Nintendo DMG-01 - Game Boy Console Manual page 57

Manual
Table of Contents

Advertisement

TM
Game Boy
CPU Manual
org $ff80
VBlank:
push af
ld a,BASE_ADRS <- transfer data from BASE_ADRS
ld ($ff46),a
ld a,28h
Wait:
dec a
jr nz,Wait
to Wait
pop af
reti
38. FF47 (BGP)
Name
Contents - BG & Window Palette Data
by DP
<- Save A reg & flags
<- put A into DMA registers
<- loop length
<- We need to wait 160 ms.
<-
<- 12 cycles - branch if Not Zero
<- Restore A reg & flags
<- Return from interrupt
- BGP
Bit 7-6 - Data for Dot Data 11
Bit 5-4 - Data for Dot Data 10
Bit 3-2 - Data for Dot Data 01
Bit 1-0 - Data for Dot Data 00
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.
4 cycles - decrease A by 1
(Normally darkest color)
(Normally lightest color)
2.13.1. I/O Registers
(R/W)
Page 57

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Game boy

Table of Contents