ref: 71bc1436876d72a38c4d69cc2b9ce9c94f82d376
parent: 73c374a366dc41c56ca6572fdc0784c84011b8f5
author: yenatch <[email protected]>
date: Tue Jan 29 20:38:32 EST 2013
A couple more general functions
--- a/main.asm
+++ b/main.asm
@@ -2686,7 +2686,39 @@
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]