Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func_f8000: ; f8000 (3e:4000)
- call Func_f9254
- call DelayFrame
- call DelayFrame
- call DelayFrame
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- ld a, [wUpdateSpritesEnabled]
- push af
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- ld a, [rIE]
- push af
- xor a
- ld [rIF], a
- ld a, $0f
- ld [rIE], a
- ld a, $08
- ld [rSTAT], a
- ld a, [$ffbd]
- push af
- ld a, $98
- ld [$ffbd], a
- call Func_f8fb3
- call Func_f807a
- xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
- call UpdateGBCPal_BGP
- call UpdateGBCPal_OBP0
- call UpdateGBCPal_OBP1
- call Func_fbb5a
- call ClearSprites
- xor a
- ld [hLCDCPointer], a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $90
- ld [hWY], a
- call DelayFrame
- pop af
- ld [$ffbd], a
- xor a
- ld [rIF], a
- pop af
- ld [rIE], a
- xor a
- ld [rSTAT], a
- call RunDefaultPaletteCommand
- call Func_0f16
- call PlayDefaultMusic
- call GBPalNormal
- pop af
- ld [wUpdateSpritesEnabled], a
- pop af
- ld [hTilesetType], a
- ret
- Func_f807a: ; f807a (3e:407a)
- call Func_f8116
- call DelayFrame
- ld b, $0e
- call RunPaletteCommand
- .asm_f8085
- ld a, [$c5d1]
- bit 7, a
- ret nz
- call Func_f923f
- call Func_f80ac
- ret nz
- call Func_f8282
- ld a, $3c
- ld [$c5bd], a
- call Func_fbb65
- call Func_f8848
- call Func_f80a8
- call Func_f80c4
- jr .asm_f8085
- Func_f80a8: ; f80a8 (3e:40a8)
- call DelayFrame
- ret
- Func_f80ac: ; f80ac (3e:40ac)
- ld hl, wPreventBlackout
- bit 1, [hl]
- ret z
- ld a, [hJoyPressed]
- and $04
- ret
- Func_f80b7: ; f80b7 (3e:40b7)
- ld a, [hJoyPressed]
- and $08
- ret z
- ld hl, $c5e2
- ld a, [hl]
- xor $01
- ld [hl], a
- ret
- Func_f80c4: ; f80c4 (3e:40c4)
- ld a, [$c634]
- and a
- ret z
- ld hl, wChannelNoteDelayCounters
- ld a, $01
- cp [hl]
- ret nz
- inc hl
- cp [hl]
- ret nz
- inc hl
- cp [hl]
- ret nz
- ld a, [$c5e3]
- ld e, a
- ld a, [$c5e4]
- and $03
- ld d, a
- sla e
- rl d
- ld e, d
- ld d, $00
- ld hl, Data_f80f5
- add hl, de
- add hl, de
- ld a, [hli]
- ld [$c0e9], a
- ld a, [hl]
- ld [wMusicTempo], a
- ret
- Data_f80f5 ; f80f5 (3e:40f5)
- ld [hl], l
- nop
- ld l, l
- nop
- ld h, l
- nop
- ld e, l
- nop
- ld d, l
- nop
- ld hl, wChannelNoteDelayCounters
- ld a, $01
- cp [hl]
- ret nz
- inc hl
- cp [hl]
- ret nz
- inc hl
- cp [hl]
- ret nz
- ld a, $75
- ld [$c0e9], a
- xor a
- ld [wMusicTempo], a
- ret
- Func_f8116: ; f8116 (3e:4116)
- call Func_f9279
- call ClearSprites
- call DisableLCD
- ld hl, wSerialEnemyMonsPatchList
- ld bc, $67
- xor a
- call FillMemory
- ld hl, $c700
- ld bc, $200
- xor a
- call FillMemory
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call Func_fbb5a
- ld hl, $4f14
- ld de, vTileset
- ld bc, $500
- ld a, $20
- call FarCopyData
- ld hl, $5324
- ld de, vNPCSprites
- ld bc, $1000
- ld a, $20
- call FarCopyData
- ld a, $d3
- ld [$c5c0], a
- ld a, $53
- ld [$c5c1], a
- ld a, $fa
- ld [$c5c4], a
- ld a, $53
- ld [$c5c5], a
- ld a, $07
- ld [$c5c6], a
- ld a, $55
- ld [$c5c7], a
- ld a, $05
- ld [$c5c2], a
- ld a, $54
- ld [$c5c3], a
- ld hl, vBGMap0
- ld bc, $800
- ld a, $00
- call FillMemory
- ld hl, $98c0
- ld bc, $180
- ld a, $0b
- call FillMemory
- ld a, $01
- ld de, $7458
- call Func_fbb93
- ld a, $74
- ld [$c5ea], a
- call Func_f9223
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7e
- ld [hWY], a
- ld a, $42
- ld [hLCDCPointer], a
- ld a, $40
- ld [$c5e3], a
- xor a
- ld [$c5e4], a
- xor a
- ld [$c5d6], a
- ld a, $60
- ld [$c5d7], a
- ld hl, $c61a
- ld bc, $14
- ld a, $74
- call FillMemory
- call Func_f81ff
- call Func_f8256
- ld a, $e3
- ld [rLCDC], a
- call Func_f81e9
- ld a, $e4
- ld [rOBP0], a
- ld a, $e0
- ld [rOBP1], a
- call UpdateGBCPal_OBP0
- call UpdateGBCPal_OBP1
- ret
- Func_f81e9: ; f81e9 (3e:41e9)
- ld a, [wOnSGB]
- and a
- jr nz, .asm_f81f7
- ld a, $d0
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ret
- .asm_f81f7
- ld a, $e4
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ret
- Func_f81ff: ; f81ff (3e:41ff)
- ld hl, wOAMBuffer
- ld de, $4249
- ld b, $97
- ld c, $80
- ld a, $04
- call Func_f8233
- ld de, Data_f8248
- ld b, $96
- ld c, $50
- ld a, $01
- call Func_f8233
- ld de, Data_f824d
- ld b, $14
- ld c, $20
- ld a, $05
- call Func_f8233
- ld de, Data_f8252
- ld b, $20
- ld c, $80
- ld a, $04
- call Func_f8233
- ret
- Func_f8233: ; f8233 (3e:4233)
- .asm_f8233
- push af
- ld [hl], b
- inc hl
- ld [hl], c
- inc hl
- ld a, [de]
- ld [hl], a
- inc hl
- ld [hl], $00
- inc hl
- ld a, c
- add $08
- ld c, a
- inc de
- pop af
- dec a
- jr nz, .asm_f8233
- ret
- Data_f8248 ; f8248 (3e:4248)
- cp $d0
- ret nc
- ret nc
- ret nc
- Data_f824d ; f824d (3e:424d)
- db $ec
- xor $ef
- Data_f8252 ; f8252 (3e:4252)
- db $ec
- rst $28
- ld de, $9c21
- ld hl, Data_f8279
- ld c, $09
- .asm_f825e
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .asm_f825e
- ld hl, $9c01
- ld [hl], $15
- ld hl, $9c02
- ld [hl], $16
- ld hl, $9c2c
- ld [hl], $1b
- ld hl, $9c2d
- ld [hl], $1c
- ret
- Data_f8279 ; f8279 (3e:4279)
- rla
- jr .asm_f8295
- add hl, de
- add hl, de
- add hl, de
- add hl, de
- add hl, de
- add hl, de
- ld a, [$c5d1]
- ld e, a
- ld d, $00
- ld hl, Data_f8291
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp [hl]
- Data_f8291 ; f8291 (3e:4291)
- xor e
- ld b, d
- cp l
- ld b, d
- .asm_f8295
- inc h
- ld b, e
- ld e, h
- ld b, e
- adc h
- ld b, e
- sbc c
- ld b, e
- xor d
- ld b, e
- cp e
- ld b, e
- call z, Func_e343
- ld b, e
- ld b, $44
- rrca
- ld b, h
- dec e
- ld b, h
- ld a, $02
- ld de, Data_f88e0
- call Func_fbb93
- ld hl, $c5d1
- inc [hl]
- ld a, $01
- ld [$c634], a
- ret
- Func_f82bd: ; f82bd (3e:42bd)
- ld a, [$c5e5]
- cp $18
- jr nc, .asm_f82e8
- ld hl, $c5d6
- ld a, [hli]
- or [hl]
- and a
- jr z, .asm_f82f6
- call Random
- ld [$c5d5], a
- call Func_f9210
- call Func_f88ae
- call Func_f886b
- call Func_f8cb0
- call Func_f844c
- call Func_f88e4
- call Func_f88fd
- ret
- .asm_f82e8
- ld hl, $c5d1
- inc [hl]
- xor a
- ld [$c634], a
- ld a, $c0
- ld [$c632], a
- ret
- .asm_f82f6
- ld a, $01
- ld [$c630], a
- ld a, $0c
- ld [$c5d1], a
- ld a, $80
- ld [$c631], a
- ld a, $0b
- ld de, $8858
- call Func_fbb93
- ld hl, $7
- add hl, bc
- ld [hl], $80
- ld hl, $b
- add hl, bc
- ld [hl], $80
- ld hl, $c
- add hl, bc
- ld [hl], $30
- xor a
- ld [$c634], a
- ret
- Func_f8324: ; f8324 (3e:4324)
- call Func_f8440
- jr c, .asm_f833d
- xor a
- ld [$c5d5], a
- call Func_f9210
- call Func_f88ae
- call Func_f886b
- call Func_f8c97
- call Func_f80ff
- ret
- .asm_f833d
- ld hl, $c5d1
- inc [hl]
- ld a, $90
- ld [hSCX], a
- ld a, $72
- ld [$c5d3], a
- ld a, $04
- ld [$c5d2], a
- xor a
- ld [hLCDCPointer], a
- ld [$c617], a
- ld [$c618], a
- ld [$c619], a
- ret
- Func_f835c: ; f835c (3e:435c)
- ld a, [hSCX]
- and a
- jr z, .asm_f837b
- call Func_f9210
- call Func_f88ae
- call Func_f886b
- ld a, [hSCX]
- dec a
- dec a
- dec a
- dec a
- ld [hSCX], a
- ld a, $e0
- ld [$c62e], a
- call Func_f8cc7
- ret
- .asm_f837b
- xor a
- ld [$c5e3], a
- ld [$c5e4], a
- ld hl, $c5d1
- inc [hl]
- ld a, $05
- ld [$c5d2], a
- ret
- Func_f838c: ; f838c (3e:438c)
- call Func_f891e
- ld a, $20
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f8399: ; f8399 (3e:4399)
- call Func_f8440
- ret nc
- call Func_f8a92
- ld a, $40
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f83aa: ; f83aa (3e:43aa)
- call Func_f8440
- ret nc
- call Func_f8ae4
- ld a, $40
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f83bb: ; f83bb (3e:43bb)
- call Func_f8440
- ret nc
- call Func_f8b7a
- ld a, $40
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f83cc: ; f83cc (3e:43cc)
- call Func_f8440
- ret nc
- call Func_f8aa9
- push af
- call Func_f8b5d
- pop af
- ret nc
- ld a, $40
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f83e3: ; f83e3 (3e:43e3)
- call Func_f8440
- ret nc
- call Func_f8afb
- push af
- call Func_f8b5d
- pop af
- ret nc
- ld a, $80
- ld [$c632], a
- ld hl, $c5d1
- inc [hl]
- call Func_f8b92
- ret nc
- call Func_f8a7c
- ld a, $06
- ld [$c5d2], a
- ret
- Func_f8406: ; f8406 (3e:4406)
- call Func_f8440
- ret nc
- ld hl, $c5d1
- inc [hl]
- ret
- Func_f840f: ; f840f (3e:440f)
- call Func_f9210
- ld a, [hJoyPressed]
- and $01
- ret z
- ld hl, $c5d1
- set 7, [hl]
- ret
- Func_f841d: ; f841d (3e:441d)
- call Func_f9210
- call Func_f88ae
- call Func_f886b
- call Func_f8cb0
- call Func_f80ff
- ld hl, $c631
- ld a, [hl]
- and a
- jr z, .asm_f8435
- dec [hl]
- ret
- .asm_f8435
- ld a, [hJoyPressed]
- and $01
- ret z
- ld hl, $c5d1
- set 7, [hl]
- ret
- Func_f8440: ; f8440 (3e:4440)
- ld hl, $c632
- ld a, [hl]
- and a
- jr z, .asm_f844a
- dec [hl]
- and a
- ret
- .asm_f844a
- scf
- ret
- Func_f844c: ; f844c (3e:444c)
- ld a, [$c5e6]
- ld h, a
- ld a, [$c5e7]
- ld l, a
- ld a, [$c5e3]
- ld e, a
- ld a, [$c5e4]
- ld d, a
- add hl, de
- ld a, h
- ld [$c5e6], a
- ld a, l
- ld [$c5e7], a
- ret nc
- ld hl, $c5e5
- inc [hl]
- ld hl, $c311
- dec [hl]
- dec [hl]
- ret
- Func_f8470: ; f8470 (3e:4470)
- ld a, [$c5d2]
- ld e, a
- ld d, $00
- ld hl, Data_f847f
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp [hl]
- Data_f847f ; f847f (3e:447f)
- adc l
- ld b, h
- ld [$ff00+c], a
- ld b, h
- ld d, $45
- ld b, l
- ld b, l
- ld h, c
- ld b, l
- ld l, l
- ld b, l
- ld a, c
- ld b, l
- ld a, [$c630]
- and a
- jr nz, .asm_f84d2
- call Func_f87b5
- ld a, [$c5ea]
- ld hl, $5
- add hl, bc
- ld [hl], a
- call Func_f871e
- jr c, .asm_f84aa
- call Func_f8742
- call Func_f86b8
- ret
- .asm_f84aa
- call Func_f8742
- ld a, $01
- ld [$c5d2], a
- xor a
- ld hl, $c
- add hl, bc
- ld [hl], a
- ld hl, $d
- add hl, bc
- ld [hl], a
- ld hl, $e
- add hl, bc
- ld [hl], a
- ld [$c5d9], a
- ld [$c62f], a
- xor a
- ld [$c02d], a
- ld a, $91
- call PlaySound
- ret
- .asm_f84d2
- xor a
- ld [$c5e3], a
- ld [$c5e4], a
- ld a, $04
- ld [$c5d2], a
- call Func_f8742
- ret
- Func_f84e2: ; f84e2 (3e:44e2)
- call Func_f8598
- call Func_f928c
- ret nc
- call Func_f8606
- jr c, .asm_f84fd
- call Func_f8bed
- ld hl, $c
- add hl, bc
- ld [hl], $00
- ld a, $02
- ld [$c5d2], a
- ret
- .asm_f84fd
- ld a, $03
- ld [$c5d2], a
- ld a, $60
- ld [$c5e1], a
- ld a, $10
- call Func_fbcd4
- xor a
- ld [$c02d], a
- ld a, $93
- call PlaySound
- ret
- Func_f8516: ; f8516 (3e:4516)
- ld hl, $c
- add hl, bc
- ld a, [hl]
- cp $20
- jr nc, .asm_f8539
- inc [hl]
- inc [hl]
- inc [hl]
- inc [hl]
- ld d, $04
- call Func_f9362
- ld hl, $7
- add hl, bc
- ld [hl], a
- call Func_f87b5
- ld a, [$c5ea]
- ld hl, $5
- add hl, bc
- ld [hl], a
- ret
- .asm_f8539
- ld hl, $7
- add hl, bc
- ld [hl], $00
- ld a, $00
- ld [$c5d2], a
- ret
- Func_f8545: ; f8545 (3e:4545)
- ld hl, $c5e1
- ld a, [hl]
- and a
- jr z, .asm_f8556
- dec [hl]
- ld a, [$c5ea]
- ld hl, $5
- add hl, bc
- ld [hl], a
- ret
- .asm_f8556
- ld a, $00
- ld [$c5d2], a
- ld a, $04
- call Func_fbcd4
- ret
- Func_f8561: ; f8561 (3e:4561)
- ld a, [$c5ea]
- ld hl, $5
- add hl, bc
- ld [hl], a
- call Func_f8742
- ret
- Func_f856d: ; f856d (3e:456d)
- ld a, $0f
- call Func_fbcd4
- ld hl, $c
- add hl, bc
- ld [hl], $00
- ret
- Func_f8579: ; f8579 (3e:4579)
- ld hl, $c
- add hl, bc
- ld a, [hl]
- inc [hl]
- inc [hl]
- and $3f
- cp $20
- jr c, .asm_f8591
- ld d, $10
- call Func_f9362
- ld hl, $7
- add hl, bc
- ld [hl], a
- ret
- .asm_f8591
- ld hl, $7
- add hl, bc
- ld [hl], $00
- ret
- Func_f8598: ; f8598 (3e:4598)
- ld de, hJoy5
- ld a, [de]
- and $20
- jr nz, .asm_f85a6
- ld a, [de]
- and $10
- jr nz, .asm_f85cc
- ret
- .asm_f85a6
- ld hl, $e
- add hl, bc
- ld [hl], $00
- ld hl, $d
- add hl, bc
- ld a, [hl]
- inc [hl]
- cp $0b
- jr c, .asm_f85be
- call Func_f85f2
- ld hl, $c62f
- set 0, [hl]
- .asm_f85be
- ld hl, $1
- add hl, bc
- ld a, [hl]
- cp $0e
- jr nc, .asm_f85c9
- inc [hl]
- ret
- .asm_f85c9
- ld [hl], $01
- ret
- .asm_f85cc
- ld hl, $d
- add hl, bc
- ld [hl], $00
- ld hl, $e
- add hl, bc
- ld a, [hl]
- inc [hl]
- cp $0d
- jr c, .asm_f85e4
- call Func_f85f2
- ld hl, $c62f
- set 1, [hl]
- .asm_f85e4
- ld hl, $1
- add hl, bc
- ld a, [hl]
- cp $01
- jr z, .asm_f85ef
- dec [hl]
- ret
- .asm_f85ef
- ld [hl], $0e
- ret
- Func_f85f2: ; f85f2 (3e:45f2)
- call Func_f8bdf
- xor a
- ld hl, $d
- add hl, bc
- ld [hl], a
- ld hl, $e
- add hl, bc
- ld [hl], a
- ld a, $92
- call PlaySound
- ret
- Func_f8606: ; f8606 (3e:4606)
- ld hl, $1
- add hl, bc
- ld a, [$c5ef]
- cp $06
- jr z, .asm_f863d
- cp $14
- jr z, .asm_f867b
- cp $12
- jr z, .asm_f867b
- cp $07
- jr z, .asm_f865c
- ld a, [hl]
- cp $01
- jp z, Func_f86ad
- cp $02
- jr z, .asm_f869a
- cp $03
- jr z, .asm_f869f
- cp $04
- jr z, .asm_f86a2
- cp $05
- jr z, .asm_f869f
- cp $06
- jr z, .asm_f869a
- cp $07
- jr z, .asm_f86ad
- jr .asm_f86ad
- .asm_f863d
- ld a, [hl]
- cp $01
- jr z, .asm_f86ad
- cp $02
- jr z, .asm_f86ad
- cp $03
- jr z, .asm_f86ad
- cp $04
- jr z, .asm_f869a
- cp $05
- jr z, .asm_f869f
- cp $06
- jr z, .asm_f86a2
- cp $07
- jr z, .asm_f869f
- jr .asm_f86ad
- .asm_f865c
- ld a, [hl]
- cp $01
- jr z, .asm_f869f
- cp $02
- jr z, .asm_f86a2
- cp $03
- jr z, .asm_f869f
- cp $04
- jr z, .asm_f869a
- cp $05
- jr z, .asm_f86ad
- cp $06
- jr z, .asm_f86ad
- cp $07
- jr z, .asm_f86ad
- jr .asm_f86ad
- .asm_f867b
- ld a, [hl]
- cp $01
- jr z, .asm_f86ad
- cp $02
- jr z, .asm_f869a
- cp $03
- jr z, .asm_f869f
- cp $04
- jr z, .asm_f86a2
- cp $05
- jr z, .asm_f86a2
- cp $06
- jr z, .asm_f869f
- cp $07
- jr z, .asm_f869a
- jr .asm_f86ad
- .asm_f869a
- call Func_f86f7
- jr .asm_f86a2
- .asm_f869f
- call Func_f86d0
- .asm_f86a2
- xor a
- ld [$c02d], a
- ld a, $95
- call PlaySound
- and a
- ret
- .asm_f86ad
- ld a, $40
- ld [$c5e3], a
- xor a
- ld [$c5e4], a
- scf
- ret
- Func_f86b8: ; f86b8 (3e:46b8)
- ld a, [$c5e4]
- cp $02
- ret nc
- ld h, a
- ld a, [$c5e3]
- ld l, a
- ld de, $2
- add hl, de
- ld a, h
- ld [$c5e4], a
- ld a, l
- ld [$c5e3], a
- ret
- Func_f86d0: ; f86d0 (3e:46d0)
- ld a, [$c5e4]
- and a
- jr nz, .asm_f86e2
- ld a, [$c5e3]
- cp $40
- jr nc, .asm_f86e2
- xor a
- ld [$c5e3], a
- ret
- .asm_f86e2
- ld a, [$c5e4]
- ld h, a
- ld a, [$c5e3]
- ld l, a
- ld de, $ffc0
- add hl, de
- ld a, h
- ld [$c5e4], a
- ld a, l
- ld [$c5e3], a
- ret
- Func_f86f7: ; f86f7 (3e:46f7)
- ld a, [$c5e4]
- and a
- jr nz, .asm_f8709
- ld a, [$c5e3]
- cp $80
- jr nc, .asm_f8709
- xor a
- ld [$c5e3], a
- ret
- .asm_f8709
- ld a, [$c5e4]
- ld h, a
- ld a, [$c5e3]
- ld l, a
- ld de, $ff80
- add hl, de
- ld a, h
- ld [$c5e4], a
- ld a, l
- ld [$c5e3], a
- ret
- Func_f871e: ; f871e (3e:471e)
- ld a, [hSCX]
- and $07
- cp $03
- jr c, .asm_f8740
- cp $05
- jr nc, .asm_f8740
- ld a, [$c5ef]
- cp $14
- jr nz, .asm_f8740
- call Func_f87a8
- cp $0a
- jr c, .asm_f8740
- ld [$c5ec], a
- call Func_f9284
- scf
- ret
- .asm_f8740
- and a
- ret
- Func_f8742: ; f8742 (3e:4742)
- ld a, [hSCX]
- and $07
- cp $03
- ret c
- cp $05
- ret nc
- ld a, [$c5ef]
- cp $06
- jr z, .asm_f8766
- cp $14
- jr z, .asm_f8766
- cp $07
- jr z, .asm_f876a
- call Func_f8778
- ld a, $04
- ld hl, $1
- add hl, bc
- ld [hl], a
- ret
- .asm_f8766
- ld a, $06
- jr .asm_f876c
- .asm_f876a
- ld a, $02
- .asm_f876c
- ld e, a
- ld a, [$c5de]
- dec a
- add e
- ld hl, $1
- add hl, bc
- ld [hl], a
- ret
- Func_f8778: ; f8778 (3e:4778)
- ld hl, $c5e0
- ld a, [hl]
- inc [hl]
- and $07
- ret nz
- ld a, [$c5df]
- and a
- jr z, .asm_f8796
- ld a, [$c5de]
- and a
- jr z, .asm_f8791
- dec a
- ld [$c5de], a
- ret
- .asm_f8791
- xor a
- ld [$c5df], a
- ret
- .asm_f8796
- ld a, [$c5de]
- cp $02
- jr z, .asm_f87a2
- inc a
- ld [$c5de], a
- ret
- .asm_f87a2
- ld a, $01
- ld [$c5df], a
- ret
- Func_f87a8: ; f87a8 (3e:47a8)
- ld a, [$c5e3]
- ld l, a
- ld a, [$c5e4]
- ld h, a
- add hl, hl
- add hl, hl
- add hl, hl
- ld a, h
- ret
- Func_f87b5: ; f87b5 (3e:47b5)
- ld hl, $c5eb
- ld a, [hl]
- inc [hl]
- and $03
- ret nz
- call Func_f87ce
- ld d, a
- ld hl, $4
- add hl, bc
- ld e, [hl]
- ld a, $0a
- push bc
- call Func_fbb93
- pop bc
- ret
- Func_f87ce: ; f87ce (3e:47ce)
- ld a, [hSCX]
- and $08
- jr nz, .asm_f87d9
- ld hl, $c622
- jr .asm_f87dc
- .asm_f87d9
- ld hl, $c623
- .asm_f87dc
- ld a, [$c5f0]
- cp $06
- jr z, .asm_f87ed
- cp $14
- jr z, .asm_f87ed
- cp $07
- jr z, .asm_f87f5
- ld a, [hl]
- ret
- .asm_f87ed
- ld a, [hSCX]
- and $07
- ld e, a
- ld a, [hl]
- sub e
- ret
- .asm_f87f5
- ld a, [hSCX]
- and $07
- add [hl]
- ret
- Func_f87fb: ; f87fb (3e:47fb)
- ld hl, $4
- add hl, bc
- ld a, [hl]
- cp $58
- ret z
- add $04
- ld [hl], a
- ret
- Func_f8807: ; f8807 (3e:4807)
- call Func_fbbe8
- ret
- Func_f880b: ; f880b (3e:480b)
- ld hl, $b
- add hl, bc
- ld a, [hl]
- and a
- ret z
- dec [hl]
- dec [hl]
- ld d, a
- ld hl, $c
- add hl, bc
- ld a, [hl]
- inc [hl]
- call Func_f9362
- cp $80
- jr nc, .asm_f8825
- xor $ff
- inc a
- .asm_f8825
- ld hl, $7
- add hl, bc
- ld [hl], a
- ret
- Func_f882b: ; f882b (3e:482b)
- ld hl, $b
- add hl, bc
- ld a, [hl]
- inc [hl]
- and $01
- ret z
- ld hl, $4
- add hl, bc
- ld a, [hl]
- cp $c0
- jr z, .asm_f883f
- inc [hl]
- ret
- .asm_f883f
- ld a, $01
- ld [$c633], a
- call Func_fbbe8
- ret
- Func_f8848: ; f8848 (3e:4848)
- ld a, [$c635]
- ld e, a
- ld d, $00
- ld a, [$c5e3]
- ld l, a
- ld a, [$c5e4]
- ld h, a
- add hl, de
- ld a, l
- ld [$c635], a
- ld d, h
- ld hl, $c315
- ld e, $09
- .asm_f8861
- ld a, [hl]
- add d
- ld [hli], a
- inc hl
- inc hl
- inc hl
- dec e
- jr nz, .asm_f8861
- ret
- Func_f886b: ; f886b (3e:486b)
- ld a, [$c5ef]
- ld a, [hSCX]
- add $48
- ld e, a
- srl e
- srl e
- srl e
- ld d, $00
- ld hl, vBGMap0
- add hl, de
- ld a, [$c5ea]
- srl a
- srl a
- srl a
- ld c, a
- .asm_f8889
- ld a, c
- and a
- jr z, .asm_f889a
- dec c
- ld de, $20
- add hl, de
- ld a, h
- and $03
- or $98
- ld h, a
- jr .asm_f8889
- .asm_f889a
- ld de, $c5ef
- ld a, e
- ld [H_VBCOPYDEST], a
- ld a, d
- ld [$ffca], a
- ld a, l
- ld [H_VBCOPYSRC], a
- ld a, h
- ld [$ffc8], a
- ld a, $01
- ld [H_VBCOPYSIZE], a
- ret
- Func_f88ae: ; f88ae (3e:48ae)
- ld a, [hSCX]
- and $08
- jr nz, .asm_f88b9
- ld hl, $c621
- jr .asm_f88bc
- .asm_f88b9
- ld hl, $c622
- .asm_f88bc
- ld a, [$c5ef]
- cp $06
- jr z, .asm_f88d0
- cp $14
- jr z, .asm_f88d0
- cp $07
- jr z, .asm_f88db
- ld a, [hl]
- ld [$c5ea], a
- ret
- .asm_f88d0
- ld a, [hSCX]
- and $07
- ld e, a
- ld a, [hl]
- sub e
- ld [$c5ea], a
- ret
- .asm_f88db
- ld a, [hSCX]
- and $07
- add [hl]
- Data_f88e0 ; f88e0 (3e:48e0)
- ld [$c5ea], a
- ret
- Func_f88e4: ; f88e4 (3e:48e4)
- ld hl, $c5d6
- ld e, $99
- call Func_f88f0
- ret nc
- inc hl
- ld e, $99
- ld a, [hl]
- and a
- jr z, .asm_f88fa
- sub $01
- daa
- ld [hl], a
- and a
- ret
- .asm_f88fa
- ld [hl], e
- scf
- ret
- Func_f88fd: ; f88fd (3e:48fd)
- ld de, $c5d7
- ld hl, $c302
- ld a, [de]
- call Func_f890b
- ld hl, $c30a
- ld a, [de]
- ld c, a
- swap a
- and $0f
- add $d0
- ld [hli], a
- inc hl
- inc hl
- inc hl
- ld a, c
- and $0f
- add $d0
- ld [hl], a
- dec de
- ret
- Func_f891e: ; f891e (3e:491e)
- ld hl, wTileMap
- ld bc, $168
- xor a
- call FillMemory
- ld hl, Data_f8946
- ld de, $c418
- ld bc, CopyVideoDataAlternate
- call CopyData
- call Func_f8a0e
- ld hl, $c315
- ld bc, $24
- xor a
- call FillMemory
- ld a, $01
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
- Data_f8946 ; f8946 (3e:4946)
- inc c
- inc c
- inc c
- inc c
- inc c
- inc c
- inc c
- inc c
- inc c
- inc c
- ld c, $0f
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- db $10
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- ld c, $0f
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- db $10
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- ld c, $0f
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- db $10
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- ld c, $0f
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- db $10
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- ld c, $0f
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- dec c
- db $10
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- dec bc
- ld hl, $c3b5
- ld de, $3b3c
- ld a, $40
- call Func_f8a72
- ld hl, $c3c9
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c3dd
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c3f1
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c405
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c419
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c42d
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c441
- ld de, $3f3f
- ld a, $ff
- call Func_f8a72
- ld hl, $c455
- ld de, $3d3e
- ld a, $40
- call Func_f8a72
- ret
- Func_f8a72: ; f8a72 (3e:4a72)
- ld [hl], d
- inc hl
- ld c, $10
- .asm_f8a76
- ld [hli], a
- dec c
- jr nz, .asm_f8a76
- ld [hl], e
- ret
- Func_f8a7c: ; f8a7c (3e:4a7c)
- ld hl, Data_f8a89
- ld de, $c446
- ld bc, $9
- call CopyData
- ret
- Data_f8a89 ; f8a89 (3e:4a89)
- jr nz, .asm_f8ab9
- cpl
- jr nc, .asm_f8abf
- inc l
- ld [hld], a
- inc hl
- inc sp
- ld hl, Data_f8aa2
- ld de, $c3ca
- ld bc, $7
- call CopyData
- call Func_f8aca
- ret
- Data_f8aa2 ; f8aa2 (3e:4aa2)
- jr nz, .asm_f8ac5
- rst $38
- ld [hli], a
- inc hl
- inc h
- dec h
- ld c, $63
- .asm_f8aab
- push bc
- ld hl, $c5d6
- ld a, [hli]
- or [hl]
- and a
- jr z, .asm_f8ac7
- call Func_f88e4
- ld e, $01
- .asm_f8ab9
- call Func_f8b42
- pop bc
- dec c
- jr nz, .asm_f8aab
- ld a, $90
- call PlaySound
- .asm_f8ac5
- and a
- ret
- .asm_f8ac7
- pop bc
- scf
- ret
- ld hl, $c3d2
- ld de, $c5d7
- ld a, [de]
- call Func_f9350
- inc hl
- ld a, [de]
- call Func_f9350
- inc hl
- inc hl
- ld [hl], $21
- inc hl
- ld [hl], $25
- inc hl
- ld [hl], $26
- ret
- ld hl, Data_f8af4
- ld de, $c3f2
- ld bc, $7
- call CopyData
- call Func_f8b25
- ret
- Data_f8af4 ; f8af4 (3e:4af4)
- daa
- jr z, .asm_f8b20
- ld a, [hli]
- inc hl
- ld h, $26
- ld c, $63
- .asm_f8afd
- push bc
- ld hl, $c5da
- ld a, [hli]
- ld e, a
- or [hl]
- jr z, .asm_f8b22
- ld d, [hl]
- ld a, e
- sub $01
- daa
- ld e, a
- ld a, d
- sbc $00
- daa
- ld [hld], a
- ld [hl], e
- ld e, $01
- call Func_f8b42
- pop bc
- dec c
- jr nz, .asm_f8afd
- ld a, $90
- call PlaySound
- .asm_f8b20
- and a
- ret
- .asm_f8b22
- pop bc
- scf
- ret
- ld a, [$c5db]
- ld hl, $c3fa
- call Func_f9350
- ld a, [$c5da]
- ld hl, $c3fc
- call Func_f9350
- inc hl
- inc hl
- ld [hl], $21
- inc hl
- ld [hl], $25
- inc hl
- ld [hl], $26
- ret
- ld a, [$c5dc]
- add e
- daa
- ld [$c5dc], a
- ld a, [$c5dd]
- adc $00
- daa
- ld [$c5dd], a
- ret nc
- ld a, $99
- ld [$c5dc], a
- ld [$c5dd], a
- ret
- ld a, [$c5dd]
- ld hl, $c422
- call Func_f9350
- ld a, [$c5dc]
- ld hl, $c424
- call Func_f9350
- inc hl
- inc hl
- ld [hl], $21
- inc hl
- ld [hl], $25
- inc hl
- ld [hl], $26
- ret
- ld hl, Data_f8b8d
- ld de, $c41a
- ld bc, $5
- call CopyData
- call Func_f8b25
- call Func_f8b5d
- ret
- Data_f8b8d ; f8b8d (3e:4b8d)
- dec hl
- inc l
- dec h
- jr z, .asm_f8bbf
- ld hl, wd496
- ld a, [$c5dd]
- cp [hl]
- jr c, .asm_f8ba6
- jr nz, .asm_f8bb0
- dec hl
- ld a, [$c5dc]
- cp [hl]
- jr c, .asm_f8ba6
- jr nz, .asm_f8bb0
- .asm_f8ba6
- call WaitForSoundToFinish
- ld e, $1b
- call Func_f8bcb
- and a
- ret
- .asm_f8bb0
- ld a, [$c5dc]
- ld [wd495], a
- ld a, [$c5dd]
- ld [wd496], a
- call WaitForSoundToFinish
- .asm_f8bbf
- ld e, $21
- call Func_f8bcb
- ld a, $96
- call PlaySound
- scf
- ret
- ; 0xf8bcb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement