Advertisement
spartonberry

Nadia ASM source

Aug 29th, 2014
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.54 KB | None | 0 0
  1. ;A10001 = version number
  2. ;10xxxxx = US ? (export NTSC)
  3. ;00xxxxx = JP ? (JP NTSC)
  4. ;11xxxxx = EU ? (export PAL)
  5. ;01xxxxx = none (JP PAL)
  6.  
  7. ;this routine checks the pointer as it passes to the graphics decompression routine
  8. ;if it is identified as the pointer to one of the compressed graphics/tilemap blocks,
  9. ;it gets replaced with the offset of the compressed English data and jumps back to
  10. ;the game's original decompression routine
  11. org $115000
  12. move.b $A10001,D0 ;put this is for US-region check
  13. andi #$C0,D0
  14. cmpi #$80,D0
  15. bne end_init
  16. move.l A0,D6
  17. cmp.l #$00019C80,D6 ;Japanese font pointer
  18. bne not_font
  19. move.l #$0017C000,A0 ;English font pointer
  20. bra end_init
  21. not_font:
  22. cmp.l #$00022A08,D6 ;Japanese "legend" font
  23. bne not_legend_font
  24. move.l #$0017B800,A0
  25. bra end_init
  26. not_legend_font:
  27. cmp.l #$000A0F5E,D6 ;Japanese "legend" screen
  28. bne not_legend
  29. move.l #$0017CA00,A0
  30. bra end_init
  31. not_legend:
  32. cmp.l #$0009AE82,D6 ;Japanese "legend" block map
  33. bne not_legend0
  34. move.l #$0017CC00,A0
  35. bra end_init
  36. not_legend0:
  37. cmp.l #$0009B41A,D6 ;Japanese "J. Verne" block map
  38. bne not_jverne_blockmap
  39. move.l #$0017CC80,A0
  40. bra end_init
  41. not_jverne_blockmap:
  42. cmp.l #$00028D70,D6 ;Japanese "J. Verne" tiles
  43. bne not_jverne_tiles
  44. move.l #$0017CE00,A0
  45. bra end_init
  46. not_jverne_tiles:
  47. cmp.l #$000A2BCE,D6 ;Japanese "J. Verne" tilemap
  48. bne not_jverne_tilemap
  49. move.l #$0017CCC0,A0
  50. bra end_init
  51. not_jverne_tilemap:
  52. cmp.l #$000203E2,D6 ;Japanese title tiles
  53. bne not_title_tiles
  54. move.l #$0017D200,A0
  55. bra end_init
  56. not_title_tiles:
  57. cmp.l #$000A04EE,D6 ;Japanese tittle tilemap
  58. bne not_title_tilemap
  59. move.l #$0017E200,A0
  60. bra end_init
  61. not_title_tilemap:
  62. cmp.l #$0009B9E4,D6 ;Paris, block map
  63. bne not_paris_blockmap
  64. move.l #$0017E500,A0
  65. bra end_init
  66. not_paris_blockmap:
  67. cmp.l #$0002B0FC,D6 ;Paris, tiles
  68. bne not_paris_tiles
  69. move.l #$0017E580,A0
  70. bra end_init
  71. not_paris_tiles:
  72. cmp.l #$000A3E50,D6 ;Paris, tilemap
  73. bne not_paris_tilemap
  74. move.l #$0017E900,A0
  75. bra end_init
  76. not_paris_tilemap:
  77. cmp.l #$000855FA,D6 ;final screen
  78. bne not_final
  79. move.l #$0017A000,A0
  80. not_final:
  81. end_init:
  82. move.b (A0)+,D6
  83. lsl.w #8,D6
  84. move.b (A0)+,D6
  85. jmp $00000B3C
  86.  
  87. org $115200
  88. move.b $A10001,D0 ;put this in for US-region check
  89. andi #$C0,D0
  90. cmpi #$80,D0
  91. beq end_text_pointer ;this will jump if the system is US. Final will be changed to jump if JP
  92. moveq #$00,D0
  93. move.l A0,-(A7) ;save A0
  94. addi.l #$40000,D2 ;D2+$40000 = string number
  95. movea.l D2,A0
  96. move.b (A0)+,D0 ;read high byte of word
  97. asl.l #8,D0
  98. move.b (A0),D0 ;read low byte of word. Must read two bytes seperately incase it starts at an odd address
  99. asl.l #2,D0 ;multiply by 4 for word address
  100. addi.l #$120000,D0 ;index into English pointer table
  101. movea.l D0,A0 ;move pointer to address
  102. move.l (A0),D2 ;read pointer
  103. move.l (A7)+,A0 ;restore A0
  104. end_text_pointer:
  105. MOVE.l D2,($00FF8E28)
  106. jmp $00001C64
  107.  
  108. org $115280
  109. move.w (A1)+,D2 ;get original window data
  110. bmi OriginalWinData ;value above #$8000 = original window data
  111. beq JumpEndWinLine
  112. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  113. move.l D3,-(A7) ;save D3
  114. move.w D2,D3 ;copy tile value to D3
  115. lsr.w #8,D3 ;move to lower byte
  116. andi.w #$0007,D3 ;low 3 bits = max run of 7
  117. ori.w #$8700,D2
  118. jsr $1154C0
  119. move.l (A7)+,D3 ;restore D3
  120. jmp $001D4A
  121. OriginalWinData:
  122. move.w D2,$00(A2,D1)
  123. jmp $001D52
  124. JumpEndWinLine:
  125. jmp $001D62
  126.  
  127. org $115300
  128. ;original code $001C78 = horizontal window dimension
  129. moveq #$00,D2
  130. move.b (A6)+,D2 ;get window horizontal size
  131. cmp.b #$02,D2
  132. bcs WindowWideEnough
  133. move.b #$02,D2
  134. WindowWideEnough:
  135. add.w D2,D2
  136. jmp $001C7E
  137.  
  138. org $115340
  139. ;same as middle lines code
  140. move.w (A1)+,D2 ;get original window data
  141. bmi OriginalWinTopData ;value above #$8000 = original window data
  142. beq JumpEndWinTopLine
  143. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  144. move.l D3,-(A7) ;save D3
  145. move.w D2,D3 ;copy tile value to D3
  146. lsr.w #8,D3 ;move to lower byte
  147. andi.w #$0007,D3 ;low 3 bits = max run of 7
  148. ori.w #$8700,D2
  149. jsr $1154C0
  150. move.l (A7)+,D3 ;restore D3
  151. jmp $001D20
  152. OriginalWinTopData:
  153. move.w D2,$00(A2,D1)
  154. jmp $001D28
  155. JumpEndWinTopLine:
  156. jmp $001D38
  157.  
  158. org $1153A0
  159. ;same as middle lines code
  160. move.w (A1)+,D1 ;get original window data
  161. bmi OriginalWinBotData ;value above #$8000 = original window data
  162. beq JumpEndWinBotLine
  163. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  164. move.l D3,-(A7) ;save D3
  165. move.w D1,D3 ;copy tile value to D3
  166. lsr.w #8,D3 ;move to lower byte
  167. andi.w #$0007,D3 ;low 3 bits = max run of 7
  168. ori.w #$8700,D1
  169. jsr $1154E0
  170. move.l (A7)+,D3 ;restore D3
  171. jmp $001D74
  172. OriginalWinBotData:
  173. move.w D1,$00(A2,D0)
  174. jmp $001D7C
  175. JumpEndWinBotLine:
  176. jmp $001D8C
  177.  
  178. org $115400
  179. add.l ($00FF8F06),D0 ;finishes putting string address in D0
  180. move.b $A10001,D5 ;put this in for US-region check
  181. andi #$C0,D5
  182. cmpi #$80,D5
  183. beq end_menu_text_pointer ;this will jump if the system is US. Final will be changed to jump if JP
  184. moveq #$00,D5
  185. move.l A0,-(A7) ;save A0
  186. addi.l #$40000,D0 ;D2+$40000 = string number
  187. movea.l D0,A0
  188. move.b (A0)+,D5 ;read high byte of word
  189. asl.l #8,D5
  190. move.b (A0),D5 ;read low byte of word. Must read two bytes seperately incase it starts at an odd address
  191. asl.l #2,D5 ;multiply by 4 for word address
  192. addi.l #$120000,D5 ;index into English pointer table
  193. movea.l D5,A0 ;move pointer to address
  194. move.l (A0),D0 ;read pointer
  195. move.l (A7)+,A0 ;restore A0
  196. end_menu_text_pointer:
  197. jmp $000039B6
  198.  
  199. org $115440
  200. move.l ($00FF8F06),A1
  201. adda.l D2,A1 ;A1 = address of item
  202. move.b $A10001,D2 ;put this in for US-region check
  203. andi #$C0,D2
  204. cmpi #$80,D2
  205. beq end_item_text_pointer ;this will jump if the system is US. Final will be changed to jump if JP
  206. move.l A1,D3
  207. moveq #$00,D2
  208. move.l A0,-(A7) ;save A0
  209. addi.l #$40000,D3 ;D2+$40000 = string number
  210. movea.l D3,A0
  211. move.b (A0)+,D2 ;read high byte of word
  212. asl.l #8,D2
  213. move.b (A0),D2 ;read low byte of word. Must read two bytes seperately incase it starts at an odd address
  214. asl.l #2,D2 ;multiply by 4 for word address
  215. addi.l #$120000,D2 ;index into English pointer table
  216. movea.l D2,A0 ;move pointer to address
  217. move.l (A0),D3 ;read pointer
  218. move.l D3,A1
  219. move.l (A7)+,A0 ;restore A0
  220. end_item_text_pointer:
  221. jmp $00004004
  222.  
  223. org $115490
  224. ;same as middle lines code
  225. ;ROM $3EFC = max width
  226. ;ROM $3EA6 = max width (used to clear window)
  227. move.w (A1)+,D2 ;get original window data
  228. bmi OriginalItemTopData ;value above #$8000 = original window data
  229. beq JumpEndItemTopLine
  230. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  231. move.l D3,-(A7) ;save D3
  232. move.w D2,D3 ;copy tile value to D3
  233. lsr.w #8,D3 ;move to lower byte
  234. andi.w #$0007,D3 ;low 3 bits = max run of 7
  235. ori.w #$8700,D2
  236. jsr $1154C0
  237. move.l (A7)+,D3 ;restore D3
  238. jmp $003f54
  239. OriginalItemTopData:
  240. move.w D2,$00(A2,D1)
  241. jmp $003f5c
  242. JumpEndItemTopLine:
  243. jmp $003f6c
  244.  
  245. org $115500
  246. ;same as middle lines code
  247. move.w (A1)+,D2 ;get original window data
  248. bmi OriginalItemMidData ;value above #$8000 = original window data
  249. beq JumpEndItemMidLine
  250. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  251. move.l D3,-(A7) ;save D3
  252. move.w D2,D3 ;copy tile value to D3
  253. lsr.w #8,D3 ;move to lower byte
  254. andi.w #$0007,D3 ;low 3 bits = max run of 7
  255. ori.w #$8700,D2
  256. jsr $1154C0
  257. move.l (A7)+,D3 ;restore D3
  258. jmp $003f88
  259. OriginalItemMidData:
  260. move.w D2,$00(A2,D1)
  261. jmp $003f90
  262. JumpEndItemMidLine:
  263. jmp $003fa0
  264.  
  265. org $115560
  266. ;same as middle lines code
  267. move.w (A1)+,D1 ;get original window data
  268. bmi OriginalItemBotData ;value above #$8000 = original window data
  269. beq JumpEndItemBotLine
  270. ;$xx00, where X & 0x07 = repeat length, repeat original sequence to apply RLE
  271. move.l D3,-(A7) ;save D3
  272. move.w D1,D3 ;copy tile value to D3
  273. lsr.w #8,D3 ;move to lower byte
  274. andi.w #$0007,D3 ;low 3 bits = max run of 7
  275. ori.w #$8700,D1
  276. jsr $1154E0
  277. move.l (A7)+,D3 ;restore D3
  278. jmp $003fb2
  279. OriginalItemBotData:
  280. move.w D1,$00(A2,D0)
  281. jmp $003fba
  282. JumpEndItemBotLine:
  283. jmp $003fca
  284.  
  285. org $115600
  286. ;version 1 of pointer expansion. D2 = tile data, D1 = offset into window data
  287. Ver1RLERout:
  288. move.w D2,$00(A2,D1)
  289. move.w D2,-(A7)
  290. move.w D1,D2
  291. addq.w #2,D1
  292. andi.w #$007E,D1
  293. andi.w #$0F80,D2
  294. or.w D2,D1
  295. move.w (A7)+,D2
  296. subq.w #1,D3
  297. bne Ver1RLERout
  298. rts
  299.  
  300. org $115620
  301. ;version 2 of pointer expansion. D1 = tile data, D0 = offset into window data
  302. Ver2RLERout:
  303. move.w D1,$00(A2,D0)
  304. move.w D1,-(A7)
  305. move.w D0,D1
  306. addq.w #2,D0
  307. andi.w #$007E,D0
  308. andi.w #$0F80,D1
  309. or.w D1,D0
  310. move.w (A7)+,D1
  311. subq.w #1,D3
  312. bne Ver2RLERout
  313. rts
  314.  
  315. ;intermission text loading
  316. org $115660
  317. adda.l D2, A1 ;now A1 has the pointer to the original string
  318. move.l A1, D2
  319. moveq #$00,D0
  320. move.l A0,-(A7) ;save A0
  321. addi.l #$40000,D2 ;D2+$40000 = string number
  322. movea.l D2,A0
  323. move.b (A0)+,D0 ;read high byte of word
  324. asl.l #8,D0
  325. move.b (A0),D0 ;read low byte of word. Must read two bytes seperately incase it starts at an odd address
  326. asl.l #2,D0 ;multiply by 4 for word address
  327. addi.l #$120000,D0 ;index into English pointer table
  328. movea.l D0,A0 ;move pointer to address
  329. move.l (A0),D2 ;read pointer
  330. move.l (A7)+,A0 ;restore A0
  331. movea.l D2, A1 ;now A1 has the pointer to the original string
  332. lea ($00FF711A),A0
  333. jmp $0000170E
  334.  
  335. org $1156A0
  336. ;tower floor identify. We want A1 to have the address of the ROM string
  337. move.l ($00FF8F06),A1
  338. adda.l D3,A1
  339. movem.l D0-D2,-(A7)
  340. move.b $A10001,D0 ;put this is for US-region check
  341. andi #$C0,D0
  342. cmpi #$80,D0
  343. beq not_change_floor_pointer
  344. move.l A1,D3 ;original string address
  345. moveq #$00,D2
  346. move.l A0,-(A7) ;save A0
  347. addi.l #$40000,D3 ;D3+$40000 = string number
  348. movea.l D3,A0
  349. move.b (A0)+,D2 ;read high byte of word
  350. asl.l #8,D2
  351. move.b (A0),D2 ;read low byte of word. Must read two bytes seperately incase it starts at an odd address
  352. asl.l #2,D2 ;multiply by 4 for word address
  353. addi.l #$120000,D2 ;index into English pointer table
  354. movea.l D2,A0 ;move pointer to address
  355. move.l (A0),D3 ;read pointer
  356. move.l D3,A1
  357. move.l (A7)+,A0 ;restore A0
  358. not_change_floor_pointer:
  359. movem.l (A7)+,D0-D2
  360. jmp $000034E2
  361.  
  362. org $115780
  363. move.b $A10001,D0 ;put this is for US-region check
  364. andi #$C0,D0
  365. cmpi #$80,D0
  366. bne eng_sound_spacing_down
  367. move.w #$000B,($00FFA604)
  368. jmp $00006F22
  369. eng_sound_spacing_down:
  370. move.w #$0003,($00FFA604)
  371. jmp $00006F22
  372.  
  373. org $1157C0
  374. move.b $A10001,D0 ;put this is for US-region check
  375. andi #$C0,D0
  376. cmpi #$80,D0
  377. bne eng_sound_spacing_up
  378. move.w #$FFF5,($00FFA604)
  379. jmp $00006EF2
  380. eng_sound_spacing_up:
  381. move.w #$FFFD,($00FFA604)
  382. jmp $00006EF2
  383.  
  384. org $115800
  385. SouneMenu:
  386. lea ($00FF1164),A0 ;start of tilemap
  387. move.b $A10001,D0 ;put this is for US-region check
  388. andi #$C0,D0
  389. cmpi #$80,D0
  390. bne eng_sound_menu
  391. lea ($00007132),A1 ;original Japanese text
  392. jmp $000070B8
  393. eng_sound_menu:
  394. lea ($00116000),A1 ;English sound text
  395. move.w #$001E,D7 ;number of lines of text
  396. SoundMenuLine:
  397. moveq #$16,D6 ;number of characters per line
  398. SoundMenuLineLoop:
  399. move.w #$0700,D0
  400. move.b (A1)+,D0
  401. move.w D0,(A0)+
  402. subq.w #1,D6
  403. bne SoundMenuLineLoop
  404. lea $0014(A0),A0
  405. subq.w #1,D7
  406. bne SoundMenuLine
  407. jmp $000070EC
  408.  
  409. org $115900
  410. SoundMenuCursorHack:
  411. move.b $A10001,D0 ;put this is for US-region check
  412. andi #$C0,D0
  413. cmpi #$80,D0
  414. bne eng_sound_cursor
  415. move.w ($00FFA600),D0 ;cursor selection in left column
  416. jmp $00006E7A ;return to JP routine
  417. eng_sound_cursor:
  418. move.w ($00FFA600),D0
  419. jmp $00006E86
  420.  
  421. org $115940
  422. SoundCursorMaxHack:
  423. move.b $A10001,D0 ;put this is for US-region check
  424. andi #$C0,D0
  425. cmpi #$80,D0
  426. bne eng_cursor_length
  427. cmp.w #$000E,($00FFA600)
  428. ble JP_within_range
  429. jmp $00006F32
  430. JP_within_range:
  431. jmp $00006F46
  432. eng_cursor_length:
  433. cmp.w #$001D,($00FFA600)
  434. ble EN_within_range
  435. move.w #$001D,($00FFA600)
  436. jmp $00006F3A
  437. EN_within_range:
  438. jmp $00006F46
  439.  
  440. org $115B00
  441. move.b $A10001,D0 ;put this is for US-region check
  442. andi #$C0,D0
  443. cmpi #$80,D0
  444. bne column_hack
  445. move.w #$000b,($00FFA602)
  446. jmp $00006FA2
  447. column_hack:
  448. jmp $00006FBC
  449.  
  450. org $115B40
  451. move.b $A10001,D0 ;put this is for US-region check
  452. andi #$C0,D0
  453. cmpi #$80,D0
  454. bne highlight_table_hack
  455. lea ($00FF7422),A0
  456. jmp $00006E58
  457. highlight_table_hack:
  458. lea ($00FF7422),A0
  459. lea ($00115B00),A1 ;alternate table
  460. jmp $00006E58
  461.  
  462. org $115C00
  463. move.b $A10001,D0 ;put this is for US-region check
  464. andi #$C0,D0
  465. cmpi #$80,D0
  466. bne return_items_hack
  467. lea ($00001F4F),A1 ;offset for original string
  468. jsr $00002054 ;we replaced a bsr
  469. jmp $0000202C
  470. return_items_hack:
  471. lea ($00116300),A1
  472. jsr $00002054
  473. jmp $0000202C
  474.  
  475. ;relocate item string
  476. ;00:2038 13 79 MOVE.b ($00FFA3C5),$0007(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E41 A3=00FF8F6E A4=00001D0A A5=00FFEFB8 A6=000DA3D0 A7=00FFEFF8 D0=000000DF D1=0000000C D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  477. ;** 00:2038 13 79 MOVE.b ($00FFA3C5),$0007(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E41 A3=00FF8F6E A4=00001D0A A5=00FFEFB8 A6=000DA3D0 A7=00FFEFF8 D0=000000DF D1=0000000C D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  478. ;** [00:203E] W08 = 00 [FF8E39]
  479. org $115C40
  480. move.b $A10001,D0 ;put this is for US-region check
  481. andi #$C0,D0
  482. cmpi #$80,D0
  483. bne return_items_string_hack
  484. move.b ($00FFA3C5),$0007(A1)
  485. move.b ($00FFA3C6),$0008(A1)
  486. move.b ($00FFA3C7),$0009(A1)
  487. jmp $00002050
  488. return_items_string_hack:
  489. move.b ($00FFA3C5),$000F(A1)
  490. move.b ($00FFA3C6),$0010(A1)
  491. move.b ($00FFA3C7),$0011(A1)
  492. jmp $00002050
  493.  
  494. ;relocate give item string
  495. ;00:1F6C 60 00 BRA #$000E [00:1F7C] A0=00001C14 A1=000D1AAE A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  496. ;** 00:1F6C 60 00 BRA #$000E [00:1F7C] A0=00001C14 A1=000D1AAE A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  497. ;00:1F7C 43 FA LEA $FF8C(PC),A1 A0=00001C14 A1=000D1AAE A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  498. ;** 00:1F7C 43 FA LEA $FF8C(PC),A1 A0=00001C14 A1=000D1AAE A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  499. ;00:1F80 61 00 BSR #$00D2 [00:2054] A0=00001C14 A1=00001F0A A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  500. ;** 00:1F80 61 00 BSR #$00D2 [00:2054] A0=00001C14 A1=00001F0A A2=00FF8E7E A3=00FF8F76 A4=00003F42 A5=00FFEFB8 A6=000ECA05 A7=00FFEFF8 D0=00000010 D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  501. org $115C90
  502. move.b $A10001,D0 ;put this is for US-region check
  503. andi #$C0,D0
  504. cmpi #$80,D0
  505. bne give_items_string_hack
  506. lea ($00001F0A),A1 ;offset for original string
  507. jsr $00002054 ;we replaced a bsr
  508. jmp $00001F84
  509. give_items_string_hack:
  510. lea ($00116340),A1
  511. jsr $00002054
  512. jmp $00001F84
  513.  
  514. ;item string
  515. ;00:1F9C 13 79 MOVE.b ($00FFA3C5),$0007(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  516. ;** 00:1F9C 13 79 MOVE.b ($00FFA3C5),$0007(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  517. ;** [00:1FA2] W08 = 00 [FF8E39]
  518. ;00:1FA4 13 79 MOVE.b ($00FFA3C6),$0008(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  519. ;** 00:1FA4 13 79 MOVE.b ($00FFA3C6),$0008(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  520. ;** [00:1FAA] W08 = F8 [FF8E3A]
  521. ;00:1FAC 13 79 MOVE.b ($00FFA3C7),$0009(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  522. ;** 00:1FAC 13 79 MOVE.b ($00FFA3C7),$0009(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  523. ;** [00:1FB2] W08 = 9D [FF8E3B]
  524. ;00:1FB4 60 00 BRA #$00B6 [00:206C] A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  525. ;** 00:1FB4 60 00 BRA #$00B6 [00:206C] A0=00001C14 A1=00FF8E32 A2=00FF8E4A A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0B A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  526.  
  527. org $115CE0
  528. move.b $A10001,D0 ;put this is for US-region check
  529. andi #$C0,D0
  530. cmpi #$80,D0
  531. bne give_items_string_item
  532. move.b ($00FFA3C5),$0007(A1)
  533. move.b ($00FFA3C6),$0008(A1)
  534. move.b ($00FFA3C7),$0009(A1)
  535. jmp $00001FB4
  536. give_items_string_item:
  537. move.b ($00FFA3C5),$000F(A1)
  538. move.b ($00FFA3C6),$0010(A1)
  539. move.b ($00FFA3C7),$0011(A1)
  540. jmp $00001FB4
  541.  
  542. ;00:1F90 13 5E MOVE.b (A6)+,$000D(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA08 A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  543. ;** 00:1F90 13 5E MOVE.b (A6)+,$000D(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA08 A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xNzvc
  544. ;** [00:1F92] W08 = 00 [FF8E3F]
  545. ;00:1F94 13 5E MOVE.b (A6)+,$000E(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA09 A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  546. ;** 00:1F94 13 5E MOVE.b (A6)+,$000E(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA09 A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnZvc
  547. ;** [00:1F96] W08 = 01 [FF8E40]
  548. ;00:1F98 13 5E MOVE.b (A6)+,$000F(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0A A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnzvc
  549. ;** 00:1F98 13 5E MOVE.b (A6)+,$000F(A1) A0=00001C14 A1=00FF8E32 A2=00FF8E4E A3=00FF8F76 A4=00003A04 A5=00FFEFB8 A6=000ECA0A A7=00FFEFF8 D0=000000DF D1=00000000 D2=00000004 D3=00FF0712 D4=74000004 D5=00000000 D6=00000001 D7=0000FFFF xnzvc
  550. ;** [00:1F9A] W08 = A8 [FF8E41]
  551. org $115D30
  552. move.b $A10001,D0 ;put this is for US-region check
  553. andi #$C0,D0
  554. cmpi #$80,D0
  555. bne give_items_string_receiver
  556. move.b (A6)+,$000D(A1)
  557. move.b (A6)+,$000E(A1)
  558. move.b (A6)+,$000F(A1)
  559. jmp $00001F9C
  560. give_items_string_receiver:
  561. move.b (A6)+,$0017(A1)
  562. move.b (A6)+,$0018(A1)
  563. move.b (A6)+,$0019(A1)
  564. jmp $00001F9C
  565.  
  566. org $115D80
  567. ; move.l D0,-(A7)
  568. ; move $A10001,D0 ;put this is for US-region check
  569. ; andi #$C0,D0
  570. ; cmpi #$80,D0
  571. ; bne pass_cursor_right_hack
  572. ; move.l (A7)+,D0
  573. ; addq.w #$1,($00FFA5D4)
  574. ; jmp $00005DEE
  575. ;pass_cursor_right_hack:
  576. ; move.l (A7)+,D0
  577. lea $00FF0006,A0
  578. lea $00FF7430,A1
  579. move.w ($00FFA5D4),D1
  580. add.w D1,D1
  581. move.w #$0720,D0
  582. jmp $00005E56
  583.  
  584. org $115E30
  585. ; move.l D0,-(A7)
  586. ; move $A10001,D0 ;put this is for US-region check
  587. ; andi #$C0,D0
  588. ; cmpi #$80,D0
  589. ; bne pass_cursor_left_hack
  590. ; move.l (A7)+,D0
  591. ; subq.w #1,($00FFA5D4)
  592. ; jmp $00005E16
  593. ;pass_cursor_left_hack:
  594. ; move.l (A7)+,D0
  595. lea $00FF0006,A0
  596. lea $00FF7430,A1
  597. move.w ($00FFA5D4),D1
  598. add.w D1,D1
  599. move.w #$0720,D0
  600. cmp.w #$0000,($FFA5D4)
  601. beq subtract_once
  602. subq.w #1,($00FFA5D4)
  603. subtract_once:
  604. subq.w #1,($00FFA5D4) ;subtract a second to counter the print routines + 1
  605. jmp $00005E56
  606.  
  607. org $115E90
  608. move.b $A10001,D0 ;put this is for US-region check
  609. andi #$C0,D0
  610. cmpi #$80,D0
  611. bne pass_instruction_hack
  612. lea $0000670E,A0
  613. lea $00FF7620,A1
  614. jmp $0000674E
  615. pass_instruction_hack:
  616. lea $00116370,A0
  617. lea $00FF75A0,A1
  618. pass_instruction_loop:
  619. move.w (A0)+,D0
  620. beq pass_instruction_end
  621. cmpi.w #$0001,D0
  622. bne pass_instruction_next_line
  623. lea $00FF7620,A1
  624. move.w (A0)+,D0
  625. pass_instruction_next_line:
  626. move.w D0,(A1)+
  627. bra pass_instruction_loop
  628. pass_instruction_end:
  629. jmp $00006074
  630.  
  631. org $115F00
  632. move.b $A10001,D0 ;put this is for US-region check
  633. andi #$C0,D0
  634. cmpi #$80,D0
  635. bne pass_error_hack
  636. lea $00006076,A0
  637. lea $00FF7630,A1
  638. jmp $00006030
  639. pass_error_hack:
  640. lea $001163D0,A0
  641. lea $00FF75A6,A1
  642. pass_error_loop:
  643. move.w (A0)+,D0
  644. beq pass_error_end
  645. cmpi.w #$0001,D0
  646. bne pass_error_next_line
  647. lea $00FF7626,A1
  648. move.w (A0)+,D0
  649. pass_error_next_line:
  650. move.w D0,(A1)+
  651. bra pass_error_loop
  652. pass_error_end:
  653. jmp $00006074
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement