mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00

Rhyperior files are dummies and will need to be properly edited with sprites, Rhydon evo data, etc, but it (and the other files included) show that the trainer and pokemon sprite indexes have been separated, which allows us to add the other KEP mons
40 lines
659 B
NASM
40 lines
659 B
NASM
FarCopyData::
|
|
; Copy bc bytes from a:hl to de.
|
|
ld [wBuffer], a
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, [wBuffer]
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
call CopyData
|
|
pop af
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
ret
|
|
|
|
CopyData::
|
|
; Copy bc bytes from hl to de.
|
|
ld a, [hli]
|
|
ld [de], a
|
|
inc de
|
|
dec bc
|
|
ld a, c
|
|
or b
|
|
jr nz, CopyData
|
|
ret
|
|
|
|
FarCopyData2::
|
|
; Identical to FarCopyData, but uses hROMBankTemp
|
|
; as temp space instead of wBuffer.
|
|
ldh [hROMBankTemp], a
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ldh a, [hROMBankTemp]
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
call CopyData
|
|
pop af
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
ret
|
|
|