Advertisement
luckytyphlosion

based gbz80disasm.py

May 30th, 2016
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.26 KB | None | 0 0
  1. Func_f8000: ; f8000 (3e:4000)
  2. call Func_f9254
  3. call DelayFrame
  4. call DelayFrame
  5. call DelayFrame
  6. ld a, [hTilesetType]
  7. push af
  8. xor a
  9. ld [hTilesetType], a
  10. ld a, [wUpdateSpritesEnabled]
  11. push af
  12. ld a, $ff
  13. ld [wUpdateSpritesEnabled], a
  14. ld a, [rIE]
  15. push af
  16. xor a
  17. ld [rIF], a
  18. ld a, $0f
  19. ld [rIE], a
  20. ld a, $08
  21. ld [rSTAT], a
  22. ld a, [$ffbd]
  23. push af
  24. ld a, $98
  25. ld [$ffbd], a
  26. call Func_f8fb3
  27. call Func_f807a
  28. xor a
  29. ld [rBGP], a
  30. ld [rOBP0], a
  31. ld [rOBP1], a
  32. call UpdateGBCPal_BGP
  33. call UpdateGBCPal_OBP0
  34. call UpdateGBCPal_OBP1
  35. call Func_fbb5a
  36. call ClearSprites
  37. xor a
  38. ld [hLCDCPointer], a
  39. ld [hSCX], a
  40. ld [hSCY], a
  41. ld a, $90
  42. ld [hWY], a
  43. call DelayFrame
  44. pop af
  45. ld [$ffbd], a
  46. xor a
  47. ld [rIF], a
  48. pop af
  49. ld [rIE], a
  50. xor a
  51. ld [rSTAT], a
  52. call RunDefaultPaletteCommand
  53. call Func_0f16
  54. call PlayDefaultMusic
  55. call GBPalNormal
  56. pop af
  57. ld [wUpdateSpritesEnabled], a
  58. pop af
  59. ld [hTilesetType], a
  60. ret
  61.  
  62. Func_f807a: ; f807a (3e:407a)
  63. call Func_f8116
  64. call DelayFrame
  65. ld b, $0e
  66. call RunPaletteCommand
  67. .asm_f8085
  68. ld a, [$c5d1]
  69. bit 7, a
  70. ret nz
  71. call Func_f923f
  72. call Func_f80ac
  73. ret nz
  74. call Func_f8282
  75. ld a, $3c
  76. ld [$c5bd], a
  77. call Func_fbb65
  78. call Func_f8848
  79. call Func_f80a8
  80. call Func_f80c4
  81. jr .asm_f8085
  82.  
  83. Func_f80a8: ; f80a8 (3e:40a8)
  84. call DelayFrame
  85. ret
  86.  
  87. Func_f80ac: ; f80ac (3e:40ac)
  88. ld hl, wPreventBlackout
  89. bit 1, [hl]
  90. ret z
  91. ld a, [hJoyPressed]
  92. and $04
  93. ret
  94.  
  95. Func_f80b7: ; f80b7 (3e:40b7)
  96. ld a, [hJoyPressed]
  97. and $08
  98. ret z
  99. ld hl, $c5e2
  100. ld a, [hl]
  101. xor $01
  102. ld [hl], a
  103. ret
  104.  
  105. Func_f80c4: ; f80c4 (3e:40c4)
  106. ld a, [$c634]
  107. and a
  108. ret z
  109. ld hl, wChannelNoteDelayCounters
  110. ld a, $01
  111. cp [hl]
  112. ret nz
  113. inc hl
  114. cp [hl]
  115. ret nz
  116. inc hl
  117. cp [hl]
  118. ret nz
  119. ld a, [$c5e3]
  120. ld e, a
  121. ld a, [$c5e4]
  122. and $03
  123. ld d, a
  124. sla e
  125. rl d
  126. ld e, d
  127. ld d, $00
  128. ld hl, Data_f80f5
  129. add hl, de
  130. add hl, de
  131. ld a, [hli]
  132. ld [$c0e9], a
  133. ld a, [hl]
  134. ld [wMusicTempo], a
  135. ret
  136.  
  137. Data_f80f5 ; f80f5 (3e:40f5)
  138. ld [hl], l
  139. nop
  140. ld l, l
  141. nop
  142. ld h, l
  143. nop
  144. ld e, l
  145. nop
  146. ld d, l
  147. nop
  148. ld hl, wChannelNoteDelayCounters
  149. ld a, $01
  150. cp [hl]
  151. ret nz
  152. inc hl
  153. cp [hl]
  154. ret nz
  155. inc hl
  156. cp [hl]
  157. ret nz
  158. ld a, $75
  159. ld [$c0e9], a
  160. xor a
  161. ld [wMusicTempo], a
  162. ret
  163.  
  164. Func_f8116: ; f8116 (3e:4116)
  165. call Func_f9279
  166. call ClearSprites
  167. call DisableLCD
  168. ld hl, wSerialEnemyMonsPatchList
  169. ld bc, $67
  170. xor a
  171. call FillMemory
  172. ld hl, $c700
  173. ld bc, $200
  174. xor a
  175. call FillMemory
  176. xor a
  177. ld [H_AUTOBGTRANSFERENABLED], a
  178. call Func_fbb5a
  179. ld hl, $4f14
  180. ld de, vTileset
  181. ld bc, $500
  182. ld a, $20
  183. call FarCopyData
  184. ld hl, $5324
  185. ld de, vNPCSprites
  186. ld bc, $1000
  187. ld a, $20
  188. call FarCopyData
  189. ld a, $d3
  190. ld [$c5c0], a
  191. ld a, $53
  192. ld [$c5c1], a
  193. ld a, $fa
  194. ld [$c5c4], a
  195. ld a, $53
  196. ld [$c5c5], a
  197. ld a, $07
  198. ld [$c5c6], a
  199. ld a, $55
  200. ld [$c5c7], a
  201. ld a, $05
  202. ld [$c5c2], a
  203. ld a, $54
  204. ld [$c5c3], a
  205. ld hl, vBGMap0
  206. ld bc, $800
  207. ld a, $00
  208. call FillMemory
  209. ld hl, $98c0
  210. ld bc, $180
  211. ld a, $0b
  212. call FillMemory
  213. ld a, $01
  214. ld de, $7458
  215. call Func_fbb93
  216. ld a, $74
  217. ld [$c5ea], a
  218. call Func_f9223
  219. xor a
  220. ld [hSCX], a
  221. ld [hSCY], a
  222. ld a, $7e
  223. ld [hWY], a
  224. ld a, $42
  225. ld [hLCDCPointer], a
  226. ld a, $40
  227. ld [$c5e3], a
  228. xor a
  229. ld [$c5e4], a
  230. xor a
  231. ld [$c5d6], a
  232. ld a, $60
  233. ld [$c5d7], a
  234. ld hl, $c61a
  235. ld bc, $14
  236. ld a, $74
  237. call FillMemory
  238. call Func_f81ff
  239. call Func_f8256
  240. ld a, $e3
  241. ld [rLCDC], a
  242. call Func_f81e9
  243. ld a, $e4
  244. ld [rOBP0], a
  245. ld a, $e0
  246. ld [rOBP1], a
  247. call UpdateGBCPal_OBP0
  248. call UpdateGBCPal_OBP1
  249. ret
  250.  
  251. Func_f81e9: ; f81e9 (3e:41e9)
  252. ld a, [wOnSGB]
  253. and a
  254. jr nz, .asm_f81f7
  255. ld a, $d0
  256. ld [rBGP], a
  257. call UpdateGBCPal_BGP
  258. ret
  259. .asm_f81f7
  260. ld a, $e4
  261. ld [rBGP], a
  262. call UpdateGBCPal_BGP
  263. ret
  264.  
  265. Func_f81ff: ; f81ff (3e:41ff)
  266. ld hl, wOAMBuffer
  267. ld de, $4249
  268. ld b, $97
  269. ld c, $80
  270. ld a, $04
  271. call Func_f8233
  272. ld de, Data_f8248
  273. ld b, $96
  274. ld c, $50
  275. ld a, $01
  276. call Func_f8233
  277. ld de, Data_f824d
  278. ld b, $14
  279. ld c, $20
  280. ld a, $05
  281. call Func_f8233
  282. ld de, Data_f8252
  283. ld b, $20
  284. ld c, $80
  285. ld a, $04
  286. call Func_f8233
  287. ret
  288.  
  289. Func_f8233: ; f8233 (3e:4233)
  290. .asm_f8233
  291. push af
  292. ld [hl], b
  293. inc hl
  294. ld [hl], c
  295. inc hl
  296. ld a, [de]
  297. ld [hl], a
  298. inc hl
  299. ld [hl], $00
  300. inc hl
  301. ld a, c
  302. add $08
  303. ld c, a
  304. inc de
  305. pop af
  306. dec a
  307. jr nz, .asm_f8233
  308. ret
  309.  
  310. Data_f8248 ; f8248 (3e:4248)
  311. cp $d0
  312. ret nc
  313. ret nc
  314. ret nc
  315. Data_f824d ; f824d (3e:424d)
  316. db $ec
  317. xor $ef
  318. Data_f8252 ; f8252 (3e:4252)
  319. db $ec
  320. rst $28
  321. ld de, $9c21
  322. ld hl, Data_f8279
  323. ld c, $09
  324. .asm_f825e
  325. ld a, [hli]
  326. ld [de], a
  327. inc de
  328. dec c
  329. jr nz, .asm_f825e
  330. ld hl, $9c01
  331. ld [hl], $15
  332. ld hl, $9c02
  333. ld [hl], $16
  334. ld hl, $9c2c
  335. ld [hl], $1b
  336. ld hl, $9c2d
  337. ld [hl], $1c
  338. ret
  339.  
  340. Data_f8279 ; f8279 (3e:4279)
  341. rla
  342. jr .asm_f8295
  343. add hl, de
  344. add hl, de
  345. add hl, de
  346. add hl, de
  347. add hl, de
  348. add hl, de
  349. ld a, [$c5d1]
  350. ld e, a
  351. ld d, $00
  352. ld hl, Data_f8291
  353. add hl, de
  354. add hl, de
  355. ld a, [hli]
  356. ld h, [hl]
  357. ld l, a
  358. jp [hl]
  359. Data_f8291 ; f8291 (3e:4291)
  360. xor e
  361. ld b, d
  362. cp l
  363. ld b, d
  364. .asm_f8295
  365. inc h
  366. ld b, e
  367. ld e, h
  368. ld b, e
  369. adc h
  370. ld b, e
  371. sbc c
  372. ld b, e
  373. xor d
  374. ld b, e
  375. cp e
  376. ld b, e
  377. call z, Func_e343
  378. ld b, e
  379. ld b, $44
  380. rrca
  381. ld b, h
  382. dec e
  383. ld b, h
  384. ld a, $02
  385. ld de, Data_f88e0
  386. call Func_fbb93
  387. ld hl, $c5d1
  388. inc [hl]
  389. ld a, $01
  390. ld [$c634], a
  391. ret
  392.  
  393. Func_f82bd: ; f82bd (3e:42bd)
  394. ld a, [$c5e5]
  395. cp $18
  396. jr nc, .asm_f82e8
  397. ld hl, $c5d6
  398. ld a, [hli]
  399. or [hl]
  400. and a
  401. jr z, .asm_f82f6
  402. call Random
  403. ld [$c5d5], a
  404. call Func_f9210
  405. call Func_f88ae
  406. call Func_f886b
  407. call Func_f8cb0
  408. call Func_f844c
  409. call Func_f88e4
  410. call Func_f88fd
  411. ret
  412. .asm_f82e8
  413. ld hl, $c5d1
  414. inc [hl]
  415. xor a
  416. ld [$c634], a
  417. ld a, $c0
  418. ld [$c632], a
  419. ret
  420. .asm_f82f6
  421. ld a, $01
  422. ld [$c630], a
  423. ld a, $0c
  424. ld [$c5d1], a
  425. ld a, $80
  426. ld [$c631], a
  427. ld a, $0b
  428. ld de, $8858
  429. call Func_fbb93
  430. ld hl, $7
  431. add hl, bc
  432. ld [hl], $80
  433. ld hl, $b
  434. add hl, bc
  435. ld [hl], $80
  436. ld hl, $c
  437. add hl, bc
  438. ld [hl], $30
  439. xor a
  440. ld [$c634], a
  441. ret
  442.  
  443. Func_f8324: ; f8324 (3e:4324)
  444. call Func_f8440
  445. jr c, .asm_f833d
  446. xor a
  447. ld [$c5d5], a
  448. call Func_f9210
  449. call Func_f88ae
  450. call Func_f886b
  451. call Func_f8c97
  452. call Func_f80ff
  453. ret
  454. .asm_f833d
  455. ld hl, $c5d1
  456. inc [hl]
  457. ld a, $90
  458. ld [hSCX], a
  459. ld a, $72
  460. ld [$c5d3], a
  461. ld a, $04
  462. ld [$c5d2], a
  463. xor a
  464. ld [hLCDCPointer], a
  465. ld [$c617], a
  466. ld [$c618], a
  467. ld [$c619], a
  468. ret
  469.  
  470. Func_f835c: ; f835c (3e:435c)
  471. ld a, [hSCX]
  472. and a
  473. jr z, .asm_f837b
  474. call Func_f9210
  475. call Func_f88ae
  476. call Func_f886b
  477. ld a, [hSCX]
  478. dec a
  479. dec a
  480. dec a
  481. dec a
  482. ld [hSCX], a
  483. ld a, $e0
  484. ld [$c62e], a
  485. call Func_f8cc7
  486. ret
  487. .asm_f837b
  488. xor a
  489. ld [$c5e3], a
  490. ld [$c5e4], a
  491. ld hl, $c5d1
  492. inc [hl]
  493. ld a, $05
  494. ld [$c5d2], a
  495. ret
  496.  
  497. Func_f838c: ; f838c (3e:438c)
  498. call Func_f891e
  499. ld a, $20
  500. ld [$c632], a
  501. ld hl, $c5d1
  502. inc [hl]
  503. ret
  504.  
  505. Func_f8399: ; f8399 (3e:4399)
  506. call Func_f8440
  507. ret nc
  508. call Func_f8a92
  509. ld a, $40
  510. ld [$c632], a
  511. ld hl, $c5d1
  512. inc [hl]
  513. ret
  514.  
  515. Func_f83aa: ; f83aa (3e:43aa)
  516. call Func_f8440
  517. ret nc
  518. call Func_f8ae4
  519. ld a, $40
  520. ld [$c632], a
  521. ld hl, $c5d1
  522. inc [hl]
  523. ret
  524.  
  525. Func_f83bb: ; f83bb (3e:43bb)
  526. call Func_f8440
  527. ret nc
  528. call Func_f8b7a
  529. ld a, $40
  530. ld [$c632], a
  531. ld hl, $c5d1
  532. inc [hl]
  533. ret
  534.  
  535. Func_f83cc: ; f83cc (3e:43cc)
  536. call Func_f8440
  537. ret nc
  538. call Func_f8aa9
  539. push af
  540. call Func_f8b5d
  541. pop af
  542. ret nc
  543. ld a, $40
  544. ld [$c632], a
  545. ld hl, $c5d1
  546. inc [hl]
  547. ret
  548.  
  549. Func_f83e3: ; f83e3 (3e:43e3)
  550. call Func_f8440
  551. ret nc
  552. call Func_f8afb
  553. push af
  554. call Func_f8b5d
  555. pop af
  556. ret nc
  557. ld a, $80
  558. ld [$c632], a
  559. ld hl, $c5d1
  560. inc [hl]
  561. call Func_f8b92
  562. ret nc
  563. call Func_f8a7c
  564. ld a, $06
  565. ld [$c5d2], a
  566. ret
  567.  
  568. Func_f8406: ; f8406 (3e:4406)
  569. call Func_f8440
  570. ret nc
  571. ld hl, $c5d1
  572. inc [hl]
  573. ret
  574.  
  575. Func_f840f: ; f840f (3e:440f)
  576. call Func_f9210
  577. ld a, [hJoyPressed]
  578. and $01
  579. ret z
  580. ld hl, $c5d1
  581. set 7, [hl]
  582. ret
  583.  
  584. Func_f841d: ; f841d (3e:441d)
  585. call Func_f9210
  586. call Func_f88ae
  587. call Func_f886b
  588. call Func_f8cb0
  589. call Func_f80ff
  590. ld hl, $c631
  591. ld a, [hl]
  592. and a
  593. jr z, .asm_f8435
  594. dec [hl]
  595. ret
  596. .asm_f8435
  597. ld a, [hJoyPressed]
  598. and $01
  599. ret z
  600. ld hl, $c5d1
  601. set 7, [hl]
  602. ret
  603.  
  604. Func_f8440: ; f8440 (3e:4440)
  605. ld hl, $c632
  606. ld a, [hl]
  607. and a
  608. jr z, .asm_f844a
  609. dec [hl]
  610. and a
  611. ret
  612. .asm_f844a
  613. scf
  614. ret
  615.  
  616. Func_f844c: ; f844c (3e:444c)
  617. ld a, [$c5e6]
  618. ld h, a
  619. ld a, [$c5e7]
  620. ld l, a
  621. ld a, [$c5e3]
  622. ld e, a
  623. ld a, [$c5e4]
  624. ld d, a
  625. add hl, de
  626. ld a, h
  627. ld [$c5e6], a
  628. ld a, l
  629. ld [$c5e7], a
  630. ret nc
  631. ld hl, $c5e5
  632. inc [hl]
  633. ld hl, $c311
  634. dec [hl]
  635. dec [hl]
  636. ret
  637.  
  638. Func_f8470: ; f8470 (3e:4470)
  639. ld a, [$c5d2]
  640. ld e, a
  641. ld d, $00
  642. ld hl, Data_f847f
  643. add hl, de
  644. add hl, de
  645. ld a, [hli]
  646. ld h, [hl]
  647. ld l, a
  648. jp [hl]
  649. Data_f847f ; f847f (3e:447f)
  650. adc l
  651. ld b, h
  652. ld [$ff00+c], a
  653. ld b, h
  654. ld d, $45
  655. ld b, l
  656. ld b, l
  657. ld h, c
  658. ld b, l
  659. ld l, l
  660. ld b, l
  661. ld a, c
  662. ld b, l
  663. ld a, [$c630]
  664. and a
  665. jr nz, .asm_f84d2
  666. call Func_f87b5
  667. ld a, [$c5ea]
  668. ld hl, $5
  669. add hl, bc
  670. ld [hl], a
  671. call Func_f871e
  672. jr c, .asm_f84aa
  673. call Func_f8742
  674. call Func_f86b8
  675. ret
  676. .asm_f84aa
  677. call Func_f8742
  678. ld a, $01
  679. ld [$c5d2], a
  680. xor a
  681. ld hl, $c
  682. add hl, bc
  683. ld [hl], a
  684. ld hl, $d
  685. add hl, bc
  686. ld [hl], a
  687. ld hl, $e
  688. add hl, bc
  689. ld [hl], a
  690. ld [$c5d9], a
  691. ld [$c62f], a
  692. xor a
  693. ld [$c02d], a
  694. ld a, $91
  695. call PlaySound
  696. ret
  697. .asm_f84d2
  698. xor a
  699. ld [$c5e3], a
  700. ld [$c5e4], a
  701. ld a, $04
  702. ld [$c5d2], a
  703. call Func_f8742
  704. ret
  705.  
  706. Func_f84e2: ; f84e2 (3e:44e2)
  707. call Func_f8598
  708. call Func_f928c
  709. ret nc
  710. call Func_f8606
  711. jr c, .asm_f84fd
  712. call Func_f8bed
  713. ld hl, $c
  714. add hl, bc
  715. ld [hl], $00
  716. ld a, $02
  717. ld [$c5d2], a
  718. ret
  719. .asm_f84fd
  720. ld a, $03
  721. ld [$c5d2], a
  722. ld a, $60
  723. ld [$c5e1], a
  724. ld a, $10
  725. call Func_fbcd4
  726. xor a
  727. ld [$c02d], a
  728. ld a, $93
  729. call PlaySound
  730. ret
  731.  
  732. Func_f8516: ; f8516 (3e:4516)
  733. ld hl, $c
  734. add hl, bc
  735. ld a, [hl]
  736. cp $20
  737. jr nc, .asm_f8539
  738. inc [hl]
  739. inc [hl]
  740. inc [hl]
  741. inc [hl]
  742. ld d, $04
  743. call Func_f9362
  744. ld hl, $7
  745. add hl, bc
  746. ld [hl], a
  747. call Func_f87b5
  748. ld a, [$c5ea]
  749. ld hl, $5
  750. add hl, bc
  751. ld [hl], a
  752. ret
  753. .asm_f8539
  754. ld hl, $7
  755. add hl, bc
  756. ld [hl], $00
  757. ld a, $00
  758. ld [$c5d2], a
  759. ret
  760.  
  761. Func_f8545: ; f8545 (3e:4545)
  762. ld hl, $c5e1
  763. ld a, [hl]
  764. and a
  765. jr z, .asm_f8556
  766. dec [hl]
  767. ld a, [$c5ea]
  768. ld hl, $5
  769. add hl, bc
  770. ld [hl], a
  771. ret
  772. .asm_f8556
  773. ld a, $00
  774. ld [$c5d2], a
  775. ld a, $04
  776. call Func_fbcd4
  777. ret
  778.  
  779. Func_f8561: ; f8561 (3e:4561)
  780. ld a, [$c5ea]
  781. ld hl, $5
  782. add hl, bc
  783. ld [hl], a
  784. call Func_f8742
  785. ret
  786.  
  787. Func_f856d: ; f856d (3e:456d)
  788. ld a, $0f
  789. call Func_fbcd4
  790. ld hl, $c
  791. add hl, bc
  792. ld [hl], $00
  793. ret
  794.  
  795. Func_f8579: ; f8579 (3e:4579)
  796. ld hl, $c
  797. add hl, bc
  798. ld a, [hl]
  799. inc [hl]
  800. inc [hl]
  801. and $3f
  802. cp $20
  803. jr c, .asm_f8591
  804. ld d, $10
  805. call Func_f9362
  806. ld hl, $7
  807. add hl, bc
  808. ld [hl], a
  809. ret
  810. .asm_f8591
  811. ld hl, $7
  812. add hl, bc
  813. ld [hl], $00
  814. ret
  815.  
  816. Func_f8598: ; f8598 (3e:4598)
  817. ld de, hJoy5
  818. ld a, [de]
  819. and $20
  820. jr nz, .asm_f85a6
  821. ld a, [de]
  822. and $10
  823. jr nz, .asm_f85cc
  824. ret
  825. .asm_f85a6
  826. ld hl, $e
  827. add hl, bc
  828. ld [hl], $00
  829. ld hl, $d
  830. add hl, bc
  831. ld a, [hl]
  832. inc [hl]
  833. cp $0b
  834. jr c, .asm_f85be
  835. call Func_f85f2
  836. ld hl, $c62f
  837. set 0, [hl]
  838. .asm_f85be
  839. ld hl, $1
  840. add hl, bc
  841. ld a, [hl]
  842. cp $0e
  843. jr nc, .asm_f85c9
  844. inc [hl]
  845. ret
  846. .asm_f85c9
  847. ld [hl], $01
  848. ret
  849. .asm_f85cc
  850. ld hl, $d
  851. add hl, bc
  852. ld [hl], $00
  853. ld hl, $e
  854. add hl, bc
  855. ld a, [hl]
  856. inc [hl]
  857. cp $0d
  858. jr c, .asm_f85e4
  859. call Func_f85f2
  860. ld hl, $c62f
  861. set 1, [hl]
  862. .asm_f85e4
  863. ld hl, $1
  864. add hl, bc
  865. ld a, [hl]
  866. cp $01
  867. jr z, .asm_f85ef
  868. dec [hl]
  869. ret
  870. .asm_f85ef
  871. ld [hl], $0e
  872. ret
  873.  
  874. Func_f85f2: ; f85f2 (3e:45f2)
  875. call Func_f8bdf
  876. xor a
  877. ld hl, $d
  878. add hl, bc
  879. ld [hl], a
  880. ld hl, $e
  881. add hl, bc
  882. ld [hl], a
  883. ld a, $92
  884. call PlaySound
  885. ret
  886.  
  887. Func_f8606: ; f8606 (3e:4606)
  888. ld hl, $1
  889. add hl, bc
  890. ld a, [$c5ef]
  891. cp $06
  892. jr z, .asm_f863d
  893. cp $14
  894. jr z, .asm_f867b
  895. cp $12
  896. jr z, .asm_f867b
  897. cp $07
  898. jr z, .asm_f865c
  899. ld a, [hl]
  900. cp $01
  901. jp z, Func_f86ad
  902. cp $02
  903. jr z, .asm_f869a
  904. cp $03
  905. jr z, .asm_f869f
  906. cp $04
  907. jr z, .asm_f86a2
  908. cp $05
  909. jr z, .asm_f869f
  910. cp $06
  911. jr z, .asm_f869a
  912. cp $07
  913. jr z, .asm_f86ad
  914. jr .asm_f86ad
  915. .asm_f863d
  916. ld a, [hl]
  917. cp $01
  918. jr z, .asm_f86ad
  919. cp $02
  920. jr z, .asm_f86ad
  921. cp $03
  922. jr z, .asm_f86ad
  923. cp $04
  924. jr z, .asm_f869a
  925. cp $05
  926. jr z, .asm_f869f
  927. cp $06
  928. jr z, .asm_f86a2
  929. cp $07
  930. jr z, .asm_f869f
  931. jr .asm_f86ad
  932. .asm_f865c
  933. ld a, [hl]
  934. cp $01
  935. jr z, .asm_f869f
  936. cp $02
  937. jr z, .asm_f86a2
  938. cp $03
  939. jr z, .asm_f869f
  940. cp $04
  941. jr z, .asm_f869a
  942. cp $05
  943. jr z, .asm_f86ad
  944. cp $06
  945. jr z, .asm_f86ad
  946. cp $07
  947. jr z, .asm_f86ad
  948. jr .asm_f86ad
  949. .asm_f867b
  950. ld a, [hl]
  951. cp $01
  952. jr z, .asm_f86ad
  953. cp $02
  954. jr z, .asm_f869a
  955. cp $03
  956. jr z, .asm_f869f
  957. cp $04
  958. jr z, .asm_f86a2
  959. cp $05
  960. jr z, .asm_f86a2
  961. cp $06
  962. jr z, .asm_f869f
  963. cp $07
  964. jr z, .asm_f869a
  965. jr .asm_f86ad
  966. .asm_f869a
  967. call Func_f86f7
  968. jr .asm_f86a2
  969. .asm_f869f
  970. call Func_f86d0
  971. .asm_f86a2
  972. xor a
  973. ld [$c02d], a
  974. ld a, $95
  975. call PlaySound
  976. and a
  977. ret
  978. .asm_f86ad
  979. ld a, $40
  980. ld [$c5e3], a
  981. xor a
  982. ld [$c5e4], a
  983. scf
  984. ret
  985.  
  986. Func_f86b8: ; f86b8 (3e:46b8)
  987. ld a, [$c5e4]
  988. cp $02
  989. ret nc
  990. ld h, a
  991. ld a, [$c5e3]
  992. ld l, a
  993. ld de, $2
  994. add hl, de
  995. ld a, h
  996. ld [$c5e4], a
  997. ld a, l
  998. ld [$c5e3], a
  999. ret
  1000.  
  1001. Func_f86d0: ; f86d0 (3e:46d0)
  1002. ld a, [$c5e4]
  1003. and a
  1004. jr nz, .asm_f86e2
  1005. ld a, [$c5e3]
  1006. cp $40
  1007. jr nc, .asm_f86e2
  1008. xor a
  1009. ld [$c5e3], a
  1010. ret
  1011. .asm_f86e2
  1012. ld a, [$c5e4]
  1013. ld h, a
  1014. ld a, [$c5e3]
  1015. ld l, a
  1016. ld de, $ffc0
  1017. add hl, de
  1018. ld a, h
  1019. ld [$c5e4], a
  1020. ld a, l
  1021. ld [$c5e3], a
  1022. ret
  1023.  
  1024. Func_f86f7: ; f86f7 (3e:46f7)
  1025. ld a, [$c5e4]
  1026. and a
  1027. jr nz, .asm_f8709
  1028. ld a, [$c5e3]
  1029. cp $80
  1030. jr nc, .asm_f8709
  1031. xor a
  1032. ld [$c5e3], a
  1033. ret
  1034. .asm_f8709
  1035. ld a, [$c5e4]
  1036. ld h, a
  1037. ld a, [$c5e3]
  1038. ld l, a
  1039. ld de, $ff80
  1040. add hl, de
  1041. ld a, h
  1042. ld [$c5e4], a
  1043. ld a, l
  1044. ld [$c5e3], a
  1045. ret
  1046.  
  1047. Func_f871e: ; f871e (3e:471e)
  1048. ld a, [hSCX]
  1049. and $07
  1050. cp $03
  1051. jr c, .asm_f8740
  1052. cp $05
  1053. jr nc, .asm_f8740
  1054. ld a, [$c5ef]
  1055. cp $14
  1056. jr nz, .asm_f8740
  1057. call Func_f87a8
  1058. cp $0a
  1059. jr c, .asm_f8740
  1060. ld [$c5ec], a
  1061. call Func_f9284
  1062. scf
  1063. ret
  1064. .asm_f8740
  1065. and a
  1066. ret
  1067.  
  1068. Func_f8742: ; f8742 (3e:4742)
  1069. ld a, [hSCX]
  1070. and $07
  1071. cp $03
  1072. ret c
  1073. cp $05
  1074. ret nc
  1075. ld a, [$c5ef]
  1076. cp $06
  1077. jr z, .asm_f8766
  1078. cp $14
  1079. jr z, .asm_f8766
  1080. cp $07
  1081. jr z, .asm_f876a
  1082. call Func_f8778
  1083. ld a, $04
  1084. ld hl, $1
  1085. add hl, bc
  1086. ld [hl], a
  1087. ret
  1088. .asm_f8766
  1089. ld a, $06
  1090. jr .asm_f876c
  1091. .asm_f876a
  1092. ld a, $02
  1093. .asm_f876c
  1094. ld e, a
  1095. ld a, [$c5de]
  1096. dec a
  1097. add e
  1098. ld hl, $1
  1099. add hl, bc
  1100. ld [hl], a
  1101. ret
  1102.  
  1103. Func_f8778: ; f8778 (3e:4778)
  1104. ld hl, $c5e0
  1105. ld a, [hl]
  1106. inc [hl]
  1107. and $07
  1108. ret nz
  1109. ld a, [$c5df]
  1110. and a
  1111. jr z, .asm_f8796
  1112. ld a, [$c5de]
  1113. and a
  1114. jr z, .asm_f8791
  1115. dec a
  1116. ld [$c5de], a
  1117. ret
  1118. .asm_f8791
  1119. xor a
  1120. ld [$c5df], a
  1121. ret
  1122. .asm_f8796
  1123. ld a, [$c5de]
  1124. cp $02
  1125. jr z, .asm_f87a2
  1126. inc a
  1127. ld [$c5de], a
  1128. ret
  1129. .asm_f87a2
  1130. ld a, $01
  1131. ld [$c5df], a
  1132. ret
  1133.  
  1134. Func_f87a8: ; f87a8 (3e:47a8)
  1135. ld a, [$c5e3]
  1136. ld l, a
  1137. ld a, [$c5e4]
  1138. ld h, a
  1139. add hl, hl
  1140. add hl, hl
  1141. add hl, hl
  1142. ld a, h
  1143. ret
  1144.  
  1145. Func_f87b5: ; f87b5 (3e:47b5)
  1146. ld hl, $c5eb
  1147. ld a, [hl]
  1148. inc [hl]
  1149. and $03
  1150. ret nz
  1151. call Func_f87ce
  1152. ld d, a
  1153. ld hl, $4
  1154. add hl, bc
  1155. ld e, [hl]
  1156. ld a, $0a
  1157. push bc
  1158. call Func_fbb93
  1159. pop bc
  1160. ret
  1161.  
  1162. Func_f87ce: ; f87ce (3e:47ce)
  1163. ld a, [hSCX]
  1164. and $08
  1165. jr nz, .asm_f87d9
  1166. ld hl, $c622
  1167. jr .asm_f87dc
  1168. .asm_f87d9
  1169. ld hl, $c623
  1170. .asm_f87dc
  1171. ld a, [$c5f0]
  1172. cp $06
  1173. jr z, .asm_f87ed
  1174. cp $14
  1175. jr z, .asm_f87ed
  1176. cp $07
  1177. jr z, .asm_f87f5
  1178. ld a, [hl]
  1179. ret
  1180. .asm_f87ed
  1181. ld a, [hSCX]
  1182. and $07
  1183. ld e, a
  1184. ld a, [hl]
  1185. sub e
  1186. ret
  1187. .asm_f87f5
  1188. ld a, [hSCX]
  1189. and $07
  1190. add [hl]
  1191. ret
  1192.  
  1193. Func_f87fb: ; f87fb (3e:47fb)
  1194. ld hl, $4
  1195. add hl, bc
  1196. ld a, [hl]
  1197. cp $58
  1198. ret z
  1199. add $04
  1200. ld [hl], a
  1201. ret
  1202.  
  1203. Func_f8807: ; f8807 (3e:4807)
  1204. call Func_fbbe8
  1205. ret
  1206.  
  1207. Func_f880b: ; f880b (3e:480b)
  1208. ld hl, $b
  1209. add hl, bc
  1210. ld a, [hl]
  1211. and a
  1212. ret z
  1213. dec [hl]
  1214. dec [hl]
  1215. ld d, a
  1216. ld hl, $c
  1217. add hl, bc
  1218. ld a, [hl]
  1219. inc [hl]
  1220. call Func_f9362
  1221. cp $80
  1222. jr nc, .asm_f8825
  1223. xor $ff
  1224. inc a
  1225. .asm_f8825
  1226. ld hl, $7
  1227. add hl, bc
  1228. ld [hl], a
  1229. ret
  1230.  
  1231. Func_f882b: ; f882b (3e:482b)
  1232. ld hl, $b
  1233. add hl, bc
  1234. ld a, [hl]
  1235. inc [hl]
  1236. and $01
  1237. ret z
  1238. ld hl, $4
  1239. add hl, bc
  1240. ld a, [hl]
  1241. cp $c0
  1242. jr z, .asm_f883f
  1243. inc [hl]
  1244. ret
  1245. .asm_f883f
  1246. ld a, $01
  1247. ld [$c633], a
  1248. call Func_fbbe8
  1249. ret
  1250.  
  1251. Func_f8848: ; f8848 (3e:4848)
  1252. ld a, [$c635]
  1253. ld e, a
  1254. ld d, $00
  1255. ld a, [$c5e3]
  1256. ld l, a
  1257. ld a, [$c5e4]
  1258. ld h, a
  1259. add hl, de
  1260. ld a, l
  1261. ld [$c635], a
  1262. ld d, h
  1263. ld hl, $c315
  1264. ld e, $09
  1265. .asm_f8861
  1266. ld a, [hl]
  1267. add d
  1268. ld [hli], a
  1269. inc hl
  1270. inc hl
  1271. inc hl
  1272. dec e
  1273. jr nz, .asm_f8861
  1274. ret
  1275.  
  1276. Func_f886b: ; f886b (3e:486b)
  1277. ld a, [$c5ef]
  1278. ld a, [hSCX]
  1279. add $48
  1280. ld e, a
  1281. srl e
  1282. srl e
  1283. srl e
  1284. ld d, $00
  1285. ld hl, vBGMap0
  1286. add hl, de
  1287. ld a, [$c5ea]
  1288. srl a
  1289. srl a
  1290. srl a
  1291. ld c, a
  1292. .asm_f8889
  1293. ld a, c
  1294. and a
  1295. jr z, .asm_f889a
  1296. dec c
  1297. ld de, $20
  1298. add hl, de
  1299. ld a, h
  1300. and $03
  1301. or $98
  1302. ld h, a
  1303. jr .asm_f8889
  1304. .asm_f889a
  1305. ld de, $c5ef
  1306. ld a, e
  1307. ld [H_VBCOPYDEST], a
  1308. ld a, d
  1309. ld [$ffca], a
  1310. ld a, l
  1311. ld [H_VBCOPYSRC], a
  1312. ld a, h
  1313. ld [$ffc8], a
  1314. ld a, $01
  1315. ld [H_VBCOPYSIZE], a
  1316. ret
  1317.  
  1318. Func_f88ae: ; f88ae (3e:48ae)
  1319. ld a, [hSCX]
  1320. and $08
  1321. jr nz, .asm_f88b9
  1322. ld hl, $c621
  1323. jr .asm_f88bc
  1324. .asm_f88b9
  1325. ld hl, $c622
  1326. .asm_f88bc
  1327. ld a, [$c5ef]
  1328. cp $06
  1329. jr z, .asm_f88d0
  1330. cp $14
  1331. jr z, .asm_f88d0
  1332. cp $07
  1333. jr z, .asm_f88db
  1334. ld a, [hl]
  1335. ld [$c5ea], a
  1336. ret
  1337. .asm_f88d0
  1338. ld a, [hSCX]
  1339. and $07
  1340. ld e, a
  1341. ld a, [hl]
  1342. sub e
  1343. ld [$c5ea], a
  1344. ret
  1345. .asm_f88db
  1346. ld a, [hSCX]
  1347. and $07
  1348. add [hl]
  1349. Data_f88e0 ; f88e0 (3e:48e0)
  1350. ld [$c5ea], a
  1351. ret
  1352.  
  1353. Func_f88e4: ; f88e4 (3e:48e4)
  1354. ld hl, $c5d6
  1355. ld e, $99
  1356. call Func_f88f0
  1357. ret nc
  1358. inc hl
  1359. ld e, $99
  1360. ld a, [hl]
  1361. and a
  1362. jr z, .asm_f88fa
  1363. sub $01
  1364. daa
  1365. ld [hl], a
  1366. and a
  1367. ret
  1368. .asm_f88fa
  1369. ld [hl], e
  1370. scf
  1371. ret
  1372.  
  1373. Func_f88fd: ; f88fd (3e:48fd)
  1374. ld de, $c5d7
  1375. ld hl, $c302
  1376. ld a, [de]
  1377. call Func_f890b
  1378. ld hl, $c30a
  1379. ld a, [de]
  1380. ld c, a
  1381. swap a
  1382. and $0f
  1383. add $d0
  1384. ld [hli], a
  1385. inc hl
  1386. inc hl
  1387. inc hl
  1388. ld a, c
  1389. and $0f
  1390. add $d0
  1391. ld [hl], a
  1392. dec de
  1393. ret
  1394.  
  1395. Func_f891e: ; f891e (3e:491e)
  1396. ld hl, wTileMap
  1397. ld bc, $168
  1398. xor a
  1399. call FillMemory
  1400. ld hl, Data_f8946
  1401. ld de, $c418
  1402. ld bc, CopyVideoDataAlternate
  1403. call CopyData
  1404. call Func_f8a0e
  1405. ld hl, $c315
  1406. ld bc, $24
  1407. xor a
  1408. call FillMemory
  1409. ld a, $01
  1410. ld [H_AUTOBGTRANSFERENABLED], a
  1411. ret
  1412.  
  1413. Data_f8946 ; f8946 (3e:4946)
  1414. inc c
  1415. inc c
  1416. inc c
  1417. inc c
  1418. inc c
  1419. inc c
  1420. inc c
  1421. inc c
  1422. inc c
  1423. inc c
  1424. ld c, $0f
  1425. dec bc
  1426. dec bc
  1427. dec bc
  1428. dec bc
  1429. dec bc
  1430. dec bc
  1431. dec bc
  1432. dec bc
  1433. dec c
  1434. dec c
  1435. dec c
  1436. dec c
  1437. dec c
  1438. dec c
  1439. dec c
  1440. dec c
  1441. dec c
  1442. dec c
  1443. db $10
  1444. dec bc
  1445. dec bc
  1446. dec bc
  1447. dec bc
  1448. dec bc
  1449. dec bc
  1450. dec bc
  1451. dec bc
  1452. dec bc
  1453. dec c
  1454. dec c
  1455. dec c
  1456. dec c
  1457. dec c
  1458. dec c
  1459. dec c
  1460. dec c
  1461. dec c
  1462. dec c
  1463. ld c, $0f
  1464. dec bc
  1465. dec bc
  1466. dec bc
  1467. dec bc
  1468. dec bc
  1469. dec bc
  1470. dec bc
  1471. dec bc
  1472. dec c
  1473. dec c
  1474. dec c
  1475. dec c
  1476. dec c
  1477. dec c
  1478. dec c
  1479. dec c
  1480. dec c
  1481. dec c
  1482. db $10
  1483. dec bc
  1484. dec bc
  1485. dec bc
  1486. dec bc
  1487. dec bc
  1488. dec bc
  1489. dec bc
  1490. dec bc
  1491. dec bc
  1492. dec c
  1493. dec c
  1494. dec c
  1495. dec c
  1496. dec c
  1497. dec c
  1498. dec c
  1499. dec c
  1500. dec c
  1501. dec c
  1502. ld c, $0f
  1503. dec bc
  1504. dec bc
  1505. dec bc
  1506. dec bc
  1507. dec bc
  1508. dec bc
  1509. dec bc
  1510. dec bc
  1511. dec c
  1512. dec c
  1513. dec c
  1514. dec c
  1515. dec c
  1516. dec c
  1517. dec c
  1518. dec c
  1519. dec c
  1520. dec c
  1521. db $10
  1522. dec bc
  1523. dec bc
  1524. dec bc
  1525. dec bc
  1526. dec bc
  1527. dec bc
  1528. dec bc
  1529. dec bc
  1530. dec bc
  1531. dec c
  1532. dec c
  1533. dec c
  1534. dec c
  1535. dec c
  1536. dec c
  1537. dec c
  1538. dec c
  1539. dec c
  1540. dec c
  1541. ld c, $0f
  1542. dec bc
  1543. dec bc
  1544. dec bc
  1545. dec bc
  1546. dec bc
  1547. dec bc
  1548. dec bc
  1549. dec bc
  1550. dec c
  1551. dec c
  1552. dec c
  1553. dec c
  1554. dec c
  1555. dec c
  1556. dec c
  1557. dec c
  1558. dec c
  1559. dec c
  1560. db $10
  1561. dec bc
  1562. dec bc
  1563. dec bc
  1564. dec bc
  1565. dec bc
  1566. dec bc
  1567. dec bc
  1568. dec bc
  1569. dec bc
  1570. dec c
  1571. dec c
  1572. dec c
  1573. dec c
  1574. dec c
  1575. dec c
  1576. dec c
  1577. dec c
  1578. dec c
  1579. dec c
  1580. ld c, $0f
  1581. dec bc
  1582. dec bc
  1583. dec bc
  1584. dec bc
  1585. dec bc
  1586. dec bc
  1587. dec bc
  1588. dec bc
  1589. dec c
  1590. dec c
  1591. dec c
  1592. dec c
  1593. dec c
  1594. dec c
  1595. dec c
  1596. dec c
  1597. dec c
  1598. dec c
  1599. db $10
  1600. dec bc
  1601. dec bc
  1602. dec bc
  1603. dec bc
  1604. dec bc
  1605. dec bc
  1606. dec bc
  1607. dec bc
  1608. dec bc
  1609. ld hl, $c3b5
  1610. ld de, $3b3c
  1611. ld a, $40
  1612. call Func_f8a72
  1613. ld hl, $c3c9
  1614. ld de, $3f3f
  1615. ld a, $ff
  1616. call Func_f8a72
  1617. ld hl, $c3dd
  1618. ld de, $3f3f
  1619. ld a, $ff
  1620. call Func_f8a72
  1621. ld hl, $c3f1
  1622. ld de, $3f3f
  1623. ld a, $ff
  1624. call Func_f8a72
  1625. ld hl, $c405
  1626. ld de, $3f3f
  1627. ld a, $ff
  1628. call Func_f8a72
  1629. ld hl, $c419
  1630. ld de, $3f3f
  1631. ld a, $ff
  1632. call Func_f8a72
  1633. ld hl, $c42d
  1634. ld de, $3f3f
  1635. ld a, $ff
  1636. call Func_f8a72
  1637. ld hl, $c441
  1638. ld de, $3f3f
  1639. ld a, $ff
  1640. call Func_f8a72
  1641. ld hl, $c455
  1642. ld de, $3d3e
  1643. ld a, $40
  1644. call Func_f8a72
  1645. ret
  1646.  
  1647. Func_f8a72: ; f8a72 (3e:4a72)
  1648. ld [hl], d
  1649. inc hl
  1650. ld c, $10
  1651. .asm_f8a76
  1652. ld [hli], a
  1653. dec c
  1654. jr nz, .asm_f8a76
  1655. ld [hl], e
  1656. ret
  1657.  
  1658. Func_f8a7c: ; f8a7c (3e:4a7c)
  1659. ld hl, Data_f8a89
  1660. ld de, $c446
  1661. ld bc, $9
  1662. call CopyData
  1663. ret
  1664.  
  1665. Data_f8a89 ; f8a89 (3e:4a89)
  1666. jr nz, .asm_f8ab9
  1667. cpl
  1668. jr nc, .asm_f8abf
  1669. inc l
  1670. ld [hld], a
  1671. inc hl
  1672. inc sp
  1673. ld hl, Data_f8aa2
  1674. ld de, $c3ca
  1675. ld bc, $7
  1676. call CopyData
  1677. call Func_f8aca
  1678. ret
  1679. Data_f8aa2 ; f8aa2 (3e:4aa2)
  1680. jr nz, .asm_f8ac5
  1681. rst $38
  1682. ld [hli], a
  1683. inc hl
  1684. inc h
  1685. dec h
  1686. ld c, $63
  1687. .asm_f8aab
  1688. push bc
  1689. ld hl, $c5d6
  1690. ld a, [hli]
  1691. or [hl]
  1692. and a
  1693. jr z, .asm_f8ac7
  1694. call Func_f88e4
  1695. ld e, $01
  1696. .asm_f8ab9
  1697. call Func_f8b42
  1698. pop bc
  1699. dec c
  1700. jr nz, .asm_f8aab
  1701. ld a, $90
  1702. call PlaySound
  1703. .asm_f8ac5
  1704. and a
  1705. ret
  1706. .asm_f8ac7
  1707. pop bc
  1708. scf
  1709. ret
  1710. ld hl, $c3d2
  1711. ld de, $c5d7
  1712. ld a, [de]
  1713. call Func_f9350
  1714. inc hl
  1715. ld a, [de]
  1716. call Func_f9350
  1717. inc hl
  1718. inc hl
  1719. ld [hl], $21
  1720. inc hl
  1721. ld [hl], $25
  1722. inc hl
  1723. ld [hl], $26
  1724. ret
  1725. ld hl, Data_f8af4
  1726. ld de, $c3f2
  1727. ld bc, $7
  1728. call CopyData
  1729. call Func_f8b25
  1730. ret
  1731. Data_f8af4 ; f8af4 (3e:4af4)
  1732. daa
  1733. jr z, .asm_f8b20
  1734. ld a, [hli]
  1735. inc hl
  1736. ld h, $26
  1737. ld c, $63
  1738. .asm_f8afd
  1739. push bc
  1740. ld hl, $c5da
  1741. ld a, [hli]
  1742. ld e, a
  1743. or [hl]
  1744. jr z, .asm_f8b22
  1745. ld d, [hl]
  1746. ld a, e
  1747. sub $01
  1748. daa
  1749. ld e, a
  1750. ld a, d
  1751. sbc $00
  1752. daa
  1753. ld [hld], a
  1754. ld [hl], e
  1755. ld e, $01
  1756. call Func_f8b42
  1757. pop bc
  1758. dec c
  1759. jr nz, .asm_f8afd
  1760. ld a, $90
  1761. call PlaySound
  1762. .asm_f8b20
  1763. and a
  1764. ret
  1765. .asm_f8b22
  1766. pop bc
  1767. scf
  1768. ret
  1769. ld a, [$c5db]
  1770. ld hl, $c3fa
  1771. call Func_f9350
  1772. ld a, [$c5da]
  1773. ld hl, $c3fc
  1774. call Func_f9350
  1775. inc hl
  1776. inc hl
  1777. ld [hl], $21
  1778. inc hl
  1779. ld [hl], $25
  1780. inc hl
  1781. ld [hl], $26
  1782. ret
  1783. ld a, [$c5dc]
  1784. add e
  1785. daa
  1786. ld [$c5dc], a
  1787. ld a, [$c5dd]
  1788. adc $00
  1789. daa
  1790. ld [$c5dd], a
  1791. ret nc
  1792. ld a, $99
  1793. ld [$c5dc], a
  1794. ld [$c5dd], a
  1795. ret
  1796. ld a, [$c5dd]
  1797. ld hl, $c422
  1798. call Func_f9350
  1799. ld a, [$c5dc]
  1800. ld hl, $c424
  1801. call Func_f9350
  1802. inc hl
  1803. inc hl
  1804. ld [hl], $21
  1805. inc hl
  1806. ld [hl], $25
  1807. inc hl
  1808. ld [hl], $26
  1809. ret
  1810. ld hl, Data_f8b8d
  1811. ld de, $c41a
  1812. ld bc, $5
  1813. call CopyData
  1814. call Func_f8b25
  1815. call Func_f8b5d
  1816. ret
  1817. Data_f8b8d ; f8b8d (3e:4b8d)
  1818. dec hl
  1819. inc l
  1820. dec h
  1821. jr z, .asm_f8bbf
  1822. ld hl, wd496
  1823. ld a, [$c5dd]
  1824. cp [hl]
  1825. jr c, .asm_f8ba6
  1826. jr nz, .asm_f8bb0
  1827. dec hl
  1828. ld a, [$c5dc]
  1829. cp [hl]
  1830. jr c, .asm_f8ba6
  1831. jr nz, .asm_f8bb0
  1832. .asm_f8ba6
  1833. call WaitForSoundToFinish
  1834. ld e, $1b
  1835. call Func_f8bcb
  1836. and a
  1837. ret
  1838. .asm_f8bb0
  1839. ld a, [$c5dc]
  1840. ld [wd495], a
  1841. ld a, [$c5dd]
  1842. ld [wd496], a
  1843. call WaitForSoundToFinish
  1844. .asm_f8bbf
  1845. ld e, $21
  1846. call Func_f8bcb
  1847. ld a, $96
  1848. call PlaySound
  1849. scf
  1850. ret
  1851. ; 0xf8bcb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement