Nintendo 1504166 Programming Manual - Page 121

Display Synchronization DMA

Page 121 highlights

AGB Programming Manual DMA Transfer Display Synchronization DMA This function is used to transfer frame data from peripheral equipment, such as a camera, to a frame buffer in BG mode 3. Since BG mode 3 has only one frame buffer, this function is designed so that the next frame data transfer will not overwrite the current screen data that is displayed. When transferring one (1) frame of data composed of 240 x 160 pixels with 32,768 colors (16-bit/pixel), use the following settings: § Word count register -Word count § DMA control register -DMA repeat :The number of transfers per horizontal line (For 32-bit DMA transfer, set to 78h). :1 You can enable this DMA anytime. Set the DMA enable flag to 1 after making the above settings. If the DMA enable flag is 1 when the V count value is 162, DMA transfers will be executed in the next frame. Synchronizing with the horizontal line, DMA, which transfers the "word count" data per horizontal line, will be executed 160 times, from line 2 to line 161. Data is always DMA transferred to the frame buffer address located 2 horizontal lines before the line being drawn, so currently displayed graphics will never be affected by transferred data. When the V count value becomes 162, the DMA enable flag is reset to 0 automatically and the DMA stops. If the DMA enable flag is cleared manually, there is a possibility of a malfunction. Always wait until the DMA enable flag is reset to 0. Although the DMA repeat flag is ON, this DMA will be disabled after the transfer of 1 frame's worth of data. Therefore, it is necessary to re-enable the DMA enable flag for every frame to be transferred. ©1999 - 2001 Nintendo of America Inc. 121 D.C.N. AGB-06-0001-002B4

  • 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
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171

AGB Programming Manual
DMA Transfer
©1999 - 2001 Nintendo of America Inc.
121
D.C.N. AGB-06-0001-002B4
Display Synchronization DMA
This function is used to transfer frame data from peripheral equipment, such as a
camera, to a frame buffer in BG mode 3.
Since BG mode 3 has only one frame buffer,
this function is designed so that the next frame data transfer will not overwrite the
current screen data that is displayed.
When transferring one (1) frame of data composed of 240 x 160 pixels with 32,768
colors (16-bit/pixel), use the following settings:
§
Word count register
-Word count
:The number of transfers per horizontal line
(For 32-bit DMA transfer, set to 78h).
§
DMA control register
-DMA repeat
:1
You can enable this DMA anytime. Set the DMA enable flag to 1 after making the
above settings. If the DMA enable flag is 1 when the V count value is 162, DMA
transfers will be executed in the next frame.
Synchronizing with the horizontal line,
DMA, which transfers the "word count" data per horizontal line, will be executed 160
times, from line 2 to line 161.
Data is always DMA transferred to the frame buffer address located 2 horizontal lines
before the line being drawn, so currently displayed graphics will never be affected by
transferred data. When the V count value becomes 162, the DMA enable flag is reset
to 0 automatically and the DMA stops.
If the DMA enable flag is cleared manually, there is a possibility of a malfunction.
Always wait until the DMA enable flag is reset to 0.
Although the DMA repeat flag is ON, this DMA will be disabled after the transfer of 1
frame's worth of data.
Therefore, it is necessary to re-enable the DMA enable flag for
every frame to be transferred.