Looks like GoldS updated the list to document the duplicates. The indexes are all the same, if you add 43 to the normal ones. I suspect this is probably used as the alternate version for switch block levels, which would mean every level can be switched arbitrarily. The implications are quite delicious, so we'll have to wait and see how it works out.
__________
At 0x000534 (00:0534), waaaaaay at the beginning of the ROM file, is a list of pointers (86 entries) for course numbers. What exactly do those pointers point to, you ask? Get ready to facepalm:
00:058A 3E 01 ld a,01
00:058C C9 ret
00:058D 3E 02 ld a,02
00:058F C9 ret
00:0590 3E 03 ld a,03
00:0592 C9 ret
00:0593 3E 04 ld a,04
00:0595 C9 ret
00:0596 3E 05 ld a,05
00:0598 C9 ret
(And so on...)
The game program loads the address, jumps to it, and executes the code there... which just in turn loads the course number via immediate data. They could have, oh, I dunno, used a list of bytes containing the course numbers in place of this code pointer->load code business, but they wanted to keep it fresh. 
They used 5 bytes of ROM data to represent 1 byte of information per level.
These ld+ret blocks continue sequentially all the way up to 40, so to simplify course number translation, you can take the address from the table and process it with this formula: Course = (Address - 0x0587) / 3
As usual, the indexes are the same as for the other tables. Mt. Teapot 1, Course No. 7, has an index of 6, at which position is $059C. This becomes 0x059C - 0x0587 = 21 / 3 = 7.
_________
At 0x033E73 (0C:7E73) is a table of 43 pointers for level music. The data immediately following the pointers specifies the musics themselves, and the only ones present are the ones used in the final game. Their values and not-very-helpful names are as follows:
$7EC9 = Lake
$7ED5 = Beach 1
$7EE1 = Cave 1
$7EED = Cave 2
$7EF9 = Train
$7F05 = Boss Level
$7F11 = Cave 3
$7F1D = Cave 4
$7F29 = Beach 2
$7F35 = Cave 5
$7F41 = Syrup Castle
$7F4D = Cave 6
$7F59 = Sherbet Land
The music "definitions" look like they take up 12 bytes each, putting the next one at $7F65, but that crashes the game, so there certainly isn't any music defined there.
__________
Originally posted by Aeonic Butterfly
GuyPerfect, for starters, you are awesome.
I long suspected as such! But it's good to have a second opinion. 
Originally posted by Aeonic Butterfly
Also, I'd be interested in a beginner's course. I once upon a time had a tiny bit of this knowhow (I could convert codes from Pokemon Red/Blue to Yellow), but that's been many, many years now. I understand Hex, and that's about it.
Well, hex is definitely something you'll need. Let me think on how to establish some lessons and I'll bring it up again later.
|