SHARE
TWEET

FlashBack MSU1 Patch Source Code

LuigiBlood Feb 22nd, 2013 212 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. arch snes.cpu
  2.  
  3. //Flashback MSU1 Patch for USA version.
  4. //By Seru-kun/LuigiBlood
  5. //226D8 = Music Table
  6.  
  7. macro seek n
  8.   org {n} & 0x3fffff
  9.   base {n}
  10. endmacro
  11.  
  12. {seek $C2012B}
  13.  
  14.         jsl music1
  15.  
  16. {seek $C22349} //22349
  17.  
  18.         jsl music1
  19.        
  20. {seek $C22352}
  21.  
  22.         jsl music2
  23.  
  24. {seek $C2235C}
  25.  
  26.         jsl music2
  27.        
  28. {seek $c2016c}
  29.  
  30.         jsl music3
  31.        
  32. {seek $c22322}
  33.  
  34.         jsl music3
  35.  
  36. {seek $E00000} //200000
  37.  
  38. music1:
  39.         pha
  40.         php
  41.         jsr msu1_check
  42.         bne music1_normal
  43.         lda $1eaf
  44.         cmp #$03
  45.         beq music1_normal
  46.         jml music2_yes
  47.         plp
  48.         pla
  49.         rtl
  50. music1_normal:
  51.         plp
  52.         pla
  53.         jml $D90101
  54.        
  55.  
  56. music2:
  57.         pha
  58.         php
  59.         jsr msu1_check
  60.         bne music2_no
  61.         bra music2_yes
  62.  
  63. music2_no:
  64.         plp
  65.         pla
  66.         jml $d904fd
  67.        
  68. music2_yes:
  69.         lda $c226d8,x
  70.         and #$7f
  71.         clc
  72.         adc $1eaf
  73.         sta $2004
  74.         stz $2005
  75. loop:
  76.     lda $002000
  77.         and #$40
  78.         bne loop
  79.  
  80.         lda #$ff
  81.         sta $2006
  82.         lda $c226d8,x
  83.         bmi music2_repeat
  84.         lda #$01
  85.         sta $2007
  86.         plp
  87.         pla
  88.         rtl
  89.  
  90. music2_repeat:
  91.         lda #$03
  92.         sta $2007
  93.         plp
  94.         pla
  95.         rtl
  96.        
  97. music3: //Stop
  98.         pha
  99.         phx
  100.         php
  101.         jsr msu1_check
  102.         bne music3_no
  103.         stz $2007
  104. music3_no:
  105.         plp
  106.         plx
  107.         pla
  108.         jml $d94c16
  109.        
  110.  
  111. msu1_check:
  112.         sep #$20
  113.         lda $2002
  114.         cmp #$53 //'S'
  115.         bne msu1_no
  116.         lda $2003
  117.         cmp #$2d //'-'
  118.         bne msu1_no
  119.         lda $2004
  120.         cmp #$4d //'M'
  121.         bne msu1_no
  122.         lda $2005
  123.         cmp #$53 //'S'
  124.         bne msu1_no
  125.         lda $2006
  126.         cmp #$55 //'U'
  127.         bne msu1_no
  128.         lda $2007
  129.         cmp #$31 //'1'
  130.         bne msu1_no
  131.         bra msu1_yes
  132. msu1_no:
  133.         lda #$01
  134.         rts
  135. msu1_yes:
  136.         lda #$00
  137.         rts
  138.  
  139. {seek $c226d6}
  140. //c22756 - Cutscene Music Table
  141. //Action Replay Codes:
  142. //Cutscene Modifier: 00021D?? (?? = Cutscene Entry)
  143. //
  144. //Music Modifier: D904F9?? (?? = Music Entry)
  145. //00 00 - Logo 0
  146. //01 00 - Intro 1
  147. //02 00 - Theme 2
  148. //03 00 - Reunion 3
  149. //03 01 - Memory 4
  150. //03 02 - Wake Up 5
  151. //03 03 - Jingle (Get Ready) 6
  152. //03 04 - Jingle (Mission) 7
  153. //03 05 - Jingle (Nearby) 8
  154. //03 06 - Jingle (New Washington) 9
  155. //03 07 - Item Fanfare 10
  156. //03 08 - Ending + Credits 11
  157. //03 09 - Fall 12
  158. //03 0A - Desintegration 13
  159. //Added Songs:
  160. //03 0B - Give Item 14
  161. //03 0C - Bridge 15
  162. //03 0D - Anti-G Belt 16
  163. //03 0E - Accepted Mission 17
  164. //03 0F - Taxi 18
  165. //03 10 - Holocube/Map 19
  166. //03 11 - Recharge 20
  167. //03 12 - Mission Theme 21
  168. //03 13 - Game Over 22
  169. //03 14 - Bad Ending 23
  170. //03 15 - Diary 24
  171. //03 16 - Lift 25
  172. //03 17 - Voyage 26
  173. //03 18 - Teleport to Morph Planet 27
  174.  
  175. MusicTable:
  176.         dw $0001, $0000 //Intro Song    - Intro Cutscene
  177.         dw $0003, $0000 //Reunion
  178.         dw $0003, $0001 //Memory
  179.         dw $0003, $0017 //Voyage
  180.         dw $0003, $000D //To NW
  181.         dw $0003, $0090 //Holocube              - Holocube Cutscene
  182.         dw $0003, $0018 //Teleport
  183.         dw $0002, $0000 //Theme Song    - Title Screen
  184.         dw $0003, $0088 //Ending
  185.         dw $0003, $000A //Desintegration
  186.         dw $0003, $000C //Bridge
  187.         dw $0003, $0011 //Recharge
  188.         dw $FFFF, $FFFF
  189.         dw $0003, $0002 //Wake Up               - Jungle Cutscene
  190.         dw $0003, $000F //Taxi
  191.         dw $0003, $0016 //Lift Up/Down
  192.         dw $0003, $0007 //Item Fanfare
  193.         dw $0003, $0095 //Diary
  194.         dw $0003, $0092 // Mission stuff
  195.         dw $0003, $0009 //FALL
  196.         dw $0003, $0014 //Bad Ending
  197.         dw $0003, $008E //Accepted Mission
  198.         dw $0003, $000B //Give Item Fanfare
  199.         dw $FFFF, $FFFF
  200.         dw $0003, $0013 //Game Over
  201.         dw $0000, $0000 //Logo                  - Logo Cutscene
  202.         dw $FFFF, $FFFF
  203.         dw $FFFF, $FFFF
  204.         dw $0003, $0003
  205.         dw $0003, $0004
  206.         dw $0003, $0005
  207.         dw $0003, $0006
  208.  
  209. CutsceneMusicTable:
  210.         db $0D //Wake Up
  211.         db $10 //Take Holocube
  212.         db $10 //Take Key
  213.         db $FF
  214.         db $10 //Take Gun
  215.         db $0B //Recharging Shield
  216.         db $13 //Fall to Death
  217.         db $FF
  218.         db $FF
  219.         db $09 //Desintegrated
  220.         db $10 //Take Credits
  221.         db $FF
  222.         db $FF
  223.         db $00 //Intro
  224.         db $0B //Recharging Battery $17
  225.         db $10 //Take Battery
  226.         db $10 //Take Teleporter
  227.         db $05 //Holocube
  228.         db $10 //Take ID
  229.         db $FF
  230.         db $0A //Bridge
  231.         db $16 //Give Teleporter
  232.         db $FF
  233.         db $FF
  234.         db $FF
  235.         db $05 //Map
  236.         db $05 //Map - Asia
  237.         db $05 //Map - America
  238.         db $05 //Map - Africa
  239.         db $05 //Map - Europa
  240.         db $FF
  241.         db $FF
  242.         db $10 //Take Parcel
  243.         db $16 //Give Parcel
  244.         db $10 //Take Work Permit
  245.         db $10 //Take ID
  246.         db $10 //Take Fuse
  247.         db $12 //Mission 1 (Parcel)
  248.         db $12 //Mission 2 (VIP)
  249.         db $12 //Mission 2 (VIP) ???
  250.         db $12 //Mission 3 (Maintenance)
  251.         db $12 //Mission 4 (Cyborg Search)
  252.         db $12 //Mission 5 (Clear Area 3)
  253.         db $16 //Give ID
  254.         db $16 //Give Credits
  255.         db $15 //Accepting Mission
  256.         db $FF
  257.         db $04 //To New Washington
  258.         db $02 //Memory
  259.         db $10 //Take Anti-G Belt
  260.         db $0E //Taxi
  261.         db $FF
  262.         db $03 //Won Death Tower
  263.         db $06 //Going to Morph Planet
  264.         db $0F //Lift Up
  265.         db $0F //Lift Down
  266.         db $FF
  267.         db $01 //Reunion
  268.         db $10 //Take Atomic Charge
  269.         db $11 //Diary
  270.         db $10 //Take Tele Reciever
  271.         db $08 //Ending + Credits
  272.         db $09 //Generator Explode $0C
  273.         db $14 //Morph Planet Explode (Bad Ending)
  274.         db $19 //Logo
  275.         db $18 //Game Over
  276.         db $12 //Mission Completed (100 credits)
  277.         db $12 //Mission Completed (100 credits)
  278.         db $12 //Mission Completed (300 credits)
  279.         db $12 //Mission Completed (400 credits)
  280.         db $12 //Mission Completed (500 credits)
  281.         db $12 //Mission Completed (600 credits)
  282.         db $FF
  283.         db $FF
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top