Nintendo DMG-01 Manual - Page 57
FF47 BGP
View all Nintendo DMG-01 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 57 highlights
Game BoyTM CPU Manual 2.13.1. I/O Registers org $ff80 VBlank: push af
Game Boy
TM
CPU Manual
2.13.1. I/O Registers
org $ff80
VBlank:
push af
<- Save A reg & flags
ld a,BASE_ADRS <- transfer data from BASE_ADRS
ld ($ff46),a
<- put A into DMA registers
ld a,28h
<- loop length
Wait:
<- We need to wait 160 ms.
dec a
<-
4 cycles - decrease A by 1
jr nz,Wait
<- 12 cycles - branch if Not Zero
to Wait
pop af
<- Restore A reg & flags
reti
<- Return from interrupt
38.
FF47 (BGP)
Name
- BGP
Contents - BG & Window Palette Data
(R/W)
Bit 7-6 - Data for Dot Data 11
(Normally darkest color)
Bit 5-4 - Data for Dot Data 10
Bit 3-2 - Data for Dot Data 01
Bit 1-0 - Data for Dot Data 00
(Normally lightest color)
This selects the shade of grays to use
for the background (BG) & window pixels.
Since each pixel uses 2 bits, the
corresponding shade will be selected from
here.
by DP
Page 57