News:

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

Main Menu

[SM] Customizing Super Metroid's Game Over Screen

Started by Mar99troid, August 23, 2017, 04:30:46 PM

Previous topic - Next topic

Mar99troid

Hey, hello everybody.
Wanting to edit the game over screen in my hack I soon found out that the game over screen uses palette 765E0-0F together with the file select screen and I stumbled upon the game over screen document by begrimed and Digital_Mantra:
http://www.metroidconstruction.com/SMMM/game_over_screen.rtf

It's quite interesting, but unfortunately it doesn't show exactly which letter belongs to which bytes so I made my own list after trying out all the possibilities I could think of:

EDIT: I TESTED IT AND THIS WORKS FOR OFFSETS 9304, 9334, 937E AND 93CC:
[spoiler]A = 6A 00
B = 6B 00
C = 6C 00
D = 6D 00
E = 6E 00
F = GF 00
G = 70 00
H = 71 00
I = 72 00
J = 73 00
K = 74 00
L = 75 00
M = 76 00
N = 77 00
O = 78 00
P = 79 00
Q = 7A 00
R = 7B 00
S = 7C 00
T = 7D 00
U = 7E 00
V = 7F 00
W = 80 00
X = 81 00
Y = 82 00
Z = 83 00
  = 0F 00
! = 84 00
? = 85 00
( = 8A 00
) = 8B 00[/spoiler]

Now is there a way to edit the background (not only changing the palette) or to get rid of the Metroid Larva and that "chirping" sound effect? Maybe somebody knows where the graphic for the larva is located.
And although it's not that important and I see no reason to change something there but maybe somebody could find out how to edit the text in the other offsets, which seems to be more difficult since you only have "game over", "yes" and "no" as an example. I'll try to get to it when I have the time.

EDIT: I'm done trying it with the other offsets. Here's everything I found out so far. I'm very unsure about lines marked with "??". Use at your own risk. Feel free to post additions/corrections. (At least I was able to replace "Yes" with "Yeah" and "No" with "Nah" :lol: ):

Offset: 92DC (must be same as 92F0) , 93A0 (must be same as 9376) and 934C (must be same as 93C4)
[spoiler]A = 0A 00
B = 0B 00 ??
C =
D = 0D 00 ??
E = 0E 00
F =
G = 0C 00
H = 21 00
I = 22 00 ??
J = 23 00 ??
K = 24 00
L = 25 00 ??
M = 26 00
N = 27 00
O = 00 00
P =
Q =
R = 0D 00
S = 2B 00
T = 2C 00 ??
U =
V = 2D 00
W = 40 00 ??
X = 40 00 ??
Y = 41 00
Z = 42 00 ??
  = 0F 00[/spoiler]

Offset: 92F0 (must be same as 92DC), 9376 (must be same as 93A0) and 93C4 (must be same as 934C)
[spoiler]A = 1A 00
B = 1B 00 ??
C = 1C 00 ??
D = 1D 00 ??
E = 1E 00
F = 1F 00 ??
G = 30 00
H = 31 00
I = 32 00 ??
J = 33 00 ??
K = 34 00
L = 35 00 ??
M = 36 00
N = 37 00
O = 10 00
P = 38 00 ??
Q = 39 00 ??
R = 3A 00
S = 3B 00
T = 3C 00 ??
U = 3D 00 ??
V = 3E 00
W = 3F 00 ??
X = 3F 00 ??
Y = 17 00
Z = 40 00 ??
  = 0F 00[/spoiler]

PHOSPHOTiDYL

Your post help me find the game over screen, so here's some quick data.
LDY gets your tilemap. LDX is position in ram. JSR $B3E2 is the draw routine.

The draw routine is used for the file select menu as well.
It reads $FFFE, then $FFFF. If only one row, then you end with $FFFF.

Just flip every two bytes & there's your tile.
As for the metroid larva, might be the same gfx location, haven't found the routine yet.

EA EA EA EA EA EA EA EA @ 009250 to remove the haze.

$819206 A0 DC 92    LDY #$92DC         ;//gameoverscreen
$819209 A2 56 01    LDX #$0156         ;//position
$81920C 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$81920F A0 04 93    LDY #$9304         ;//gameoverscreen
$819212 A2 8A 03    LDX #$038A         ;//position
$819215 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$819218 A0 34 93    LDY #$9334         ;//gameoverscreen
$81921B A2 14 04    LDX #$0414         ;//position
$81921E 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$819221 A0 4C 93    LDY #$934C         ;//gameoverscreen
$819224 A2 CE 04    LDX #$04CE         ;//position
$819227 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$81922A A0 A0 93    LDY #$93A0         ;//gameoverscreen
$81922D A2 CE 05    LDX #$05CE         ;//position
$819230 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile

;//[GFX @ 1B4000]
$8192DC   ;//[GAME OVER]
0C 00 0A 00 26 00 0E 00 0F 00 00 00 2D 00 0E 00 0D 00 FE FF
30 00 1A 00 36 00 1E 00 0F 00 10 00 3E 00 1E 00 3A 00 FF FF

$819304   ;//[FIND THE METROID LARVA!]
6F 00 72 00 77 00 6D 00 0F 00 7D 00 71 00 6E 00 0F 00 76 00 6E 00 7D 00 7B 00 78 00 72 00 6D 00 0F 00 75 00 6A 00 7B 00 7F 00 6A 00 84 00 FF FF

$819334   ;//[TRY AGAIN?]
7D 00 7B 00 82 00 0F 00 6A 00 70 00 6A 00 72 00 77 00 0F 00 85 00 FF FF

$81934C   ;//[YES (RETURN TO GAME)]
41 00 0E 00 2B 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 FE FF
17 00 1E 00 3B 00 0F 00 8A 00 7B 00 6E 00 7D 00 7E 00 7B 00 77 00 0F 00 7D 00 78 00 0F 00 70 00 6A 00 76 00 6E 00 8B 00 FF FF

$8193A0   ;//[N O (GO TO TITLE)]
27 00 0F 00 00 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 0F 00 FE FF
37 00 0F 00 10 00 0F 00 8A 00 70 00 78 00 0F 00 7D 00 78 00 0F 00 7D 00 72 00 7D 00 75 00 6E 00 8B 00 FF FF

PHOSPHOTiDYL

Larva palette is 013D97 3F in I'm a genius.
The larva animation, not the tank it's in, is 013C27-013D96, $0170 bytes.

Left column is animation timer.
Middle might be tile, but it doesn't match any pattern I'm used to, so idk.
Next column is all the palette changes to get the glow effect.
The few bits on the right are for sound, & $FFFF to end it.

ORG $819239 : JSL $82BB75 from the last routine I posted.

$82BB75 is what's getting the animation below.
It's using enemy ram instructions, so I'm guessing it's early super metroid code.

0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 0C BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 15 BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 1E BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD FF FF



PHOSPHOTiDYL

From $82BB75.

$82BBC5 : JSL $81891F        ;//larva
$82BBD7 : JSL $81891F        ;//container

From $81891F.

$81892B : LDY $C569,x        ;//from $82 due to PEA

That's loading a list of pointers up until it reaches $0000??
This is data I don't have, so no clue.

Some of the first pointers seem to affect the samus death animation, pointing to data before these pointers.
Then there's a shift @ 0145C1, & pointers are pointing to data beyond the table.

Somewhere in that mess is the game over screen stuff...

Mar99troid

Quote from: PHOSPHOTiDYL on August 24, 2017, 05:32:55 AM
LDY gets your tilemap. LDX is position in ram. JSR $B3E2 is the draw routine.

It reads $FFFE, then $FFFF. If only one row, then you end with $FFFF.

Just flip every two bytes & there's your tile.

$819206 A0 DC 92    LDY #$92DC         ;//gameoverscreen
$819209 A2 56 01    LDX #$0156         ;//position
$81920C 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$81920F A0 04 93    LDY #$9304         ;//gameoverscreen
$819212 A2 8A 03    LDX #$038A         ;//position
$819215 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$819218 A0 34 93    LDY #$9334         ;//gameoverscreen
$81921B A2 14 04    LDX #$0414         ;//position
$81921E 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$819221 A0 4C 93    LDY #$934C         ;//gameoverscreen
$819224 A2 CE 04    LDX #$04CE         ;//position
$819227 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile
$81922A A0 A0 93    LDY #$93A0         ;//gameoverscreen
$81922D A2 CE 05    LDX #$05CE         ;//position
$819230 20 E2 B3    JSR $B3E2  [$81:B3E2]   ;//drawtile

Ok, this might be a noob question, but with what do you exchange the values next to LDY and LDX? For example, what do I do when I want to draw a specific tile on the cordinates X=2 and Y=2 (SMILE coordinates on a single screen)? Sorry, I don't know much about assembly yet. (I only know the LDA command)

Quote from: PHOSPHOTiDYL on August 24, 2017, 06:10:24 AM
The larva animation, not the tank it's in, is 013C27-013D96, $0170 bytes.

Left column is animation timer.
Middle might be tile, but it doesn't match any pattern I'm used to, so idk.
Next column is all the palette changes to get the glow effect.
The few bits on the right are for sound, & $FFFF to end it.

ORG $819239 : JSL $82BB75 from the last routine I posted.

$82BB75 is what's getting the animation below.
It's using enemy ram instructions, so I'm guessing it's early super metroid code.

0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 0C BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 15 BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
0A 00 65 00 97 BD
0A 00 66 00 97 BD
0A 00 67 00 97 BD
0A 00 66 00 97 BD
06 00 65 00 B7 BD 1E BC
05 00 66 00 D7 BD
04 00 67 00 F7 BD
03 00 66 00 D7 BD
02 00 65 00 B7 BD
03 00 66 00 D7 BD
04 00 67 00 F7 BD
05 00 66 00 D7 BD FF FF





I replaced all of this with the following bytes shown in the spoiler (changing the middle and right column to a bunch of zeros and leaving out the sound bytes by adding FF's at the end) and this was the result:

[spoiler]0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
06 00 00 00 00 BD
05 00 00 00 00 BD
04 00 00 00 00 BD
03 00 00 00 00 BD
02 00 00 00 00 BD
03 00 00 00 00 BD
04 00 00 00 00 BD
05 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
06 00 00 00 00 BD
05 00 00 00 00 BD
04 00 00 00 00 BD
03 00 00 00 00 BD
02 00 00 00 00 BD
03 00 00 00 00 BD
04 00 00 00 00 BD
05 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
0A 00 00 00 00 BD
06 00 00 00 00 BD
05 00 00 00 00 BD
04 00 00 00 00 BD
03 00 00 00 00 BD
02 00 00 00 00 BD
03 00 00 00 00 BD
04 00 00 00 00 BD
05 00 00 00 00 BD
FF FF FF FF FF FF FF FF[/spoiler]

http://fs5.directupload.net/images/170824/rsa4vax9.png

(I edited the text to fit the story of my hack.) No chirping sound is playing and it doesn't crash.  :grin: Now I just need to get rid of that tank and that yellow "thing".

Quote from: PHOSPHOTiDYL on August 24, 2017, 06:35:27 AM
From $82BB75.

$82BBC5 : JSL $81891F        ;//larva
$82BBD7 : JSL $81891F        ;//container

$82BBC5 is 22 1F 89 81 A9 00 0A 85 03 A9 64 00 A2 7C 00 A0 50 00 so what do I do with these bytes? And where do the bytes from $82BBD7 end?

Mar99troid

Ok, the character list I posted before works for all of these offsets:
9304 (FIND THE METROID LARVA!),
9334 (TRY AGAIN ?),
937E (RETURN TO GAME),
93CC (GO TO TITLE)
.
I tested it, even ! and ? work in lines they weren't supposed to be in the original game. However, the other offsets are way more difficult to edit, since both offsets for the line have to be correct in order to show the letter correctly. I'll play around with it.