Tsumi To Batsu

Rip by Ugetab on 11/04/09
tagged by blitzlunar

A pretty standard rip. Same company made Dynamite Headdy, which is pretty much the only reason I made any attempt at it so soon. You got some track names with it because the game had a sound test with english names to go with it.

---
Thanks to the save-game contributor from GameFaqs, who allowed several tracks to be more easily ripped, and to allow for english tagging from game data

Both of these can be used with the self-loop code:

C:\gshi\emulate\n64\USFRipping\Save\TSUMI TO BATSU.pj1
80025F70
C:\gshi\emulate\n64\USFRipping\TsumiToBatsu\
80025F73

00 to 12

8003C34C

8003C260 = Music Pre-Init (00002821 0C00F098)
8003C34C = Music Init (Works with self-loop) (0C00F0D3) (A0)

8003BBCC = Ambients/SFX Init (A2)
8003B04C = Additional SFX Init (Just run this right after the first one)

Silencing music/sfx: 
At 8003C0D0, go to a JR RA
800EFBE8 = 00000000

Set PJ64 save state to Music Init address

Setup Graphics Thread Crash:
-8004DDA8 = 8FBF0010 03E00008 27BD0028
8004DDA8 = 1000FFFF

Set PJ64 save state directly to 80025F6C

80025F6C:
00000000
240400??= ADDIU A0, R0, 0x00?? (Load A0) (0-max)
3C058002= LUI A1, 0x8002 (Load A1 with initial upper address)
24A55E90= ADDIU A1, A1, 0x5E90 (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)
80A40007= LB A1, 0x0007(A1) (1 byte read, A1 for music init)
1C900003= BGTZ A1, goto next
00000000= NOP
0800F0D3= Music init (Jump)
8CA40000= LW A0, 0x0000(A1) (4 byte read, A0 init. LD = 8 bytes)
next:
8CA60000= LW A2, 0x0000(A1) (4 byte read, A0 init. LD = 8 bytes)
00002021= ADDU A0, R0, R0
0800EEF3= SFX init (Jump)
00002821= ADDU A1, R0, R0
00000000= NOP

end:
(Continue normal coding from here)

Data Style: (0x68 for space)
80000000 00000000 (Init 1)
80000000 00000001 (Init 2)

---
80025FA0 = SFX Init: (0C00EEF3 00000000 0C00EC13 00000000)

-8003C0D0 = Main Music Init (A0. Other inits exist, like for title screen)

8003C34C = Top of music init (Seems to work with self-loop) (0C00F0D3) (Can't use it for SFX init though)
8003BBCC = (0C00EEF3) (A0, A1 = 00, A2=??)


---

800EF040 = Main Menu Ambient (8D)

8003B948 = Music Init 2(A2)

80053EA8

8003C34C = Music Test Music Init

556CC = On restart
3C180 = On restart

On either valid song init, setup some code to lookup the value to use, then jump to the desired init.
Main Music Init preferred

0C00F034:

8003C0D0 = Main Music Init (A0. Other inits exist, like for main menu)
00-Within earshot
01-Risk one's neck
02-Spiral up torture
03-Blood infactor
04-Agave
05-Raid blue
06-Heroine "A"
07-Wait soon ripe
08-Ally risker's
09-Solid line
0A-From raving
0B-Dying peace
0C-Result of victory

8003BBCC = Ambients/SFX Init (A2)
80, 82(main menu)-84, 86, 88


Threads:

Kill:
8004DDA8 (Main graphics routine) (Kill: 8004DDA8 = 8FBF0010 03E00008 27BD0028)

Unsorted:

-8004E498 = JR RA
80025FB8 = Self Loop thread

8004E7C8 (Keep. Preventing run kills speed)