News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Minor HUD edits

Started by CrAzY, August 07, 2014, 04:37:41 PM

Previous topic - Next topic

CrAzY

Work on my SM Beta hack is chugging along smoothly, but I've been stuck with these two problems.

I want the reserve tanks icon ("Auto" with 2 arrows) to only have the top arrow. Opening up TLP shows us that the game simply copies & flips the top arrow gfx for the bottom one, so I can't simply blank it out. I am guessing some line of code needs to be nulled out to get it to stop drawing?

Also, how would I go about pointing the Energy value to use different numerical gfx? Some of the beta builds show that the Energy numbers have an italic looking font to them while the numbers for Missiles/PB's are the retail ones.

Thanks!

Smiley

For the reserve tank, open your ROM in a hex editor and go to 1993. You should see 33 BC 46 BC. Replace that with 0F 2C 0F 2C.
Then go to 199F where you should see 33 AC 46 AC. Replace with 0F 2C 0F 2C.
That should do it. :^_^:

CrAzY

Excellent! May I ask what exactly is changed? Is this stopping it from drawing, moving it, or what? Also, is the second chunk of code handling the arrow when it's highlighted yellow? Sorry to ask, just like knowing what is actually going on.

Thanks again for the lightning fast reply. I love this place!

Smiley

It changes the tilemaps, so the lower arrow is replaced with blank tiles.
The first one is used when the arrow is yellow, the second when there's 0 reserve energy.

Quote58

#4
Nvm

CrAzY

#5
Thanks for the explanation, SMILE.

& thank you as well, Quote. That is a bit over my head at the moment (not the details, but working with asm) , but it is good to know what will have to be done. Also, the "italic" numbers are still within the game at TLP offset 75600.
Which makes me want to ask another question. That "debug" game crashing screen uses the italics & an early Energy symbol. Is there anyway to force enable that setup (as it seems to exist already?)
Not that it matters much as I have already recreated most of the older HUD, but still interesting.

Smiley

Looking through PJ's log of bank $80, I found this:
(HUD routine when game is paused/running)

$809BEE A9 BF 9D    LDA #$9DBF                  ;\
$809BF1 85 00       STA $00    [$7E:0000]       ;} $00..$02 = pointer to other (identical) digit tiles
$809BF3 A2 8C 00    LDX #$008C                  ;\
$809BF6 A5 12       LDA $12    [$7E:0012]       ;} Draw non-E-tank energy count
$809BF8 20 98 9D    JSR $9D98  [$80:9D98]       ;/


The LDA #$9DBF points to the digit tilemap values for health (and health only :grin:). You will have to copy the beta numbers from 75600 to D3200, replacing one of the number sheets. Then just edit the tilemap at $80:9DBF accordingly. ($80:9DD3 is the start of the tilemap for the weapon digits)

CrAzY

#7
Beautiful! I had a feeling they would have left it in there. This is just excellent, as I now have the HUD pretty much done! Thanks for the quick resolution.

Edit : @JAM's reply below

Glad I wasn't the only one to notice the 1993. Funny how that'd be the location of an obvious beta element. Once I travel back there, don't worry, I'll nab multiple versions & warn Gumpei!

JAM