Romano338

Ball n chain pendulum

Jul 30th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.23 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; sprite 9E - Ball 'n Chain
  3. ; commented by yoshicookiezeus
  4. ;
  5. ; Uses extra bit: YES
  6. ; If the extra bit is clear, the sprite will rotate clockwise, and if it's set, it will
  7. ; rotate counterclockwise.
  8. ;
  9. ; NOTE: The palette of the sprite is hardcoded inside the ASM file. To change it, look
  10. ; for the "Properties" table. As always, the entries are in the YXCCPPPT format.
  11. ; The palette for the chain tiles is also hardcoded, and can be found on line 285.
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14.  
  15. !RAM_FrameCounter = $13
  16. !RAM_FrameCounterB = $14
  17. !RAM_ScreenBndryXLo = $1A
  18. !RAM_ScreenBndryYLo = $1C
  19. !RAM_MarioDirection = $76
  20. !RAM_MarioSpeedX = $7B
  21. !RAM_MarioSpeedY = $7D
  22. !RAM_MarioXPos = $94
  23. !RAM_MarioXPosHi = $95
  24. !RAM_MarioYPos = $96
  25. !RAM_SpritesLocked = $9D
  26. !RAM_SpriteNum = !9E
  27. !RAM_SpriteSpeedY = !AA
  28. !RAM_SpriteSpeedX = !B6
  29. !RAM_SpriteState = !C2
  30. !RAM_SpriteYLo = !D8
  31. !RAM_SpriteXLo = !E4
  32. !OAM_DispX = $0300|!Base2
  33. !OAM_DispY = $0301|!Base2
  34. !OAM_Tile = $0302|!Base2
  35. !OAM_Prop = $0303|!Base2
  36. !OAM_Tile2DispX = $0304|!Base2
  37. !OAM_Tile2DispY = $0305|!Base2
  38. !OAM_Tile2 = $0306|!Base2
  39. !OAM_Tile2Prop = $0307|!Base2
  40. !OAM_TileSize = $0460|!Base2
  41. !RAM_RandomByte1 = $148D|!Base2
  42. !RAM_RandomByte2 = $148E|!Base2
  43. !RAM_KickImgTimer = $149A|!Base2
  44. !RAM_SpriteYHi = !14D4
  45. !RAM_SpriteXHi = !14E0
  46. !RAM_Reznor1Dead = $1520|!Base2
  47. !RAM_Reznor2Dead = $1521|!Base2
  48. !RAM_Reznor3Dead = $1522|!Base2
  49. !RAM_Reznor4Dead = $1523|!Base2
  50. !RAM_DisableInter = !154C
  51. !RAM_SpriteDir = !157C
  52. !RAM_SprObjStatus = !1588
  53. !RAM_OffscreenHorz = !15A0
  54. !RAM_SprOAMIndex = !15EA
  55. !RAM_SpritePal = !15F6
  56. !RAM_Tweaker1662 = !1662
  57. !RAM_ExSpriteNum = $170B|!Base2
  58. !RAM_ExSpriteYLo = $1715|!Base2
  59. !RAM_ExSpriteXLo = $171F|!Base2
  60. !RAM_ExSpriteYHi = $1729|!Base2
  61. !RAM_ExSpriteXHi = $1733|!Base2
  62. !RAM_ExSprSpeedY = $173D|!Base2
  63. !RAM_ExSprSpeedX = $1747|!Base2
  64. !RAM_OffscreenVert = !186C
  65. !RAM_OnYoshi = $187A|!Base2
  66.  
  67. !RAM_ExtraBits = !7FAB10
  68. !RAM_NewSpriteNum = !7FAB9E
  69.  
  70. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  71. ; sprite init JSL
  72. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  73.  
  74. print "INIT ",pc
  75. LDA #$38 ;\ set ball n' chain radius
  76. STA !187B,x ;/
  77.  
  78. LDA #$00 ;\ set initial angle ($0000-$01FF)
  79. STA !151C,x ; | $151C is the high byte
  80. LDA #$00 ; |
  81. STA !1602,x ;/ $161C is the low byte
  82.  
  83. RTL ; return
  84.  
  85.  
  86. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  87. ; sprite code JSL
  88. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  89.  
  90. print "MAIN ",pc
  91. PHB
  92. PHK
  93. PLB
  94. JSR BallnChainMain
  95. PLB
  96. RTL
  97.  
  98. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  99. ; main
  100. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  101.  
  102. BallnChainMain: LDA #$00
  103. %SubOffScreen()
  104. LDA !RAM_SpritesLocked ;\ if sprites locked,
  105. BNE CODE_02D653 ;/ branch
  106.  
  107. LDA !RAM_ExtraBits,x ;\ use extra bits to determine direction of rotation
  108. LDY #$02 ; | (original uses sprite x position)
  109. AND #$04 ; |
  110. BNE CODE_02D63B ; |
  111. LDY #$FE ; |
  112. CODE_02D63B: TYA ; |
  113. LDY #$00 ; |
  114. CMP #$00 ; |
  115. BPL CODE_02D643 ; |
  116. DEY ;/
  117.  
  118. CODE_02D643: CLC ;\ update angle depending on direction of rotation
  119. ADC !1602,x ; | $1602,x is used to store the low byte of the ball n' chain angle
  120. STA !1602,x ; |
  121. TYA ; |
  122. ADC !151C,x ; | and $151C,x for the high byte
  123. AND #$01 ; |
  124. STA !151C,x ; |
  125. CODE_02D653: LDA !151C,x ; |
  126. STA $01 ; | $00-$01 = ball n' chain angle
  127. LDA !1602,x ; |
  128. STA $00 ;/
  129.  
  130. REP #$30 ; set 16-bit mode for accumulator and registers
  131. STZ $02
  132. ; LDA $00 ;\ $02-$03 = ball n' chain angle + 90 degrees
  133. ; CLC ; |
  134. ; ADC #$0080 ; |
  135. ; AND #$01FF ; |
  136. ; STA $02 ;/
  137.  
  138. LDA $00 ;\ $04-$05 = cosines of ball n' chain angle
  139. AND #$00FF ; |
  140. ASL ; |
  141. TAX ; |
  142. ; LDA $07F7DB,x ; | this is SMW's trigonometry table
  143. LDA HorzSineTable,x
  144. SEP #$10
  145. BPL NotHorzFlip
  146. LDX #$01
  147. STX $02
  148. EOR #$FFFF
  149. INC A
  150. NotHorzFlip:
  151. LDX $01
  152. BEQ NotHorzFlip2
  153. LDX $02
  154. DEX
  155. STX $02
  156. NotHorzFlip2:
  157. REP #$10
  158. STA $04 ;/
  159.  
  160. ; LDA $02 ;\ $06-$07 = cosines of ball n' chain angle + 90 degrees = sines for ball n' chain angle
  161. LDA $00
  162. AND #$00FF ; |
  163. ASL ; |
  164. TAX ; |
  165. ; LDA $07F7DB,x ; |
  166. LDA VertSineTable,x
  167. BPL NotVertFlip
  168. SEP #$10
  169. LDX #$01
  170. STX $03
  171. EOR #$FFFF
  172. INC A
  173. NotVertFlip:
  174. STA $06 ;/
  175.  
  176. SEP #$30 ; set 8-bit mode for accumulator and registers
  177.  
  178. LDX $15E9|!Base2 ; get sprite index
  179.  
  180. if !SA1
  181. STZ $2250 ; MULTIPLICATRON
  182. LDA $04 ;\ multiply $04...
  183. STA $2251 ; |
  184. STZ $2252
  185. LDA !187B,x ; |
  186. LDY $05 ; |\ if $05 is 1, no need to do the multiplication
  187. BNE CODE_02D6A3 ; |/
  188. STA $2253 ; | ...with radius of circle ($187B,x)
  189. STZ $2254
  190. NOP ;<WASTE
  191. BRA $00 ;<TIME
  192. ASL $2306 ; Product/Remainder Result (Low Byte)
  193. LDA $2307 ; Product/Remainder Result (High Byte)
  194. ADC #$00
  195. else
  196. LDA $04 ;\ multiply $04...
  197. STA $4202 ; |
  198. LDA !187B,x ; |
  199. LDY $05 ; |\ if $05 is 1, no need to do the multiplication
  200. BNE CODE_02D6A3 ; |/
  201. STA $4203 ; | ...with radius of circle ($187B,x)
  202. JSR CODE_02D800 ;/ waste some cycles while the result is calculated
  203. ASL $4216 ; Product/Remainder Result (Low Byte)
  204. LDA $4217 ; Product/Remainder Result (High Byte)
  205. ADC #$00
  206. endif
  207.  
  208. ;CODE_02D6A3: LSR $01
  209. ; BCC CODE_02D6AA
  210. CODE_02D6A3:
  211. LDY $02
  212. BEQ CODE_02D6AA
  213. EOR #$FF
  214. INC A
  215. CODE_02D6AA: STA $04
  216. if !SA1
  217. STZ $2250 ; MULTIPLICATRON
  218. LDA $06 ;\ multiply $06...
  219. STA $2251 ; |
  220. STZ $2252
  221. LDA !187B,x ; |
  222. LDY $07 ; |\ if $07 is 1, no need to do the multiplication
  223. BNE CODE_02D6C6 ; |/
  224. STA $2253 ; | ...with radius of circle ($187B,x)
  225. STZ $2254
  226. NOP ;<WASTE
  227. BRA $00 ;<TIME
  228. ASL $2306 ; Product/Remainder Result (Low Byte)
  229. LDA $2307 ; Product/Remainder Result (High Byte)
  230. ADC #$00
  231. else
  232. LDA $06 ;\ multiply $06...
  233. STA $4202 ; |
  234. LDA !187B,x ; |
  235. LDY $07 ; |\ if $07 is 1, no need to do the multiplication
  236. BNE CODE_02D6C6 ; |/
  237. STA $4203 ; | ...with raidus of circle ($187B,x)
  238. JSR CODE_02D800 ;/ waste some cycles while the result is calculated
  239. ASL $4216 ; Product/Remainder Result (Low Byte)
  240. LDA $4217 ; Product/Remainder Result (High Byte)
  241. ADC #$00
  242. endif
  243. ;CODE_02D6C6: LSR $03
  244. ; BCC CODE_02D6CD
  245. CODE_02D6C6:
  246. LDY $03
  247. BEQ CODE_02D6CD
  248. EOR #$FF
  249. INC A
  250. CODE_02D6CD: STA $06
  251.  
  252. LDA !RAM_SpriteXLo,x ;\ preserve current sprite position (center of rotation)
  253. PHA ; |
  254. LDA !RAM_SpriteXHi,x ; |
  255. PHA ; |
  256. LDA !RAM_SpriteYLo,x ; |
  257. PHA ; |
  258. LDA !RAM_SpriteYHi,x ; |
  259. PHA ;/
  260.  
  261. ;LDY $0F86,x ; UNKNOWN RAM ADDRESS ALERT
  262.  
  263. STZ $00 ;\
  264. LDA $04 ; | x offset low byte
  265. BPL CODE_02D6E8 ; |
  266. DEC $00 ; |
  267. CODE_02D6E8: CLC ; |
  268. ADC !RAM_SpriteXLo,x ; | + x position of rotation center low byte
  269. STA !RAM_SpriteXLo,x ;/ = sprite x position low byte
  270.  
  271. PHP ;\
  272. PHA ; |
  273. SEC ; |
  274. SBC !1534,x ; |
  275. STA !1528,x ; |
  276. PLA ; |
  277. STA !1534,x ; |
  278. PLP ;/
  279.  
  280. LDA !RAM_SpriteXHi,x ;\ x position of rotation center high byte
  281. ADC $00 ; | + adjustment for screen boundaries
  282. STA !RAM_SpriteXHi,x ;/ = x position of sprite high byte
  283.  
  284. STZ $01 ;\
  285. LDA $06 ; | y offset low byte
  286. BPL CODE_02D70B ; |
  287. DEC $01 ; |
  288. CODE_02D70B: CLC ; |
  289. ADC !RAM_SpriteYLo,x ; | + y position of rotation center low byte
  290. STA !RAM_SpriteYLo,x ;/ = sprite y position low byte
  291.  
  292. LDA !RAM_SpriteYHi,x ;\ y position of center of rotation high byte
  293. ADC $01 ; | + adjustment for screen boundaries
  294. STA !RAM_SpriteYHi,x ;/ = sprite y position high byte
  295.  
  296. ; in between here was a check for sprite number that determined whether the sprite should act like a platform or hurt Mario, since the ball n' chain
  297. ; shares its code with the rotating platform
  298. ; if you are interested in the exact code, check all.log
  299.  
  300. JSL $01A7DC ; interact with Mario
  301. JSR BallnChainGFX
  302.  
  303. PLA ;\ retrieve sprite position (center of rotation)
  304. STA !RAM_SpriteYHi,x ; |
  305. PLA ; |
  306. STA !RAM_SpriteYLo,x ; |
  307. PLA ; |
  308. STA !RAM_SpriteXHi,x ; |
  309. PLA ; |
  310. STA !RAM_SpriteXLo,x ;/
  311.  
  312. LDA $00 ;\ $00 = x position of first chain tile
  313. CLC ; |
  314. ADC !RAM_ScreenBndryXLo ; |
  315. SEC ; |
  316. SBC !RAM_SpriteXLo,x ; |
  317. JSR CODE_02D870 ; |
  318. CLC ; |
  319. ADC !RAM_SpriteXLo,x ; |
  320. SEC ; |
  321. SBC !RAM_ScreenBndryXLo ; |
  322. STA $00 ;/
  323.  
  324. LDA $01 ;\ $01 = y position of first chain tile
  325. CLC ; |
  326. ADC !RAM_ScreenBndryYLo ; |
  327. SEC ; |
  328. SBC !RAM_SpriteYLo,x ; |
  329. JSR CODE_02D870 ; |
  330. CLC ; |
  331. ADC !RAM_SpriteYLo,x ; |
  332. SEC ; |
  333. SBC !RAM_ScreenBndryYLo ; |
  334. STA $01 ;/
  335.  
  336. LDA !15C4,x ;\ if sprite is off-screen,
  337. BNE Return02D806 ;/ return
  338. LDA !RAM_SprOAMIndex,x ;\ get new OAM index for chain tiles
  339. CLC ; |
  340. ADC #$10 ; |
  341. TAY ;/
  342. PHX ; preserve sprite index
  343.  
  344. LDA !RAM_SpriteXLo,x ;\ make backups of sprite position low bytes that are accessible
  345. STA $0A ; | without having the sprite index in the x register
  346. LDA !RAM_SpriteYLo,x ; |
  347. STA $0B ;/
  348.  
  349. ; yay more removed sprite number checks
  350.  
  351. LDA #$E8 ;\ $08 = chain tile number
  352. STA $08 ;/
  353. LDX #$01 ; setup loop
  354.  
  355. CODE_02D7AF: LDA $00 ;\ set tile x position
  356. STA !OAM_DispX,y ;/
  357. LDA $01 ;\ set tile y position
  358. STA !OAM_DispY,y ;/
  359. LDA $08 ;\ set tile number
  360. STA !OAM_Tile,y ;/
  361. LDA #$33 ;\ set tile properties
  362. STA !OAM_Prop,y ;/
  363.  
  364. LDA $00 ;\ $00 = x position of next chain tile
  365. CLC ; |
  366. ADC !RAM_ScreenBndryXLo ; |
  367. SEC ; |
  368. SBC $0A ; |
  369. STA $00 ; |
  370. ASL ; |
  371. ROR $00 ; |
  372. LDA $00 ; |
  373. SEC ; |
  374. SBC !RAM_ScreenBndryXLo ; |
  375. CLC ; |
  376. ADC $0A ; |
  377. STA $00 ;/
  378.  
  379. LDA $01 ;\ $01 = y position of next chain tile
  380. CLC ; |
  381. ADC !RAM_ScreenBndryYLo ; |
  382. SEC ; |
  383. SBC $0B ; |
  384. STA $01 ; |
  385. ASL ; |
  386. ROR $01 ; |
  387. LDA $01 ; |
  388. SEC ; |
  389. SBC !RAM_ScreenBndryYLo ; |
  390. CLC ; |
  391. ADC $0B ; |
  392. STA $01 ;/
  393.  
  394. INY ;\ increase OAM index by four
  395. INY ; |
  396. INY ; |
  397. INY ;/
  398. DEX ;\ if chain tiles left to draw,
  399. BPL CODE_02D7AF ;/ go to start of loop
  400.  
  401. PLX ; retrieve sprite index
  402. LDY #$02 ; the tiles drawn were 16x16
  403. LDA #$05 ; six tiles were drawn
  404. JSL $01B7B3 ; finish OAM write
  405. RTS ; return
  406.  
  407. CODE_02D800: NOP ;\ this routine exists for the sole purpose of wasting cycles
  408. NOP ; | while the multiplication or division registers do their work
  409. NOP ; |
  410. NOP ; |
  411. NOP ; |
  412. NOP ;/
  413. Return02D806: RTS ; return
  414.  
  415. XOffset: db $F8,$08,$F8,$08
  416. YOffset: db $F8,$F8,$08,$08
  417. Tilemap: db $EA,$EA,$EA,$EA
  418. Properties: db $33,$73,$B3,$F3
  419.  
  420. BallnChainGFX: %GetDrawInfo()
  421. PHX ; preserve sprite index
  422. LDX #$03 ; setup loop
  423.  
  424. CODE_02D819: LDA $00 ;\ set tile x position
  425. CLC ; |
  426. ADC XOffset,x ; |
  427. STA !OAM_DispX,y ;/
  428.  
  429. LDA $01 ;\ set tile y position
  430. CLC ; |
  431. ADC YOffset,x ; |
  432. STA !OAM_DispY,y ;/
  433.  
  434. LDA Tilemap,x ;\ set tile number
  435. STA !OAM_Tile,y ;/ this used to draw its data from the NOPs just above instead of from a proper table
  436.  
  437. LDA Properties,x ;\ set tile properties
  438. STA !OAM_Prop,y ;/
  439.  
  440. INY ;\ increase OAM index by four
  441. INY ; |
  442. INY ; |
  443. INY ;/
  444.  
  445. DEX ;\ if tiles left to draw,
  446. BPL CODE_02D819 ;/ go to start of loop
  447.  
  448. PLX ; retrieve sprite index
  449. RTS ; return
  450.  
  451. CODE_02D870: PHP ; preserve processor flags
  452. BPL CODE_02D876 ;\ make sure value is positive
  453. EOR #$FF ; |
  454. INC A ;/
  455. CODE_02D876:
  456. if !SA1
  457. STA $2252 ; low byte of dividend is whatever was in the accumulator when the routine was called
  458. STZ $2251 ; high byte of dividend is zero
  459. LDA #$01
  460. STA $2250
  461. LDA !187B,x ;\ divisor is half the radius of the circle
  462. LSR ; |
  463. STA $2253 ;/
  464. STZ $2254
  465. NOP
  466. BRA $00
  467. LDA $2306 ;\ $0E = low byte of result
  468. STA $0E ;/
  469. LDA $2307 ; noone cares about the high byte, so why is it even loaded?
  470. else
  471. STA $4205 ; low byte of dividend is whatever was in the accumulator when the routine was called
  472. STZ $4204 ; high byte of dividend is zero
  473. LDA !187B,x ;\ divisor is half the radius of the circle
  474. LSR ; |
  475. STA $4206 ;/
  476. JSR CODE_02D800 ; wait
  477. LDA $4214 ;\ $0E = low byte of result
  478. STA $0E ;/
  479. LDA $4215 ; noone cares about the high byte, so why is it even loaded?
  480. endif
  481.  
  482. ASL $0E ;\ what
  483. ROL ; |
  484. ASL $0E ; |
  485. ROL ; |
  486. ASL $0E ; |
  487. ROL ; |
  488. ASL $0E ; |
  489. ROL ;/
  490.  
  491. PLP ; retrieve processor flags
  492. BPL Return02D8A0 ;\ if original value was negative,
  493. EOR #$FF ; | invert result
  494. INC A ;/
  495. Return02D8A0: RTS ; return
  496.  
  497. ;For circletool.exe to work, those MUST be last and the labels/format may NOT be changed.
  498. HorzSineTable:
  499. db $00,$00,$04,$00,$09,$00,$0E,$00,$13,$00,$18,$00,$1D,$00,$22,$00
  500. db $27,$00,$2C,$00,$30,$00,$35,$00,$3A,$00,$3F,$00,$43,$00,$48,$00
  501. db $4D,$00,$51,$00,$56,$00,$5A,$00,$5F,$00,$63,$00,$68,$00,$6C,$00
  502. db $70,$00,$74,$00,$79,$00,$7D,$00,$81,$00,$85,$00,$89,$00,$8C,$00
  503. db $90,$00,$94,$00,$98,$00,$9B,$00,$9F,$00,$A2,$00,$A6,$00,$A9,$00
  504. db $AC,$00,$AF,$00,$B2,$00,$B6,$00,$B8,$00,$BB,$00,$BE,$00,$C1,$00
  505. db $C4,$00,$C6,$00,$C9,$00,$CB,$00,$CE,$00,$D0,$00,$D2,$00,$D4,$00
  506. db $D6,$00,$D8,$00,$DA,$00,$DC,$00,$DE,$00,$E0,$00,$E2,$00,$E3,$00
  507. db $E5,$00,$E6,$00,$E8,$00,$E9,$00,$EB,$00,$EC,$00,$ED,$00,$EE,$00
  508. db $EF,$00,$F0,$00,$F1,$00,$F2,$00,$F3,$00,$F4,$00,$F5,$00,$F6,$00
  509. db $F7,$00,$F7,$00,$F8,$00,$F9,$00,$F9,$00,$FA,$00,$FA,$00,$FB,$00
  510. db $FB,$00,$FC,$00,$FC,$00,$FC,$00,$FD,$00,$FD,$00,$FD,$00,$FD,$00
  511. db $FE,$00,$FE,$00,$FE,$00,$FE,$00,$FE,$00,$FF,$00,$FF,$00,$FF,$00
  512. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  513. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  514. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  515. db $00,$01,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  516. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  517. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
  518. db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$FE,$00,$FE,$00,$FE,$00,$FE,$00
  519. db $FE,$00,$FD,$00,$FD,$00,$FD,$00,$FD,$00,$FC,$00,$FC,$00,$FC,$00
  520. db $FB,$00,$FB,$00,$FA,$00,$FA,$00,$F9,$00,$F9,$00,$F8,$00,$F7,$00
  521. db $F7,$00,$F6,$00,$F5,$00,$F4,$00,$F3,$00,$F2,$00,$F1,$00,$F0,$00
  522. db $EF,$00,$EE,$00,$ED,$00,$EC,$00,$EB,$00,$E9,$00,$E8,$00,$E6,$00
  523. db $E5,$00,$E3,$00,$E2,$00,$E0,$00,$DE,$00,$DC,$00,$DA,$00,$D8,$00
  524. db $D6,$00,$D4,$00,$D2,$00,$D0,$00,$CE,$00,$CB,$00,$C9,$00,$C6,$00
  525. db $C4,$00,$C1,$00,$BE,$00,$BB,$00,$B8,$00,$B6,$00,$B2,$00,$AF,$00
  526. db $AC,$00,$A9,$00,$A6,$00,$A2,$00,$9F,$00,$9B,$00,$98,$00,$94,$00
  527. db $90,$00,$8C,$00,$89,$00,$85,$00,$81,$00,$7D,$00,$79,$00,$74,$00
  528. db $70,$00,$6C,$00,$68,$00,$63,$00,$5F,$00,$5A,$00,$56,$00,$51,$00
  529. db $4D,$00,$48,$00,$43,$00,$3F,$00,$3A,$00,$35,$00,$30,$00,$2C,$00
  530. db $27,$00,$22,$00,$1D,$00,$18,$00,$13,$00,$0E,$00,$09,$00,$04,$00
  531. VertSineTable:
  532. db $00,$01,$FF,$00,$FF,$00,$FF,$00,$FF,$00,$FE,$00,$FE,$00,$FD,$00
  533. db $FC,$00,$FC,$00,$FB,$00,$FA,$00,$F9,$00,$F8,$00,$F6,$00,$F5,$00
  534. db $F4,$00,$F2,$00,$F0,$00,$EF,$00,$ED,$00,$EB,$00,$E9,$00,$E7,$00
  535. db $E5,$00,$E3,$00,$E1,$00,$DF,$00,$DC,$00,$DA,$00,$D8,$00,$D5,$00
  536. db $D3,$00,$D0,$00,$CD,$00,$CB,$00,$C8,$00,$C5,$00,$C2,$00,$BF,$00
  537. db $BC,$00,$BA,$00,$B7,$00,$B4,$00,$B0,$00,$AD,$00,$AA,$00,$A7,$00
  538. db $A4,$00,$A1,$00,$9E,$00,$9B,$00,$97,$00,$94,$00,$91,$00,$8E,$00
  539. db $8B,$00,$87,$00,$84,$00,$81,$00,$7E,$00,$7B,$00,$77,$00,$74,$00
  540. db $71,$00,$6E,$00,$6B,$00,$68,$00,$65,$00,$62,$00,$5F,$00,$5C,$00
  541. db $59,$00,$56,$00,$53,$00,$50,$00,$4D,$00,$4B,$00,$48,$00,$45,$00
  542. db $42,$00,$40,$00,$3D,$00,$3B,$00,$38,$00,$36,$00,$33,$00,$31,$00
  543. db $2F,$00,$2C,$00,$2A,$00,$28,$00,$26,$00,$24,$00,$22,$00,$20,$00
  544. db $1E,$00,$1C,$00,$1A,$00,$19,$00,$17,$00,$15,$00,$14,$00,$12,$00
  545. db $11,$00,$0F,$00,$0E,$00,$0D,$00,$0C,$00,$0A,$00,$09,$00,$08,$00
  546. db $07,$00,$06,$00,$05,$00,$05,$00,$04,$00,$03,$00,$03,$00,$02,$00
  547. db $01,$00,$01,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  548. db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00,$01,$00
  549. db $01,$00,$02,$00,$03,$00,$03,$00,$04,$00,$05,$00,$05,$00,$06,$00
  550. db $07,$00,$08,$00,$09,$00,$0A,$00,$0C,$00,$0D,$00,$0E,$00,$0F,$00
  551. db $11,$00,$12,$00,$14,$00,$15,$00,$17,$00,$19,$00,$1A,$00,$1C,$00
  552. db $1E,$00,$20,$00,$22,$00,$24,$00,$26,$00,$28,$00,$2A,$00,$2C,$00
  553. db $2F,$00,$31,$00,$33,$00,$36,$00,$38,$00,$3B,$00,$3D,$00,$40,$00
  554. db $42,$00,$45,$00,$48,$00,$4B,$00,$4D,$00,$50,$00,$53,$00,$56,$00
  555. db $59,$00,$5C,$00,$5F,$00,$62,$00,$65,$00,$68,$00,$6B,$00,$6E,$00
  556. db $71,$00,$74,$00,$77,$00,$7B,$00,$7E,$00,$81,$00,$84,$00,$87,$00
  557. db $8B,$00,$8E,$00,$91,$00,$94,$00,$97,$00,$9B,$00,$9E,$00,$A1,$00
  558. db $A4,$00,$A7,$00,$AA,$00,$AD,$00,$B0,$00,$B4,$00,$B7,$00,$BA,$00
  559. db $BC,$00,$BF,$00,$C2,$00,$C5,$00,$C8,$00,$CB,$00,$CD,$00,$D0,$00
  560. db $D3,$00,$D5,$00,$D8,$00,$DA,$00,$DC,$00,$DF,$00,$E1,$00,$E3,$00
  561. db $E5,$00,$E7,$00,$E9,$00,$EB,$00,$ED,$00,$EF,$00,$F0,$00,$F2,$00
  562. db $F4,$00,$F5,$00,$F6,$00,$F8,$00,$F9,$00,$FA,$00,$FB,$00,$FC,$00
  563. db $FC,$00,$FD,$00,$FE,$00,$FE,$00,$FF,$00,$FF,$00,$FF,$00,$FF,$00
Add Comment
Please, Sign In to add comment