Nintendo DMG-01 Manual - Page 131

Set Attribute from ATF $15, Set Data from ATF $16 data, GameBoy Window Mask $17 data

Page 131 highlights

Game BoyTM CPU Manual 4.5. Commands 19. Set Attribute from ATF ($15) The data for 45 Attribute files is transfered with this command. Each ATtribute File is 90 bytes so 90x45 or 4050 bytes of data are transfered. Each attribute file uses 5 bytes per 8x8 horizontal line (20 x 4 char/byte x 2 bits/palette) to describe the color palettes of a line. Example ATF data: DB $ff,$00,$00,$00,$02 DB $ff,$00,$00,$00,$02 DB $ff,$00,$00,$00,$02 ..... DB $ff,$00,$00,$00,$02 ; Line #1 ; Line #2 ; Line #3 ; Line #18 The above ATtribute File would set the SGB color palette selection to 3 for the first 4 columns of the main game action window. The last column would have SGB color palette 2 selected. All the other columns would have palette 0 selected. 20. Set Data from ATF ($16) (data) Transfer specified ATtribute File to GameBoy window. data: %/xyyyyyy x - 0 = No Change, 1 = Cancel mask after xfer ATF yyyyyy = ATtribute File number ($00-$2c) 21. GameBoy Window Mask ($17) (data) data: $00 = Off $01 = Transfers VRAM to SNES until cancelled. by DP Page 131

  • 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
4.5. Commands
19.
Set Attribute from ATF ($15)
The data for 45 Attribute files is transfered with
this command. Each ATtribute File is 90 bytes so
90x45 or 4050 bytes of data are transfered. Each
attribute file uses 5 bytes per 8x8 horizontal
line (20 x 4 char/byte x 2 bits/palette) to
describe the color palettes of a line.
Example ATF data:
DB $ff,$00,$00,$00,$02
; Line #1
DB $ff,$00,$00,$00,$02
; Line #2
DB $ff,$00,$00,$00,$02
; Line #3
.....
DB $ff,$00,$00,$00,$02
; Line #18
The above ATtribute File would set the SGB color
palette selection to 3 for the first 4 columns
of the main game action window. The last column
would have SGB color palette 2 selected. All the
other columns would have palette 0 selected.
20.
Set Data from ATF ($16) (data)
Transfer specified ATtribute File to GameBoy window.
data:
%/xyyyyyy
x - 0
= No Change, 1 = Cancel mask after xfer ATF
yyyyyy = ATtribute File number ($00-$2c)
21.
GameBoy Window Mask ($17) (data)
data:
$00 = Off
$01 = Transfers VRAM to SNES until cancelled.
by DP
Page 131