Credits

From TLoZ: ALTTP Hacking Resources
Jump to: navigation, search

Wishes

  • 0x742E1 to 0x74303 (34) = Pointers for wishes. Comes in pairs of two in little endian. 16 screens and 17 pointers. The spare pointer serves to mark the end.
00 00 3C 00 68 00 AA 00 E8 00 28 01 5B 01 98 01
CF 01 07 02 42 02 7D 02 B0 02 EA 02 22 03 52 03 
95 03
  • 00 00 = First screen (Return of the King)
  • 3C 00 = Second screen (Sanctuary)
  • 68 00 = Third screen (Village)

Basically the data for the pointers to the screens are:

  • 0x73F4C + 000x73F4C + 3C - 1
  • 0x73F4C + 3C0x73F4C + 68 - 1
  • And so forth.

Credits

To parse the ending credits data (scrolling credits), I'll take this one as an example:

  • 0x7317A = EXECUTIVE PRODUCER
0x73170 - XX XX XX XX XX XX XX XX 07 23 3C 4F 3C 3A 4C 4B
0x73180 - 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49 FF XX XX XX
  • 07 = start from the 7th tile from the left of the screen (Note scrolling credits have no vertical position, and return of the king section have them hardcoded)
  • 23 = ($23 + $1) / $2 = $12 bytes to read
  • Then read $12 bytes - 3C 4F 3C 3A 4C 4B 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49

For each 12 bytes look up the table definition and draw the character on screen at the position.

Now to pointers to the data.

Pointers start at 0x7393D

Data around there is as follows:

94 91 9B 97 8D 8B 9F 9B 83 8F 83 86 83 00 00 14
00 14 00 14 00 15 00 27 00 14 00 14 00 14 00 14
00 14 00 14 00 14 00 14 00 39 00 14 00 14 00 14

That 00 00, is a relative position to 0x73178, funnily enough, the next value is 14 00, which points straight to the $FF! $FF is a special placeholder to show a blank line (as the game's engine does)

In other words from the above

00 00 = EXECUTIVE PRODUCER
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
15 00 = NAME FIRST LINE
27 00 = NAME SECOND LINE
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
14 00 = BLANK
39 00 = NEXT LABEL (forgot what it is)
14 00 = BLANK
14 00 = BLANK
...

This continues until the last pointer at 0x73C4F, so the data ends at 0x73C50 (0x73C51 has assembly!) -- you'll notice that the lines with the death counts have the place names written this way but not the actual number. That bit is hardcoded.

So the next thing is what about the RETURN OF THE KING data? (puns) There's 4 byte control code rather than two in the credits area.

For the line THE RETURN OF THE KING, the data actually starts 4 bytes before 0x73F50 at 0x73F4C @0x73F40

30 A9 FF 9D 02 10 A9 01 85 14 AB 60 62 65 00 2B
2D 21 1E 9F 2B 1E 2D 2E 2B 27 9F 28 1F 9F 2D 21
1E 9F 24 22 27 20 62 E9 00 19 64 75 6E 71 68 61
62 65 00 2B
62 E9 00 19
63 09 00 19
62 EB 00 11
63 0B 00 11

First + second byte are related to the position of the data (16 bytes BIG endian) - to actually control the starting location of the text, you would subtract 2ONE for every tile you want to move left (62 64), and add 2ONE if you want to move it right (62 66). I could go into SNES screen positioning tutorial but that would just bore you, but I can assure this this goes straight into a DMA RAM area to the GPU.

  • 3rd byte is always - 00 (the code ANDs them out anyway lol)
  • 4th byte - length - formula is (value + 1) / 2 in terms of text to read after that byte just like the above. So the first line we would read $16 bytes (THE RETURN OF THE KING)
(Source: Euclid)

Table

The game contains a table to store all of its characters. The table's location for each region is as follows.

JP
0x75A68 (0xA0)
(Source: SmallHacker)

Navigate

Table of Contents
SpritesDungeonsOverworldUnderworldSRAM MapRAM MapROM MapMusicMonologueCreditsDumpsMiscellaneousTo-Do/Suggestions