Nintendo DMG-01 Manual - Page 23

Both background and window can be disabled or enabled

Page 23 highlights

Game BoyTM CPU Manual 2.8.1. Tiles number of a tile to be displayed. Tile patterns are taken from the Tile Data Table located either at $8000-8FFF or $8800-97FF. In the first case, patterns are numbered with unsigned numbers from 0 to 255 (i.e. pattern #0 lies at address $8000). In the second case, patterns have signed numbers from -128 to 127 (i.e. pattern #0 lies at address $9000). The Tile Data Table address for the background can be selected via LCDC register. Besides background, there is also a "window" overlaying the background. The window is not scrollable i.e. it is always displayed starting from its left upper corner. The location of a window on the screen can be adjusted via WNDPOSX and WNDPOSY registers. Screen coordinates of the top left corner of a window are WNDPOSX-7,WNDPOSY. The tile numbers for the window are stored in the Tile Data Table. None of the windows tiles are ever transparent. Both the Background and the window share the same Tile Data Table. Both background and window can be disabled or enabled separately via bits in the LCDC register. If the window is used and a scan line interrupt disables it (either by writing to LCDC or by setting WX > 166) and a scan line interrupt a little later on enables it then the window will resume appearing on the screen at the exact position of the window where it left off earlier. This way, even if there are only 16 lines of useful graphics in the window, you could display the first 8 lines at the top of the screen and the next 8 lines at the bottom if you wanted to do so. by DP Page 23

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139

Game Boy
TM
CPU Manual
2.8.1. Tiles
number of a tile to be displayed. Tile patterns are
taken from the Tile Data Table located either at
$8000-8FFF or $8800-97FF. In the first case, patterns
are numbered with unsigned numbers from 0 to 255 (i.e.
pattern #0 lies at address $8000). In the second case,
patterns have signed numbers from -128 to 127 (i.e.
pattern #0 lies at address $9000). The Tile Data Table
address for the background can be selected via LCDC
register.
Besides background, there is also a "window"
overlaying the background. The window is not
scrollable i.e. it is always displayed starting from
its left upper corner. The location of a window on the
screen can be adjusted via WNDPOSX and WNDPOSY
registers. Screen coordinates of the top left corner
of a window are WNDPOSX-7,WNDPOSY. The tile numbers
for the window are stored in the Tile Data Table. None
of the windows tiles are ever transparent. Both the
Background and the window share the same Tile Data
Table.
Both background and window can be disabled or enabled
separately via bits in the LCDC register.
If the window is used and a scan line interrupt
disables it (either by writing to LCDC or by setting
WX > 166) and a scan line interrupt a little later on
enables it then the window will resume appearing on
the screen at the exact position of the window where
it left off earlier. This way, even if there are only
16 lines of useful graphics in the window, you could
display the first 8 lines at the top of the screen and
the next 8 lines at the bottom if you wanted to do so.
by DP
Page 23