disassembled and named some general functions

hg-commit-id: 16b81dc4ca99
This commit is contained in:
xeons 2012-04-07 00:24:45 +01:00
parent 18f52b7cdc
commit 3870ca7703

View file

@ -6900,7 +6900,22 @@ LoadHpBarAndStatusTilePatterns: ; 36C0
ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e) ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e)
jp CopyVideoData ; if LCD is on, transfer during V-blank jp CopyVideoData ; if LCD is on, transfer during V-blank
INCBIN "baserom.gbc",$36E0,$3739 - $36E0 ;Fills memory range with the specified byte.
;input registers a = fill_byte, bc = length, hl = address
FillMemory: ;36E0
push de
ld d, a
.loop\@
ld a, d
ldi [hl], a
dec bc
ld a, b
or c
jr nz, .loop\@
pop de
ret
INCBIN "baserom.gbc",$36EB,$3739 - $36EB
DelayFrames: ; 3739 DelayFrames: ; 3739
; wait n frames, where n is the value in c ; wait n frames, where n is the value in c
@ -7932,7 +7947,24 @@ Predef: ; 3E6D
ld [$2000],a ld [$2000],a
ret ret
INCBIN "baserom.gbc",$3E94,$4000 - $3E94 ;loads hl from cc4f, de from cc51, and bc from cc53
Load16BitRegisters: ;3e94
ld a, [$cc4f]
ld h, a
ld a, [$cc50]
ld l, a
ld a, [$cc51]
ld d, a
ld a, [$cc52]
ld e, a
ld a, [$cc53]
ld b, a
ld a, [$cc54]
ld c, a
ret
; 0x3ead
INCBIN "baserom.gbc",$3EAD,$4000 - $3EAD
SECTION "bank1",DATA,BANK[$1] SECTION "bank1",DATA,BANK[$1]