moar comments, moar constants
This commit is contained in:
@@ -23,7 +23,7 @@ BitsSet:
|
|||||||
EXPORT DefaultMap
|
EXPORT DefaultMap
|
||||||
SECTION "Default Map", ROM0, ALIGN[8]
|
SECTION "Default Map", ROM0, ALIGN[8]
|
||||||
DefaultMap:
|
DefaultMap:
|
||||||
; 32x18 map matching the startup nintendo logo
|
; 32x18 game of life map matching the startup nintendo logo
|
||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ Intro:
|
|||||||
jr z, .setBGPalette
|
jr z, .setBGPalette
|
||||||
|
|
||||||
; fade bg palette
|
; fade bg palette
|
||||||
ld b, 8
|
FADE_DELAY = 8 ; frames
|
||||||
|
ld b, FADE_DELAY
|
||||||
.fadeDelay0
|
.fadeDelay0
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -53,7 +54,7 @@ Intro:
|
|||||||
ld a, %11111100
|
ld a, %11111100
|
||||||
ldh [rBGP], a
|
ldh [rBGP], a
|
||||||
|
|
||||||
ld b, 8
|
ld b, FADE_DELAY
|
||||||
.fadeDelay1
|
.fadeDelay1
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -62,7 +63,7 @@ Intro:
|
|||||||
ld a, %11111000
|
ld a, %11111000
|
||||||
ldh [rBGP], a
|
ldh [rBGP], a
|
||||||
|
|
||||||
ld b, 8
|
ld b, FADE_DELAY
|
||||||
.fadeDelay2
|
.fadeDelay2
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -127,7 +128,7 @@ Intro:
|
|||||||
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BG9800
|
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BG9800
|
||||||
ldh [rLCDC], a
|
ldh [rLCDC], a
|
||||||
|
|
||||||
; sound
|
; sweep sound while transforming nintendo logo into game of life of it
|
||||||
ld a, $77
|
ld a, $77
|
||||||
ldh [rNR10], a ; sweep
|
ldh [rNR10], a ; sweep
|
||||||
ld a, (%00 << 6) + 0
|
ld a, (%00 << 6) + 0
|
||||||
@@ -146,22 +147,23 @@ FREQUENCY = 146
|
|||||||
ld b, 20
|
ld b, 20
|
||||||
.loopX
|
.loopX
|
||||||
ld c, 2
|
ld c, 2
|
||||||
|
; 3 frame delay
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
.loopY
|
.loopY
|
||||||
; copy 8 tiles (that's how many there is before L and E overflow)
|
; copy 8 tiles from (that's how many there is before L and E overflow)
|
||||||
REPT 8
|
REPT 8
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, l
|
ld a, l
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld e, a
|
ld e, a
|
||||||
ENDR
|
ENDR
|
||||||
; L and E overflowed, we can increment H and L
|
; L and E overflowed, we can increment high byte of pointers (h and d)
|
||||||
inc h
|
inc h
|
||||||
inc d
|
inc d
|
||||||
dec c
|
dec c
|
||||||
@@ -171,10 +173,10 @@ REPT 2
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, l
|
ld a, l
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld e, a
|
ld e, a
|
||||||
ENDR
|
ENDR
|
||||||
; back to beginning (high byte)
|
; back to beginning (high byte)
|
||||||
@@ -187,10 +189,10 @@ ENDR
|
|||||||
|
|
||||||
; back to beginning + next column (low byte)
|
; back to beginning + next column (low byte)
|
||||||
ld a, l
|
ld a, l
|
||||||
sub a, $3F
|
sub a, SCRN_VX_B * 2 - 1
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
sub a, $3F
|
sub a, SCRN_VX_B * 2 - 1
|
||||||
ld e, a
|
ld e, a
|
||||||
|
|
||||||
dec b
|
dec b
|
||||||
|
|||||||
Reference in New Issue
Block a user