11 March 2016 - Forum Rules

Main Menu

Predator Music in NES

Started by Dracula X, April 21, 2011, 10:07:08 PM

Previous topic - Next topic

Dracula X

I'm starting to understand 6502 a little but I'm getting there. This is the best way that I can explain this part.


$0000 - I only found this in nsf RAM it's the current music that's being played. You can also look for it in ROM file
to change the music that's playing for the stage.

$0796 - Square 1
$0798 - Square 2
$079A - Triangle
$079C - Noise

000147B8:   AD9507   LDA $0795
000147BB:   F030   BEQ $30
000147BD:   AD9607   LDA $0796
000147C0:   85B1   STA $B1
000147C2:   AD9707   LDA $0797
000147C5:   85B2   STA $B2
000147C7:   AD9807   LDA $0798
000147CA:   85B3   STA $B3
000147CC:   AD9907   LDA $0799
000147CF:   85B4   STA $B4
000147D1:   AD9A07   LDA $079A
000147D4:   85B5   STA $B5
000147D6:   AD9B07   LDA $079B
000147D9:   85B6   STA $B6
000147DB:   AD9C07   LDA $079C
000147DE:   85B7   STA $B7
000147E0:   AD9D07   LDA $079D
000147E3:   85B8   STA $B8
000147E5:   203987   JSR $8739
000147E8:   A900   LDA #$00
000147EA:   8D9507   STA $0795
000147ED:   206F87   JSR $876F
000147F0:   209987   JSR $8799
000147F3:   60   RTS

Here what I came up in ROM file:

$14804 - Music 1 FC87-1088-2688-188A
$14B37 - Music 2 2F8B-5F8B-938B-3A8F
$14FE6 - Music 3 DE8F-0F90-5090-5197
$1589F - Music 4 9798-B698-DC98-03A1
$1646B - Music 5 63A4-92A4-9BA4-04A5
$16310 - Music 6 08A3-11A3-1AA3-2EA4
$16B08 - Music 7 00AB-23AB-46AB-49AB
$1653D - Music 8 35A5-36A6-F4A6-90A7
$16539 - Music 9 82A8-01A9-86A9-67AA
Back to Thunder Force II hacking again.

Dr. Floppy

Would you like a translation?

000147B8:   AD9507   LDA $0795
000147BB:   F030   BEQ $30                         If the value at $795 is zero, skip the next 48 bytes (jump to $147ED).
000147BD:   AD9607   LDA $0796
000147C0:   85B1   STA $B1                         Copy the value at $796 over to $00B1.
000147C2:   AD9707   LDA $0797
000147C5:   85B2   STA $B2                         Copy the value at $797 over to $00B2.
000147C7:   AD9807   LDA $0798
000147CA:   85B3   STA $B3                         Copy the value at $798 over to $00B3.
000147CC:   AD9907   LDA $0799
000147CF:   85B4   STA $B4                         Copy the value at $799 over to $00B4.
000147D1:   AD9A07   LDA $079A
000147D4:   85B5   STA $B5                         Copy the value at $79A over to $00B5.
000147D6:   AD9B07   LDA $079B
000147D9:   85B6   STA $B6                         Copy the value at $79B over to $00B6.
000147DB:   AD9C07   LDA $079C
000147DE:   85B7   STA $B7                         Copy the value at $79C over to $00B7.
000147E0:   AD9D07   LDA $079D
000147E3:   85B8   STA $B8                         Copy the value at $79D over to $00B8.
000147E5:   203987   JSR $8739                  Jump to Subroutine at $14749.
000147E8:   A900   LDA #$00
000147EA:   8D9507   STA $0795                 Store a zero at $795.
000147ED:   206F87   JSR $876F                  Jump to Subroutine at $1477F.
000147F0:   209987   JSR $8799                  Jump to Subroutine at $147A9.
000147F3:   60   RTS                                     Return from Subroutine

As for the data from $14804-16539+, it looks like pointers to music data for each sound channel:

$14804 - Music 1 FC87-1088-2688-188A      $1480C; $14820; $14836; $14A28

Offhand, I'd suspect these addresses represent Pulse-2, Pulse-1, Triangle and Noise channel music data (respectively). The relatively large amount of Triangle data this suggests does give me pause... Does the first song in the game have a lot of funky bassline stuff?

Out of curiosity, how long have you been doing this? It's quite impressive for a n00b!

Dracula X

Thanks for the translation!

I've been doing this since 2009 or 2010 when I was looking at the hex viewer on FCEUX it see what's it's doing. Also, I was messing with X816
assembler to understand on how to locate the address.
Back to Thunder Force II hacking again.