Nintendo DMG-01 Manual - Page 120

SGB Border

Page 120 highlights

4.2. Palettes Game BoyTM CPU Manual the SGB border palette. The SGB border palette is setup using command $14. There are 64 colors in this palette. The SGB color palettes may be set directly using commands $00-$03. There are a total of four of these palettes and they determine which colors are used in the main game action window. The color for bit 00 will be the same for all SGB color palettes. The color most recently stored in bit 00 will be used. The SGB color palettes may be set indirectly using the System color palettes using commands $0a-$0b. There are a total of 512 of these palettes. 4.3. SGB Border The SGB border is often shown as colorful graphics that surround the main game action window. The truth is that the SGB border actually covers the whole viewing screen and has the highest viewing priority. The reason it appears be just a "border" around most games is due to the fact that usually a 160x144 pixel wide box is drawn in the center of the SGB "border" using color 0. Since this color is transparent, the main game action window under it is visible. Creating a program to convert a 16-color GIF to a SGB border is relatively easy and has been done for DOS. (i.e.gif2sopt.exe) What is not so easy is converting a 64-color GIF to a SGB border because each tile only has access to 16-colors. The 16-color palette that the tile has access to is determined by the tile attribute byte. The tile attribute byte is described in the 'Picture Transfer' command ($14) below. Page 120 V 1.01

  • 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

4.2. Palettes
Game Boy
TM
CPU Manual
the SGB border palette.
The SGB border palette is setup using command $14.
There are 64 colors in this palette.
The SGB color palettes may be set directly using
commands $00-$03. There are a total of four of
these palettes and they determine which colors are
used in the main game action window. The color for
bit 00 will be the same for all SGB color palettes.
The color most recently stored in bit 00 will be used.
The SGB color palettes may be set indirectly using
the System color palettes using commands $0a-$0b.
There are a total of 512 of these palettes.
4.3.
SGB Border
The SGB border is often shown as colorful graphics
that surround the main game action window. The truth is
that the SGB border actually covers the whole viewing
screen and has the highest viewing priority. The reason
it appears be just a "border" around most games is due
to the fact that usually a 160x144 pixel wide box is
drawn in the center of the SGB "border" using color 0.
Since this color is transparent, the main game action
window under it is visible.
Creating a program to convert a 16-color GIF to a SGB
border is relatively easy and has been done for DOS.
(i.e.gif2sopt.exe) What is not so easy is converting a
64-color GIF to a SGB border because each tile only has
access to 16-colors. The 16-color palette that the tile
has access to is determined by the tile attribute byte.
The tile attribute byte is described in the 'Picture
Transfer' command ($14) below.
Page 120
V 1.01