Advertisement
Guest User

Explosion Sensitive Blocks

a guest
Apr 14th, 2020
38
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.84 KB | None
  1. ;--------------;
  2. ; Some defines ;
  3. ;--------------;
  4.  
  5. !AirTile = $0025 ; Tile that comes in place of destroyed tiles.
  6.  
  7. ;--------;
  8. ; Hijack ;
  9. ;--------;
  10.  
  11. if read1($00FFD5) == $23
  12. sa1rom
  13. !base1 = $3000
  14. !base2 = $6000
  15. !base3 = $000000
  16. !7E = $40
  17. !D8 = $3216
  18. !E4 = $322C
  19. !14D4 = $3258
  20. !14E0 = $326E
  21. !1540 = $32C6
  22. !1662 = $75EA
  23. else
  24. lorom
  25. !base1 = $0000
  26. !base2 = $0000
  27. !base3 = $800000
  28. !7E = $7E
  29. !D8 = $D8
  30. !E4 = $E4
  31. !14D4 = $14D4
  32. !14E0 = $14E0
  33. !1540 = $1540
  34. !1662 = $1662
  35. endif
  36.  
  37. org $02808D|!base3
  38. autoclean JSL Main
  39. NOP
  40.  
  41. ;----------------------------;
  42. ; Do not change any of this! ;
  43. ;----------------------------;
  44.  
  45. freecode
  46.  
  47. ;----------------------;
  48. ; Various tables ;
  49. ; Adjusting is allowed ;
  50. ;----------------------;
  51.  
  52. TileList:
  53. dw $0048,$0106,$0114,$0117,$0118,$0119,$011A,$011B,$011C,$011D,$011E,$011F,$0120,$0121,$0122,$0123,$0124,$0125,$0126,$0127,$0128,$0129,$012A,$012B,$012E,$0130,$0132,$02A0,$02B0,$02C0,$02D0,$02E0,$02F0,$0300,$0301,$0380,$0381,$03C0,$0400
  54. ; List of tiles (16-bit values) that are explosion-sensitive.
  55. ; You are allowed and encouraged to adjust these.
  56. ; Note that tile 048 is a special exception - if you're not
  57. ; going to make tile 048 explosion-sensitive, then you can
  58. ; remove the code between "DestroyBlock:" and "NoSpinner:".
  59. ; You can add more tiles, or delete some, if you want to.
  60. TileListEnd:
  61.  
  62. ; The following tables denote the X and Y positions (16-bit) of each
  63. ; seperate 16x16 square of the 64x64 Bob-Omb explosion.
  64. ; You can change these as you wish.
  65. XDispLo:
  66. db $F0,$00,$10,$20,$F0,$00,$10,$20,$F0,$00,$10,$20,$F0,$00,$10,$20
  67. XDispHi:
  68. db $FF,$00,$00,$00,$FF,$00,$00,$00,$FF,$00,$00,$00,$FF,$00,$00,$00
  69. YDispLo:
  70. db $F0,$F0,$F0,$F0,$00,$00,$00,$00,$10,$10,$10,$10,$20,$20,$20,$20
  71. YDispHi:
  72. db $FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  73.  
  74. ; Index to the Bob-Omb 16x16 square handling.
  75. ; Every frame, 4 of these tiles are handled.
  76. ; This is to prevent the screen from flickering when
  77. ; too many tiles are destroyed at once.
  78. ; So that's why they're split out over 4 frames.
  79. ; Adjusting this would not be very useful.
  80. MinimumTiles:
  81. db $00,$04,$08,$0C
  82.  
  83. ;------------------------;
  84. ; Custom code ;
  85. ; Adjusting at own risk! ;
  86. ;------------------------;
  87.  
  88. Main:
  89. PHB ; Wrapper.
  90. PHK ; I used the Y index a lot here for 16-bit addresses
  91. PLB ; so this is necessary. Do not remove or adjust these lines.
  92. LDA #$11 ; Hijacked code.
  93. STA !1662,x ;
  94.  
  95. LDA !1540,x
  96. CMP #$3C ; This code runs once only - the very start of the explosion, frame #$3F (it decrements)
  97. BCS LoadTiles
  98. JMP DontLoadTiles+1 ; Terminate code if it's not this frame.
  99.  
  100. LoadTiles:
  101. SEC
  102. SBC #$3C
  103. TAY
  104. LDA.w MinimumTiles,y
  105. PHA
  106. LDY #$03 ; 16 (15+1, $F+1) blocks to check in a 4x4 square. The radius is 64x64 pixels.
  107.  
  108. Loop:
  109. PHY
  110. TYA
  111. CLC
  112. ADC $02,s
  113. TAY
  114. LDA !E4,x ; \ setup block properties
  115. CLC ; | $E4,x is more or less the center X position.
  116. ADC XDispLo,y ; | Each block in the 4x4 checked square has a different X and Y position.
  117. STA $9A ; | Therefore, extra tables are required to prepare the positions.
  118. LDA !14E0,x ; |
  119. ADC XDispHi,y ; | High byte
  120. STA $9B ; |
  121. LDA !D8,x ; |
  122. CLC ; | Y position, low and high bytes
  123. ADC YDispLo,y ; |
  124. STA $98 ; |
  125. LDA !14D4,x ; |
  126. ADC YDispHi,y ; |
  127. STA $99 ; /
  128.  
  129. JSR Map16Blk ; Subroutine that gets the Map16 tile that the sprite is touching (or in this case, one of the sixteen explosion squares)
  130. LDA [$05] ; [$05] = 24-bit pointer to low byte Map16 tables.
  131. XBA ; Get the low byte...
  132. INC $07 ; Increment $07 so [$05] points to the high byte of Map16.
  133. LDA [$05] ; Now get the high byte.
  134. XBA ;
  135. PHX ; Preserve X as we're going to need it later again.
  136. REP #$30
  137. LDX.w #TileListEnd-TileList ; Get maximum size of table into the X index
  138.  
  139. LoopTile:
  140. CMP.w TileList,x ; \ This loop here is to check if this specific 16x16 of the Bob-Omb explosion...
  141. BEQ DestroyBlock ; | ... is in contact with a tile specified in TileList:
  142. DEX ; | It checks the rightmost value first, then moves up left...
  143. DEX ; |
  144. BPL LoopTile ; |
  145. SEP #$30 ; | Effectively, if the 16x16 square of the explosion doesn't touch any of these tiles...
  146. PLX ; |
  147. JMP SkipTileUpload ; / ...then get to the next one.
  148.  
  149. DestroyBlock:
  150. ; Note: If you do not want tile 048 to be destroyed by the Bob-Omb explosion,
  151. ; remove the following code up to the "NoSpinner:" label.
  152. ; All of this code is specific to tile 048, as it requires killing a turn block bounce sprite too.
  153.  
  154. CMP #$0048 ; Check if the tile in question is 048 (always spinning turn block).
  155. SEP #$30 ;
  156. BNE NoSpinner ; If not, don't handle the specific code.
  157.  
  158. PHY
  159. LDY #$03
  160.  
  161. BounceSpriteLoop:
  162. LDA $1699|!base2,y ; \ Check if bounce sprite num = spinning turn lock
  163. CMP #$07 ; |
  164. BEQ SpinningTurnBlock ; | if so, branch
  165. DEY ; | decrease Y otherwise and check next slot
  166. BPL BounceSpriteLoop ; |
  167.  
  168. DontLoopBounce:
  169. PLY ; |
  170. BRA NoSpinner ; / if all slots are handled, go to the general code
  171.  
  172. SpinningTurnBlock:
  173. LDA $16A1|!base2,y ; Get X and Y positions of the bounce sprite and turn block into scratch RAM.
  174. AND #$F0
  175. STA $00
  176. LDA $16A9|!base2,y
  177. STA $01
  178. LDA $16A5|!base2,y
  179. AND #$F0
  180. STA $02
  181. LDA $16AD|!base2,y
  182. STA $03
  183. LDA $98
  184. AND #$F0
  185. STA $04
  186. LDA $99
  187. STA $05
  188. LDA $9A
  189. AND #$F0
  190. STA $06
  191. LDA $9B
  192. STA $07
  193. REP #$20
  194. LDA $00 ; Check if X and Y positions of both are equal.
  195. CMP $04 ; If not, decrease Y.
  196. BNE DecreaseYSpin ; (This to prevent that bounce sprites are destroyed that do not actually belong to the current turn block tile)
  197. LDA $02
  198. CMP $06
  199. BEQ Correct
  200.  
  201. DecreaseYSpin:
  202. SEP #$20
  203. DEY
  204. BPL BounceSpriteLoop
  205. BRA DontLoopBounce
  206.  
  207. Correct:
  208. SEP #$20
  209. LDA #$00 ; Terminate spinning turn block bounce sprite.
  210. STA $1699|!base2,y
  211. STA $18CE|!base2,y
  212. DEY
  213. BPL BounceSpriteLoop
  214. BRA DontLoopBounce
  215.  
  216. NoSpinner:
  217. PLX
  218. PHB ; \ Shatter block routine.
  219. PHY ; |
  220. LDA #$02 ; |
  221. PHA ; |
  222. PLB ; |
  223. LDA #$00 ; |
  224. JSL $028663|!base3 ; |
  225. PLY ; |
  226. PLB ; /
  227.  
  228. PHP
  229. REP #$30 ; \ change sprite to block
  230. LDA.w #!AirTile ; |
  231. STA $03 ; |
  232. JSR SUBL_SET_MAP16 ; |
  233. PLP ; /
  234.  
  235. SkipTileUpload:
  236. PLY
  237. DEY
  238. BMI DontLoadTiles
  239. JMP Loop
  240.  
  241. DontLoadTiles:
  242. PLA
  243. PLB
  244. RTL
  245.  
  246. Map16Blk:
  247. LDA $9A ; Get X low position of sprite
  248. STA $02 ; store into $02
  249. LDA $9B ;
  250. STA $03
  251. LDA $98 ; Get y low position of sprite
  252. STA $00 ; Store into $00
  253. LDA $99 ; Get y hi
  254. STA $01 ; Store into $01
  255. LDA $00
  256. AND #$F0
  257. STA $06
  258. LDA $02
  259. LSR
  260. LSR
  261. LSR
  262. LSR
  263. ORA $06
  264. PHA
  265. LDA $5B
  266. AND #$01
  267. BNE CODE_01D977
  268. PLA
  269. LDX $03
  270. CLC
  271. ;ADC $0BF6|!base2,X
  272. ADC.l $00BA60|!base3,X
  273. STA $05
  274. ;LDA $0C56|!base2,X
  275. LDA.l $00BA9C|!base3,X
  276. ADC $01
  277. STA $06
  278. BRA CODE_01D989
  279.  
  280. CODE_01D977:
  281. PLA
  282. LDX $01
  283. CLC
  284. ADC.l $00BA80|!base3,x
  285. STA $05
  286. LDA.l $00BABC|!base3,x
  287. ADC $03
  288. STA $06
  289.  
  290. CODE_01D989:
  291. LDA #!7E
  292. STA $07
  293. LDX $15E9|!base2
  294. RTS
  295.  
  296. SUBL_SET_MAP16: PHP ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01EE P:envmxdizcHC:1306 VC:149 00 FL:1681
  297. REP #$30 ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01ED P:envmxdizcHC:1328 VC:149 00 FL:1681
  298. PHY ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01ED P:envmxdizcHC:1350 VC:149 00 FL:1681
  299. PHX ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01EB P:envmxdizcHC:0012 VC:150 00 FL:1681
  300. TAX ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0042 VC:150 00 FL:1681
  301. LDA $03 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0056 VC:150 00 FL:1681
  302. PHA ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0088 VC:150 00 FL:1681
  303. JSR SUB_8034 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E7 P:envmxdizcHC:0118 VC:150 00 FL:1681
  304. PLA ;A:0010 X:0000 Y:0006 D:0000 DB:00 S:01DC P:envmxdizCHC:0726 VC:032 00 FL:11805
  305. STA $03 ;A:02A8 X:0000 Y:0006 D:0000 DB:00 S:01DE P:envmxdizCHC:0762 VC:032 00 FL:11805
  306. PLX ;A:02A8 X:0000 Y:0006 D:0000 DB:00 S:01DE P:envmxdizCHC:0794 VC:032 00 FL:11805
  307. PLY ;A:02A8 X:0020 Y:0006 D:0000 DB:00 S:01E0 P:envmxdizCHC:0830 VC:032 00 FL:11805
  308. PLP ;A:02A8 X:0020 Y:0001 D:0000 DB:00 S:01E2 P:envmxdizCHC:0866 VC:032 00 FL:11805
  309. RTS ;A:02A8 X:0020 Y:0001 D:0000 DB:00 S:01E3 P:envmxdizCHC:0894 VC:032 00 FL:11805
  310.  
  311. RETURN18: PLX
  312. PLB
  313. PLP
  314. RTS
  315.  
  316. SUB_8034: PHP ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E5 P:envmxdizcHC:0164 VC:150 00 FL:1682
  317. SEP #$20 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E4 P:envmxdizcHC:0186 VC:150 00 FL:1682
  318. PHB ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E4 P:envMxdizcHC:0208 VC:150 00 FL:1682
  319. LDA.B #$00|!base3>>16 ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E3 P:envMxdiZcHC:0286 VC:150 00 FL:1682
  320. PHA ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E3 P:envMxdiZcHC:0324 VC:150 00 FL:1682
  321. PLB ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E2 P:envMxdiZcHC:0346 VC:150 00 FL:1682
  322. REP #$30 ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E3 P:envMxdiZcHC:0374 VC:150 00 FL:1682
  323. PHX ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E3 P:envmxdiZcHC:0396 VC:150 00 FL:1682
  324. LDA $9A ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0426 VC:150 00 FL:1682
  325. STA $0C ;A:0070 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0458 VC:150 00 FL:1682
  326. LDA $98 ;A:0070 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0490 VC:150 00 FL:1682
  327. STA $0E ;A:0130 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0522 VC:150 00 FL:1682
  328. LDA #$0000 ;A:0130 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0554 VC:150 00 FL:1682
  329. SEP #$20 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0578 VC:150 00 FL:1682
  330. LDA $5B ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0600 VC:150 00 FL:1682
  331. STA $09 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0624 VC:150 00 FL:1682
  332. LDA $1933|!base2 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0648 VC:150 00 FL:1682
  333. BEQ NO_SHIFT ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0680 VC:150 00 FL:1682
  334. LSR $09
  335. NO_SHIFT: LDY $0E ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0702 VC:150 00 FL:1682
  336. LDA $09 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdizcHC:0734 VC:150 00 FL:1682
  337. AND #$01 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0758 VC:150 00 FL:1682
  338. BEQ HORIZ ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0774 VC:150 00 FL:1682
  339. LDA $9B
  340. STA $00
  341. LDA $99
  342. STA $9B
  343. LDA $00
  344. STA $99
  345. LDY $0C
  346. HORIZ: CPY #$0200 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0796 VC:150 00 FL:1682
  347. BCS RETURN18 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0820 VC:150 00 FL:1682
  348. LDA $1933|!base2 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0836 VC:150 00 FL:1682
  349. ASL A ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0868 VC:150 00 FL:1682
  350. TAX ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0882 VC:150 00 FL:1682
  351. LDA.w $BEA8,x ;[$00:BEA8] ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0896 VC:150 00 FL:1682
  352. STA $65 ;A:00A8 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0928 VC:150 00 FL:1682
  353. LDA.w $BEA9,x ;[$00:BEA9] ;A:00A8 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0952 VC:150 00 FL:1682
  354. STA $66 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0984 VC:150 00 FL:1682
  355. STZ $67 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1008 VC:150 00 FL:1682
  356. LDA $1925|!base2 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1032 VC:150 00 FL:1682
  357. ASL A ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1064 VC:150 00 FL:1682
  358. TAY ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1078 VC:150 00 FL:1682
  359. LDA ($65),y ;[$00:BDA8] ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1092 VC:150 00 FL:1682
  360. STA $04 ;A:00D8 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1132 VC:150 00 FL:1682
  361. INY ;A:00D8 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1156 VC:150 00 FL:1682
  362. LDA ($65),y ;[$00:BDA9] ;A:00D8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:1170 VC:150 00 FL:1682
  363. STA $05 ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1210 VC:150 00 FL:1682
  364. STZ $06 ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1234 VC:150 00 FL:1682
  365. LDA $9B ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1258 VC:150 00 FL:1682
  366. STA $07 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1282 VC:150 00 FL:1682
  367. ASL A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1306 VC:150 00 FL:1682
  368. CLC ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1320 VC:150 00 FL:1682
  369. ADC $07 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1334 VC:150 00 FL:1682
  370. TAY ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1358 VC:150 00 FL:1682
  371. LDA ($04),y ;[$00:BAD8] ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0004 VC:151 00 FL:1682
  372. STA $6B ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0044 VC:151 00 FL:1682
  373. STA $6E ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0068 VC:151 00 FL:1682
  374. INY ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0092 VC:151 00 FL:1682
  375. LDA ($04),y ;[$00:BAD9] ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0106 VC:151 00 FL:1682
  376. STA $6C ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0146 VC:151 00 FL:1682
  377. STA $6F ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0170 VC:151 00 FL:1682
  378. LDA #!7E ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0194 VC:151 00 FL:1682
  379. STA $6D ;A:007E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0210 VC:151 00 FL:1682
  380. INC A ;A:007E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0234 VC:151 00 FL:1682
  381. STA $70 ;A:007F X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0248 VC:151 00 FL:1682
  382. LDA $09 ;A:007F X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0272 VC:151 00 FL:1682
  383. AND #$01 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0296 VC:151 00 FL:1682
  384. BEQ NO_AND ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0312 VC:151 00 FL:1682
  385. LDA $99
  386. LSR A
  387. LDA $9B
  388. AND #$01
  389. BRA LABEL52
  390. NO_AND: LDA $9B ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0334 VC:151 00 FL:1682
  391. LSR A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0358 VC:151 00 FL:1682
  392. LDA $99 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0372 VC:151 00 FL:1682
  393. LABEL52: ROL A ;A:0001 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0396 VC:151 00 FL:1682
  394. ASL A ;A:0002 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0410 VC:151 00 FL:1682
  395. ASL A ;A:0004 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0424 VC:151 00 FL:1682
  396. ORA #$20 ;A:0008 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0438 VC:151 00 FL:1682
  397. STA $04 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0454 VC:151 00 FL:1682
  398. CPX #$0000 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0478 VC:151 00 FL:1682
  399. BEQ NO_ADD ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0502 VC:151 00 FL:1682
  400. CLC
  401. ADC #$10
  402. STA $04
  403. NO_ADD: LDA $98 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0524 VC:151 00 FL:1682
  404. AND #$F0 ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0548 VC:151 00 FL:1682
  405. CLC ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0564 VC:151 00 FL:1682
  406. ASL A ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0578 VC:151 00 FL:1682
  407. ROL A ;A:0060 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0592 VC:151 00 FL:1682
  408. STA $05 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0606 VC:151 00 FL:1682
  409. ROL A ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0630 VC:151 00 FL:1682
  410. AND #$03 ;A:0080 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizCHC:0644 VC:151 00 FL:1682
  411. ORA $04 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0660 VC:151 00 FL:1682
  412. STA $06 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0684 VC:151 00 FL:1682
  413. LDA $9A ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0708 VC:151 00 FL:1682
  414. AND #$F0 ;A:0070 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0732 VC:151 00 FL:1682
  415. LSR A ;A:0070 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0748 VC:151 00 FL:1682
  416. LSR A ;A:0038 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0762 VC:151 00 FL:1682
  417. LSR A ;A:001C X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0776 VC:151 00 FL:1682
  418. STA $04 ;A:000E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0790 VC:151 00 FL:1682
  419. LDA $05 ;A:000E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0814 VC:151 00 FL:1682
  420. AND #$C0 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0838 VC:151 00 FL:1682
  421. ORA $04 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0854 VC:151 00 FL:1682
  422. STA $07 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0878 VC:151 00 FL:1682
  423. REP #$20 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0902 VC:151 00 FL:1682
  424. LDA $09 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:0924 VC:151 00 FL:1682
  425. AND #$0001 ;A:0100 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0956 VC:151 00 FL:1682
  426. BNE LABEL51 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0980 VC:151 00 FL:1682
  427. LDA $1A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0996 VC:151 00 FL:1682
  428. SEC ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1028 VC:151 00 FL:1682
  429. SBC #$0080 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZCHC:1042 VC:151 00 FL:1682
  430. TAX ;A:FF80 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:1066 VC:151 00 FL:1682
  431. LDY $1C ;A:FF80 X:FF80 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:1080 VC:151 00 FL:1682
  432. LDA $1933|!base2 ;A:FF80 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1112 VC:151 00 FL:1682
  433. BEQ LABEL50 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1152 VC:151 00 FL:1682
  434. LDX $1E
  435. LDA $20
  436. SEC
  437. SBC #$0080
  438. TAY
  439. BRA LABEL50
  440. LABEL51: LDX $1A
  441. LDA $1C
  442. SEC
  443. SBC #$0080
  444. TAY
  445. LDA $1933|!base2
  446. BEQ LABEL50
  447. LDA $1E
  448. SEC
  449. SBC #$0080
  450. TAX
  451. LDY $20
  452. LABEL50: STX $08 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1174 VC:151 00 FL:1682
  453. STY $0A ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1206 VC:151 00 FL:1682
  454. LDA $98 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1238 VC:151 00 FL:1682
  455. AND #$01F0 ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1270 VC:151 00 FL:1682
  456. STA $04 ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1294 VC:151 00 FL:1682
  457. LDA $9A ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1326 VC:151 00 FL:1682
  458. LSR A ;A:0070 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1358 VC:151 00 FL:1682
  459. LSR A ;A:0038 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0004 VC:152 00 FL:1682
  460. LSR A ;A:001C X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0018 VC:152 00 FL:1682
  461. LSR A ;A:000E X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0032 VC:152 00 FL:1682
  462. AND #$000F ;A:0007 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0046 VC:152 00 FL:1682
  463. ORA $04 ;A:0007 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0070 VC:152 00 FL:1682
  464. TAY ;A:0137 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0102 VC:152 00 FL:1682
  465. PLA ;A:0137 X:FF80 Y:0137 D:0000 DB:00 S:01E1 P:envmxdizcHC:0116 VC:152 00 FL:1682
  466. SEP #$20 ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0152 VC:152 00 FL:1682
  467. STA [$6B],y ;[$7E:C937] ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0174 VC:152 00 FL:1682
  468. XBA ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0222 VC:152 00 FL:1682
  469. STA [$6E],y ;[$7F:C937] ;A:6602 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0242 VC:152 00 FL:1682
  470. XBA ;A:6602 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0290 VC:152 00 FL:1682
  471. REP #$20 ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0310 VC:152 00 FL:1682
  472. ASL A ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0332 VC:152 00 FL:1682
  473. TAY ;A:04CC X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0346 VC:152 00 FL:1682
  474. PHK ;A:04CC X:FF80 Y:04CC D:0000 DB:00 S:01E3 P:envmxdizcHC:0360 VC:152 00 FL:1682
  475. PEA.w MAP16_RETURN-1 ; NOTE: this relative counter must always point to MAP16_RETURN.
  476. PEA $804C
  477. JML $00C0FB|!base3
  478. MAP16_RETURN: PLB
  479. PLP
  480. RTS
Advertisement
RAW Paste Data Copied
Advertisement