How to get another song play on another act

Discussion in 'Engineering & Reverse Engineering' started by Dracula, Nov 10, 2007.

Thread Status:
Not open for further replies.
  1. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    This guide will show you how to get another song playing on act 2 instead of both songs playing on 2 acts. First go to Level_GetBgm in ASM and you will see this:
    Code (Text):
    1. Level_GetBgm:
    2.          tst.w  (Demo_mode_flag).w
    3.          bmi.s  loc_4114
    4.          moveq  #0,d0
    5.          move.b (Current_Zone).w,d0
    6.          lea    MusicList(pc),a1
    7.          tst.w  (Two_player_mode).w
    8.          beq.s  Level_PlayBgm
    9.          lea    MusicList2(pc),a1
    Change it to this:
    Code (Text):
    1. Level_GetBgm:
    2.        tst.w    (Demo_mode_flag).w
    3.        bmi.s    loc_4114
    4.        moveq    #0,d0
    5.        move.w   (Current_ZoneAndAct).w,d0
    6.        ror.b    #1,d0
    7.        lsr.w    #7,d0
    8.        lea  (MusicList).l,a1
    9.        tst.w    (Two_player_mode).w
    10.        beq.s    Level_PlayBgm
    11.        lea  MusicList2(pc),a1
    Now in S3K ASM, go to LevelMusic_Playlist:
    Code (Text):
    1. dc.b    1,   2  ; DATA XREF: ROM:0000620Eo
    2.                 ; sub_85B60+Co
    3.          dc.b   3,   4
    4.          dc.b   5,   6
    5.          dc.b   7,   8
    6.          dc.b   9,  $A
    7.          dc.b   $B,  $C
    8.          dc.b   $D,  $E
    9.          dc.b   $F, $10
    10.          dc.b  $11, $12
    11.          dc.b  $13, $14
    12.          dc.b  $15, $15
    13.          dc.b  $16, $17
    14.          dc.b  $1A, $1A
    15.          dc.b  $1C, $15
    16.          dc.b  $20, $20
    17.          dc.b  $21, $21
    18.          dc.b  $22, $22
    19.          dc.b  $23, $23
    20.          dc.b  $24, $24
    21.          dc.b  $1E, $1E
    22.          dc.b  $1B, $1B
    23.          dc.b  $1D, $1D
    24.          dc.b  $19, $14
    25.          dc.b  $17, $14
    Now the last part is go to music playlist in S2ASM and add this:
    Code (Text):
    1. MusicList:
    2.      dc.b   2+$80 , ?+$80 ; 0; EHZ
    3.      dc.b   2+$80  ; 1
    4.      dc.b   5+$80  ; 2
    5.      dc.b   4+$80  ; 3
    6.      dc.b   5+$80  ; 4; MTZ1,2
    7.      dc.b   5+$80  ; 5; MTZ3
    8.      dc.b  $F+$80  ; 6; WFZ
    9.      dc.b   6+$80  ; 7; HTZ
    10.      dc.b $10+$80  ; 8
    11.      dc.b  $D+$80  ; 9
    12.      dc.b   4+$80  ; 10; OOZ
    13.      dc.b  $B+$80  ; 11; MCZ
    14.      dc.b  $9+$80  ; 12; CNZ
    15.      dc.b  $E+$80  ; 13; CPZ
    16.      dc.b  $A+$80  ; 14; DEZ
    17.      dc.b   7+$80  ; 15; ARZ
    18.      dc.b  $D+$80  ; 16; SCZ
    19.      dc.b   0  ; 17
    Did you see that question mark that I added? That means you can choose any song that you want for act 2. Credits goes to S3KASM!

    I hope someone understand this.
     
  2. Hayate

    Hayate

    Tech Member
    Don't forget to also add numbers for all the other zones 2nd acts, or everything will get desynced.
     
  3. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Wow, they did that pretty cleverly. I would have just checked against act directly (with a cmp) and loaded a different list depending on the act.
     
  4. SMTP

    SMTP

    Tech Member
    I would have done the same..

    Cinossu Edit: Grammar nazi ahoy. (Sorry, couldn't resist. :x)
     
  5. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    10
    18
    United Kingdom
    YouTuber
    I would have used the CMP too. I can't use this anyway, I don't use xeno's disassembly. I could easily convert it though, if I decided to put this in my hack. Seeming as I can't do music anyway, I doubt I will =P
     
  6. Liliam

    Liliam

    Previously Fred Oldbie
    1,563
    117
    43
    ASDFGASDSFGSD
     
  7. SMTP

    SMTP

    Tech Member
    o lul. quit breaking my posts.
     
  8. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    10
    18
    United Kingdom
    YouTuber
    That isn't even good English; let alone Grammar =P
     
Thread Status:
Not open for further replies.