Custom Robo

Ripped by ugetab
tagged by Mouser_X (amended by blitzlunar)

--
73E44 = Used for music init (After title screen)
32788 = 73DF8 writer
--
(Can be expanded by using more BGTZs and subtracting 1 for the next test. Inits would then be numbered entities from data)
00-36

29B10 = Destroyed thread. Should be able to contain the data

80027198:
00000000
240400??= ADDIU A0, R0, 0x00?? (Load A0) (0-max)
3C0580??= LUI A1, 0x80?? (Load A1 with initial upper address)
24A5????= ADDIU A1, A1, 0x???? (Load A1 with initial lower address)
00042080= SLL A0, A0, 0x2
00852820= ADD A1, A0, A1
00852820= ADD A1, A0, A1 (This is used because there's 2 sets of 4 bytes. Add some for more)
8CA40000= LW A0, 0x0000(A1) (4 byte read, A0 init. LD = 8 bytes)
80A50007= LB A1, 0x0007(A1) (1 byte read, A1 for music init)
1CA00005= BGTZ A1, goto next (Fill in when it's coded once)
00000000= NOP
0C??????= Music data 1 init (0C00CC2F)
00000000= NOP
10000003= BEQ R0, R0, Goto end (Fill in when it's coded once)
00000000= NOP
next:
0C??????= Music data 2 init (0C00CDA6)
00000000= NOP
end:
(Continue normal coding from here)

Data Style:
80000000 00000000 (Init 1)
80000000 00000001 (Init 2)

80000000 00000000 80000000 00000001

(When converting, just rip them all, and let the tagger sort out any dupes...or maybe run through and put out a list of the items, and remove any full dupes that way. Could help with translation)

See if the music table equates to a lookup table for the music value? (How does it test for init?)

Manually entered the start addresses of the names into an OpenOffice Calc sheet, then used a built-on-need VB6 program to convert the addresses to a set of 2 tables, one with Music Init 1 flag set, one with Music Init 2 flag set, and then combined them into 1 table, and put them over the exited graphics routine (0x01C0 in size)

---
Remember to make note of how to turn a near-ready init-only address into a better set, by breaking on one before either set of songs.

Also note that the system used direct address references to name values for music loading.

--
Song Init from RAM:
800330BC = Song Init 1 (A0 = Reference to Song Name) (77270-77334) (Copy:774D4-77598)
80033698 = Song Init 2 (A0 = Reference to Song Name) (77348-774CC)
Names are single-byte null terminated, expanded to 4 byte boundry. Just use a For J loop on the byte(in reverse, to account for endian), inside a For I loop on the 4 byte mark. Write out a text document, as well as a location table. Remember to include the init byte info

77588 = Intro music

800271D0:
00000000
0C00CDA6 / 0C00CC2F
00000000

Intro SFX:
73DB0:
A5BFA5A4
73DD0:
A5BFA5A4

73E04:
6E616D65
73E24:
6E616D65
73E44:
01000000

77270 = Music data/SFX Data(For above)

800781E0

A0 = Section to use(Changes possible music available)
Music names: 77348-774CC

--

Threads:

Keep:
800296D8=SP 800D7AA0
80029AD8=SP 800D9AA0
800271DC=SP 80127368 (Halted)
8004AF4C=SP 80362798, 80362BC8
800546F0=SP 801529D0 (Screws up music)
8005E958=SP 80153E68
8004CC3C=SP 801512C8, 80151370 (Music init routine?)


Kill:
80029C84=SP 800DBAC0
8004BD14=SP 8012B960, 8012B9A8 (SFX Init?)



8004C034=SP 8012DB98 (subset)

=SP 
=SP 


--------
4AE70-4AF4C = music

35867C / 80057844

50A08 = Part of music init (A1=Music Speed)

5085C

5031C

4F678

80050878

487D0
4AEEC

80048CC8 = A1 can disable music from playing
80048990

800487B0

801D8D48 > 80032638

80260cb4 = part of inits?

801D8980 -> (80260cb0=00000004) - Disable initial SFX