Dragon Ball - Final Bout [SLPS-00949]

Format    : MiniPSF
Driver    : Original and tested on real hardware
Ripper    : Squaresoft74
Timing    : AceK
Ripped    : January 2020
Tracks    : #28
Artist    : Kenji Yamamoto
Platform  : PS1 (Japan)
Genre     : Fighting
Copyright : (C) 1997 TOSE, Bandai


--- History ---

v1.0 - Initial release.


--- Credits ---

AceK                : For fixing my Engrish and help with pre-ripping analysis.
BizHawk authors     : For BizHawk which was used for pre-ripping analysis.
krHACKen            : For getting me started with MIPS assembly.
Loveemu             : For his PSF ripping guide.
Martin Korth        : For no$psx which was used for debugging.
Mednafen author     : For Mednafen which was used for debugging.
Nisto               : For his Python scripts allowing fast PSF/MiniPSF set building.
Neill Corlett       : For the PSF format and tools.
Someone42           : For his PSF ripping guide.


--- Notes ---

At the time of release, not all PSF players / PS1 emulators play all tracks properly.
It's most noticeable with the end portion of "Title Screen".
There's no such issue when playing this rip on real hardware.


[PSF driver v1.0 infos]


--- Source executable ---

SLPS_009.49 (CRC32: 1E6517BC)


--- EXE settings ---

Text section start       : 0x80010000
Text section size        : 0x000A9800
Initial program counter  : 0x80010B98
Initial stack pointer    : 0x801FFFF0


--- Data import addresses ---

0x8003E000 : .seq file
0x80078000 : .vb  file


--- Patches ---

"main" (sub_80010C54):

80010C5C: jal   0x80013464	# InitialSound
80010C60: nop
80010C64: li    $a0, 0x3F80	# Main volume left
80010C68: jal   0x8001B794	# SpuSetCommonMasterVolume
80010C6C: li    $a1, 0x3F80	# Main volume right
80010C70: li    $a0, 0x0001
80010C74: li    $a1, 0x0004	# Reverb type 4
80010C78: move  $a2, $0
80010C7C: move  $a3, $0
80010C80: jal   0x80013930	# SsUtSetReverbType
80010C84: nop
80010C88: lui   $a0, 0x8002
80010C8C: ori   $a0, 0xBBB0	# SNTp address (0x8002BBB0)
80010C90: jal   0x8001350C	# SNTp load (write SNTp addresses pointers to 0x80035030 and 0x80035038)
80010C94: nop
80010C98: li    $a0, 0x1100	# SPU RAM samples bank address (0x1100) 
80010C9C: jal   0x800136A0	# Write SPU RAM samples bank address pointer (0x1100) to 0x80035034
80010CA0: move  $a1, $0		# Must be zero
80010CA4: li    $a0, 0x1100	# SPU RAM samples bank destination address (0x1100)
80010CA8: jal   0x8001A4F8	# SpuSetTransferStartAddr
80010CAC: nop
80010CB0: lui   $a0, 0x8007
80010CB4: ori   $a0, 0x8000	# Main RAM samples bank address (0x80078000)
80010CB8: lui   $a1, 0x0004
80010CBC: ori   $a1, 0x1800	# Samples bank size 0x41800 (must be 0x800 multiple)
80010CC0: jal   0x8001A33C	# SpuWrite
80010CC4: nop
80010CC8: lui   $a0, 0x8003
80010CCC: ori   $a0, 0xE000	# Sequence address (0x8003E000)
80010CD0: li    $a1, 0x0000	# Vab ID
80010CD4: lui   $a2, 0x8003
80010CD8: ori   $a2, 0xBED0	# Playback area (0x8003BED0)
80010CDC: jal   0x8001400C	# Load sequence
80010CE0: nop
80010CE4: move  $a0, $0		# Must be zero
80010CE8: li    $a1, 0x0064	# Playback volume left
80010CEC: jal   0x80013800	# Set playback volume
80010CF0: li    $a2, 0x0064	# Playback volume right
80010CF4: move  $a0, $0		# Must be zero
80010CF8: jal   0x80014580	# Enable playback
80010CFC: nop
80010D00: lui   $a0, 0x8001
80010D04: addiu $a0, 0x4860	# Playback routine (sub_80014860)
80010D08: sh    $0, 0x0110($gp) # Write 0x0000 to 0x80034FE4
80010D0C: jal   0x8001BE60	# VSyncCallback
80010D10: nop
80010D14: b     0x80010D14	# Branch here forever (patch with 0x1000FFFF)
80010D18: nop


[Bgm files infos]

Sequences are custom.
Bgm-21~29 are found in STEP999.BIN.
Bgm-03~20 and Bgm-30 are found in BTCHARA.DAT but compressed (Psdp).
Those are unpacked from 0x80035298 to 0x801EC000 in sound test menu.
I used it to extract them uncompressed via RAM dumps.

Vab header is custom (SNTp) too and located at 0x0001C3B0 in the main executable.
It's found at 0x8002BBB0 in main RAM.

Vab body is found in VABDATA.BIN.
