Jump to content

Photo

Hardcoded zero in Dig Dug score

Dig Dug 2600

5 replies to this topic

#1 NostAlgae37 OFFLINE  

NostAlgae37

    Chopper Commander

  • 145 posts

Posted Thu Mar 21, 2019 2:21 AM

Hi, where do I find the location of the last digit of the Dig Dug score?  I was using Hack-O-Matic to change the score font to match the arcade version of the game, but I noticed after doing so that the final digit of the score remains the same (see screenshot below), so it must be stored some other way than as graphics.  And if so, is it even possible to alter it?  Thanks.

 

Attached Thumbnails

  • Dig_Dug_ 35th_Anniv_Ed_8.png


#2 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 24,031 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Thu Mar 21, 2019 3:27 AM

icon_idea.gif The '0' graphics are not stored as data. Instead the code loads the immediate values, pushes them onto the stack and pulls them for drawing.
 

L9194
    ldx     #$cd                    ;2  stack pointer, do NOT touch this value!
    txs                             ;2        
    lda     #$6c                    ;2  2nd line
    pha                             ;3        
    lda     #$c6                    ;2  middle line, repeated 3x      
    pha                             ;3        
    pha                             ;3        
    pha                             ;3        
    lda     #$6c                    ;2  last but one line      
    pha                             ;3        
    lda     #$38                    ;2  first AND and last line!      
    pha                             ;3  first line at bottom of stack (pulled first)      
    sta     ram_CE                  ;3  last line at top of stack (pulled last)


#3 NostAlgae37 OFFLINE  

NostAlgae37

    Chopper Commander

  • Topic Starter
  • 145 posts

Posted Thu Mar 21, 2019 1:33 PM

OK, but after I altered all of the graphics for the score digits (including the zero), why does the last digit (which is always a zero) continue to look like the old font instead of the new font (the first 2 zeros in the screenshot above)?  Is there another zero graphic located somewhere else in the rom that I missed (I thought that all of the score numerals were stored in a row in one place)?


Edited by NostAlgae37, Thu Mar 21, 2019 1:33 PM.


#4 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 24,031 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Thu Mar 21, 2019 1:45 PM

You got me wrong. The last zero exists only as code, not as data/graphic. So you have to change the code to change the last zero.



#5 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,931 posts
  • Location:The land of Gorch

Posted Thu Mar 21, 2019 2:16 PM

Change the 2 #$6C values shown in the code snippet to be #$4C and #$64.

 

You'll see them at $0198 and $01A0 when using a bithacker.


Edited by Nukey Shay, Thu Mar 21, 2019 2:19 PM.


#6 NostAlgae37 OFFLINE  

NostAlgae37

    Chopper Commander

  • Topic Starter
  • 145 posts

Posted Fri Mar 22, 2019 12:14 AM

Thanks Nukey, that fixed it.  :)

Attached Thumbnails

  • Dig_Dug_ 35th_Anniv_Ed_2.png

Edited by NostAlgae37, Tue Mar 26, 2019 11:20 PM.






Also tagged with one or more of these keywords: Dig Dug, 2600

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users