diff options
author | xeons <xeons@xeons.net> | 2012-04-07 00:24:45 +0100 |
---|---|---|
committer | xeons <xeons@xeons.net> | 2012-04-07 00:24:45 +0100 |
commit | 3870ca7703c8d152e6b849925c9eef333414929d (patch) | |
tree | 8051883cabdd320fb7083bcae2129919a40fe5ff | |
parent | 18f52b7cdcf957ff7c7eab902a8e90d7cf0935e9 (diff) |
disassembled and named some general functions
hg-commit-id: 16b81dc4ca99
-rw-r--r-- | main.asm | 36 |
1 files changed, 34 insertions, 2 deletions
@@ -6900,7 +6900,22 @@ LoadHpBarAndStatusTilePatterns: ; 36C0 ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e) 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 ; wait n frames, where n is the value in c @@ -7932,7 +7947,24 @@ Predef: ; 3E6D ld [$2000],a 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] |