]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - bootrom.asm
Fix insn_bit. HOLY SHIT THE BOOT ROM WORKS c.c
[fpgaboy.git] / bootrom.asm
index 4f71d5ef23cce76e0c4de9076ed16adc1b740fee..3cdf0e9a0a7ea8d2c1adfc74af837b620bdc9caf 100644 (file)
@@ -28,14 +28,14 @@ Addr_0007:
        LD HL,$8010             ; $0024
 Addr_0027:
        LD A,[DE]               ; $0027
-       CALL $0095              ; $0028
-       CALL $0096              ; $002b
+       CALL a95                ; $0028
+       CALL a96                ; $002b
        INC DE          ; $002e
        LD A,E          ; $002f
        CP $34          ; $0030
        JR NZ, Addr_0027        ; $0032
 
-       LD DE,$00d8             ; $0034  Load 8 additional bytes into Video RAM
+       LD DE,Addr_00D8         ; $0034  Load 8 additional bytes into Video RAM
        LD B,$08                ; $0037
 Addr_0039:
        LD A,[DE]               ; $0039
@@ -112,8 +112,8 @@ Addr_0086:
 
        ; ==== Graphic routine ====
 
-       LD C,A          ; $0095  "Double up" all the bits of the graphics data
-       LD B,$04                ; $0096     and store in Video RAM
+a95:   LD C,A          ; $0095  "Double up" all the bits of the graphics data
+a96:   LD B,$04                ; $0096     and store in Video RAM
 Addr_0098:
        PUSH BC         ; $0098
        RL C                    ; $0099
@@ -129,7 +129,7 @@ Addr_0098:
        INC HL          ; $00a6
        RET                     ; $00a7
 
-Addr_00A8:
+NintendoLogo:
        ;Nintendo Logo
        DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D 
        DB $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 
@@ -143,7 +143,7 @@ Addr_00D8:
 
 Addr_00E0:     
        LD HL,$0104             ; $00e0 ; point HL to Nintendo logo in cart
-       LD DE,$00a8             ; $00e3 ; point DE to Nintendo logo in DMG rom
+       LD DE,NintendoLogo      ; $00e3 ; point DE to Nintendo logo in DMG rom
 
 Addr_00E6:
        LD A,[DE]               ; $00e6
@@ -168,3 +168,21 @@ Addr_00F4:
 
        LD A,$01                ; $00fc
        LD [$FF50],A    ; $00fe ;turn off DMG rom
+
+
+       SECTION "b",HOME[$100]
+boot:  jr .running     ; $0100
+       nop             ; $0102
+       nop             ; $0103
+       ;Nintendo Logo  ; $0104
+       DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D 
+       DB $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 
+       DB $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E
+       ;$0134 
+       DB $00,$E7,$00,$00,$00,$00,$00,$00, $00,$00,$00,$00,$00,$00,$00,$00
+       ;$0144
+       DB $00,$00,$00,$00,$00,$00,$00,$00, $00,$00,$00,$00,$00,$00,$00,$00
+.running:
+       ld a, $FF
+       ld [$FF51], A
+.diq:  jr .diq
This page took 0.028062 seconds and 4 git commands to generate.