Sound Hacking/Game Boy: Difference between revisions

From vgmrips
No edit summary
No edit summary
Line 38: Line 38:
  | <code>maincpu.b@FF8F = 0xXX</code>
  | <code>maincpu.b@FF8F = 0xXX</code>
<code>00</code> = stop sound, <code>01~15</code> = music
<code>00</code> = stop sound, <code>01~15</code> = music
|-
| Joe & Mac|| Motivetime
| <code>maincpu.b@FF81 = 0xXX</code>
<code>00~06</code> = music
  |-
  |-
  | Mighty Morphin Power Rangers || Pixel, Tom Create
  | Mighty Morphin Power Rangers || Pixel, Tom Create

Revision as of 23:36, 27 August 2023

Simple Triggers

Game Developer Music Trigger + Comments
Action Man: Search for Base X Natsume maincpu.b@CF30 = 0xXX

01 = stop sound, 03~19 = music

Alien vs. Predator: The Last of His Clan ASK Kodansha maincpu.b@C786 = 0xXX

08 = stop sound, 01~07 = music

Aguri Suzuki no F-1 Super Driving Pixel maincpu.b@CFE0 = 0xXX

0A = stop sound, 01~09 = music

Chiki Chiki Machine Mou Race Atlus maincpu.b@DE80=0x01; maincpu.b@DE81=0xXX

00 = stop sound, 01~0A, 0C = music

Cosmo Tank Atlus maincpu.b@DF80=0x01; maincpu.b@DF81=0xXX

00 = stop sound, 01~06, 20, 22, 23 = music

Croc 2 Natsume maincpu.b@FFA0 = 0xXX

01 = stop sound, 03~16 = music

DuckTales Capcom maincpu.b@FFA9 = 0xXX

4C = stop sound, 21, 41~4B = music

DuckTales 2 Make Software maincpu.b@FF8F = 0xXX

00 = stop sound, 01~15 = music

Joe & Mac Motivetime maincpu.b@FF81 = 0xXX

00~06 = music

Mighty Morphin Power Rangers Pixel, Tom Create maincpu.b@DE00 = 0xXX

00 = stop sound, 01~0B = music

Mighty Morphin Power Rangers: The Movie Tom Create maincpu.b@DEE0 = 0xXX

12 = stop sound, 01~10 = music

Power Rangers: Lightspeed Rescue Natsume maincpu.b@FFA0 = 0xXX

01 = stop sound, 03~14 = music

Power Rangers: Time Force Natsume maincpu.b@C130 = 0xXX

01 = stop sound, 03~23 = music

The Smurfs Bit Managers w@0xD95A = 0x4000+3*id

01 = stop sound, 08~19 = music

Advanced Hacks

Baby's Day Out

Notes:

  • Each ROM bank is 4000h bytes (16 KB) large.
  • The game stores 3-byte pointers in various locations: 2 bytes address (into CPU space) + 1 byte ROM bank
    These 3-byte pointers will be called "PtrB" below.
  • ROM locations below may be given in the format BB:PPPP where BB = ROM bank and PPPP = pointer into CPU space.

various ROM locations

- functions -
Load Single Track:      4401 (register DE = pointer, register C = bank)
Stop All Tracks:        2239
Start Title (1st boot): 0251 (set C0ED~EF = 04 40 0A, then call 2288)
Start Title (return):   02D6 (set C0ED~EF = 04 40 0A, then call 22EB)
Stage intro load:       2339
Stage BGM load:         08CD

- other data -
Level Pointer Bank:     05:4000 (ROM offset 14000)
Level Header Pointers:  05:4004, 3 bytes each (2 bytes pointer, 1 byte bank)
Level Header:
                        3 bytes: ?? (some PtrB)
                        3 bytes: music PtrB
                        6 bytes: level password
Song Banks:             0A:4000 (ROM offset 28000) ~ 0D:4000 (ROM offset 34000)
                        Song headers begin at xx:4004 with 3 bytes per header. (1 byte = ??, 2 bytes = pointer)
                        Song offsets are BB:4004, BB:4007, BB:400A, etc.
        Bank 0A         2 songs
        Bank 0B         5 songs
        Bank 0C         1 song
        Bank 0D         1 song

Example song pointers:
        Title           0A:4004 (bytes 04 40 0A)
        Stage 1 Intro   0C:4004 (bytes 04 40 0C)
        Stage 1 BGM     0B:4004 (bytes 04 40 0B)
        some song       0A:4007 (bytes 07 40 0A)

misc. info

Level load routine:
        1. base pointer (e.g. 4004, points to "Level Header Pointers") into RAM CC23~CC24
        2. read that PtrB (e.g. 05:4B80) -> result into RAM CC25~CC27
        3. take CC25~CC27, add 3 to get music PtrB -> C0ED~C0EF
        4. call subroutine 22EB: stops all music, copies C0ED~C0EF -> D729~D72B
        5. start music based on PtrB in D729~D72B

Hacks

Silence title screen (1st boot):
        00:025E CD 88 22        CALL    2288h   ; start song via C0ED~EF
        ->
        00:025E 00 00 00        NOP / NOP / NOP

Play song on password screen:
        write PtrB of the song header to ROM offset 14B83~14B85 (e.g. bank 0A, ptr 4004 -> write 04 40 0A)

Note: The sound driver automatically loads the song pointed to at RAM D729~D72B when the GameBoy master volume (FF24) reaches 0.

Star Ocean: Blue Sphere

offset  hex patch               description
0040C3  3E 00    -> 3E xx
0040C5  EA 69 C9 -> CD 5E 30    ;Play Music on Enix Logo
0040D2  D8       -> C9          ;Freeze Game on Enix Logo

Valid Music IDs: 01~1E