A couple more general functions

This commit is contained in:
yenatch 2013-01-30 01:38:32 -05:00
parent 73c374a366
commit 71bc143687
1 changed files with 33 additions and 1 deletions

View File

@ -2686,7 +2686,39 @@ CopyData: ; 0x9a52
ret
; 0x9a5b
INCBIN "baserom.gbc",$9a5b,$c000 - $9a5b
ClearBytes: ; 0x9a5b
; clear bc bytes of data starting from de
xor a
ld [de], a
inc de
dec bc
ld a, c
or b
jr nz, ClearBytes
ret
; 0x9a64
DrawDefaultTiles: ; 0x9a64
; Draw 240 tiles (2/3 of the screen) from tiles in VRAM
ld hl, $9800 ; BG Map 0
ld de, 32 - 20
ld a, $80 ; starting tile
ld c, 12 + 1
.line
ld b, 20
.tile
ld [hli], a
inc a
dec b
jr nz, .tile
; next line
add hl, de
dec c
jr nz, .line
ret
; 0x9a7a
INCBIN "baserom.gbc",$9a7a,$c000 - $9a7a
SECTION "bank3",DATA,BANK[$3]