Advertisement
atreyu187

Dreamcast Guides : Dev Box System Architecture

Jan 4th, 2013
3,656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 652.06 KB | None | 0 0
  1.  
  2. Dreamcast/
  3. Dev.Box
  4. System
  5. Architecture
  6.  
  7. Last Update: 99/09/02 18:41
  8. (Preliminary)
  9.  
  10. REVISION HISTORY
  11. [1999]
  12. 9/2 ? Modified terms: KATANA -> Dreamcast, SET5 -> Dev.Box (Revisions in green: Up to next release)
  13. ? Distinction between HOLLY1 and HOLLY2 were unnecessary, and so combined as just HOLLY. (Revisions in green: Up to next release)
  14. 8/23 ? Corrected description of FNS and OCT settings in section 8.1.1.4.
  15. ? Corrected description of FNS[9:0] in the register descriptions (channel data) in section 8.4.5.
  16. 3/10 ? Added descriptions of register modification procedures in section 2.7.2.
  17. 2/4 ? Corrected register addresses in section 8.4.1.1: 6930 -> 6920, 6950 -> 6930, etc. (Revisions in green: Up to next release)
  18. 1/27
  19. [1998]
  20. 11/25 ? Corrected descriptions of revisions added to section 1.4 and 9.
  21. ? Corrected description of parameters in the common data for the AICA register in section 8.4.5.
  22. 11/20 ? Made additions to and corrected descriptions related to revisions in sections 1.4 and 9.
  23. ? Added description for the STARTRENDER register (0x005F8014) in section 8.4.2.
  24. ? Corrected a portion of the description of G2-related registers in section 8.4.1.4.
  25. ? Made additions to and corrected supplementary descriptions for the mapping table in section 2.1.
  26. 11/10 ? Corrected description and headings concerning section 4.2, "G2 Interface." (Revisions in green: Up to next release)
  27. ? Corrected description of G2-related registers in section 8.4.1.4. (Revisions in green: Up to next release)
  28. 11/4 ? Corrected description of Maple-related registers in section 8.4.1.2. (Revisions in green: Up to next release)
  29. 10/30 ? Corrected description concerning PVR-DMA registers in section 8.4.1.5. (Revisions in green: Up to next release)
  30. ? Corrected description in section 5, "User Interface" -- Described hard triggers again. (Revisions in green: Up to next release)
  31. 10/15
  32. 10/13 ? Corrected description in section 3.6.2.3, "VQ Textures," and Figs. 3-1 and 3-2.
  33. 9/30 ? Corrected description in Section 1.4, "Dev.Box Board."
  34. ? Changed description in section 9, "Bug List."
  35. ? Added description to section 8.4.2 for the STARTRENDER Register (0x005F8014).
  36. 9/25
  37. 9/1616 ? Corrected Corrected description in section 1.1.5, "Expansion Devices."
  38. 8/31 ? Corrected description in section 3.7.4.4.3, "Obj Control." bit 16-8 -> bit
  39. 8/28 ? Added description in section 4.2.3, "RTC."
  40. ? Corrected description in section 8.4.5, "AICA Registers," concerning channel data:PCMS, and cutoff frequency (FLV) and common data: DLG.
  41. ? Corrected description of external memory specifications in section 4.2.2.4, "Wave Memory (AICA)."
  42. ? Corrected portion of description in section 8.1.1, "Audio-related..."
  43. ? Corrected description in section 3.4.5.3, "Modifier Volume Processing of Various Polygons."
  44. ? Corrected table in section 3.5.1, "Sync Pulse Generator."
  45. 8/21 ? Added and corrected a portion of text and figure in section 3.6.2.4, "MIPMAP Texture."
  46. ? Added to and corrected ISP_FEED_CFG Register in section 8.4.2(0x005F8098).
  47. ? Changed a portion of 3.4.3.1, "ISP Cache Size."
  48. ? Changed a portion of 3.4.5.2, "Volume Mode."
  49. ? Changed a portion of 3.4.11.2, "Y Scaler."
  50. ? Changed Type A diagram in section 3.4.12, "Flicker-free Interlacing"
  51. 8/18 ? Changed "ARC" to "SRC" in section 3.4.7.2.3, "Trilinear Filtering."
  52. 8/7
  53. 8/4 ? Corrected a portion of ISP_FEED_CFG Register in section 8.4.2(0x005F8098).
  54. ? Corrected a portion of display lists in sections 3.7.8 and 3.7.9.2.
  55. ? Corrected a portion of section 3.4.3, Punch Through Polygons."
  56. 7/31
  57. 7/28 ? Changed a portion of section 3.3, "Register Map (Graphics System)."
  58. 7/27 ? Corrected a portion of Figs. 3-77 and 3-78 in section 3.7, "Display List Details."
  59. ? Corrected a portion of FPU_PARAM_CFG Register (0x005F807C) in section 8.4.2.
  60. 7/14 ? Corrected a portion of section 3.1.1.1.
  61. ? Corrected a portion of the HOLY version table in section 1.4, "Dev.Box."
  62. 7/9 ? Corrected all pages.
  63. ? Changed "Opaqu" to "Opaque" in section 3.1.1.9, "Polygon List."
  64. 7/7 ? Made "Expansion Devices" the term used consistently for external expansion devices that are connected to the G2 Bus.
  65. ? Added description to section 3.4.3, "Punch Through Polygons."
  66. ? Corrected references in section 3.7.7, "Region Array Data Configuration."
  67. ? Corrected explanation in section 4.2.5, "Expansion Devices."
  68. ? Corrected SDRAM_CFG Register (0x005F80A8) in section 8.4.2.
  69. 7/1 ? Deleted the hidden character portion of section 4.1.4, "System Codes."
  70. ? Changed the underlining of the additional HOLLY2 specifications in section 3, "Graphics System," from a broken line to a wavy line.
  71. ? Returned the setting for the portion of section 5.1.6 that was composed of hidden characters back to normal characters.
  72. 6/30 ? Submitted to Software Technology Development Group.
  73. 6/10 ? Submitted to Software Technology Development Group.
  74. 5/26 ? Submitted to Software Technology Development Group.
  75. 5/1 ? Submitted to Software Technology Development Group.
  76. 4/21 ? Submitted to Software Technology Development Group.
  77. 3/27 ? Submitted to Software Technology Development Group.
  78. 2/24 ? Submitted to Software Technology Development Group.
  79. 2/4 ? Submitted to Software Technology Development Group.
  80. 1/30 ? Submitted to Software Technology Development Group.
  81. 1/23 ? Submitted to Software Technology Development Group.
  82. 12/16 ? Submitted to Software Technology Development Group.
  83. 11/25 ? Submitted to Software Technology Development Group.
  84.  
  85.  
  86. Table of Contents
  87.  
  88. Dreamcast/Dev.Box System Architecture 1
  89. REVISION HISTORY 2
  90. �1 THE SYSTEM 9
  91. �1.1 Overview 10
  92. �1.2 System Architecture 10
  93. �1.3 Block Diagram 11
  94. �1.4 Dev.Box Board 14
  95. �2 CPU AND PERIPHERAL MEMORY 15
  96. �2.1 System Mapping 16
  97. �2.1.1 Cache Access 18
  98. �2.2 SH4 20
  99. �2.2.1 Overview of the SH4 20
  100. �2.2.2 CPU Bus Interface 21
  101. �2.2.3 Initial Settings for the SH4 22
  102. �2.3 System Memory 34
  103. �2.3.1 System Memory Configuration and Control 34
  104. �2.3.2 System Memory Initial Settings 34
  105. �2.3.3 Access Procedure 36
  106. �2.4 Register Map 37
  107. �2.5 Single Access to Each Block 41
  108. �2.6 DMA Transfers 42
  109. �2.6.1 Overview of DMA Transfers 42
  110. �2.6.2 Types of DMA 43
  111. �2.6.3 GD-ROM Data Transfers 44
  112. �2.6.4 Texture Data Transfers 47
  113. �2.6.4.1 Direct Texture Transfers 47
  114. �2.6.4.2 YUV Texture Transfer 55
  115. �2.6.5 Display List Transfers 57
  116. �2.6.5.1 Direct Display list DMA 57
  117. �2.6.5.2 TA Input Display List Transfers 59
  118. �2.6.5.3 Sort-DMA Transfer of ? Polygon Parameters 61
  119. �2.6.6 Wave Data Transfers 72
  120. �2.6.7 ARM Data Transfers 77
  121. �2.6.8 Peripheral Data Transfers 78
  122. �2.6.9 Color Palette Transfers 81
  123. �2.6.10 External Data Transfer 82
  124. �2.7 Interrupts 83
  125. �2.7.1 Overview 83
  126. �2.7.2 Interrupt Settings and Access Procedures 84
  127. �2.7.3 Notes Concerning Interrupts 90
  128. �3 The Graphics System 91
  129. �3.1 Overview 92
  130. �3.1.1 Graphics Architecture 92
  131. �3.1.1.1 Basic Polygons 92
  132. �3.1.1.2 Coordinate System 93
  133. �3.1.1.3 Display List 93
  134. �3.1.1.4 Tile Partitioning and Surface Equations 94
  135. �3.1.1.5 Block Diagram 95
  136. �3.1.1.6 Triangle Setup 96
  137. �3.1.1.7 ISP(Image Synthesis Processor) 97
  138. �3.1.1.8 TSP(Texture and Shading Processor) 97
  139. �3.1.1.9 Polygon List 98
  140. �3.1.2 Drawing Function Overview 99
  141. �3.1.3 Display Function Overview 100
  142. �3.2 Memory Map 100
  143. �3.3 Register Map 101
  144. �3.4 Drawing Function Details 103
  145. �3.4.1 Background 103
  146. �3.4.2 Translucent Polygon Sort 104
  147. �3.4.2.1 Auto-sort Mode 104
  148. �3.4.2.2 Pre-sort Mode 105
  149. �3.4.3 Punch Through Polygons 105
  150. �3.4.3.1 ISP Cache Size 105
  151. �3.4.3.2 Relationship with Translucent Polygons 106
  152. �3.4.4 Processing List Discarding 106
  153. �3.4.5 Modifier Volume 108
  154. �3.4.5.1 Inclusion and Exclusion Volumes 109
  155. �3.4.5.2 Volume Modes 109
  156. �3.4.5.3 Modifier Volume Processing for Various Polygons 110
  157. �3.4.6 Flow of Texture Mapping and Shading Processing 111
  158. �3.4.6.1 Secondary Accumulation Buffer 112
  159. �3.4.7 Texture Mapping 113
  160. �3.4.7.1 MIPMAP 113
  161. �3.4.7.2 Texture Filtering 114
  162. �3.4.7.2.1 Point Sampling 114
  163. �3.4.7.2.2 Bi-linear Filtering 115
  164. �3.4.7.2.3 Tri-linear Filtering 117
  165. �3.4.7.2.4 Texture Super-Sampling 119
  166. �3.4.7.3 Bump Mapping 120
  167. �3.4.7.3.1 Bump Mapping Algorithm 121
  168. �3.4.7.3.2 Bump Mapped + Textured Polygons 122
  169. �3.4.8 Fog Processing 124
  170. �3.4.8.1 Look-up Table Mode 124
  171. �3.4.8.2 Per Vertex Mode 125
  172. �3.4.9 Clipping 126
  173. �3.4.9.1 Tile Clipping 126
  174. �3.4.9.2 Pixel Clipping 128
  175. �3.4.10 Drawing to a Texture Map 129
  176. �3.4.11 X Scaler & Y Scaler 130
  177. �3.4.11.1 X Scaler 130
  178. �3.4.11.2 Y Scaler 131
  179. �3.4.12 Flicker-free Interlacing 131
  180. �3.4.12.1 Type A 132
  181. �3.4.12.2 Type B 133
  182. �3.4.13 Strip Buffers 134
  183. �3.4.14 Frame Buffer Drawing Data and Display Data 136
  184. �3.5 Display Function Details 137
  185. �3.5.1 Sync Pulse Generator 137
  186. �3.5.2 Frame Buffer Settings 138
  187. �3.6 Texture Definition 139
  188. �3.6.1 Texture Pixel Format 140
  189. �3.6.1.1 RGB Textures 140
  190. �3.6.1.2 YUV Textures 140
  191. �3.6.1.3 Bump Map Textures 141
  192. �3.6.1.4 Palette Textures 142
  193. �3.6.2 Texture Formats 143
  194. �3.6.2.1 Twiddled Format 143
  195. �3.6.2.2 Non-Twiddled Format 145
  196. �3.6.2.3 VQ Textures 146
  197. �3.6.2.4 MIPMAP Texture 149
  198. �3.6.3 Color Data Extension 151
  199. �3.6.4 Texture Format Combinations 152
  200. �3.6.5 Efficient Storage in Texture Memory 153
  201. �3.7 Display List Details 154
  202. �3.7.1 Polygon List Input 157
  203. �3.7.1.1 TA Parameter Input Flow 159
  204. �3.7.1.2 TA Register Settings for List Input 160
  205. �3.7.1.3 Region Array Data Storage 162
  206. �3.7.1.4 Object List Starting Address for Each List 163
  207. �3.7.2 Tile Arrangement 165
  208. �3.7.3 Tile Accelerator 166
  209. �3.7.3.1 Strip Partitioning 166
  210. �3.7.3.2 Tile Division 167
  211. �3.7.3.3 Tile Clipping 168
  212. �3.7.3.4 Object List Generation 169
  213. �3.7.3.4.1 List Initialization Processing and List Continuation Processing 169
  214. �3.7.3.4.2 Adding an OPB 172
  215. �3.7.3.4.3 Processing When a Limit Address Is Exceeded 175
  216. �3.7.3.5 ISP/TSP Parameter Generation 176
  217. �3.7.4 Explanation of TA Parameters 177
  218. �3.7.4.1 Control Parameter 177
  219. �3.7.4.2 Global Parameter 179
  220. �3.7.4.3 Vertex Parameter 180
  221. �3.7.4.4 Parameter Control Word 181
  222. �3.7.4.4.1 Para Control 181
  223. �3.7.4.4.2 Group Control 182
  224. �3.7.4.4.3 Obj Control 183
  225. �3.7.5 Parameter Format 187
  226. �3.7.5.1 Control Parameter Format 187
  227. �3.7.5.2 Global Parameter Format 188
  228. �3.7.5.3 Vertex Parameter Format 190
  229. �3.7.6 Overview of TA Parameters 194
  230. �3.7.6.1 Notes When Using the TA 194
  231. �3.7.6.2 Parameter Combinations 195
  232. �3.7.6.3 Parameter Input Example 196
  233. �3.7.7 Region Array Data Configuration 198
  234. �3.7.8 Object List Data Configuration 201
  235. �3.7.9 ISP/TSP Parameter Data Configuration 203
  236. �3.7.9.1 ISP/TSP Instruction Word 205
  237. �3.7.9.2 TSP Instruction Word 209
  238. �3.7.9.3 Texture Control Word 214
  239. �3.8 Details on Miscellaneous Functions 216
  240. �3.8.1 YUV-data Converter 216
  241. �4 Peripheral Interface 220
  242. �4.1 G1 Bus 221
  243. �4.1.1 GD-ROM 221
  244. �4.1.1.1 Register Map 222
  245. �4.1.1.2 Access Methods 222
  246. �4.1.1.3 Initial Settings 222
  247. �4.1.1.4 Access Procedure 222
  248. �4.1.2 System ROM 223
  249. �4.1.2.1 Access Methods 223
  250. �4.1.2.2 System Initial Settings 223
  251. �4.1.2.3 Access Procedure 223
  252. �4.1.3 FLASH Memory 224
  253. �4.1.3.1 System Initial Settings 224
  254. �4.1.3.2 Access Procedure 224
  255. �4.1.4 System Code 225
  256. �4.1.4.1 Initial Setting 225
  257. �4.1.4.2 Access Procedure 225
  258. �4.2 G2 Interface 226
  259. �4.2.1 Interface 226
  260. �4.2.2 AICA 230
  261. �4.2.2.1 Memory/Register Map 231
  262. �4.2.2.2 Initial Settings 232
  263. �4.2.2.3 Access Procedure 232
  264. �4.2.2.4 Wave Memory 235
  265. �4.2.3 RTC(Real Time Clock) 236
  266. �4.2.3.1 Access Method 236
  267. �4.2.4 MODEM 237
  268. �4.2.4.1 Address Map 237
  269. �4.2.4.2 Access Method 237
  270. �4.2.4.2.1 ID 238
  271. �4.2.4.2.2 Reset 238
  272. �4.2.5 Expansion Devices 239
  273. �5 User Interface 247
  274. �5.1 Peripherals 248
  275. �5.1.1 Overview 248
  276. �5.1.2 Register Map 250
  277. �5.1.3 Operating Sequence 251
  278. �5.1.4 Access Procedure 253
  279. �5.1.5 Example of Transmission and Reception Data 255
  280. �5.1.6 Notes Regarding Access 256
  281. �5.2 Control Pad 258
  282. �5.3 Light Phaser Gun 259
  283. �5.4 Backup (Option) 259
  284. �5.5 Sound Recognition (Option) 259
  285. �6 Peripheral Devices 260
  286. �6.1 DVE (Digital Video Encoder) 261
  287. �7 deBugger 263
  288. �8 Appendix 265
  289. �8.1 Technical Explanations 266
  290. �8.1.1 Technical Explanation Concerning Audio 266
  291. �8.1.1.1 Loop Control 266
  292. �8.1.1.2 ADPCM 268
  293. �8.1.1.3 AEG 271
  294. �8.1.1.4 PG 272
  295. �8.1.1.5 LFO 273
  296. �8.1.1.6 Mixer 274
  297. �8.1.1.7 FEG 276
  298. �8.1.1.8 Audio DSP 277
  299. �8.1.2 Reset Sequence 283
  300. �8.1.3 Clock 288
  301. �8.1.3.1 PLL 288
  302. �8.1.3.2 Clock Tree 288
  303. �8.1.4 JTAG Interface 290
  304. �8.1.4.1 SH4 290
  305. �8.1.4.2 HOLLY 290
  306. �8.1.4.3 AICA 290
  307. �8.2 Individual Block Diagrams 290
  308. �8.2.1 Detailed Block Diagram of Entire System 290
  309. �8.2.2 CPU Subsystem (Including System Memory) 290
  310. �8.2.3 HOLLY Subsystem 290
  311. �8.2.4 GD-ROM Subsystem 290
  312. �8.2.5 AICA Subsystem 290
  313. �8.2.6 Digital Video Encoder Subsystem 290
  314. �8.2.7 16Mbit SDRAM (16bit) 290
  315. �8.2.8 64Mbit SGRAM (32bit) 290
  316. �8.2.9 Power Supply 290
  317. �8.3 Pin Assignments (with Descriptions of Pins) Pin Assignments for Each Chip 290
  318. �8.3.1 CPU 290
  319. �8.3.2 HOLLY 290
  320. �8.3.3 GD-ROM 290
  321. �8.3.4 AICA 290
  322. �8.3.5 Digital Video Encoder 290
  323. �8.3.6 16Mbit SDRAM (16bit) 290
  324. �8.3.7 64Mbit SGRAM (32bit) 290
  325. �8.4 List of Registers 291
  326. �8.4.1 System Bus Register 291
  327. �8.4.1.1 System Registers 292
  328. �8.4.1.2 Maple Peripheral Interface 305
  329. �8.4.1.3 G1 Interface 311
  330. �8.4.1.4 G2 Interface 322
  331. �8.4.1.5 PowerVR Interface 332
  332. �8.4.2 CORE Registers 337
  333. �8.4.3 Tile Accelerator Registers 359
  334. �8.4.4 GD-ROM Registers 364
  335. �8.4.5 AICA Register 371
  336. �8.5 List of Interrupts 386
  337. �8.5.1 Interrupt Tree 386
  338. �8.5.2 List of Interrupt Sources 387
  339. �8.6 List of Input Parameters 391
  340. �9 Bug List 399
  341.  
  342.  
  343.  
  344.  
  345. �1 THE SYSTEM
  346. �1.1
  347. Overview
  348. The Dreamcast system, based on the PowerVR Family core, includes a high-performance graphics system, a 64-channel audio system that is capable of various effects, and a 12x (max.) GD-ROM drive. In addition, the Dreamcast system provides excellent cost performance.
  349.  
  350. In addition, in order to facilitate expansion into the network/internet business, the main unit of the Dreamcast system is designed to accept a plug-in modem card.
  351.  
  352. This section provides an overview of the Dreamcast system. For further details on specific blocks, please refer to the individual sections that correspond to those blocks later in this manual.
  353.  
  354. �1.2 System Architecture
  355. The basic hardware specifications for the Dreamcast system are listed below.
  356. * CPU: Hitachi SH4 - 200MHz, super-scalar RISC processor, 360MIPS, 1.4GFLOPS
  357. * ASICs: Graphics: VL/NEC HOLLY - 100MHz; audio: Yamaha AICA - 22/25MHz
  358. * Polygon performance: 1 million polygons/sec (100-pixel triangles, opaque - 75%, translucent - 25%)
  359. * Polygon functions: Shadowing, trilinear mip-map, Fog, Z buffering, etc.
  360. * 16MB system memory
  361. * 8MB texture memory (can be expanded up to 16MB)
  362. * 2MB audio memory (can be expanded up to a maximum of 8MB)
  363. * 2MB system ROM
  364. * 128K flash memory (for system code)
  365. * Audio function: 64ch PCM/ADPCM, 44.1kHz
  366. * 4x to 12x CAV-type GD-ROM drive (128K of built-in buffer RAM)
  367. * Four game ports (peripheral ports)
  368. * RTC that permits battery backup
  369. * Supports NTSC/PAL and VGA video output
  370. * 33.6kbps modem card (LINE jack) that operates off of 3.3V
  371.  
  372. The specifications for Dreamcast system options are listed below.
  373. * Supports light phaser gun, backup storage media, and voice recognition as peripheral devices that connect to a game port.
  374. * Supports externally connected expansion devices.
  375. �1.1
  376. �1.3 Block Diagram
  377. Fig. 1-1 shows a block diagram of the system.
  378.  
  379. Fig. 1-1 System Block Diagram
  380.  
  381. Overviews of each block and the primary devices are provided below.
  382.  
  383. CPU
  384. The main CPU is a Hitachi SH4, which accepts a 33.3MHz clock signal from the system and, by means of an internal PLL, operates at 1.8V/200Mhz internally and at 3.3V/100MHz for the external bus. The SH4 is primarily responsible for processing concerning the game sequence, AI, 3D calculations, and issuing 3D graphics instructions. In addition, the SH4 also provides a general-purpose serial port with a FIFO buffer for use by external I/O devices. The serial port uses start-stop synchronization, and supports a maximum transfer speed of 1.5625Mbps.
  385.  
  386. Peripheral Memory
  387. In order to make the best use of the performance capabilities of the SH4, SDRAM is used for the main system memory, and is connected directly to the SH4. There are 16MB of main memory, the bus width is 64 bits, and the operating frequency is 100MHz. The (theoretical) maximum burst transfer speed is 800MB/s. In addition, aside from DMA transfers from the graphics and the interface chip, this system memory is used only by the SH4. 7ns chips or the equivalent are used for this memory.
  388. The Dreamcast System also has 2MB of system ROM, where the operating system, boot routine, etc., are stored.
  389. There is also a 128K flash memory that is used to store system information, such as region information, manufacturer code, etc.
  390.  
  391. Graphics System
  392. A feature of the Dreamcast graphics system is high-performance 3D graphics, and can produce output in a variety of video modes with 8-bit RGB data as the color information. The Dreamcast graphics core uses the DMA transfer capability of the SH4 (the CPU) to retrieve display lists created by the SH4 in system memory; the graphics core then uses these display lists to generate 3D images internally. Because the raster algorithm is used for the drawing method, there is no need for a frame buffer in order to generate 3d graphics; for texture mapping, textures are loaded in from dedicated texture memory. The standard graphics memory in the Dreamcast System is 8MB, but this can be expanded to 16MB for development work.
  393. The Dreamcast System supports video output for typical NTSC/PAL monitors as well as for VGA monitors (such as personal computer displays). In addition to the stereo sound that is output from the audio system, the Dreamcast system also outputs audio on a general-purpose RCA connector and an extended VGA connector.
  394.  
  395. Audio System
  396. The Dreamcast System can generate stereo output from the 64-channel PCM/ADPCM sound source that is built into the audio chip, and also supports various effects through the sound CPU and DSP that are also built into the chip. This output can also be mixed with sound data that is output from the GD-ROM. The system and the sound CPU and DSP all share a common wave memory, which has a 2MB capacity in the base system. (This capacity can be expanded to 8MB for development work.) The MIDI interface is also supported for development work as the audio peripheral interface.
  397. The GD-ROM drive that is built into the Dreamcast system is used to load sound data as well as data that is used by the game software, etc. The GD-ROM drive supports various CD formats, and rotates according to the CAV system. The data reading speed ranges from 4x to 12x. An ATAPI device is used for the drive.
  398. The stereo sound that is generated by the audio system passes through an audio DAC/AMP, and is then output on the RCA connector and extended VGA connector, along with the video output that is generated by the graphics system.
  399.  
  400. User Interface
  401. Sega's proprietary serial peripheral interface is used for the user interface devices, such as the control pads. The main unit of the Dreamcast system supports up to four ports. In addition to control pads, these ports also support connection with light phaser gun, backup storage media, etc. the maximum transfer rate through these ports is 2Mbps.
  402. Expansion Device
  403. Debuggers for use in software development can be connected to the expansion connector as expansion devices.
  404.  
  405. Communications System
  406. The Dreamcast system supports a plug-in modem card. The communications speed of this modem is 33.6Kbps, and the modem includes a modular line jack.
  407.  
  408. Supplemental descriptions of the buses in relation to the hardware are provided below.
  409.  
  410. CPU bus
  411. This bus connects the SH4, the CPU, to the 16MB system memory and to "HOLLY," the graphics/interface core. Between the CPU and system memory, this is an SDRAM interface with a 64-bit data width, and between the CPU and HOLLY, this is a 64-bit bus interface on which addresses and data are multiplexed.
  412. As mentioned on the previous page, the bus clock in both cases is 100MHz.
  413.  
  414. Texture memory bus
  415. Supported by the HOLLY's internal PowerVR core, this is an SDRAM interface bus for texture memory, which is memory that is used for drawing and display functions. The bus clock is 100MHz, and the bus width is 64 bits (16 bits x 4).
  416.  
  417. Wave memory bus
  418. This is an SDRAM interface bus for audio that is supported by AICA. The bus clock is 67.7MHz (2 x 33.8688MHz, which is supplied from the GD-ROM to AICA). The bus width is 16 bits.
  419.  
  420. G1 bus
  421. The G1 bus is supported by HOLLY. The GD-ROM, system ROM, flash memory and other asynchronous devices are connected to the G1 bus in parallel. The access method used on the G1 bus differs according to the target device, with accesses to the GD-ROM device being different from accesses to system ROM or flash memory. Access is based on the ATA standard, according to a protocol that supports the ATA standard in part. One interrupt line from the GD-ROM is supported. Regarding data transfers, DMA transfers are possible in the GD-ROM area.
  422. This G1 bus also supports the loading of 8 bits of data (a country code) that are set on the board.
  423.  
  424. G2 bus
  425. The G2 bus is supported by HOLLY. This bus supports the audio chip AICA, a modem, external expansion devices, and other synchronous devices. The G2 bus is basically a PCI-like bus, with a bus clock of 25MHz and a bus width of 16 bits. The bus supports three interrupt lines, one for each of the supported devices listed above. Aside from the modem, DMA transfer is possible with the AICA and expansion devices.
  426.  
  427. �1.4
  428. Dev.Box Board
  429. This section describes the board settings and electrical aspects of the hardware.
  430. * About the HOLLY revisions (=CLX: chipmaker code name)...
  431. Each revision of Holly is the result of problems with chips or changes to the specifications.
  432. The version can be identified by the SH4 (the CPU) by reading the revision register in the system bus block and the CORE block.
  433. The following table lists the three types of internal registers that are used to identify the chip in each block. The register addresses shown in the table below are the addresses in the P2 9uncacheable) area of the SH4. (Refer to section 2.1.)
  434.  
  435.  
  436. 0xA05F689C
  437. bit7-0
  438. (reg. SB_SBREV) 0xA05F7880
  439. bit7-0
  440. (reg. SB_G2ID) 0xA05F8004
  441. bit15-0
  442. (REVISION) Chip currently
  443. in use 0x01 0x12 0x0001 HOLLY1.0 / 1.1
  444. (CLX1 1.0 / 1.1) 0x02 0x12 0x0001 HOLLY1.5/1.6
  445. (CLX1 1.5/1.6) 0x08 0x12 0x0011 HOLLY ES2.2
  446. (CLX2.2) 0x09 0x12 0x0011 HOLLY ES2.3
  447. (CLX2.3) 0x0A 0x12 0x0011 HOLLY ES2.4/2.41
  448. (CLX2.4/2.41) 0x0B 0x12 0x0011 HOLLY ES2.42
  449. (CLX2.42)
  450.  
  451. There are different versions of Dev.Box for the different HOLLY versions, as described below:
  452.  
  453. Dev.Box
  454. Ver. 5.05 Dev.Box
  455. Ver. 5.16 Dev.Box
  456. Ver. 5.22 Dev.Box
  457. Ver. 5.23 Dev.Box
  458. Ver. 5.24 HOLLY
  459. ES1.1 HOLLY
  460. ES1.6 HOLLY
  461. ES2.2 HOLLY
  462. ES2.3 HOLLY
  463. ES2.4 ~
  464. * Details on each HOLLY revision are provided in section 9.
  465.  
  466. * The drive capacity of all Maple-related pins on the HOLLY chip is 6mA (BFU C23).
  467.  
  468. * The withstand voltage for G1 devices connected to the HOLLY's G1 bus is 3.3V for the HOLLY1 and 5V for the HOLLY2.
  469.  
  470.  
  471.  
  472. �2 CPU AND PERIPHERAL MEMORY
  473.  
  474. This section describes the main processor of the Dreamcast System and the system memory.
  475.  
  476. �2.1 System Mapping
  477. Table 2-1 shows the memory map for physical addresses in the Dreamcast System. Refer to their respective sections for details on individual functions.
  478.  
  479. Area Physical Address Type Function Size Access Note 0 0x00000000
  480. 0x00200000
  481. 0x00400000
  482. 0x005F6800
  483. 0x005F6C00
  484. 0x005F7000
  485. 0x005F7400
  486. 0x005F7800
  487. 0x005F7C00
  488. 0x005F8000
  489. 0x00600000
  490. 0x00600800
  491. 0x00700000
  492. 0x00710000
  493. 0x00800000
  494. 0x01000000
  495. 0x02000000 - 0x001FFFFF
  496. - 0x0021FFFF
  497. - 0x005F67FF
  498. - 0x005F69FF
  499. - 0x005F6CFF
  500. - 0x005F70FF
  501. - 0x005F74FF
  502. - 0x005F78FF
  503. - 0x005F7CFF
  504. - 0x005F9FFF
  505. - 0x006007FF
  506. - 0x006FFFFF
  507. - 0x00707FFF
  508. - 0x0071000B
  509. - 0x00FFFFFF
  510. - 0x01FFFFFF
  511. - 0x03FFFFFF* MPX System/Boot ROM
  512. Flash Memory
  513. Unassigned
  514. System Control Reg.
  515. Maple i/f Control Reg.
  516. GD-ROM
  517. G1 i/f Control Reg.
  518. G2 i/f Control Reg.
  519. PVR i/f Control Reg.
  520. TA / PVR Core Reg.
  521. MODEM
  522. G2 (Reserved)
  523. AICA- Sound Cntr. Reg.
  524. AICA- RTC Cntr. Reg.
  525. AICA- Wave Memory
  526. Ext. Device
  527. Image Area* 2MB
  528. 128KB
  529. -
  530. 512B
  531. 256B
  532. 256B
  533. 256B
  534. 256B
  535. 256B
  536. 8KB
  537. 2KB
  538. -
  539. 32KB
  540. 12B
  541. 2/8MB
  542. 16MB
  543. 32MB* 1/2/4/32
  544. 1/2/4/32
  545. -
  546. 4
  547. 4
  548. 1/2
  549. 4
  550. 4
  551. 4
  552. 4/32
  553. 1
  554. -
  555. 4
  556. 4
  557. 4
  558. 1/2/4/32
  559. in G1 i/f
  560. in G1 i/f
  561. Reserved
  562.  
  563.  
  564. in G1 i/f
  565.  
  566.  
  567.  
  568.  
  569. in G2 i/f
  570. in G2 i/f
  571. in G2 i/f
  572. in G2 i/f
  573. in G2 i/f
  574. in G2 i/f
  575. 1 0x04000000
  576. 0x05000000
  577. 0x06000000 - 0x04FFFFFF
  578. - 0x05FFFFFF
  579. - 0x07FFFFFF* MPX Tex.Mem. 64bit Acc.
  580. Tex.Mem. 32bit Acc.
  581. Image Area* 8/16MB
  582. 8/16MB
  583. 32MB* 2/4/32
  584. 2/4/32 in TA/PVR
  585. in TA/PVR 2 0x08000000 - 0x0BFFFFFF - Unassigned - - 3 0x0C000000
  586. 0x0D000000
  587. 0x0E000000 - 0x0CFFFFFF
  588. - 0x0DFFFFFF
  589. - 0x0FFFFFFF* SDRAM System Memory
  590. (Image)
  591. Image Area* 16MB
  592. 16MB
  593. 32MB* 1/2/4/32
  594.  
  595. Work
  596.  
  597. 4 0x10000000
  598. 0x10800000
  599. 0x11000000
  600. 0x12000000 - 0x107FFFFF
  601. - 0x10FFFFFF
  602. - 0x11FFFFFF
  603. - 0x13FFFFFF* MPX TA FIFO Polygon Cnv.
  604. TA FIFO YUV Conv.
  605. Tex.Mem. 32/64bit Acc.
  606. Image Area* 8MB
  607. 8MB
  608. 16MB
  609. 32MB* 32(w)
  610. 32(w)
  611. 32(w)
  612. in TA block
  613. in TA block
  614. thru TA
  615. 5 0x14000000 - 0x17FFFFFF MPX Ext. Device 64MB 1/2/4/32 in G2 i/f 6 0x18000000 - 0x1BFFFFFF - Unassigned - - Reserved 7 0x1C000000 - 0x1FFFFFFF - (SH4 Internal area) - -
  616. Notes:
  617. - Locations marked with an asterisk in the above table indicate the address image for the first half of the corresponding 64MB area, divided into 32MB sections. (Example: System Control Registers = 0x005F6800 ~ ? 0x025F6800 ~)
  618. In addition, the area from 0x02000000 to 0x021FFFFF does not contain the System/Boot ROM image, and the area from 0x02200000 to 0x023FFFFF does not contain the flash memory image. Both are unused areas.
  619. Image areas other than those indicated by the "*" mark are not marked.
  620. "Area" refers to the area divisions in the CPU, each of which is a block of 64MB of physical area.
  621. "Access" shows the unit of access, in bytes. All accesses can basically be reads or writes, but those locations where the "(w)" notation appears are write-only accesses.
  622. Table 2-1 Physical Memory Map
  623. �2.1.1
  624. Cache Access
  625. Table 2-1 indicates the mapping of physical addresses in the system, which corresponds to an external memory space that is addressed using the 29-bit (A[28:0]) addresses used by the SH4, the CPU. The specification of actual addresses from the SH4 varies according to the SH4 cache access selection, and depends on the contents of the upper three bits (A[31:29]) of the SH4 physical memory space (A[31:0]), as shown in the table below.
  626. A[31:29] Address Area Cache 000 0x00000000?0x1FFFFFFF P0 Cacheable 001 0x20000000?0x3FFFFFFF P0 Cacheable 010 0x40000000?0x5FFFFFFF P0 Cacheable 011 0x60000000?0x7FFFFFFF P0 Cacheable 100 0x80000000?0x9FFFFFFF P1 Cacheable 101 0xA0000000?0xAFFFFFFF P2 Non-Cacheable 110 0xC0000000?0xCFFFFFFF P3 Cacheable 111 0xE0000000?0xFFFFFFFF P4 Non-Cacheable(SH4 internal area) Table 2-2 Cache Access
  627.  
  628. The following table shows the areas for which cache access is possible by the CPU.
  629. The addresses shown in parentheses are an image area.
  630. Address Device/Block Access 0x00000000?0x001FFFFF
  631. (0x02000000?0x021FFFFF) System/Boot ROM R/- 0x00200000?0x0021FFFF
  632. (0x02200000?0x0221FFFF) FLASH Memory R/- 0x0C000000?0x0CFFFFFF
  633. (0x0E000000?0x0EFFFFFF) System Memory R/W 0x10000000?0x107FFFFF
  634. (0x12000000?0x127FFFFF) Polygon Converter
  635. [Thru TA FIFO] -/W 0x10800000?0x10FFFFFF
  636. (0x12800000?0x12FFFFFF) YUV Converter
  637. [Thru TA FIFO] -/W 0x11000000?0x117FFFFF
  638. (0x13000000?0x137FFFFF) Texture Memory
  639. [Thru TA FIFO] -/W 0x04000000?0x047FFFFF
  640. (0x06000000?0x067FFFFF) Texture Memory-64bit Acc.
  641. [Thru PVR i/f] R/W 0x05000000?0x057FFFFF
  642. (0x07000000?0x077FFFFF) Texture Memory-32bit Acc.
  643. [Thru PVR i/f] R/W 0x01000000?0x01FFFFFF
  644. (0x03000000?0x03FFFFFF)
  645. , 0x14000000?0x17FFFFFF G2 External area Depends on device Table 2-3 Cache Accessible Area
  646.  
  647. Cautions concerning cache access are shown below.
  648. ? When using a path through a TA FIFO for a cache access, set the write address on a 32-byte boundary. (The data is written in the order that it was output to the FIFO.)
  649. ? With the TA FIFO, if a writeback is generated before 32 bytes are collected, the data that is available at that point is sent to the TA FIFO. Therefore, it is necessary to control writebacks when using a cache via the TA FIFO.
  650.  
  651. Note that the areas other than the system boot ROM and the flash memory that are shown in the table above can be accessed through the SH4's store queue function. For details, on the SH4 memory space and cache area, and the store queue function, refer to the SH4 manual.
  652. �2.2
  653. SH4
  654. The CPU used in the Dreamcast system is the Hitachi SH4; in 3D game programming, this CPU is primarily responsible for processing concerning the game sequence, AI, physical calculations, 3D conversion, etc. This section explains the settings for the SH4 and its peripheral circuits.
  655.  
  656. �2.2.1 Overview of the SH4
  657. Table 2-4 below lists the main features of the SH4.
  658.  
  659. Core Instruction core 32-bit RISC, 16-bit instructions Pipeline 5 stages FPU Single/double precision IEEE754 Clock Internal: 200MHz; external: 100MHz (1/2, 1/3, 1/4);
  660. peripheral clock: 50MHz Performance 360MIPS (core), 1.4GFLOPS (matrix multiplier) Super scalar ? Cache I$: 8K; D$: 16K (direct mapping for both), index/RAM functions Miscellaneous Capable of high-speed packet transfer through store queue function (32 bytes, two channels) Peripheral circuits Arithmetic operations Matrix multiplier, 1/? DMAC 4 channels, DDT (on Demand Data Transfer) for channel 0 Memory interface SDRAM, multiplex interface MMU Page sizes: 1KB, 4KB, 64KB, 1MB UBC Two break points SCI Clock synchronization, start-stop synchronization serial interface Timer 3 channels RTC Real-time clock, alarm, calendar Process and package Power consumption 1.8W Operating voltage External: 3.3V DC; internal: 1.8V DC Process 0.25?m, 4-layer metal, 1.8V/3.3V Package 256-pin BGA Table 2-4 Features of the SH4
  661.  
  662. For details on the SH4, refer to the SH4 manuals (regarding hardware, programming, etc.).
  663.  
  664. �2.2.2
  665. CPU Bus Interface
  666. The buses that connect the peripheral devices to the SH4 (the CPU buses) consist of a 26-bit address bus (the SH4 uses 32-bit internal addressing) and a 64-bit data bus that permits byte access. The CPU buses connect directly to the main system memory (SDRAM) and to the HOLLY chip, which is the graphics/interface core.
  667. The clock speed is 100MHz, with single accesses being 1/2/4 bytes and burst accesses being 32 bytes. The SH4 uses two different bus protocols on the CPU buses, depending on the memory area that has been mapped. One of the following two choices is selected, depending on memory area is to be accessed:
  668. (1) Direct operation to SDRAM
  669. (2) MPX operation to HOLLY
  670.  
  671. A "Direct operation to SDRAM" is an operation that is performed once the SH4 is directly connected to SDRAM, the system memory. The address and data buses form the interface with SDRAM. Area 3 (of the seven physical memory area divisions in the SH4) is used, and memory access is possible in bank active mode. Note that this type of access does not use the upper address bits (A[25:17]).
  672. An "MPX operation to HOLLY" is an operation that multiplexes the address and data on the 64-bit data bus, and, in the Dreamcast System, is performed in all SH4 areas 0, 1, 4, and 5. Areas 0, 1, and 5 use 3 soft waits (+ external waits), and area 4 uses 0 waits (+ external waits). The devices that are assigned to each area are listed below (refer to Table 2-1):
  673.  
  674. (1) Area 0 = Accesses to system ROM, GD-ROM, AICA, and other peripheral devices, and the control registers
  675. (2) Area 1 = Accesses to texture memory
  676. (3) Area 4 = Write accesses to the HOLLY TA area (FIFO, YUV converter), and to texture memory
  677. (4) Area 5 = Area for expansion devices on the G2 bus
  678.  
  679. The graphics/interface core HOLLY is divided into three blocks: the Power VR core (CORE) block, which is the graphics-related block; the Tile Accelerator (TA) block, which is used during data transfers to the CORE; and the System Bus (SB) block, which is the interface block that handles data transfers among all devices, including the graphics-related block. (Details on each of these blocks are provided in subsequent sections.)
  680. Each of these blocks is accessed from the SH4 through the interfaces listed below.
  681.  
  682. <System register interface>
  683. This is the interface between the SH4 and the HOLLY's internal system registers; the root bus (the bus that links all of the interfaces in the SB block) does not pass through this interface.
  684. This interface uses no waits (5 clock operation) and only 4-byte access; the transfer speed is 80MB/s.
  685.  
  686. <Root bus interface>
  687. This interface is used to access the root bus that carries data between peripheral devices. The number of waits and the number accesses both depend on the target device of the access, but basically accesses are made in units of 1/2/4/32 bytes.
  688. Burst access utilizes the wraparound function. This interface has a 32-byte write buffer (large enough for two single writes or one burst write). Only when there are consecutive single writes do consecutive writes occur on the root bus, making high-speed access possible (but attention must be made to possession of the bus). The maximum transfer speed is 356MB/s (during a burst write).
  689.  
  690. <TA FIFO interface>
  691. This interface is primarily used for transferring polygon data and texture data to the TA FIFO.
  692.  
  693. This interface supports 32-byte writes only. Wraparound operation is not supported, so access must start from address 0x00. (0x08, 0x10, and 0x18 are not permitted.) The number of waits is dependent on the TA FIFO, and the capacity of the FIFO can be checked in the registers. Furthermore, because there is a possibility that DMA will not be performed properly, writes during ch2-DMA operations are prohibited. The maximum transfer speed is 640MB/s (during a burst write).
  694.  
  695. For details on the SB block (DMA and other data transfers), refer to section 2.5 and beyond; for details on graphics, refer to section 3.
  696.  
  697. �2.2.3 Initial Settings for the SH4
  698. Tables 2-5 and 2-6 show the settings that are used for the SH4 in the Dreamcast System.
  699. Table 2-5 lists the operation modes of the SH4, which are selected by means of the MD[7:0] pins. These pins are used for other functions, and are sampled internally when the reset condition is released. The same applies to the clock mode, which is set again by software after the system boots up.
  700.  
  701. Item Setting External clock 100MHz (cycle time: 10ns) Internal clock 200MHz (cycle time: 5ns) Endian Little Endian (Intel style) Area 0 interface MPX (multiplex) Table 2-5 SH4 Configuration
  702.  
  703. Mode Pin Setting Operation MD8 0 Use oscillator. MD7 1 * SH4 operates in master mode. * MD6 0 * MPX operation is used for area 0. * MD5 1 All buses are Little Endian format. MD4 0 64-bit bus width operation MD3 0 64-bit bus width operation MD2 1 Clock mode MD1 0 Clock mode MD0 1 Clock mode The configuration of the items marked by an asterisk ("*") in the table may differ, depending on the SH4 process. (The values indicated in the above table are for the 25? process.)
  704. Table 2-6 SH4 Operation Mode Settings
  705.  
  706. The initial settings and notes concerning each of the SH4's functions listed below are shown in the following pages. For details on each of the settings, please refer to the SH4 hardware manual.
  707. The register settings and addresses indicated in this section are the values in the SH4's P4 area. (Caching not permitted; refer to section 2.1.1 and the SH4 manual.)
  708.  
  709. ? Low power consumption mode
  710. ? Clock oscillation circuit
  711. ? Real-time clock (RTC)
  712. ? Time unit (TMU)
  713. ? Bus state controller (BSC)
  714. ? Direct memory access controller (DMAC)
  715. ? Interrupt controller (INTC)
  716.  
  717. Use of the following SH4 functions, even those that are for debugging only, is prohibited.
  718.  
  719. ? Serial communication interface (SCI)
  720. ? Smart card interface
  721. ? User break controller (UBC) [for debugging only]
  722. ? Hitachi user debugging interface (HITACHI-UDI) [for debugging only]
  723.  
  724. <Low power consumption mode>
  725. The following limitations apply to low power consumption mode.
  726.  
  727. (1) Use of standby mode is prohibited, because in that mode the clock is not output and the system hangs.
  728. (2) Sleep and module standby modes can be used. In addition, because the SCI and RTC are not used, no clock signal is supplied.
  729. (3) Set the RTC control register 2 (RCR2) before setting the standby control register (STBCR).
  730.  
  731. The register settings are shown below. (Only valid bits are shown.)
  732.  
  733. STBCR (standby control register) 0xFFC00004 (8 bits) ?0x03 (initial value: 0x00)
  734. bit7 6 5 4 3 2 1 0 0 0 0 0 0 0 1 1
  735. bit7 � STBY ?�0� Enters sleep mode in response to the SLEEP instruction.
  736. bit6 - PHZ ?�0� Peripheral module-related pins (*1) do not go to high impedance in standby mode.
  737. bit5 - PPU ?�0� Peripheral module-related pins (*2) are pulled up when they are inputs or high impedance.
  738. bit4 - MSTP4 ?�0� Activates the DMAC.
  739. bit3 - MSTP3 ?�0� As desired (SCIF clock supplied/not supplied)
  740. bit2 - MSTP2 ?�0� As desired (TMU clock supplied/not supplied)
  741. bit1 - MSTP1 ?�1� Stops clock supplied to the RTC.
  742. bit0 - MSTP0 ?�1� Stops clock supplied to the SCI.
  743.  
  744. *1 MD0/SCK,MD1/TXD2,MD2/RXD2,MD7/TXD,MD8/RTS2,CTS2,DACK0/TDACK,DRAK0/BAVL,DACK1/ ID0,DRAK1/ID1
  745. *2 MD0/SCK,MD1/TXD2,MD2/RXD2,MD7/TXD,MD8/RTS2,SCK2/MRESET,RXD,CTS2,DREQ0/DBREQ, DACK0/TDACK,DRAK0/BAVL,DREQ1/TR,DACK1/ID0,DRAK1/ID1,TCLK
  746.  
  747. <Clock oscillation circuit>
  748. The clock oscillation circuit settings also conform with the MD pin settings in Table 2-6.
  749. (1) Using an oscillator, not a crystal resonator * MD8= 0
  750. (2) Using clock operation mode "5" * MD2= 1, MD1= 0, MD0= 1
  751. The detailed settings are as follows:
  752. 1/2 divider: OFF
  753. PLL1: ON
  754. PLL2: ON
  755. EXTAL clock input: 33MHz
  756. CPU clock: 200MHz (? 6)
  757. Bus clock: 100MHz (? 3)
  758. Peripheral module clock: 50MHz (? 3/2)
  759. (3) CKIO is clock output
  760. (4) Watchdog timer mode is prohibited since resets are applied to SH4 only, and not to other chips.
  761.  
  762. The register settings are shown below. (Only valid bits are shown.)
  763.  
  764. FRQCR (frequency control register): 0xFFC00000 /initial value: 0x0E0A
  765. With the MD pin settings shown in Table 2-6, it is not necessary to set this register. (The initial settings are adequate.)
  766. bit15-12 11 10 9 8-6 5-3 2-0 0000 1 1 1 000 001 010 [Bits 15:12 are reserved. (Specify "0x0".)]
  767. bit11 - CKOEN ?�1� CKIO clock input
  768. bit10 - PLL1EN ?�1� Use PLL1
  769. bit9 - PLL2EN? ?�1� Use PLL2
  770. bit8:6 - IFC [2:0] ?�000� CPU clock ? 1
  771. bit5:3 - BFC[2:0] ?�001� Bus clock ? 1/2
  772. bit2:0 - PFC[2:0]? ?�010� Peripheral clock ? 1/4
  773.  
  774. WTCNT (watchdog timer counter): 0xFFC00008 /initial value: 0x0000
  775. bit15-8 7 6 5 4 3 2 1 0 0101 1010 * * * * * * * * ?[Bits 15:8 are reserved. (Specify "0x5A".)]
  776. bit7:0 Don't care
  777.  
  778. WTCSR (watchdog timer control/status): 0xFFC0000C ? 0xA500/Initial value: 0x0000
  779. bit15-8 7 6 5 4 3 2-0 1010 0101 * 0 * * * *** [Bits 15:8 are reserved. (Specify "0xA5".)]
  780. bit7 - TME ?Don't care Timer enable
  781. bit6 - WT/IT ?�0� Used in interval timer mode
  782. bit5 - RSTS ?Don't care Reset type that was generated (Ignored in interval timer mode.)
  783. bit4 - WOVF ?Don't care Overflow flag (Not set in interval timer mode.)
  784. bit3 - IOVF ?Don't care Overflow flag (Used in interval timer mode.)
  785. bit2:0 - CKS[2:0] ?Don't care WTCNT clock select (The clock from divider 2 is 200MHz.)
  786. <Real-time clock (RTC)>
  787. Use of the RTC is prohibited, and it is necessary to make the setting that stops it. Note that the TCLK pin is an input, and the RTC control register 2 (RCR2) must be set before the standby control register (STBCR) is set.
  788. Including those registers for which access is prohibited, the RTC-related register settings are as listed below.
  789.  
  790. R6?CNT (64Hz counter) : 0xFFC80000 Access prohibited
  791. RSECCNT (seconds counter) : 0xFFC80004 Access prohibited
  792. RMINCNT (minutes counter) : 0xFFC80008 Access prohibited
  793. RHRCNT (hours counter) : 0xFFC8000C Access prohibited
  794. RWKCNT (day of the week counter) : 0xFFC80010 Access prohibited
  795. RDAYCNT (day counter) : 0xFFC80014 Access prohibited
  796. RMONCNT (month counter) : 0xFFC80018 Access prohibited
  797. RYRCNT (year counter) : 0xFFC8001C Access prohibited
  798. RSECAR (seconds alarm) : 0xFFC80020 Access prohibited
  799. RMINAR (minutes alarm) : 0xFFC80024 Access prohibited
  800. RHRAR (hours alarm) : 0xFFC80028 Access prohibited
  801. RWKAR (day of the week alarm) : 0xFFC8002C Access prohibited
  802. RDAYAR (day alarm) : 0xFFC80030 Access prohibited
  803. RMONAR (month alarm) : 0xFFC80034 Access prohibited
  804.  
  805. RCR1 (RTC control register 1): 0xFFC80038 (8 bits) ? 0x00 -- Setting is not required
  806. bit7 6 5 4 3 2 1 0 * - - 0 0 - - *
  807. bit7 - CF ?Don't care Carry flag
  808. bit4 - CIE ?�0� Do not generate carry interrupt
  809. bit3 - AIE ?�0� Do not generate alarm interrupt
  810. bit0 - AF ?Don't care Alarm flag
  811.  
  812. RCR2 (RTC control register 2): 0xFFC8003C (8 bits) ? 0x00 /Initial value: 0x0001001
  813. bit7 6-4 3 2 1 0 * 000 0 0 0 0
  814. bit7 - PEF ?Don't care Periodic interrupt flag
  815. bit6:4 - PES[2:0] ?�000� Periodic interrupt generation off
  816. bit3 - RTCEN ?�0� RTC crystal oscillator stopped
  817. bit2 - ADJ ?�0� Normal clock operation
  818. bit1 - RESET ?�0� Normal clock operation
  819. bit0 - START ?�0� Alarm flag
  820.  
  821. <Timer unit (TMU)>
  822. Because the TCLK pin is a pull-up input, the TMU cannot be used with an external clock or the input capture function. Furthermore, the TMU cannot be used with the built-in RTC output clock. The peripheral module clock is 50MHz.
  823.  
  824. The register settings are as shown below.
  825.  
  826. TOCR (Timer output control register): 0xFFD8000 ? 0x00 -- Setting is not required
  827. bit7 6 5 4 3 2 1 0 - - - - - - - *
  828. bit0 - TCOE ?�0� TCLK pin input
  829.  
  830. TSTR (Timer start register): 0xFFD80004 /Initial value 0x00
  831. bit7 6 5 4 3 2 1 0 - - - - - * * *
  832. bit2 - STR2 ?Don't care Timer counter 2 on/off
  833. bit1 - STR1 ?Don't care Timer counter 2 on/off
  834. bit0 - STR0 ?Don't care Timer counter 2 on/off
  835. TCOR0 (Timer constant register 0): 0xFFD80008 (32 bits) -- Set as desired
  836. TCNT0 (Timer counter register 0): 0xFFD8000C (32 bits) -- Set as desired
  837. TCR0 (Timer control register 0): 0xFFD80010 /Initial value 0x0000
  838. bit15-9 8 7 6 5 4-3 2-0 0000 000 * - - * 00 ***
  839. bit8 - UNF ?Don't care Underflow flag
  840. bit5 - UNIE ?Don't care Underflow interrupt
  841. bit4:3 - CKEG[1:0] ?�00� Rising edge
  842. bit2:0 - TPSC[2:0] ?Don't care Timer prescaler (101, 110, and 101 are prohibited)
  843.  
  844. TCOR1 (Timer constant register 1): 0xFFD80014 (32 bits) -- Set as desired
  845.  
  846. TCNT1 (Timer counter register 1): 0xFFD80018 (32 bits) -- Set as desired
  847.  
  848. TCR1 (Timer control register 1): 0xFFD80010C /Initial value 0x0000
  849.  
  850. bit15-9 8 7 6 5 4-3 2-0 0000 000 * - - * 00 ***
  851. bit8 - UNF ?Don't care Underflow flag
  852. bit5 - UNIE ?Don't care Underflow interrupt
  853. bit4:3 - CKEG[1:0] ?�00� Rising edge
  854. bit2:0 - TPSC[2:0] ?Don't care Timer prescaler (101, 110, and 101 are prohibited)
  855.  
  856. TCOR2 (Timer constant register 2): 0xFFD80020 (32 bits) -- Set as desired
  857.  
  858. TCNT2 (Timer counter register 2): 0xFFD80024 (32 bits) -- Set as desired
  859.  
  860. TCR2 (Timer control register 2): 0xFFD80028 /Initial value 0x0000
  861.  
  862. bit15-10 9 8 7-6 5 4-3 2-0 0000 00 * * 00 * 00 ***
  863. bit9 - ICPF ?Don't care Input capture interrupt flag
  864. bit8 - UNF ?Don't care Underflow flag
  865. bit7:6 - ICPE[1:0] ?�00� Use of input capture prohibited
  866. bit5 - UNIE ?Don't care Underflow interrupt
  867. bit4:3 - CKEG[1:0] ?�00� Rising edge
  868. bit2:0 - TPSC[2:0] ?Don't care Timer prescaler (101, 110, and 101 are prohibited)
  869.  
  870. TCPR2 (input capture) 0xFFD8002C Access prohibited
  871.  
  872.  
  873. <Bus state controller (BSC)>
  874. The BSC is a register for SH4 external bus-related settings. For details on the main settings, refer to the settings for MD[3:7] in the MD pin settings shown in Table 2-6. The settings for SDRAM, the system memory, are described in section 2.3.2.
  875. The register settings are shown below.
  876.  
  877. BCR1 (Bus state control 1): 0xFF800000?? 0xA3020008 /Initial value: 0xA0000000
  878. bit31 30 29 28-26 25 24 23-22 21 20 19 18 17 16 15 14 13-11 10-8 7-5 4-2 1 0 1 0 1 - 1 1 - 0 0 0 0 0 - 0 0 000 000 000 010 - 0
  879. bit31 - ENDIAN ?�1� Little Endian
  880. bit30 - MASTER ?�0� Master
  881. bit29 - AOMPX ?�1� Area 0 is MPX
  882. bit25 - IPUP ?�1� Do not pull-up the controller pins (*3)
  883. bit24 - OPUP ?�1� Do not pull-up the controller pins (*4)
  884. bit21 - A1MBC ?�0� Area 1 normal
  885. bit20 - A4MBC ?�0� Area 4 normal
  886. bit19 - BREQEN ?�0� External request invalid
  887. bit18 - PSHR ?�0� Master mode
  888. bit17 - MEMMPX ?�1� Area 1 to 6 MPX
  889. bit15 - HIZMEM ?�0� High impedance during standby (*5)
  890. bit14 - HIZCNT ?�0� High impedance during standby or when bus is granted
  891. bit13:11 - A0BST[2:0] ?�000� Area 0 normal memory
  892. bit10:8 - A5BST[2:0] ?�000� Area 5 normal memory
  893. bit7:5 - A6BST[2:0] ?�000� Area 6 normal memory
  894. bit4:2 - DRAMTP[2:0] ?�010� Area 2 normal memory, area 3 SDRAM
  895. bit0 - A56PCM ?�0� Area 5 6 normal memory
  896.  
  897. *3 NMI,IRL[3:0],BREQ,MD6,RDY
  898. *4 A[25:0],BS,CSn,RD,WEn,RD/WR,RAS,RAS2,CE2A,CE2B,RD2,RD/WR2
  899. *5 A[25:0],BS,CSn,RD/WR,CE2A,CE2B,RD/WR2
  900. *6 RAS,RAS2,WEn,RD,RD2
  901.  
  902. BCR2 (Bus state control 2): 0xFF800004? 0x0000 /Initial value 0x3FFC
  903. bit15-14 13-12 11-10 9-8 7-6 5-4 3-2 1 0 00 00 00 00 00 00 00 - 0
  904. bit15:14 - A0SZ[1:0] ?�00� Area 0 is 64 bits
  905. bit13:12 - A6SZ[1:0] ?�00� Area 6 is 64 bits
  906. bit11:10 - A5SZ[1:0] ?�00� Area 5 is 64 bits
  907. bit9:8 - A4SZ[1:0] ?�00� Area 4 is 64 bits
  908. bit7:6 - A3SZ[1:0] ?�00� Area 3 is 64 bits
  909. bit5:4 - A2SZ[1:0] ?�00� Area 2 is 64 bits
  910. bit3:2 - A1SZ[1:0] ?�00� Area 1 is 64 bits
  911. bit0 - PORTEN ?�0� Ports D47 to D32 are unused
  912.  
  913.  
  914. WCR1 (Wait control 1): 0xFF800008 ? 0x01110111 /Initial value: 0x7777777
  915. bit31 30-28 27 26-24 23 22-20 19 18-16 15 14-12 11 10-8 7 6-4 3 2-0 - 000 - 001 - 001 - 001 - 000 - 001 - 001 - 001 bit30:28 - DMAIW[2:0] ?�000� SDRAM is RAS down mode
  916. bit26:24 - A6IW[2:0] ?�001� Area 6 - 1 idle cycle between cycles
  917. bit22:20 - A5IW[2:0] ?�001� Area 5 - 1 idle cycle between cycles
  918. bit18:16 - A4IW[2:0] ?�001� Area 4 - 1 idle cycle between cycles
  919. bit14:12 - A3IW[2:0] ?�000� SDRAM is RAS down mode
  920. bit10:8 - A2IW[2:0] ?�001� Area 2 - 1 idle cycle between cycles
  921. bit6:4 - A1IW[2:0] ?�001� Area 1 - 1 idle cycle between cycles
  922. bit2:0 - A0IW[2:0] ?�001� Area 0 - 1 idle cycle between cycles
  923.  
  924. WCR2 (Wait control 2): 0xFF80000C ? 0x018060D8 /Initial value 0xFFFEEFFF
  925. bit31-29 28-26 25-23 22-20 19-17 16 15-13 12 11-9 8-6 5-3 2-0 000 000 011 000 000 - 011 - 000 011 011 000 bit31:29 - A6W[2:0] ?�000� Area 6 Read: 1 data, 1 wait; others, 0 waits
  926. bit28:26 - A6B[2:0] ?�000� Area 6 burst pitch = 0
  927. bit25:23 - A5W[2:0] ?�011� Area 5 1 data, 3 waits; others, 0 waits
  928. bit22:20 - A5B[2:0] ?�000� Area 5 burst pitch = 0
  929. bit19:17 - A4W[2:0] ?�000� Area 4 Read: 1 data, 1 wait; others, 0 waits
  930. bit15:13 - A3W[2:0] ?�011� SDRAM CAS latency = 3
  931. bit11:9 - A2W[2:0] ?�000� Area 2 Read: 1 data, 1 wait; others, 0 waits
  932. bit8:6 - A1W[2:0] ?�011� Area 1 1 data, 3 waits; others, 0 waits
  933. bit5:3 - A0W[2:0] ?�011� Area 0 1 data, 3 waits; others, 0 waits
  934. bit2:0 - A0B[2:0] ?�000� Area 0 burst pitch = 0
  935.  
  936. WCR3 (Wait control 3): 0xFF800010 ? 0x07777777 -- Setting is not required
  937. bit31-27 26 25-24 23 22 21-20 19 18 17-16 15 14 13-12 11 10 9-8 7 6 5-4 3 2 1-0 - 1 11 - 1 11 - 1 11 - 1 11 - 1 11 - 1 11 - 1 11 bit26 - A6S0 ?�1� Area 6 Write strobe setup = 1
  938. bit25:24 - A6H[1:0] ?�11� Area 6 Data hold = 3
  939. bit22 - A5S0 ?�1� Area 5 Write strobe setup = 1
  940. bit21:20 - A5H[1:0] ?�11� Area 5 Data hold = 3
  941. bit18 - A4S0 ?�1� Area 4 Write strobe setup = 1
  942. bit17:16 - A4H[1:0] ?�11� Area 4 Data hold = 3
  943. bit14 - A3S0 ?�1� Area 3 Write strobe setup = 1
  944. bit13:12 - A3H[1:0] ?�11� Area 3 Data hold = 3
  945. bit10 - A2S0 ?�1� Area 2 Write strobe setup = 1
  946. bit9:8 - A2H[1:0] ?�11� Area 2 Data hold = 3
  947. bit6 - A1S0 ?�1� Area 1 Write strobe setup = 1
  948. bit5:4 - A1H[1:0] ?�11� Area 1 Data hold = 3
  949. bit2 - A0S0 ?�1� Area 0 Write strobe setup = 1
  950. bit1:0 - A0H[1:0] ?�11� Area 0 Data hold = 3
  951.  
  952. PCR (PCMCIA control): 0xFF800018 -- Setting is not required
  953.  
  954. Other BSC-related register settings are described in section 2.3.2.
  955.  
  956. <Direct memory access controller (DMAC)>
  957. The DMAC-related settings are described below.
  958. (1) DMAC uses DDT mode.
  959. (2) Because DMA channel 0 is used by the hardware, use by the software is prohibited. (The DMA end interrupt cannot be used.)
  960. (3) DMA operations are performed on channel 2 as a set with ch2-DMA of the HOLLY chip. (The SH4's DMAC channel 2 register must be controlled by software at the same time.) Channel 2 DMA depends on the following settings.
  961. ? Transfer data length: Only 32-byte block transfer is permitted.
  962. ? Address mode: Only single address mode is permitted.
  963. ? Transfer initiation request: Only external requests (external address space -> external device) are permitted.
  964. ? Bus mode: Only burst mode is permitted.
  965. ? DMA end interrupt: Generation of both SH4:DMAC and HOLLY:ch2-DMA is permitted. ? Select one or the other. (If two are enabled, it will just result in interrupts being generated twice.)
  966. (4) Channels 1 and 3 can be used in the following manner:
  967. ? The allowed transfer data length (8/16/32 bits, 32 bytes) depends on the transfer area. The 64-bit transfer data length specification is permitted only for system memory.
  968. ? Address mode: Only dual address mode is permitted.
  969. ? Transfer initiation request: SCIF interrupt and auto request are permitted.
  970. ? Bus mode: Only cycle steal mode is permitted.
  971. ? DMA end interrupt: Can be used.
  972.  
  973. The register settings are shown below.
  974.  
  975. SAR0 (DMA source address 0): 0xFFA00000 -- Access prohibited
  976. DAR0 (DMA destination address 0): 0xFFA00004 -- Access prohibited
  977. DMATCR0 (DMA transfer count 0): 0xFFA00008 -- Access prohibited
  978. CHCR0 (DMA channel control 0): 0xFFA0000C -- Access prohibited
  979.  
  980. SAR1 (DMA source address 1): 0xFFA00010 -- Set as desired
  981. DAR1 (DMA destination address 1): 0xFFA00014 -- Set as desired
  982. DMATCR1 (DMA transfer count 10): 0xFFA00018 -- Set as desired
  983.  
  984.  
  985. CHCR1 CHCR1 (DMA channel control 1): 0xFFA0001C?0x00005440/Initial value: 0x00000000
  986. bit31-29 28 27-25 24 23-20 19 18 17 16 15-14 13-12 11-8 7 6-4 3 2 1 0 000 0 000 0 - 0 0 0 0 ** ** **** 0 *** - * * *
  987. bit31:29 - SSA[2:0] ?�000� No PCMCIA (PCMCIA source address space attributes)
  988. bit28 - STC ?�0� No PCMCIA (PCMCIA source address wait)
  989. bit27:25 - DSA[2:0] ?�000 No PCMCIA (PCMCIA destination address space attributes)
  990. bit24 - DTC ?�0� No PCMCIA (PCMCIA destination address wait)
  991. bit19 - DS ?�0� DREQ low level detection
  992. bit18 - RL ?�0� DDT mode (DRAK active high)
  993. bit17 - AM ?�0� DACK output for reads
  994. bit16 - AL ?�0� DDT mode (DACK active high)
  995. bit15:14 - DM[1:0] ?Don�t care Destination address mode
  996. bit13:12 - SM[1:0] ?Don�t care Source address mode
  997. bit11:8 - RS[3:0] ?Don�t care Resource select - Only 0100, 0101, 0110, 1010, and 1011 can be set
  998. bit7 - TM ?�0� Cycle steal mode
  999. bit6:4 - TS[2:0] ?Don�t care Transfer size (64-bit transfer data length specification is permitted only for system memory)
  1000. bit2 - IE ?Don�t care Interrupt enable
  1001. bit1 - TE ?Don�t care Transfer end
  1002. bit0 - DE ?Don�t care DMAC enable
  1003.  
  1004. SAR2 (DMA source address 2): 0xFFA00020
  1005. This is a system memory (SDRAM) address setting. The address must be a 32-byte boundary address. (Specify "0" for bits 4 through 0.)
  1006.  
  1007. DAR2 (DMA destination address 2): 0xFFA00024 - -Access prohibited
  1008. DMATCR2 (DMA transfer count 2): 0xFFA00028
  1009. This sets the transfer length, in 32-byte units.
  1010. * It is necessary to set the same transfer amount as the "transfer count" on the HOLLY side. Although the DMAC in the SH4 is set in 32-byte units, the value is set in 1-byte units in the HOLLY.
  1011.  
  1012. CHCR2 (DMA channel control 2): 0xFFA0002C ?0x000052C0 /Initial value: 0x00000000
  1013. bit31-29 28 27-25 24 23-20 19 18 17 16 15-14 13-12 11-8 7 6-4 3 2 1 0 000 0 000 0 - 0 - 0 - 01 ** 0010 1 100 - * * *
  1014. ?bit31:29 - SSA[2:0] ?�000� No PCMCIA (PCMCIA source address space attributes)
  1015. ?bit28 - STC ?�0� No PCMCIA (PCMCIA source address wait)
  1016. ?bit27:25 - DSA[2:0] ?�000 No PCMCIA (PCMCIA destination address space attributes)
  1017. ?bit24 - DTC ?�0� No PCMCIA (PCMCIA destination address wait)
  1018. ?bit19 - DS ?�0� DREQ low level detection
  1019. ?bit17 - AM ?�0� DACK output for reads
  1020. ?bit15:14 - DM[1:0] ?�01� DDT mode (destination address increment)
  1021. ?bit13:12 - SM[1:0] ?Don�t care Source address mode
  1022. bit11:8 - RS[3:0] ?�0010� External request (external address space ? external device)
  1023. bit7 - TM ?�1� Burst mode
  1024. bit6:4 - TS[2:0] ?�100� 32-byte block transfer
  1025. bit2 - IE ?Don�t care Interrupt enable
  1026. bit1 - TE ?Don�t care Transfer end
  1027. bit0 - DE ?Don�t care DMAC enable
  1028. SAR3 (DMA source address 3): 0xFFA00030 -- Set as desired
  1029. DAR3 (DMA destination address 3): 0xFFA00034 -- Set as desired
  1030. DMATCR3 (DMA transfer count 3): 0xFFA00038 -- Set as desired
  1031. CHCR3 (DMA channel control 3): 0xFFA0003C ? 0x00005440
  1032. bit31-29 28 27-25 24 23-20 19 18 17 16 15-14 13-12 11-8 7 6-4 3 2 1 0 000 0 000 0 - 0 - 0 - ** ** **** 0 *** - * * *
  1033. bit31:29 - SSA[2:0] ?�000� No PCMCIA (PCMCIA source address space attributes)
  1034. bit28 - STC ?�0� No PCMCIA (PCMCIA source address wait)
  1035. bit27:25 - DSA[2:0] ?�000 No PCMCIA (PCMCIA destination address space attributes)
  1036. bit24 - DTC ?�0� No PCMCIA (PCMCIA destination address wait)
  1037. bit19 - DS ?�0� DREQ low level detection
  1038. bit17 - AM ?�0� DACK output for reads
  1039. bit15:14 - DM[1:0] ?Don�t care Destination address mode
  1040. bit13:12 - SM[1:0] ?Don�t care Source address mode
  1041. bit11:8 - RS[3:0] ?Don�t care Resource select - Only 0100, 0101, 0110, 1010, and 1011 can be set
  1042. bit7 - TM ?�0� Cycle steal mode
  1043. bit6:4 - TS[2:0] ?Don�t care Transfer size (64-bit transfer data length specification is permitted only for system memory)
  1044. bit2 - IE ?Don�t care Interrupt enable
  1045. bit1 - TE ?Don�t care Transfer end
  1046. bit0 - DE ?Don�t care DMAC enable
  1047.  
  1048. DMAOR (DMA operation): 0xFFA00040 ? 0x00008201 /Initial value: 0x00000000
  1049. bit31-16 15 14 13 12 11 10 9-8 7 6 5 4 3 2 1 0 - 1 - - - - - 10 - - - - - * * 1
  1050. bit15 - DDT ?�1� DDT mode
  1051. bit9:8 - PR[1:0] ?�10� ch2 priority
  1052. bit2 - AE ?Don�t care Address error flag
  1053. bit1 - NMIF ?Don�t care NMI flag
  1054. bit0 - DME ?�1� DMAC enable
  1055.  
  1056. <Serial communication interface with built-in FIFO (SCIF)>
  1057. There are no particular initial settings for the SCIF.
  1058.  
  1059.  
  1060. <I/O ports>
  1061. The I/O port settings are undefined.
  1062.  
  1063. <Interrupt Controller (INTC)>
  1064. The INTC settings are as described below.
  1065. (1) NMI interrupts (falling edge detection; the NMI pin is pulled up) are for debugging purposes only, and are not supported in the release version (MP).
  1066. (2) Only the IRL1 and 2 interrupts are used (pull up IRL0 and 3), and these interrupts are used as level encoding interrupts. The interrupt levels are "2" (IRL3:0 = 1101), "4" (IRL3:0 = 1011), and "6" (IRL3:0 = 1001).
  1067. (3) The following interrupts are not generated:
  1068. TMU2/TICPI2: Input capture interrupt
  1069. RTC/ATI: Alarm interrupt
  1070. RTC/PRI: Cycle interrupt
  1071. RTC/CUI: Carry interrupt
  1072. SCI/ERI: Reception error interrupt
  1073. SCI/RXI: Reception data full interrupt
  1074. SCI/TXI: Transmission data empty interrupt
  1075. SCI/TEI: Transmission end interrupt
  1076. REF/RCMI: Compare match interrupt
  1077. DMAC/DMTE0: DMAC-ch0 transfer end interrupt
  1078. (4) The Hitachi-UDI interrupt is for debugging only.
  1079.  
  1080. The register settings are as shown below.
  1081.  
  1082. IPRA (interrupt priority level setting register A): 0xFFD00004 /Initial value: 0x00000000
  1083. bit15-12 11-8 7-4 3-0 **** **** **** 0000
  1084. bit15:12 - TMU0 ?Don�t care TMU0 interrupt request (select from among interrupt levels 1101, 1011, and 1001)
  1085. bit11:8 - TMU1 ?Don�t care TMU1 interrupt request (same as above)
  1086. bit7:4 - TMU2 ?Don�t care TMU2 interrupt request (same as above)
  1087. bit3:0 - RTC ?�0000� RTC interrupt request mask (same as above)
  1088.  
  1089. IPRB (interrupt priority level setting register B): 0xFFD00008 /Initial value: 0x00000000
  1090. bit15-12 11-8 7-4 3-0 **** **** 0000 -
  1091. bit15:12 -WDT ?Don�t care WDT interrupt request (select from among interrupt levels 1101, 1011, and 1001)
  1092. bit11:8 - REF ?Don�t care REF interrupt request (same as above)
  1093. bit7:4 - SCI ?�0000� SCI interrupt request mask (same as above)
  1094.  
  1095. IPRC (interrupt priority level setting register C): 0xFFD0000C /Initial value: 0x00000000
  1096. bit15-12 11-8 7-4 3-0 - **** **** ****
  1097. bit11:8 - DMAC ?Don�t care DMAC interrupt request (select from among interrupt levels 1101, 1011, and 1001)
  1098. bit7:4 - SCIF ?Don�t care SCIF interrupt request (same as above)
  1099. bit3:0 - UDI ?Don�t care Hitachi-UDI interrupt request (same as above)
  1100.  
  1101. ICR (interrupt control register): 0xFFD00000 /Initial value: 0x00000000
  1102. bit15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 *- - - - - - * 0 0 - - - - - - -
  1103. bit15 - NMIL ?Don�t care NMI input level
  1104. bit9 - NMIB ?Don�t care NMI block mode
  1105. bit8 - NMIE ?�0� NMI is detected at falling edge
  1106. bit7 - IRLM ?�0� IRL interrupts are level encoded interrupts
  1107.  
  1108. �2.3
  1109. System Memory
  1110. �2.3.1 System Memory Configuration and Control
  1111. System memory, which is the main memory in the Dreamcast System, is connected directly to the SH4 (the CPU), and is used by the SH4 to store program code and as work memory. The memory size that will be supported depends on the cost of memory. The specifications for the system memory are shown in Table 2-7. The base configuration is 2 x 64Mbit SDRAMs, which provides a 16MB storage capacity.
  1112.  
  1113. Memory size 16MB Technology 2 ? 64Mbit SDRAMs (2 banks ? 1024K words ? 32 bits) Total bus width 64 bit Burst sequence Sequential 1-chip bus width 32 bit Operating frequency 100MHz Peak BBW 800MB/s Table 2-7 Base Specifications for System Memory
  1114.  
  1115. The SDRAM is controlled directly by the SH4's internal BSC (Bus State Controller). The BSC controls all of the SDRAM control signals, and also handles the refresh and precharge operations.
  1116. The SDRAM must be set prior to being accessed immediately after the power is applied. The SH4 generates all configuration cycles through software. The configuration cycles are generated by writing to the SH4 registers.
  1117. Only the SH4 can be the master for an SDRAM access; an access from the HOLLY chip to SDRAM can only be performed by using the SH4 DMA cycle. In addition, it is possible for one external device to become the logical bus master through the SH4's DDT interface.
  1118. The On Demand Data Transfer Mode (DDT) protocol can be used for channel 0. An external device can program the SH4's DMAC channel 0 through DDT. This approach can be used by HOLLY to efficiently access the main memory SDRAM.
  1119.  
  1120. �2.3.2 System Memory Initial Settings
  1121. The initial settings for system memory are identified below.
  1122. * Use burst length = 4, wrap type = sequential, CAS latency = 3
  1123. * RAS down mode.
  1124. * Self-refresh mode may not be used.
  1125. * Set the SDRAM refresh interval to 15040nsec.
  1126.  
  1127.  
  1128. The register settings are shown below.
  1129. MCR (individual memory control): 0xFF800014 ? 0xC0121214 /Dev.Box memory 32M
  1130. ? 0xC0091224 /Dev.Box/MP
  1131. (mass production version) memory 16M
  1132. bit31 30 29-27 26-24 23 22 21-19 18 17-16 15-13 12-10 9 8-7 6 5-3 2 1 0 1 * 000 - 0 - TPC - RCD 000 100 1 00 0 AMX 1 0 0
  1133. bit31 - RASD ?�1� RAS down mode
  1134. bit30 - MRSET ?Don�t SDMR write: "0", all bank precharge; "1", mode register
  1135. care setting
  1136. bit29:27 - TRC[2:0] ?�000� RAS precharge = 0 after refresh
  1137. bit23 - TCAS ?�0� CAS negate = 1
  1138. bit21:19 - TPC[2:0] ?�010� PRE-RAS = 3 -- Dev.Box memory 32M --
  1139. �001� PRE-RAS = 2 -- Dev.Box/MP memory 16M --
  1140. bit17:16 - RCD[1:0] ?�10� PRE-CAS = 3 -- Dev.Box memory 32M --
  1141. �01� PRE-CAS = 2 -- Dev.Box/MP memory 16M --
  1142. bit15:13 - TRWL[2:0] ?�000� Write precharge = 1
  1143. bit12:10 - TRAS[2:0] ?�100� After refresh, command interval = 8 + TRC
  1144. bit9 - BE ?�1� DRAM burst ("1" due to RAS down)
  1145. bit8:7 - SZ[1:0] ?�00� SDRAM 64bit
  1146. bit6 - AMXEXT ?�0� Bank address normal
  1147. bit5:3 - AMX[2:0] ?�010� 64Mbit, 16-bit bus, 2 banks ? 4 -- Dev.Box memory 32M --
  1148. �100� 64Mbit, 32-bit bus, 4 banks ? 2 -- Dev.Box/MP memory 16M --
  1149. bit2 - RFSH ?�1� Perform refresh
  1150. bit1 - RMODE ?�0� CAS-before-RAS refresh (self-refresh may not be used)
  1151. bit0 - EDOMODE ?�0� "0" due to SDRAM
  1152.  
  1153. SDMR (SDRAM mode): 0xFF940190 ? 0Xff (MCR-MRSET must also be set at the same time)
  1154. bit15-10 9-7 6 5-3 2-0 (000000) 011 0 010 (000) *This register is specified by a byte write to write address [0xFF940000 + X]. Either specify the "0" for the other bits in the setting X, or the contents of the data in the byte write do not matter.
  1155. bit9:7 - LTMODE ?�011� CAS latency = 3
  1156. bit6 - WT ?�0� Wrap type = Sequential
  1157. bit5:3 - BL ?�010� Burst Length=4
  1158.  
  1159. RTCSR (refresh timer control/status): 0xFF80001C?0xA510 /Initial value: 0x0000
  1160. bit15-8 7 6 5-3 2 1 0 (1010 0101) * 0 010 * * * bit7 - CMF ?Don�t care Compare match flag
  1161. bit6 - CMIE ?�0� Compare match interrupt disabled
  1162. bit5:3 - CKS[2:0] ?�010� Clock = CKIO/16 = 160nsec
  1163. bit2 - OVF ?Don�t care Refresh count overflow flag
  1164. bit1 - OVIE ?Don�t care Refresh count overflow interrupt
  1165. bit0 - LMTS ?Don�t care Refresh count overflow limit
  1166.  
  1167. RTCNT (Refresh timer counter): 0xFF800020? 0xA500 /Initial value 0x0000
  1168. bit15-8 7 6 5 4 3 2 1 0 (1010 0101) 0 0 0 0 0 0 0 0
  1169. ???????????????????????
  1170.  
  1171.  
  1172. RTCOR (Refresh time constant): 0xFF800024 ? 0xA55E /Initial value 0x0000
  1173. bit15-8 7 6 5 4 3 2 1 0 (1010 0101) 0 1 0 1 1 1 1 0
  1174. ( bits 15:8 Specify 0xA5.)
  1175. bit7:0 Specify 0x5E. (0x5E = 94...10nsec * 16 * 94 = 15040nsec)
  1176.  
  1177.  
  1178. RFCR (refresh count): 0xFF800028 ? Don't care /Initial value: 0x0000
  1179. bit15-9 8 7 6 5 4 3 2 1 0 (1010 010) * * * * * * * * *
  1180. ? bit15:9 Specify 1010010.?
  1181.  
  1182. �2.3.3 Access Procedure
  1183. In order to use the system memory (SDRAM), it is necessary to set the mode first immediately after power on; after setting the BSC-related registers, write the SDRAM mode register. (Refer to SDMR.)
  1184. �2.4
  1185. Register Map
  1186. The register map for the System Bus block is shown below. Shaded items are software debugging registers.
  1187.  
  1188. Address Name R/W Description 0x005F 6800 SB_C2DSTAT RW ch2-DMA destination address 0x005F 6804 SB_C2DLEN RW ch2-DMA length 0x005F 6808 SB_C2DST RW ch2-DMA start 0x005F 6810 SB_SDSTAW RW Sort-DMA start link table address 0x005F 6814 SB_SDBAAW RW Sort-DMA link base address 0x005F 6818 SB_SDWLT RW Sort-DMA link address bit width 0x005F 681C SB_SDLAS RW Sort-DMA link address shift control 0x005F 6820 SB_SDST RW Sort-DMA start 0x005F 6840 SB_DBREQM RW DBREQ# signal mask control 0x005F 6844 SB_BAVLWC RW BAVL# signal wait count 0x005F 6848 SB_C2DPRYC RW DMA (TA/Root Bus) priority count 0x005F 684C SB_C2DMAXL RW ch2-DMA maximum burst length 0x005F 6880 SB_TFREM R TA FIFO remaining amount 0x005F 6884 SB_LMMODE0 RW Via TA texture memory bus select 0 0x005F 6888 SB_LMMODE1 RW Via TA texture memory bus select 1 0x005F 688C SB_FFST R FIFO status 0x005F 6890 SB_SFRES W System reset 0x005F 689C SB_SBREV R System bus revision number 0x005F 68A0 SB_RBSPLT RW SH4 Root Bus split enable 0x005F 6900 SB_ISTNRM RW Normal interrupt status 0x005F 6904 SB_ISTEXT R External interrupt status 0x005F 6908 SB_ISTERR RW Error interrupt status 0x005F 6910 SB_IML2NRM RW Level 2 normal interrupt mask 0x005F 6914 SB_IML2EXT RW Level 2 external interrupt mask 0x005F 6918 SB_IML2ERR RW Level 2 error interrupt mask 0x005F 6920 SB_IML4NRM RW Level 4 normal interrupt mask 0x005F 6924 SB_IML4EXT RW Level 4 external interrupt mask 0x005F 6928 SB_IML4ERR RW Level 4 error interrupt mask 0x005F 6930 SB_IML6NRM RW Level 6 normal interrupt mask 0x005F 6934 SB_IML6EXT RW Level 6 external interrupt mask 0x005F 6938 SB_IML6ERR RW Level 6 error interrupt mask 0x005F 6940 SB_PDTNRM RW Normal interrupt PVR-DMA startup mask 0x005F 6944 SB_PDTEXT RW External interrupt PVR-DMA startup mask 0x005F 6950 SB_G2DTNRM RW Normal interrupt G2-DMA startup mask 0x005F 6954 SB_G2DTEXT RW External interrupt G2-DMA startup mask <Note> RW: Read/write; R: Read only; W: Write only
  1189. Address Name R/W Description 0x005F 6C04 SB_MDSTAR RW Maple-DMA command table address 0x005F 6C10 SB_MDTSEL RW Maple-DMA trigger select 0x005F 6C14 SB_MDEN RW Maple-DMA enable 0x005F 6C18 SB_MDST RW Maple-DMA start 0x005F 6C80 SB_MSYS RW Maple system control 0x005F 6C84 SB_MST R Maple status 0x005F 6C88 SB_MSHTCL W Maple-DMA hard trigger clear 0x005F 6C8C SB_MDAPRO W Maple-DMA address range 0x005F 6CE8 SB_MMSEL RW Maple MSB selection 0x005F 6CF4 SB_MTXDAD R Maple Txd address counter 0x005F 6CF8 SB_MRXDAD R Maple Rxd address counter 0x005F 6CFC SB_MRXDBD R Maple Rxd base address 0x005F 7404 SB_GDSTAR RW GD-DMA start address 0x005F 7408 SB_GDLEN RW GD-DMA length 0x005F 740C SB_GDDIR RW GD-DMA direction 0x005F 7414 SB_GDEN RW GD-DMA enable 0x005F 7418 SB_GDST RW GD-DMA start 0x005F 7480 SB_G1RRC W System ROM read access timing 0x005F 7484 SB_G1RWC W System ROM write access timing 0x005F 7488 SB_G1FRC W Flash ROM read access timing 0x005F 748C SB_G1FWC W Flash ROM write access timing 0x005F 7490 SB_G1CRC W GD PIO read access timing 0x005F 7494 SB_G1CWC W GD PIO write access timing 0x005F 74A0 SB_G1GDRC W GD-DMA read access timing 0x005F 74A4 SB_G1GDWC W GD-DMA write access timing 0x005F 74B0 SB_G1SYSM R System mode 0x005F 74B4 SB_G1CRDYC W G1IORDY signal control 0x005F 74B8 SB_GDAPRO W GD-DMA address range 0x005F 74F4 SB_GDSTARD R GD-DMA address count (on Root Bus) 0x005F 74F8 SB_GDLEND R GD-DMA transfer counter 0x005F 7800 SB_ADSTAG RW AICA:G2-DMA G2 start address 0x005F 7804 SB_ADSTAR RW AICA:G2-DMA system memory start address 0x005F 7808 SB_ADLEN RW AICA:G2-DMA length 0x005F 780C SB_ADDIR RW AICA:G2-DMA direction 0x005F 7810 SB_ADTSEL RW AICA:G2-DMA trigger select 0x005F 7814 SB_ADEN RW AICA:G2-DMA enable <Note> RW: Read/write; R: Read only; W: Write only
  1190.  
  1191.  
  1192.  
  1193.  
  1194. Address Name R/W Description 0x005F 7818 SB_ADST RW AICA:G2-DMA start 0x005F 781C SB_ADSUSP RW AICA:G2-DMA suspend 0x005F 7820 SB_E1STAG RW Ext1:G2-DMA G2 start address 0x005F 7824 SB_E1STAR RW Ext1:G2-DMA system memory start address 0x005F 7828 SB_E1LEN RW Ext1:G2-DMA length 0x005F 782C SB_E1DIR RW Ext1:G2-DMA direction 0x005F 7830 SB_E1TSEL RW Ext1:G2-DMA trigger select 0x005F 7834 SB_E1EN RW Ext1:G2-DMA enable 0x005F 7838 SB_E1ST RW Ext1:G2-DMA start 0x005F 783C SB_E1SUSP RW Ext1: G2-DMA suspend 0x005F 7840 SB_E2STAG RW Ext2:G2-DMA G2 start address 0x005F 7844 SB_E2STAR RW Ext2:G2-DMA system memory start address 0x005F 7848 SB_E2LEN RW Ext2:G2-DMA length 0x005F 784C SB_E2DIR RW Ext2:G2-DMA direction 0x005F 7850 SB_E2TSEL RW Ext2:G2-DMA trigger select 0x005F 7854 SB_E2EN RW Ext2:G2-DMA enable 0x005F 7858 SB_E2ST RW Ext2:G2-DMA start 0x005F 785C SB_E2SUSP RW Ext2: G2-DMA suspend 0x005F 7860 SB_DDSTAG RW Dev:G2-DMA G2 start address 0x005F 7864 SB_DDSTAR RW Dev:G2-DMA system memory start address 0x005F 7868 SB_DDLEN RW Dev:G2-DMA length 0x005F 786C SB_DDDIR RW Dev:G2-DMA direction 0x005F 7870 SB_DDTSEL RW Dev:G2-DMA trigger select 0x005F 7874 SB_DDEN RW Dev:G2-DMA enable 0x005F 7878 SB_DDST RW Dev:G2-DMA start 0x005F 787C SB_DDSUSP RW Dev: G2-DMA suspend 0x005F 7880 SB_G2ID R G2 bus version 0x005F 7890 SB_G2DSTO RW G2/DS timeout 0x005F 7894 SB_G2TRTO RW G2/TR timeout 0x005F 7898 SB_G2MDMTO RW Modem unit wait timeout 0x005F 789C SB_G2MDMW RW Modem unit wait time 0x005F 78BC SB_G2APRO W G2-DMA address range 0x005F 78C0 SB_ADSTAGD R AICA-DMA address counter (on AICA) 0x005F 78C4 SB_ADSTARD R AICA-DMA address counter (on root bus) 0x005F 78C8 SB_ADLEND R AICA-DMA transfer counter 0x005F 78D0 SB_E1STAGD R Ext-DMA1 address counter (on Ext) 0x005F 78D4 SB_E1STARD R Ext-DMA1 address counter (on root bus) 0x005F 78D8 SB_E1LEND R Ext-DMA1 transfer counter <Note> RW: Read/write; R: Read only; W: Write only
  1195.  
  1196.  
  1197. Address Name R/W Description 0x005F 78E0 SB_E2STAGD R Ext-DMA2 address counter (on Ext) 0x005F 78E4 SB_E2STARD R Ext-DMA2 address counter (on root bus) 0x005F 78E8 SB_E2LEND R Ext-DMA2 transfer counter 0x005F 78F0 SB_DDSTAGD R Dev-DMA address counter (on Ext) 0x005F 78F4 SB_DDSTARD R Dev-DMA address counter (on root bus) 0x005F 78F8 SB_DDLEND R Dev-DMA transfer counter 0x005F 7C00 SB_PDSTAP RW PVR-DMA PVR start address 0x005F 7C04 SB_PDSTAR RW PVR-DMA system memory start address 0x005F 7C08 SB_PDLEN RW PVR-DMA length 0x005F 7C0C SB_PDDIR RW PVR-DMA direction 0x005F 7C10 SB_PDTSEL RW PVR-DMA trigger select 0x005F 7C14 SB_PDEN RW PVR-DMA enable 0x005F 7C18 SB_PDST RW PVR-DMA start 0x005F 7C80 SB_PDAPRO W PVR-DMA address range 0x005F 7CF0 SB_PDSTAPD R PVR-DMA address counter (on Ext) 0x005F 7CF4 SB_PDSTARD R PVR-DMA address counter (on root bus) 0x005F 7CF8 SB_PDLEND R PVR-DMA transfer counter <Note> RW: Read/write; R: Read only; W: Write only
  1198.  
  1199. Table 2-9
  1200. �2.5
  1201. Single Access to Each Block
  1202. The devices that can be accessed from SH4 are shown in the memory map in section 2.1, "System Mapping." The areas that can be read/written, and the accessible sizes are also the same.
  1203. �2.6
  1204. DMA Transfers
  1205. �2.6.1 Overview of DMA Transfers
  1206. There are two basic types of DMA in this system. There is write-only DMA, which can transfer texture data or display lists (polygon parameters) quickly from system memory to texture memory via the TA Bus of the HOLY internal block bus, and DMA for transfers via the Root Bus.
  1207. In addition, there are two types of DMA that use the TA Bus: ch2-DMA and Sort-DMA. ch2-DMA is used to transfer texture data and display lists. Sort-DMA is used to presort display lists in the CPU and then transfer the data in accordance with that list.
  1208. There are six types of DMA that use the Root Bus: PVR-DMA, GD-DMA, AICA-DMA, Ext-DMA1, Ext-DMA2, and Maple-DMA. 32 bytes can be transferred in one DMA transfer operation.
  1209.  
  1210. The use of each type of DMA is described below.
  1211. PVR-DMA is used to overwrite palette RAM, etc., in the CORE from system memory. GD-DMA is used to transfer data from the GD-ROM to system memory or to wave memory (AICA Memory). AICA-DMA (wave DMA) is used to transfer wave data from system memory to wave memory. Ext-DMA1 and 2 are DMA for devices connected to the G2 Bus. (At present, there is no particular use for these types of DMA.) Maple-DMA is used to read commands from system memory, and to write data from a control pad, etc., into system memory.
  1212. In addition, even if TA Bus DMA and all six types of Root Bus DMA have been initiated, the CPU can still freely access those areas which it is normally permitted to access. However, because all DMAs steal cycles, it is always necessary to check the DMA end interrupt.
  1213. A DMA transfer can end either normally or abnormally; the status is reflected in the interrupt register.
  1214.  
  1215.  
  1216. Fig. 2-1
  1217.  
  1218. �2.6.2
  1219. Types of DMA
  1220. The DMA types are shown in the table below.
  1221.  
  1222. No. Name of DMA Use 1 GD Data DMA1 Downloads programs and data from GD-ROM to system memory. 2 GD Data DMA2 Transfers waveform data from GD-ROM to wave memory. 3 Texture DMA Large, high-speed texture transfer to texture memory. Direct texture transfer from system memory ? TA ? texture memory. 4 Display list DMA List transfer of one million polygons from system memory 5 Wave Data DMA Transfers data from system memory to wave memory. 6 ARM Data DMA Transfers programs and data from system memory to ARM (sound processor). 7 Peripheral DMA1 Reads the status (pressed or not) of the game pad buttons, etc., into system memory. 8 Peripheral DMA2 Reads the status (pressed or not) of the game pad buttons, etc., into system memory. 9 Color Palette DMA Block transfers the color palette from system memory. 10 External Area DMA1 Transfers data from an external area, such as a development (debugging) tool, to system memory. 11 External Area DMA2 Transfers data from system memory to an external area, such as a development (debugging) tool. Table 2-10
  1223.  
  1224. * All of the types of DMA listed in the table above are explained in detail in the sections that follow.
  1225.  
  1226. �2.6.3
  1227. GD-ROM Data Transfers
  1228. This section explains the register settings and GD-ROM drive settings that are needed in order to use a DMA transfer to transfer data from the GD-ROM to an area in system memory, texture memory, or wave memory.
  1229.  
  1230. (1)?SB_GDAPRO (0x005F74B8) register setting
  1231. If the transfer destination is system memory, set System Memory Protection. The upper 16 bits contain the Protection Code "0x8843." 7 bits (bits 14 - 8) out of the lower 16 bits indicate the start address for which transfer is enabled, while another 7 bits (bits 6 - 0) indicate the end address for which transfer is enabled. Each of these groups of 7 bits corresponds to the address bits A26 - A20.
  1232.  
  1233. To enable transfer to 0x0C000000 through 0x0FFFFFFF, write 0x8843407F to the register.
  1234. To enable transfer to 0x0FF00000 through 0x0FFFFFFF, write 0x88437F7F to the register.
  1235. To enable transfer to 0x0D400000 through 0x0D7FFFFF, write 0x88435457 to the register.
  1236. (2)?SB_G1GDRC (0x005F74A0) register setting
  1237. Set the access wait value when reading by a DMA.
  1238. Write 0x00001001, which is equivalent to "Multi Word-DMA Mode 2."
  1239. (3)?SB_GDSTAR (0x005F7404) setting
  1240. Set the transfer start address for the transfer destination (the SH4 address).
  1241. (4) SB_GDLEN (0x005F7408) setting
  1242. Specify the number of bytes to be transferred, in units of "0x20".
  1243. If an excess results when the amount of data that is to be sent is specified in units of 0x20 bytes, the data that is to be sent is padded with zeroes.
  1244. (5) SB_GDDIR (0x005F740C)
  1245. Specify the transfer direction. Write a "1" (GD-ROM ? system memory, etc.)
  1246. (6) SB_GDEN (0x005F7414)
  1247. Specify "1" for DMA enable.
  1248. (7) GD-ROM drive (0x005F7000 - 0x005F70FF) settings
  1249. Set the register for the GD-ROM drive.
  1250. For details on the settings, refer to the GD-ROM protocol specifications.
  1251. (8) SB_GDST (0x005F7418) settings
  1252. DMA starts when the SB_GDEN register is set to "1" and then a "1" is written to this register (SB_GDST).
  1253. This register also functions as the DMA status register. (0: DMA stopped; 1: DMA in progress)
  1254.  
  1255. Example: DMA transfer of 32,768 bytes (16 sectors) from GD-ROM to 0x0C000000 in system memory
  1256.  
  1257.  
  1258.  
  1259. Fig. 2-2
  1260.  
  1261. Interrupts from the GD-ROM are allocated to bit 0 of the SB_ISTEXT (0x005F6904) register. An interrupt is generated if an error of some sort occurred in the GD-ROM drive, or if the transfer ended normally. The status is determined by the Status register in the GD-ROM drive.
  1262.  
  1263. Regarding the end of DMA: if DMA ends normally, bit 14 of the SB_ISTNRM (0x005F6900) register is set to "1" and, if the interrupt mask is not in effect, an interrupt is generated.
  1264. In addition, the SB_GDST register indicates the DMA status; when DMA ends, the value of this register returns to "0." In this case, the value in the SB_GDEN register remains "1."
  1265.  
  1266. Regarding DMA errors: if the DMA address for the transfer destination moves beyond the allowable memory range during a DMA operation, an overrun interrupt is generated and that DMA operation is forcibly terminated. In this case, bit 13 of the SB_ISTERR (0x005F6908) register is set to "1." Furthermore, if the transfer destination address was incorrectly set outside of the allowable memory range, an illegal address interrupt is generated and bit 12 of the SB_ISTERR register is set to "1." These interrupts are generated both when the incorrect DMA address is set, and when an attempt is made to initiate DMA with such an incorrect DMA address.
  1267. Note that when these errors are generated, the SB_GDEN register is set to "0."
  1268.  
  1269. Cautions during DMA operations: If the SB_GDAPRO, SB_G1GDRC, SB_GDSTAR, SB_GDLEN, or SB_GDDIR register is overwritten while a DMA operation is in progress, the new setting has no effect on the current DMA operation. Once the current DMA is terminated and the next DMA is initiated (SB_GDEN = 1 and SB_GDST = 1), the values in these five registers are retrieved. A DMA operation that is currently in progress can be forcibly terminated by writing a "0" in the SB_GDEN register. If an access is in progress when this happens, the value in the SB_GDST register returns to "0" as soon as the access terminates.
  1270. Note that system ROM and flash memory cannot be accessed while a DMA operation is in progress. If a write access is attempted, it is invalid, and if a read access is attempted, the value "0x00" is returned. In this case, bit 14 of the SB_ISTERR (0x005F6908) register is set to "1." This error has no effect on DMA operations, but it is essential to realize that the access to system ROM or flash memory that was performed is invalid.
  1271.  
  1272. �2.6.4
  1273. Texture Data Transfers
  1274. There are two types of texture data transfers: direct texture transfers and YUV texture transfers.
  1275.  
  1276. �2.6.4.1 Direct Texture Transfers
  1277. ch2-DMA* (explained at the end of this section) is used to conduct DMA transfers of direct textures. The setup procedure is described below.
  1278.  
  1279. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1280. (2) Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1281. (3) Set the transfer source address in the SH4-DMAC-SAR2 register.
  1282. (4) Set the size of the transfer (the number of bytes to be transferred/32) in the SH4-DMAC-DMATCR2 register.
  1283. (5) Make the operation settings in the SH4-DMAC-CHCR2 register. When doing so, set the DE bit to "1."
  1284. (6) Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1." DMA cannot be initiated if the AE, NMIF, and DME bits do not all meet this condition. Furthermore, if the DDT bit is "0," the DMA operation will be performed incorrectly.
  1285. (7) If the address that is set in the SB_C2DSTAT register is within the range from 0x11000000 to 0x11FFFFE0, set 0x00000000 in the SB_LMMODE0 register.
  1286. (8) If the address that is set in the SB_C2DSTAT register is within the range from 0x13000000 to 0x13FFFFE0, set 0x00000000 in the SB_LMMODE1 register.
  1287. (9) Set the transfer destination address in the SB_C2DSTAT register.
  1288. (10) Set the transfer size (the number of bytes) in the SB_C2DLEN register.
  1289. (11) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1290.  
  1291. The following prohibitions apply during a direct texture DMA transfer:
  1292. * Because a direct texture DMA transfer is performed using ch2-DMA, other DMA operations that use ch2-DMA cannot be performed at the same time.
  1293. * Never write to any of the registers that are used in a direct texture DMA transfer. The only exception is writing 0x00000000 to the SB_C2DST register in order to interrupt the DMA transfer.
  1294. * The CPU must not perform a burst write to addresses 0x10000000 to 0x13FFFFE0. Doing so could result in the loss of some data in the DMA transfer.
  1295.  
  1296. The status of each register when a direct texture DMA transfer ends normally is described below:
  1297. * The SH4_DMAC_SAR2 register points to the address that follows the location at which the transfer ended.
  1298. * The value in the SH4_DMAC_DMATCR2 register is 0x00000000.
  1299. * The TE bit of the SH4_DMAC_CHCR2 register is "1."
  1300. * The SB_C2DSTAT register points to the address that follows the location at which the transfer ended.
  1301. * The value in the SB_C2DLEN register is 0x00000000.
  1302. * The value in the SB_C2DST register is 0x00000000.
  1303. * The DMA end interrupt flag (SB_ISTNRM - bit 19: DTDE2INT) is set to "1."
  1304.  
  1305. An example of how to use direct texture DMA transfer is provided below.
  1306.  
  1307. Transferring texture data (0x00004000 bytes) from system memory to texture memory
  1308. System memory addresses: 0C600000 to 0x0C603FFF
  1309. TA addresses: 0x11400000 to 0x11403FFF
  1310. Texture memory addresses: x00400000 to 0x00403FFF
  1311.  
  1312. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1313. (2) Read the SH4-DMAC_CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1314. (3) Set 0x0C600000 in the SH4-DMAC_SAR2 register.
  1315. (4) Set 0x00000200 in the SH4-DMAC_DMATCR2 register.
  1316. (5) Set 0x000012C1 in the SH4-DMAC_CHCR2 register.
  1317. (6) Read the SH4-DMAC_DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1."
  1318. (7) Because the address that is set in the SB_C2DSTAT register is within the range from 0x11000000 to 0x11FFFFE0, set 0x00000000 in the SB_LMMODE0 register.
  1319. (8) Because the address that is set in the SB_C2DSTAT register is not within the range from 0x13000000 to 0x13FFFFE0, do not set the SB_LMMODE1 register.
  1320. (9) Set 0x11400000 in the SB_C2DSTAT register.
  1321. (10) Set 0x00004000 in the SB_C2DLEN register.
  1322. (11) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1323.  
  1324.  
  1325. -- (Supplement) About ch2-DMA --
  1326.  
  1327. ch2-DMA permits fast data transfer from system memory to texture memory. ch2-DMA cannot be used in the reverse direction, for transfers from texture memory to system memory.
  1328.  
  1329.  
  1330. Fig. 2-3 ch2-DMA Transfer Path
  1331.  
  1332. There are three possible types of ch2-DMA transfers: transfer to the TA Converter, transfer to the YUV Converter, and direct transfer to texture memory. The transfer to the TA Converter uses the TA function, so this type is used to transfer polygon parameters. The transfer to the YUV Converter is used to transfer YUV texture data. Direct transfer to texture memory is used for direct texture data transfers because it transfers the contents of system memory to texture memory without converting the data. In addition, the bus width for transfers to texture memory can be selected as either 64 bits or 32 bits.
  1333. Which of these types of transfers is to be used is determined by the address that is set in the SB_C2DSTAT register.
  1334. The following is a list of the HOLLY registers that are used for ch2-DMA. (For details, refer to section 8.4.1, "System Bus Register.")
  1335. SB_C2DSTAT (0x005F6800)
  1336. SB_C2DLEN (0x005F6804)
  1337. SB_C2DST (0x005F6808)
  1338. SB_LMMODE0 (0x005F6884)
  1339. SB_LMMODE1 (0x005F6888)
  1340.  
  1341.  
  1342.  
  1343. Fig. 2-4?LMMODE0/1 = 0 (Bus A & B)
  1344.  
  1345.  
  1346. Fig.2-5?LMMODE0/1 = 1 (Bus A)
  1347.  
  1348.  
  1349. Fig. 2-6?LMMODE0/1 = 0 (Bus B)
  1350.  
  1351.  
  1352.  
  1353. Fig. 2-7?Texture Memory Address
  1354.  
  1355. Similarly, the following section describes the SH4(-DMAC) registers that are used for ch2-DMA. (For details, refer to the item on DMAC in the SH4 manual.)
  1356. SAR2 (ch2-DMA Source Address: P4 addr.-0xFFA00020?area7 addr.-0x1FA00020)
  1357. This specifies the ch2-DMA transfer destination address. The address that is set must lie at a 32-byte boundary.
  1358. Setting values: 0x0C000000 to 0x0FFFFFE0 (system memory area)
  1359. DMATCR2 (ch2-DMA Transfer Count: P4 addr.-0xFFA00028?area7 addr.-0x1FA00028)
  1360. This specifies the size of the ch2-DMA transfer, in units of 32 bytes.
  1361. The transfer size that is set must match the transfer size that is set in the SB_C2DLEN register. Although the transfer size is specified in bytes in the SB_C2DLEN register, here the transfer size is specified in units of 32 bytes (number of bytes/32). Values outside of the ranges shown below for the settings must not be set.
  1362. Setting values: 0x00000001: 32Bytes
  1363. 0x00000002: 64Bytes
  1364. 0x00000003: 96Bytes
  1365. ?
  1366. 0x0007FFFF: (16M-32)Bytes
  1367. 0x00080000: 16Mbytes
  1368.  
  1369.  
  1370. CHCR2 (ch2-DMA channel Control: P4 addr.-0xFFA0002C?area7 addr.-0x1FA0002C)
  1371. This is the ch2-DMA control register. (For details, refer to the SH4 manual.)
  1372. Never set a value other than those indicated in the table below.
  1373.  
  1374. Set Value Source Addr. Mode Transmit Mode Interrupt Enable DMA Enable 0x000012C1 Increment Burst Disable Enable 0x000012C0 Increment Burst Disable Disable 0x000012C5 Increment Burst Enable Enable 0x000012C4 Increment Burst Enable Disable 0x00001241 Increment Cycle steal Disable Enable 0x00001240 Increment Cycle steal Disable Disable 0x00001245 Increment Cycle steal Enable Enable 0x00001244 Increment Cycle steal Enable Disable 0x000022C1 Decrement Burst Disable Enable 0x000022C0 Decrement Burst Disable Disable 0x000022C5 Decrement Burst Enable Enable 0x000022C4 Decrement Burst Enable Disable 0x00002241 Decrement Cycle steal Disable Enable 0x00002240 Decrement Cycle steal Disable Disable 0x00002245 Decrement Cycle steal Enable Enable 0x00002244 Decrement Cycle steal Enable Disable 0x000002C1 Fix Burst Disable Enable 0x000002C0 Fix Burst Disable Disable 0x000002C5 Fix Burst Enable Enable 0x000002C4 Fix Burst Enable Disable 0x00000241 Fix Cycle steal Disable Enable 0x00000240 Fix Cycle steal Disable Disable 0x00000245 Fix Cycle steal Enable Enable 0x00000244 Fix Cycle steal Enable Disable 0x00000000 --- --- --- Disable Table 2-11
  1375.  
  1376. * The IE (Interrupt Enable) bit can also be generated from the HOLLY side; it does not matter which side generates the bit.
  1377.  
  1378. DMAOR (DMA operation: P4 addr.-0xFFA00040?area7 addr.-0x1FA00040)
  1379. This register sets the DMA transfer mode. (For details on the contents of this register, refer to the startup procedure or to the SH4 manual.)
  1380.  
  1381.  
  1382. The method for confirming the end of ch2-DMA is described below.
  1383. 1) Although an interrupt is used in order to confirm the end of ch2-DMA, in order to generate the interrupt it is necessary to set bit 19 of either the SB_IML2NRM, SB_IML4NRM, or SB_IML6NRM register (for details, refer to the interrupt manual) to "1" and release the ch2-DMA end interrupt mask. The mask needs to be released before initiating ch2-DMA.
  1384. 2) Once ch2-DMA terminates, 0x00000000 is automatically set in the SB_C2DST register, and at the same time bit 19 of the SB_ISTNRM register (for details, refer to the interrupt manual) is set to "1." If the mask has been cancelled as described in item 1 above, an interrupt is now generated.
  1385. 3) Once the SH4 receives the interrupt, it determines the source of the interrupt by reading the SB_ISTNRM, SB_ISTEXT, and SB_ISTERR registers. The SH4 is able to confirm that ch2-DMA has ended by checking bit 19 of the SB_ISTNRM register.
  1386. 4) As soon as it has confirmed that ch2-DMA has ended, the SH4 cancels the interrupt by writing a "1" to bit 19 of the SB_ISTNRM register.
  1387. Note) A separate ch2-DMA end interrupt exists for the SH4-DMAC. when using the interrupt described above, it is necessary to mask the interrupt for the SH4-DMAC by setting the IE bit in the SH4-DMAC-CHCR2 register to "0." Conversely, when using the interrupt for the SH4-DMAC, it is necessary to mask the interrupt described above by setting bit 19 in the SB_IML2NRM register, the SB_IML4NRM register, and the SB_IML6NRM register all to "0."
  1388.  
  1389. The following procedure explains how to stop ch2-DMA:
  1390. 1) Request a stop of ch2-DMA by writing 0x00000000 to the SB_C2DST register.
  1391. 2) Note that after performing step 1, the value in the SB_C2DST register does not immediately become 0x00000000; instead, the value 0x00000001 is maintained in the register until ch2-DMA stops completely. Therefore, it is necessary to poll the register repeatedly until its value becomes 0x00000000.
  1392. 3) Once the register value becomes 0x00000000, ch2-DMA has stopped. At this point, the contents of the SB_C2DSTAT, SB_C2DLEN, SH4-DMAC-SAR2, and SH4-DMAC-DMATCR registers indicate the address from which the next data item was to be transferred and the amount of data remaining to be transferred. If the value of the SB_C2DLEN and SH4-DMAC-DMATCR registers is 0x000000, that indicates that the transfer has been completed; in this case, it is not permissible to resume the ch2-DMA transfer.
  1393. Supplement 1) After stopping a ch2-DMA transfer, it is possible to change the register values and then begin a new ch2-DMA transfer.
  1394. Supplement 2) When a ch2-DMA transfer is stopped, no ch2-DMA end interrupt is generated.
  1395.  
  1396. If a ch2-DMA transfer was stopped by the method described above, it can be resumed by writing 0x00000001 to the SB_C2DST register; this causes the transfer to resume from the position where it was stopped. However, the values in the registers when the transfer is resumed must be identical to the values that were in the registers when the transfer was stopped.
  1397.  
  1398. �2.6.4.2
  1399. YUV Texture Transfer
  1400. ch2-DMA is used to conduct DMA transfers of YUV textures.
  1401. In order to conduct a DMA transfer of a YUV texture, two separate procedures are required. First, set the TA registers, and then make the ch2-DMA settings. Each of these procedures is described below.
  1402.  
  1403. ? Setting the TA registers
  1404. (1) Set the starting address (the relative address from the start of texture memory) where the YUV texture is to be stored in the TA_YUV_TEX_BASE register.
  1405. (2) Make the YUV texture settings in the TA_YUV_TEX_CTRL register.
  1406. (3) Read the TA_YUV_TEX_CTRL register. (Because, from the viewpoint of the CPU, a write to a TA register consists of writing the data to the buffer ahead of the register and then forgetting about it, perform only one read and then wait until the write to the register is completed.)
  1407.  
  1408. ? Setting up the ch2-DMA transfer
  1409. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1410. (2) Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1411. (3) Set the transfer source address in the SH4-DMAC-SAR2 register.
  1412. (4) Set the size of the transfer (the number of bytes to be transferred/32) in the SH4-DMAC-DMATCR2 register.
  1413. (5) Make the operation settings in the SH4-DMAC-CHCR2 register. When doing so, set the DE bit to "1."
  1414. (6) Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1." DMA cannot be initiated if the AE, NMIF, and DME bits do not all meet this condition. Furthermore, if the DDT bit is "0," the DMA operation will be performed incorrectly.
  1415. (7) Set the address for the TA's YUV texture converter in the SB_C2DSTAT register.
  1416. (8) Set the transfer size (the number of bytes) in the SB_C2DLEN register.
  1417. (9) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1418.  
  1419. The following prohibitions apply during a YUV texture DMA transfer:
  1420.  
  1421. * Because a YUV texture DMA transfer is performed using ch2-DMA, other DMA operations that use ch2-DMA cannot be performed at the same time.
  1422. * Never write to any of the registers that are used in a YUV texture DMA transfer. The only exception is writing 0x00000000 to the SB_C2DST register in order to interrupt the DMA transfer.
  1423. * The CPU must not perform a burst write to addresses 0x10000000 to 0x13FFFFE0. Doing so could result in the loss of some data in the DMA transfer.
  1424.  
  1425.  
  1426. The status of each register when a YUV texture DMA transfer ends normally is described below:
  1427. * The SH4_DMAC_SAR2 register points to the address that follows the location at which the transfer ended.
  1428. * The value in the SH4_DMAC_DMATCR2 register is 0x00000000.
  1429. * The TE bit of the SH4_DMAC_CHCR2 register is "1."
  1430. * The SB_C2DSTAT register retains the value that was set.
  1431. * The value in the SB_C2DLEN register is 0x00000000.
  1432. * The value in the SB_C2DST register is 0x00000000.
  1433. * The DMA end interrupt flag (SB_ISTNRM - bit 19: DTDE2INT) is set to "1."
  1434.  
  1435. An example of how to use YUV texture DMA transfer is provided below.
  1436.  
  1437. Transferring YUV420 texture data (8 * 8 macro blocks: 0x00006000 bytes) from system memory to texture memory, converting the data to YUV422
  1438. System memory addresses (YUV420 texture): 0x0C200000 to 0x0C205FFF
  1439. TA address: 0x10800000
  1440. Texture memory addresses (YUV422 texture): 0x00600000 -
  1441.  
  1442. ? Example for setting the TA registers
  1443. (1)?Set 0x00600000 in the TA_YUV_TEX_BASE register.
  1444. (2)?Set 0x00000707 in the TA_YUV_TEX_CTRL register.
  1445. (3)?Read the TA_YUV_TEX_CTRL register.
  1446.  
  1447. ? Example for setting up the ch2-DMA transfer
  1448. (1)?Read the SB_C2DST register and confirm that the value is 0x00000000.
  1449. (2)?Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1450. (3)?Set 0x0C200000 in the SH4-DMAC-SAR2 register.
  1451. (4)?Set 0x00000300 in the SH4-DMAC-DMATCR2 register.
  1452. (5)?Set 0x000012C1 in the SH4-DMAC-CHCR2 register.
  1453. (6)?Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1."
  1454. (7)?Set 0x10800000 in the SB_C2DSTAT register.
  1455. (8)?Set 0x00006000 in the SB_C2DLEN register.
  1456. (9)?Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1457.  
  1458. �2.6.5
  1459. Display List Transfers
  1460. There are two methods for transferring display lists (polygon parameters): a method that uses ch2-DMA and a method that uses Sort-DMA (ch0:DDT).
  1461.  
  1462. �2.6.5.1 Direct Display list DMA
  1463. ch2-DMA is used to conduct DMA transfers of direct display lists. The setup procedure is described below.
  1464. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1465. (2) Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1466. (3) Set the transfer source address in the SH4-DMAC-SAR2 register.
  1467. (4) Set the size of the transfer (the number of bytes to be transferred/32) in the SH4-DMAC-DMATCR2 register.
  1468. (5) Make the operation settings in the SH4-DMAC-CHCR2 register. When doing so, set the DE bit to "1."
  1469. (6) Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1." DMA cannot be initiated if the AE, NMIF, and DME bits do not all meet this condition. Furthermore, if the DDT bit is "0," the DMA operation will be performed incorrectly.
  1470. (7) If the address that is set in the SB_C2DSTAT register is within the range from 0x11000000 to 0x11FFFFE0, set 0x00000001 in the SB_LMMODE0 register.
  1471. (8) If the address that is set in the SB_C2DSTAT register is within the range from 0x13000000 to 0x13FFFFE0, set 0x00000001 in the SB_LMMODE1 register.
  1472. (9) Set the transfer destination address in the SB_C2DSTAT register.
  1473. (10) Set the transfer size (the number of bytes) in the SB_C2DLEN register.
  1474. (11) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1475.  
  1476. The following prohibitions apply during a direct display list DMA transfer:
  1477. * Because a direct display list DMA transfer is performed using ch2-DMA, other DMA operations that use ch2-DMA cannot be performed at the same time.
  1478. * Never write to any of the registers that are used in a direct display list DMA transfer. The only exception is writing 0x00000000 to the SB_C2DST register in order to interrupt the DMA transfer.
  1479. * The CPU must not perform a burst write to addresses 0x10000000 to 0x13FFFFE0. Doing so could result in the loss of some data in the DMA transfer.
  1480.  
  1481. The status of each register when a direct display list DMA transfer ends normally is described below:
  1482. * The SH4_DMAC_SAR2 register points to the address that follows the location at which the transfer ended.
  1483. * The value in the SH4_DMAC_DMATCR2 register is 0x00000000.
  1484. * The TE bit of the SH4_DMAC_CHCR2 register is "1."
  1485. * The SB_C2DSTAT register points to the address that follows the location at which the transfer ended.
  1486. * The value in the SB_C2DLEN register is 0x00000000.
  1487. * The value in the SB_C2DST register is 0x00000000.
  1488. * The DMA end interrupt flag (SB_ISTNRM - bit 19: DTDE2INT) is set to "1."
  1489.  
  1490. An example of how to use direct display list DMA transfer is provided below.
  1491.  
  1492. Transferring a direct display list (0x00002000 bytes) from system memory to texture memory
  1493. System memory addresses: 0x0C400000 to 0x0C401FFF
  1494. TA addresses: 0x11600000 to 0x11601FFF
  1495. Texture memory addresses: 0x00600000 to 0x00601FFF
  1496.  
  1497. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1498. (2) Read the SH4-DMAC_CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1499. (3) Set 0x0C400000 in the SH4-DMAC_SAR2 register.
  1500. (4) Set 0x00000100 in the SH4-DMAC_DMATCR2 register.
  1501. (5) Set 0x000012C1 in the SH4-DMAC_CHCR2 register.
  1502. (6) Read the SH4-DMAC_DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1."
  1503. (7) Because the address that is set in the SB_C2DSTAT register is within the range from 0x11000000 to 0x11FFFFE0, set 0x00000001 in the SB_LMMODE0 register.
  1504. (8) Because the address that is set in the SB_C2DSTAT register is not within the range from 0x13000000 to 0x13FFFFE0, do not set the SB_LMMODE1 register.
  1505. (9) Set 0x11600000 in the SB_C2DSTAT register.
  1506. (10) Set 0x00002000 in the SB_C2DLEN register.
  1507. (11) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1508.  
  1509.  
  1510. �2.6.5.2
  1511. TA Input Display List Transfers
  1512. In order to perform a DMA transfer for a display list for input to the TA, it is necessary to first set the TA registers and then to set up the ch2-DMA transfer. Each of these setup procedures is described below.
  1513.  
  1514. ? Setting the TA registers
  1515. (1) Set the starting address (the relative address from the start of texture memory) for where the Object List is to be stored in the TA_OL_BASE register.
  1516. (2) Set the starting address (the relative address from the start of texture memory) for where the ISP/TSP Parameters are to be stored in the TA_ISP_BASE register.
  1517. (3) Set the limit address (the relative address from the start of texture memory) for where the Object List is to be stored in the TA_OL_LIMIT register.
  1518. (4) Set the limit address (the relative address from the start of texture memory) for where the ISP/TSP Parameters are to be stored in the TA_ISP_LIMIT register.
  1519. (5) Set the Global Tile Clip value in the TA_GLOB_TILE_CLIP register.
  1520. (6) Set the Object Pointer Block unit size in the TA_ALLOC_CTRL register.
  1521. (7) Write 0x80000000 in the TA_LIST_INIT register to initialize the TA's internal registers.
  1522. (8) Read the TA_LIST_INIT register. (Because, from the viewpoint of the CPU, a write to a TA register consists of writing the data to the buffer ahead of the register and then forgetting about it, perform only one read and then wait until the write to the register is completed.)
  1523.  
  1524. ? Setting up the ch2-DMA transfer
  1525. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1526. (2) Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1527. (3) Set the transfer source address in the SH4-DMAC-SAR2 register.
  1528. (4) Set the size of the transfer (the number of bytes to be transferred/32) in the SH4-DMAC-DMATCR2 register.
  1529. (5) Make the operation settings in the SH4-DMAC-CHCR2 register. When doing so, set the DE bit to "1."
  1530. (6) Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1." DMA cannot be initiated if the AE, NMIF, and DME bits do not all meet this condition. Furthermore, if the DDT bit is "0," the DMA operation will be performed incorrectly.
  1531. (7) Set the address for the TA's display list input in the SB_C2DSTAT register.
  1532. (8) Set the transfer size (the number of bytes) in the SB_C2DLEN register.
  1533. (9) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1534. The following prohibitions apply during a TA input display list DMA transfer:
  1535. * Because a TA input display list DMA transfer is performed using ch2-DMA, other DMA operations that use ch2-DMA cannot be performed at the same time.
  1536. * Never write to any of the registers that are used in a TA input display list DMA transfer. The only exception is writing 0x00000000 to the SB_C2DST register in order to interrupt the DMA transfer.
  1537. * The CPU must not perform a burst write to addresses 0x10000000 to 0x13FFFFE0. Doing so could result in the loss of some data in the DMA transfer.
  1538. The status of each register when a TA input display list DMA transfer ends normally is described below:
  1539.  
  1540. * The SH4_DMAC_SAR2 register points to the address that follows the location at which the transfer ended.
  1541. * The value in the SH4_DMAC_DMATCR2 register is 0x00000000.
  1542. * The TE bit of the SH4_DMAC_CHCR2 register is "1."
  1543. * The SB_C2DSTAT register retains the value that was set.
  1544. * The value in the SB_C2DLEN register is 0x00000000.
  1545. * The value in the SB_C2DST register is 0x00000000.
  1546. * The DMA end interrupt flag (ISTNRM - bit 19: DTDE2INT) is set to "1."
  1547.  
  1548. An example of how to use TA input display list DMA transfer is provided below.
  1549.  
  1550. Transferring a display list (0x00008000 bytes) from system memory to texture memory
  1551. System memory addresses: 0x0C400000 to 0x0C407FFF
  1552. TA address: 0x10000000
  1553. Texture memory addresses (Object List): 0x00100000?
  1554. Texture memory addresses (ISP/TSP Parameters): 0x00000000?
  1555.  
  1556. ? Example for setting the TA registers
  1557. (1) Set 0x00100000 in the TA_OL_BASE register.
  1558. (2) Set 0x00000000 in the TA_ISP_BASE register.
  1559. (3) Set 0x00200000 in the TA_OL_LIMIT register.
  1560. (4) Set 0x00100000 in the TA_ISP_LIMIT register.
  1561. (5) Set 0x000E0013 in the TA_GLOB_TILE_CLIP register.
  1562. (6) Set 0x00000202 in the TA_ALLOC_CTRL register.
  1563. (7) Write 0x80000000 in the TA_LIST_INIT register to initialize the TA's internal registers.
  1564. (8) Read the TA_LIST_INIT register.
  1565.  
  1566. ? Example for setting up the ch2-DMA transfer
  1567. (1) Read the SB_C2DST register and confirm that the value is 0x00000000.
  1568. (2) Read the SH4-DMAC-CHCR2 register, and confirm that both the TE bit and the DE bit are both set to "0." If either bit is set to "1," set that bit to "0."
  1569. (3) Set 0x0C400000 in the SH4-DMAC-SAR2 register.
  1570. (4) Set 0x00000400 in the SH4-DMAC-DMATCR2 register.
  1571. (5) Set 0x000012C1 in the SH4-DMAC-CHCR2 register.
  1572. (6) Read the SH4-DMAC-DMAOR register and confirm that the DDT bit is set to "1," the AE bit is set to "0," the NMIF bit is set to "0," and the DME bit is set to "1."
  1573. (7) Set 0x10000000 in the SB_C2DSTAT register.
  1574. (8) Set 0x00008000 in the SB_C2DLEN register.
  1575. (9) Write 0x00000001 in the SB_C2DST register to initiate the DMA operation.
  1576.  
  1577.  
  1578. �2.6.5.3
  1579. Sort-DMA Transfer of ? Polygon Parameters
  1580. DMA ch0 (DDT) is used to transfer ? polygon parameters by means of a Sort-DMA transfer. In order to perform an ? polygon Sort-DMA transfer , it is necessary to first set the TA registers and then to set up the Sort-DMA transfer. Each of these setup procedures is described below.
  1581.  
  1582. ? Setting the TA registers
  1583. (1) Set the starting address (the relative address from the start of texture memory) for where the Object List is to be stored in the TA_OL_BASE register.
  1584. (2) Set the starting address (the relative address from the start of texture memory) for where the ISP/TSP Parameters are to be stored in the TA_ISP_BASE register.
  1585. (3) Set the limit address (the relative address from the start of texture memory) for where the Object List is to be stored in the TA_OL_LIMIT register.
  1586. (4) Set the limit address (the relative address from the start of texture memory) for where the ISP/TSP Parameters are to be stored in the TA_ISP_LIMIT register.
  1587. (5) Set the Global Tile Clip value in the TA_GLOB_TILE_CLIP register.
  1588. (6) Set the Object Pointer Block unit size in the TA_ALLOC_CTRL register.
  1589. (7) Write 0x80000000 in the TA_LIST_INIT register to initialize the TA's internal registers.
  1590. (8) Read the TA_LIST_INIT register. (Because, from the viewpoint of the CPU, a write to a TA register consists of writing the data to the buffer ahead of the register and then forgetting about it, perform only one read and then wait until the write to the register is completed.)
  1591.  
  1592. ? Setting up the Sort-DMA transfer
  1593. (1) Read the SB_SDST register and confirm that the value is 0x00000000.
  1594. (2) Set the start address of the Start Link Address Table in the SB_SDSTAW register.
  1595. (3) Set the Link Base Address in the SB_SDBAAW register.
  1596. (4) Set the bit width of the Start Link Address in the SB_SDWLT register.
  1597. (5) Set the Link Address shift control in the SB_SDLAS register.
  1598. (6) Write 0x00000001 in the SB_SDST register to initiate the DMA operation.
  1599.  
  1600. The following prohibitions apply during an ? polygon Sort-DMA transfer:
  1601. * Never write to any of the registers that are used in an ? polygon Sort-DMA transfer. The only exception is writing 0x00000000 to the SB_SDST register in order to interrupt the DMA transfer.
  1602. * The CPU must not perform a burst write to addresses 0x10000000 to 0x13FFFFE0. Doing so could result in the loss of some data in the DMA transfer.
  1603.  
  1604. The status of each register when an ? polygon Sort-DMA transfer ends normally is described below:
  1605.  
  1606. * The SB_SDSTAW register value is incremented.
  1607. * The value in the SB_SDST register is 0x00000000.
  1608. * The SB_SDDIV register the number of times that the Sort-DMA operation read the Start Link Address.
  1609. * The DMA end interrupt flag (SB_ISTNRM - bit 20: DTDESINT) is set to "1."
  1610.  
  1611.  
  1612. An example of how to use ? polygon Sort-DMA transfer is provided below.
  1613.  
  1614. Transferring a display list (? polygon) from system memory to texture memory by means of Sort-DMA
  1615. Start Link Address Table address in system memory: 0x0C600000
  1616. Link Base Address in system memory: 0x0C604000
  1617. TA address (fixed): 0x10000000
  1618. Texture memory addresses (Object List): 0x00100000?
  1619. Texture memory addresses (ISP/TSP Parameters): 0x00000000?
  1620.  
  1621. ? Example for setting the TA registers
  1622. (1) Set 0x00100000 in the TA_OL_BASE register.
  1623. (2) Set 0x00000000 in the TA_ISP_BASE register.
  1624. (3) Set 0x00200000 in the TA_OL_LIMIT register.
  1625. (4) Set 0x00100000 in the TA_ISP_LIMIT register.
  1626. (5) Set 0x000E0013 in the TA_GLOB_TILE_CLIP register.
  1627. (6) Set 0x00000202 in the TA_ALLOC_CTRL register.
  1628. (7) Write 0x80000000 in the TA_LIST_INIT register to initialize the TA's internal registers.
  1629. (8) Read the TA_LIST_INIT register.
  1630.  
  1631. ? Example for setting up the Sort-DMA transfer
  1632. (1) Read the SB_SDST register and confirm that the value is 0x00000000.
  1633. (2) Set 0x0C600000 in the SB_SDSTAW register.
  1634. (3) Set 0x0C604000 in the SB_SDBAAW register.
  1635. (4) Set 0x00000001 in the SB_SDWLT register.
  1636. (5) Set 0x00000000 in the SB_SDLAS register.
  1637. (6) Write 0x00000001 in the SB_SDST register to initiate the DMA operation.
  1638.  
  1639.  
  1640.  
  1641. -- (Supplement) About Sort-DMA --
  1642.  
  1643. Sort-DMA permits the transfer of random data from system memory to texture memory by adding link information to the polygon parameters.
  1644.  
  1645. Fig. 2-8 Sort-DMA Transfer Path (Bus A)
  1646.  
  1647.  
  1648. Fig. 2-9 Sort-DMA Transfer Path (Bus B)
  1649.  
  1650. Polygon parameters must be sorted in order to draw an ? polygon. Normally, this is accomplished either by using the Renderer's sorting function, or by having the CPU sort the parameters beforehand. When drawing a large number of ? polygons, it is probably more effective to have the CPU perform the sorting rather than using an auto-sorting function. However, sorting a large amount of polygon data can consume a large amount of CPU time. If the CPU generates link information in the ? polygon parameters, and then performs the transfer using the Sort-DMA function, it is possible to reduce the load on both the CPU and on the Renderer.
  1651. The HOLLY registers that are used in Sort-DMA operations are listed below. (For details, refer to section 8.4.1, "System Bus Register.")
  1652. Note that it is not possible to specify the texture memory address that is the transfer destination for the data in the Sort-DMA registers. For details on specifying the texture memory address, refer to the TA manual.
  1653. SB_SDSTAW (0x005F6810)
  1654. SB_SDBAAW (0x005F6814)
  1655. SB_SDWLT (0x005F6818)
  1656. SB_SDLAS (0x005F681C)
  1657. SB_SDST (0x005F6820)
  1658. SB_SDDIV (0x005F6860)
  1659.  
  1660. ??Start Link Address Table
  1661. The Start Link Address Table consists of several Start Link Addresses. A Start Link Address is needed required for Sort-DMA for each Sort-DMA polygon parameter list in order to know the starting position of the link.
  1662. ? The starting position of the Start Link Address Table is specified by the SB_SDSTAW register.
  1663. ? Because the address that is produced by adding the value that is in the SB_SDBAAW register to the Start Link Address is used in Sort-DMA operations as the link destination address, it is the same as writing the offset from SB_SDBAAW for the Next Link Address.
  1664. ? The bit width of the Start Link Address is selected through the SB_SDWLT register as either 16 bits or 32 bits.
  1665. ? The value that is written for the Start Link Address is selected through the SB_SDLAS register as either the original address or the address divided by 32.
  1666. ? If either 0x0001 (when SB_SDWLT = 0) or 0x00000001 (when SB_SDWLT = 1) is written in the Start Link Address, the Sort-DMA operation recognizes this as the End Of List code, and begins to read the next Start Link Address.
  1667. ? If either 0x0002 (when SB_SDWLT = 0) or 0x00000002 (when SB_SDWLT = 1) is written in the Start Link Address, the Sort-DMA operation recognizes this as the End Of DMA code, and ends the transfer.
  1668.  
  1669.  
  1670. Fig. 2-10 Start Link Address Table Format
  1671.  
  1672.  
  1673. Start Link Address?: Specify the offset for the starting addresses where the polygon parameters that are to be transferred at the beginning of each parameter list are stored.
  1674.  
  1675. Set Value (SB_SDWLT=0,SB_SDLAS=0)
  1676. 0x0000 : Offset Address = 0x00000000
  1677. 0x0080 : Offset Address = 0x00000080
  1678. 0x00A0 : Offset Address = 0x000000A0
  1679. 0x00C0 : Offset Address = 0x000000C0
  1680. ?
  1681. 0xFFC0 : Offset Address = 0x0000FFC0
  1682. 0xFFE0 : Offset Address = 0x0000FFE0
  1683. 0x0001 : End OF List
  1684. 0x0002 : End OF DMA
  1685.  
  1686. Set Value (SB_SDWLT=0,SB_SDLAS=1)
  1687. 0x0000 : Offset Address = 0x00000000
  1688. 0x0004 : Offset Address = 0x00000080
  1689. 0x0005 : Offset Address = 0x000000A0
  1690. 0x0006 : Offset Address = 0x000000C0
  1691. ?
  1692. 0xFFFE : Offset Address = 0x001FFFC0
  1693. 0xFFFF : Offset Address = 0x001FFFE0
  1694. 0x0001 : End OF List
  1695. 0x0002 : End OF DMA
  1696.  
  1697. Set Value (SB_SDWLT=1,SB_SDLAS=0)
  1698. 0x00000000 : Offset Address = 0x00000000
  1699. 0x00000080 : Offset Address = 0x00000080
  1700. 0x000000A0 : Offset Address = 0x000000A0
  1701. 0x000000C0 : Offset Address = 0x000000C0
  1702. ?
  1703. 0x07FFFFC0 : Offset Address = 0x07FFFFC0
  1704. 0x07FFFFE0 : Offset Address = 0x07FFFFE0
  1705. 0x00000001 : End OF List
  1706. 0x00000002 : End OF DMA
  1707.  
  1708. Set Value (SB_SDWLT=1,SB_SDLAS=1)
  1709. 0x00000000 : Offset Address = 0x00000000
  1710. 0x00000004 : Offset Address = 0x00000080
  1711. 0x00000005 : Offset Address = 0x000000A0
  1712. 0x00000006 : Offset Address = 0x000000C0
  1713. ?
  1714. 0x003FFFFE : Offset Address = 0x07FFFFC0
  1715. 0x003FFFFF : Offset Address = 0x07FFFFE0
  1716. 0x00000001 : End OF List
  1717. 0x00000002 : End OF DMA
  1718.  
  1719. ? Never specify any values other than those shown above.
  1720. ? Polygon Parameter
  1721. There are three types of polygon parameters: Control Parameters, Global Parameters, and Vertex Parameters. In Sort-DMA, the link destination address is calculated on the basis of the link information that is contained in the Global Parameters. Therefore, when sorting several polygons, the data must be created by adding Global Parameters to each Vertex Parameter, divided up by polygons. The parameter format for each polygon is illustrated below.
  1722. The seventh 32-bit word from the start of the Global Parameters is allocated for the current data size, and the eighth 32-bit word from the start of the Global Parameters is allocated for the Next Link Address. Write the size (in units of 32 bytes) of the polygon parameters that are currently being transferred for the current data size, and indicate the address where the next polygon parameters that are to be transferred are stored for the Next Link Address.
  1723. ? Because the address that is produced by adding the value that is in the SB_SDBAAW register to the Next Link Address is used in Sort-DMA operations as the link destination address, it is the same as writing the offset from SB_SDBAAW for the Next Link Address.
  1724. ? The value that is written for the Next Link Address is selected through the SB_SDLAS register as either the original address or the address divided by 32.
  1725. ? If 0x00000001 is written in the Next Link Address, the Sort-DMA operation recognizes this as the End Of List code, and begins to read the next Start Link Address from the Start Link Address Table as the new link destination address.
  1726. ? If 0x00000002 is written in the Next Link Address, the Sort-DMA operation recognizes this as the End Of DMA code, and ends the transfer.
  1727.  
  1728.  
  1729.  
  1730. Fig. 2-11 Polygon Parameter Format
  1731.  
  1732.  
  1733.  
  1734. Fig. 2-12 Global Parameter Format
  1735.  
  1736.  
  1737.  
  1738. Current Data Size???: Specify the value that is the size of the polygon parameters (control + global + vertex) that are currently being transferred, divided by 32. No values other than those listed below may be specified.
  1739.  
  1740. Set Value 0x00000004 : 128Bytes
  1741. 0x00000005 : 160Bytes
  1742. 0x00000006 : 192Bytes
  1743. ?
  1744. 0x000000FF : 8160Bytes
  1745. 0x00000000 : 8192Bytes
  1746.  
  1747.  
  1748. Next Link Address???: Specify the offset value for the starting address where the polygon parameters that are to be transferred next are stored.
  1749.  
  1750. Set Value (SB_SDLAS=0)
  1751. 0x00000000 : Offset Address = 0x00000000
  1752. 0x00000080 : Offset Address = 0x00000080
  1753. 0x000000A0 : Offset Address = 0x000000A0
  1754. 0x000000C0 : Offset Address = 0x000000C0
  1755. ?
  1756. 0x07FFFFC0 : Offset Address = 0x07FFFFC0
  1757. 0x07FFFFE0 : Offset Address = 0x07FFFFE0
  1758. 0x00000001 : End Of List
  1759. 0x00000002 : End Of DMA
  1760.  
  1761. Set Value (SB_SDLAS=1)
  1762. 0x00000000 : Offset Address = 0x 00000000
  1763. 0x00000004 : Offset Address = 0x 00000080
  1764. 0x00000005 : Offset Address = 0x 000000A0
  1765. 0x00000006 : Offset Address = 0x 000000C0
  1766. ?
  1767. 0x003FFFFE : Offset Address = 0x 07FFFFC0
  1768. 0x003FFFFF : Offset Address = 0x 07FFFFE0
  1769. 0x00000001 : End Of List
  1770. 0x00000002 : End Of DMA
  1771.  
  1772. ? Never specify any values other than those shown above.
  1773.  
  1774.  
  1775.  
  1776. ??Supplement concerning Sort-DMA
  1777.  
  1778. The method for confirming the end of Sort-DMA is described below.
  1779. (1) Although an interrupt is used in order to confirm the end of Sort-DMA, in order to generate the interrupt it is necessary to set bit 20 of either the SB_IML2NRM, SB_IML4NRM, or SB_IML6NRM register (for details, refer to the interrupt manual) to "1" and release the Sort-DMA end interrupt mask. The mask needs to be released before initiating Sort-DMA.
  1780. (2) Once Sort-DMA terminates, 0x00000000 is automatically set in the SB_SDST register, and at the same time bit 20 of the SB_ISTNRM register (for details, refer to the interrupt manual) is set to "1." If the mask has been cancelled as described in item 1 above, an interrupt is now generated.
  1781. (3) Once the SH4 receives the interrupt, it determines the source of the interrupt by reading the SB_ISTNRM, SB_ISTEXT, and SB_ISTERR registers. The SH4 is able to confirm that Sort-DMA has ended by checking bit 20 of the SB_ISTNRM register.
  1782. (4) As soon as it has confirmed that Sort-DMA has ended, the SH4 cancels the interrupt by writing a "1" to bit 20 of the SB_ISTNRM register.
  1783.  
  1784. The following procedure explains how to interrupt Sort-DMA:
  1785. (1) Request a stop of Sort-DMA by writing 0x00000000 to the SB_SDST register.
  1786. (2) Note that after performing step 1, the value in the SB_SDST register does not immediately become 0x00000000; instead, the value 0x00000001 is maintained in the register until Sort-DMA stops completely. Therefore, it is necessary to poll the register repeatedly until its value becomes 0x00000000.
  1787. (3) Once the register value becomes 0x00000000, Sort-DMA has stopped. At this point, SB_SDDIV indicates the number of times a Start Link Address was retrieved; this information can be used in order to make a rough estimate of how far the transfer proceeded.
  1788. Supplement) When a Sort-DMA transfer is interrupted, no Sort-DMA end interrupt is generated.
  1789.  
  1790. The method for generating a Sort-DMA parameter error interrupt is described below.
  1791. (1) In order to generate a Sort-DMA parameter error interrupt it is necessary to set bit 28 of either the SB_IML2ERR, SB_IML4ERR, or SB_IML6ERR register (for details, refer to the interrupt manual) to "1" and release the Sort-DMA parameter error interrupt mask. The mask needs to be released before initiating Sort-DMA.
  1792. (2) If a parameter error is generated, 0x00000000 is automatically set in the SB_SDST register, and at the same time bit 28 of the SB_ISTNRM register (for details, refer to the interrupt manual) is set to "1." Sort-DMA is forcibly terminated. If the mask has been cancelled as described in item 1 above, an interrupt is now generated.
  1793. Supplement 1) A parameter error occurs when the Global Parameters could not be found in the Sort-DMA transfer data. It is possible either that the format of the source data differs from that shown in the Fig. 2-10 Polygon Parameter format, or an incorrect value was written for a link address.
  1794. Supplement 2) When a Sort-DMA transfer is forcibly terminated, no Sort-DMA end interrupt is generated.
  1795.  
  1796. ? Sort-DMA Operation Flowchart
  1797.  
  1798. Fig. 2-13 Sort-DMA Operation Flowchart
  1799.  
  1800.  
  1801. ? Sort-DMA Transfer Example
  1802.  
  1803. Fig. 2-14 Sort-DMA Transfer Example
  1804.  
  1805. �2.6.6
  1806. Wave Data Transfers
  1807. In the Dreamcast System, wave memory is allocated to a 2MB space (0x00800000 to 0x009FFFFF) in the G2 Bus area. There are four types of DMA on the G2 Bus: DMA0 (AICA-DMA), DMA1 (External-DMA1), DMA2 (External-DMA2), and DMA3 (Debug-DMA). All of these types of DMA are functionally similar, but can be set and executed independently, except for a few common registers.
  1808. The common settings for G2-DMA are shown below, using DMA0 (AICA-DMA) as an example. Regarding DMA1 and 3 for expansion devices, etc., set registers for the AICA setting items for that device.
  1809.  
  1810. (1) Load the AICA address in the SB_ADSTAG register. (If an incorrect address is set, an illegal address interrupt is generated.)
  1811. Valid addresses are specified by bits 28 through 5. (The high-order bits 31 to 29 and the low-order bits 4 to 0 are "0".)
  1812. When setting other addresses in registers, set the highest three bits and the lowest five bits to "0".)
  1813. (2) Load the root bus address in the SB_ADSTAR register. (If an incorrect address is set, an illegal address interrupt is generated.)
  1814. (3) Set the transfer size (in 32-byte units) in the SB_ADLEN register.
  1815. (4) Set the transfer direction in the SB_ADDIR register.
  1816. 0: Root ? G2
  1817. 1: G2 ? Root
  1818. (5) Set the initiation trigger in the SB_ADTSEL register.
  1819. 0: CPU trigger
  1820. - Software initiation
  1821. 1: HARD trigger
  1822. - AICA (DMA0) when the buffer is empty. In other cases, DMA1 through DMA3 depend on the expansion device.
  1823. 2: INT trigger
  1824. - Initiated when any interrupt for which "1" is set in the SB_SBDTNRM or SB_G2DTEXT register is received. INT initiation is possible with a variety of sources, requiring procedures that vary according to the interrupt that is being used.
  1825.  
  1826. ? CPU initiation (ex: DMA0)
  1827. (6) Set "1" in the SB_ADEN register. (If an incorrect address is set, an illegal address interrupt is generated.)
  1828. 0: Disable
  1829. 1: Enable
  1830. (7) Set "1" in the SB_ADST register. If an incorrect address is set, the transfer is not initiated.
  1831. 0: STOP
  1832. 1: START
  1833. (8) There are two ways to confirm the end of a transfer:
  1834. A. Confirm through the value in the SB_ADST register.
  1835. 0: DMA end
  1836. 1: Not end
  1837. B. Confirm the end through the G2DEAINT (AICA-DMA end) interrupt.
  1838.  
  1839.  
  1840.  
  1841. ? HARD initiation (ex: DMA0)
  1842. (6) Set "1" in the SB_ADEN register.
  1843. 0: Disable
  1844. 1: Enable - After setting "enable," execute the transfer right after the AICA buffer becomes
  1845. empty.
  1846. (7) End confirmation
  1847. A. Confirm through the value in the SB_ADEN register.
  1848. 0: DMA end
  1849. 1: Not end
  1850. B. Confirm the end through the G2DEAINT interrupt.
  1851. Note: Although this usage is the same for DMA1 through DMA3, the initiation source depends on the expansion device.
  1852.  
  1853. ? INT initiation (ex.: DMA0)
  1854. (6) Set "1" for the bits corresponding to the interrupt sources in the SB_G2DTNRM and SB_G2DTEXT registers.
  1855. (7) Set "1" in the SB_ADEN register.
  1856. 0: Disable
  1857. 1: Enable
  1858. (8) End confirmation
  1859. A. Confirm through the value in the SB_ADEN register. (The value is set to either "1" or "0" by the hardware.)
  1860. 0: DMA end
  1861. 1: Not end
  1862. - However, due to the time lag in the operation of SB_ADST, the DMA operation cannot be gauged accurately.
  1863. B. Confirm the end through the G2DEAINT interrupt.
  1864.  
  1865. System memory area protection is set by setting 0x4659XXYY in the SB_G2APRO register.
  1866.  
  1867. XX: Starting area where protection is disabled
  1868. YY: Ending area where protection is disabled
  1869.  
  1870. System memory is allocated in 0x0C000000 to 0x0FFFFFFF, but 7 bits of XX and YY, respectively, are reflected in bits 26 to 20 of the above area addresses, indicating whether protection is enabled/disabled for the specified area.
  1871. To disable protection for the entire area, set 0x4659007F in the SB_G2APRO register. To enable protection for the entire area, set 0x46597F00 in the same register.
  1872. ? When a G2-DMA transfer is performed so that it spans a protected area, an overrun error is generated.
  1873. ? Regarding the timeout setting registers, the values that are set in the SB_G2DSTO and SB_G2TRTO registers must satisfy the following relationship:
  1874. SB_G2DSTO?SB_G2TRTO
  1875.  
  1876. [Supplement] Basically, changes are not possible.
  1877.  
  1878.  
  1879. For DMA transfers to wave memory, the type of transfers that are primarily used are data transfers to system memory and data transfers from the GD-ROM on the G1 bus.
  1880. The registers that are used for wave data DMA (wave DMA) include registers that are dedicated to wave DMA on the G2 Bus, and registers for interrupts that are shared with other types of DMA. An overview of the registers is provided below.
  1881.  
  1882. ? Wave DMA Dedicated Registers
  1883. SB_ADSTAG 0x005F7800 : Wave memory start address setting
  1884. Settable area: 0x00800000 to 0x009FFFE0
  1885. SB_ADSTAR 0x005F7804 : System memory start address setting
  1886. Settable area (Note: The setting in the System Memory Protection register is also referenced):
  1887. 0x0C000000 to 0x0FFFFFE0
  1888. SB_ADLEN 0x005F7808 : Transfer size setting
  1889. Set in 0x20 (32-byte) units.
  1890. The setting of bit 31 enables DMA initiation (SB_ADEN) when a DMA transfer ends.
  1891. 0x00000000: Do not set DMA initiation enable setting to "0."
  1892. 0x80000000: Set DMA initiation enable setting to "0."
  1893. SB_ADDIR 0x005F780C : Transfer direction setting
  1894. 0x00000000 : System memory to wave memory
  1895. 0x00000001 : Wave memory to system memory
  1896. SB_ADTRG 0x005F7810 : DMA initiation method setting
  1897. 0x00000000 : Initiation by CPU
  1898. 0x00000002 : Initiation by interrupt
  1899. SB_ADEN 0x005F7814 : DMA operation enable
  1900. 0x00000000 : DMA operation enabled
  1901. 0x00000001 : DMA operation disabled
  1902. SB_ADST 0x005F7818 : DMA initiation by CPU
  1903. 0x00000000 : ----
  1904. 0x00000001 : DMA initiation
  1905.  
  1906. SB_G2APRO 0x005F78BC : System memory access restriction setting (shared with other G2 devices)
  1907. 0x00000000 : ----
  1908. 0x00000001 : DMA initiation
  1909.  
  1910. SB_IST*** 0x005F6900 to 0x005F6908 interrupt status registers
  1911.  
  1912. SB_IML*** 0x005F6910 to 0x005F6938 interrupt mask registers
  1913.  
  1914. SB_G2DTNRM 0x005F6950 : Wave DMA interrupt initiation setting 1 (shared with other G2 devices
  1915. SB_G2DTEXT 0x005F6954 : Wave DMA interrupt initiation setting 2 (shared with other G2 devices)
  1916. (Settings 1 and 2 function as a pair.)
  1917.  
  1918.  
  1919. Examples of how to use wave DMA are provided below.
  1920.  
  1921. (Example 1)
  1922. Transferring wave data (0x00000040 bytes) from wave memory to system memory
  1923. Wave memory address: 0x00800000
  1924. System memory address: 0x0C001000
  1925.  
  1926. (1) Set 0x4659007F in the SB_G2APRO register, completely releasing the system memory protect setting.
  1927. (2) Set 0x00000000 in the SB_ADEN register, disabling DMA operations.
  1928. (3) Set the wave memory address 0x00800000 in the SB_ADSTAG register.
  1929. (4) Set the system memory address 0x0C001000 in the SB_ADSTAR register.
  1930. (5) Set the transfer size (0x00000040: 64 bytes) in the SB_ADLEN register.
  1931. (6) Set the transfer direction (0x00000001: wave memory to system memory) in the SB_ADDIR register.
  1932. (7) Set the DMA initiation method (0x00000000: CPU trigger) in the SB_ADTRG register.
  1933. (8) Set "DMA enabled" (0x00000001) in the SB_ADEN register.
  1934. (9) Set 0x00000001 in the SB_ADST register, initiating wave memory DMA.
  1935.  
  1936. *1 When actually using wave DMA, it is necessary to set the System Memory Protection register (SB_G2APRO).
  1937. *2 Wave memory DMA loads the set value when operation is enabled (a "1" has been written to the SB_ADEN register). Therefore, when overwriting the registers, always follow the procedure described below.
  1938. 1. Disable DMA operation. (Wave DMA enable = 0)
  1939. 2. Update the registers.
  1940. 3. Enable DMA operation. (Wave DMA enable = 1)
  1941. *3 When system memory access is restricted through the System Memory Protection register (SB_G2APRO), some address settings may result in a DMA error (Illegal Address Error), causing the DMA transfer to end abnormally.
  1942.  
  1943. (Example 2)
  1944. Transferring wave data (0x00000040 bytes) from system memory to wave memory, after having executed example 1
  1945. System memory address: 0x0C001000
  1946. Wave memory address: 0x00800040
  1947. (1) Set 0x00000000 in the SB_ADEN register, disabling DMA operations.
  1948. (2) Set the wave memory address 0x00800040 in the SB_ADSTAG register.
  1949. (3) Set the transfer direction (0x00000000: system memory to wave memory) in the SB_ADDIR register.
  1950. (4) Set "DMA enabled" (0x00000001) in the SB_ADEN register.
  1951. (5) Set 0x00000001 in the SB_ADST register, initiating wave memory DMA.
  1952. * Because the initial values in the registers are maintained after DMA is completed, the following registers do not change and therefore do not need to be overwritten:
  1953. SB_ADSTAR(system memory address: 0x0C001000)
  1954. SB_ADLEN(64-byte transfer size: 0x00000040)
  1955. SB_ADTRG(DMA initiation method - CPU trigger: 0x00000000)
  1956.  
  1957.  
  1958. (Example 3)
  1959. Initiating DMA through an interrupt signal from AICA, transferring wave data (0x00000040 bytes) from wave memory to system memory
  1960.  
  1961. Wave memory address: 0x00800000
  1962. System memory address: 0x0C001000
  1963.  
  1964. (1) Set 0x00000000 in the SB_ADEN register, disabling DMA operations.
  1965. (2) Set the wave memory address 0x00800000 in the SB_ADSTAG register.
  1966. (3) Set the system memory address 0x0C001000 in the SB_ADSTAR register.
  1967. (4) Set the transfer size (0x00000040: 64 bytes) in the SB_ADLEN register.
  1968. (5) Set the transfer direction (0x00000001: wave memory to system memory) in the SB_ADDIR register.
  1969. (6) Set the DMA initiation method (0x00000003: interrupt trigger) in the SB_ADTRG register.
  1970. (7) Set "DMA enabled" (0x00000001) in the SB_ADEN register.
  1971. (8) Set initiation by interrupt through the G2DTNRM register and the G2DTEXT register.
  1972.  
  1973. *1 Because this transfer operation is initiated by interrupt, the following register does not need to be set:
  1974. SB_ADST(DMA initiation: 0x00000001)
  1975. *2 In this example, wave DMA is initiated when the AICA interrupt signal is input, but it is also necessary to make settings for AICA that will generate the interrupt.
  1976. *3 When initiating DMA through an interrupt, if the interrupt from AICA is generated immediately after a "1" is written to the SB_ADEN (DMA operation enable) register, wave DMA might not be initiated. This is because the time at which the settings in the wave DMA registers become effective differs from the time at which the setting in the register that enables initiation by an interrupt becomes effective. In order to prevent this from happening, it is necessary to coordinate the timing of the settings by, for example, reading the SB_G2ID register (which returns the G2 Bus version information) after setting up wave DMA, and then setting the interrupt-related registers.
  1977.  
  1978. �2.6.7
  1979. ARM Data Transfers
  1980. ARM data transfers are DMA transfers programs and data for the ARM, the AICA's internal processor, to wave memory, and are basically similar to G2-DMA DMA0 (AICA-DMA) transfers.
  1981.  
  1982. �2.6.8
  1983. Peripheral Data Transfers
  1984. The registers that are required for DMA transfers of peripheral data and the procedure for setting up the command file for the controller (Maple-Host) are described in this section.
  1985. Because only the minimum requirements in terms of the registers and the procedure for DMA transfers of peripheral data are described below, refer to section 5, "User Interface," if more details are required.
  1986.  
  1987. <Registers used for Maple-DMA>
  1988.  
  1989. SB_MDSTAR 0x005F6C04: Starting address setting for the command table in system memory
  1990. Settable area: 0x0C000000?0x0FFFFFE0
  1991. SB_MDTSEL 0x005F6C10: Maple-DMA trigger setting
  1992. 0x00000000 : Software trigger
  1993. 0x00000001 : Hardware trigger
  1994. SB_MDEN 0x005F6C14: Enables Maple-DMA
  1995. (Read)
  1996. 0x00000000 : Disable
  1997. 0x00000001 : Enable
  1998. (Write)
  1999. 0x00000000 : Disable
  2000. 0x00000001 : Enable
  2001. SB_MDST 0x005F6C18: Maple-DMA software start
  2002. (Read)
  2003. 0x00000000 : Maple-DMA end
  2004. 0x00000001 : Maple-DMA transfer in progress
  2005. (Write)
  2006. 0x00000000 : Invalid
  2007. 0x00000001 : Maple-DMA start
  2008. SB_MSYS 0x005F6C80: Maple system control setting
  2009. For details, refer to section 8.4.1.1, "System Registers."
  2010. SB_MDAPRO 0x005F6C8C: Maple-DMA area protection setting
  2011. Settable area: 0x0C000000 to 0x0FFFFFE0
  2012. SB_ISTNRM 0x005F6900: Normal interrupt status
  2013. bit12: Maple-DMA end
  2014. For details on interrupt registers, refer to section 8.4.1.1, "System Registers."
  2015.  
  2016.  
  2017. The procedure is described through the use of an example below. (CPU initiation for Maple, 4 port access, interrupts not used)
  2018.  
  2019. (1) Set 0x00001000 in the SB_ISTNRM register to clear the Maple-DMA end status.
  2020. (2) Set 0x00000000 in the SB_MDEN register to disable Maple-DMA.
  2021. (3) Read the SB_MDST register, and confirm that DMA operation is not in progress (0x00000000).
  2022. (4) Set the SB_MDSYS register. (0xC3500000: timeout 1ms, transfer rate 2Mbps)
  2023. (5) Set the initiation trigger in the SB_MDSEL register. (0x00000000: Triggered from CPU)
  2024. (6) Set the accessible area in system memory in the SB_MDAPRO register. (0x6155007F: access range 0x80000000 to 0x0FFFFFE0)
  2025. (7) Set up the following command file in system memory.
  2026. (Address) (Data)
  2027. 0x0C700000 ? 0x00000000 Port 0, 4-byte data transmission (instruction to Maple-Host)
  2028. 0x0C700004 ? 0x0C800000 Port 0, reception data storage address (instruction to Maple-Host)
  2029. 0x0C700008 ? 0x01200000 [Device Request], transfer destination AP: 0x20, transfer source AP: 0x00
  2030. 0x0C70000C? 0x00010000 Port 1, 4-byte data transmission
  2031. 0x0C700010 ? 0x0C800100 Port 1, reception data storage address
  2032. 0x0C700014 ? 0x01604000 [Device Request], transfer destination AP: 0x60, transfer source AP: 0x40
  2033. 0x0C700018 ? 0x00020000 Port 2, 4-byte data transmission
  2034. 0x0C70001C? 0x0C800200 Port 2, reception data storage address
  2035. 0x0C700020 ? 0x01A08000 [Device Request], transfer destination AP: 0x80, transfer source AP: 0xA0
  2036. 0x0C700024 ? 0x80030000 Port 3, 4-byte data transmission
  2037. 0x0C700028 ? 0x0C800300 Port 3, reception data storage address
  2038. 0x0C70002C? 0x01E0C000 [Device Request], transfer destination AP: 0xC0, transfer source AP: 0xE0
  2039. (8) Set the starting address of the command file (0x0C700000 in this example) in the SB_MDSTAR register.
  2040. (9) Set 0x00000001 in the SB_MDEN register to enable Maple-DMA.
  2041. (10) Write 0x00000001 in the SB_MDST register to initiate Maple-DMA (software initiation).
  2042.  
  2043.  
  2044. After executing steps (1) through (10) above and confirming that bit 12 in the SB_ISTNRM register is "1" (DMA end), the data that was received can be used to confirm the connection, or that there is no connection, or that an error occurred.
  2045.  
  2046. (Specified reception data storage address: 0x0C800000)
  2047. 0x0C800000 ?0x0500201C [Device Status], transfer destination AP:00, transfer
  2048. source AP:20
  2049. 0x0C800004 ?0x00000001 112 bytes of fixed data follows
  2050. ? ?
  2051. 0x0C800070 ?0x00000000
  2052. 0x0C800000 ?0xFFFFFFFF No connection
  2053. 0x0C800000 ?0xFFFFFF00 Reception data error
  2054. After confirming the device status through the received data described on the previous page, the trigger data can be acquired by using "Get Condition."
  2055. Because Maple is initialized through steps (1) through (10) on the previous page, the trigger data can be acquired by changing the command file and by initiating Maple-DMA.
  2056.  
  2057. (1) Set 0x00001000 in the SB_ISTNRM register to clear the Maple-DMA end status.
  2058. (2) Set up the following command file in system memory.
  2059. (Address) (Data)
  2060. 0x0C700000 ? 0x00000001 Port 0, 8-byte data transmission (instruction to Maple-Host)
  2061. 0x0C700004 ? 0x0C800000 Port 0, reception data storage address (instruction to Maple-Host)
  2062. 0x0C700008 ? 0x09200001 [Get Condition], transfer destination AP: 0x20, transfer source AP: 0x00
  2063. 0x0C70000C? 0x00000001 Function type
  2064. 0x0C700010 ? 0x00010001 Port 2, 8-byte data transmission
  2065. 0x0C700014 ? 0x0C800100 Port1, reception data storage address
  2066. 0x0C700018 ? 0x09604001 [Get Condition], transfer destination AP:0x60,
  2067. transfer source AP:0x40
  2068. 0x0C70001C? 0x00000001 Function Type
  2069. 0x0C700020 ? 0x00020001 Port 2, 8-byte data transmission
  2070. 0x0C700024 ? 0x0C800200 Port 2, reception data storage address
  2071. 0x0C700028 ? 0x09A08001 [Get Condition], transfer destination AP: 0x80, transfer source AP: 0xA0
  2072. 0x0C70002C? 0x00000001 Function type
  2073. 0x0C700030 ? 0x80030001 Port 3, 8-byte data transmission, command list end
  2074. 0x0C700034 ? 0x0C800300 Port 3, reception data storage address
  2075. 0x0C700038 ? 0x09E0C001 [Get Condition], transfer destination AP: 0xC0, transfer source AP: 0xE0
  2076. 0x0C70003C? 0x00000001 Function Type
  2077. (3) Write 0x00000001 in the SB_MDST register to initiate Maple-DMA (software initiation).
  2078.  
  2079. After executing steps (1) through (3) above and confirming that bit 12 in the SB_ISTNRM register is "1" (DMA end), the data that was received can be used to confirm the connection, or that there is no connection, or that an error occurred.
  2080.  
  2081. (Specified reception data storage address: 0x0C800000)
  2082. 0x0C800000 ?0x0500201C [Device Status], transfer destination AP:00, transfer
  2083. source AP:20
  2084. 0x0C800004 ?0x00000001
  2085. 0x0C800008 ?0xFFFF0000 Upper 16 bits: Digital trigger; lower 16 bits:
  2086. 0x0C800070 ?0x33008080 Lower 16 bits: Analog 2ch
  2087.  
  2088. 0x0C800000 ?0xFFFFFFFF No connection
  2089. 0x0C800000 ?0xFFFFFF00 Reception data error
  2090.  
  2091. Once the trigger data has been acquired through the above sequence, the data can be acquired repeatedly through just the following procedure:
  2092.  
  2093. (1) Set 0x00001000 in the SB_ISTNRM register to clear the Maple-DMA end status
  2094. (2) Write 0x00000001 in the SB_MDST register to initiate Maple-DMA (software initiation).
  2095. (3) Check received data.
  2096. �2.6.9 Color Palette Transfers
  2097. When using DMA to transfer data from system memory to palette RAM, the required values must be set in the following registers:
  2098.  
  2099. (1) SB_PDSTAP (0x005F7C00) register
  2100. Palette RAM transfer start address (SH4 address)
  2101. (2) SB_PDSTAR (0x005F7C04) register
  2102. System memory transfer start address (SH4 address)
  2103. (3) SB_PDLEN (0x005F7C08)
  2104. Specify the number of transfer bytes in units of 0x20 bytes.
  2105. (4) SB_PDDIR (0x005F7C0C)
  2106. Specify the transfer direction. Write "0" (system memory to palette RAM).
  2107. (5) SB_PDTSEL (0x005F7C10)
  2108. Specify the DMA initiation source. This is always "0"
  2109. (6) SB_PDEN (0x005F7C14)
  2110. Set DMA enable to "1."
  2111. (7) SB_PDST (0x005F7C18)
  2112. DMA starts when register setup is complete, the SB_PDEN register is "1" and a "1" is written to this register. This register also functions as a DMA status register. (0: DMA is in standby; 1: DMA is in progress)
  2113.  
  2114. Regarding the end of DMA: if DMA ends normally, bit 11 of the SB_ISTNRM (0x005F6900) register is set to "1" and an interrupt is generated.
  2115. In addition, the SB_PDST register indicates the DMA status; when DMA ends, the value of this register returns to "0." In this case, the value in the SB_PDEN register remains "1."
  2116.  
  2117. Regarding DMA errors: if the DMA address in system memory moves beyond the allowable memory range during a DMA operation, an overrun interrupt is generated and that DMA operation is forcibly terminated. In this case, bit 7 of the SB_ISTERR (0x005F6908) register is set to "1." Furthermore, if the address in system memory or on the PVR side was incorrectly set outside of the allowable memory range, an illegal address interrupt is generated and bit 6 of the SB_ISTERR (0x005F6908) register is set to "1." These interrupts are generated both when the incorrect DMA address is set, and when an attempt is made to initiate DMA with such an incorrect DMA address.
  2118.  
  2119. Cautions during DMA operations: If the SB_PDSTAP, SB_PDSTAR, SB_PDLEN, SB_PDDIR, or SB_PDTSEL register is overwritten while a DMA operation is in progress, the new setting has no effect on the current DMA operation. Once the current DMA is terminated and the next DMA is initiated (SB_PDEN = 1 and SB_PDST = 1), the values in these five registers are retrieved. A DMA operation that is currently in progress can be forcibly terminated by writing a "0" in the SB_PDEN register. If an access is in progress when this happens, the value in the SB-PDST register returns to "0" as soon as the access terminates.
  2120. �2.6.10
  2121. External Data Transfer
  2122. This type of DMA transfer is for expansion devices connected to the G2 bus. The details are similar to those of other G2-DMA transfers.
  2123. �2.7
  2124. Interrupts
  2125. �2.7.1 Overview
  2126. The following are the main interrupt sources for the SH4:
  2127.  
  2128. * NMI interrupts
  2129. * JTAG interrupts
  2130. * SH4 external interrupts
  2131.  
  2132. Of these, the NMI and JTAG interrupts are controlled by the debugging adapter, which is an external expansion device that manipulates the system reset signal, NMIs, etc., and is used as a software development tool. Other external interrupts that are sent to the SH4 are all controlled by HOLLY, the graphics/interface core.
  2133. Interrupt processing within HOLLY is described below.
  2134.  
  2135. The graphics/interface core HOLLY includes an interrupt controller that collects interrupts that originate within and outside of the chip. HOLLY accepts interrupts from an internal and external devices, outputs interrupts to the SH4, and generates DMA start signals for the PVR block and devices on the G2 Bus (G2 devices). Of the SH4's interrupt input IRL[3:0], IRL1 and 2 are used for the interrupts that HOLLY outputs to the SH4. The interrupt outputs have four priority levels (including "no interrupt"), and can be associated with any desired interrupt source by making the appropriate register settings. In addition, any desired interrupt source (other than error interrupts, described later) can be associated with the PVR block and G2 device DMA start signals by making the appropriate register settings.
  2136. Interrupt sources are divided into the following three types:
  2137.  
  2138. * Normal interrupts: 22* (in the HOLLY2 specifications; 21 in the HOLLY1 specifications)
  2139. * External interrupts: 4
  2140. * Error interrupts: 32
  2141.  
  2142. Each interrupt signal is processed according to the source type. (Refer to section 8.5.2 for a list of sources and descriptions.)
  2143. Normal interrupt and error interrupt input can be confirmed and cleared through the SB_ISTNRM and SB_ISTERR registers, which indicate the status of interrupts of their respective types, by checking the bits assigned to each particular interrupt. External interrupts are interrupt signals from external devices (GD-ROM, AICA, modem, or expansion device), and each latched signal can be checked in SB_ISTEXT, which is the register that indicates the status of external interrupts, by checking the bits assigned to each interrupt. Note that external interrupts cannot be cancelled through this register; external interrupts must be cancelled directly through the corresponding external device.
  2144. Interrupt masks are normally set through mask control registers (SB_IML2NRM, SB_IML2EXT, SB_IML2ERR, SB_IML4NRM, SB_IML4EXT, SB_IML4ERR, SB_IML6NRM, SB_IML6EXT, and SB_IML6ERR) for each level of each type of interrupt source: normal, external, or error. If a bit assigned to a source in these registers is set to "1" and an interrupt is received from the corresponding interrupt source, the corresponding interrupt is generated for the SH4. If a bit in these registers is set to "0," output of that interrupt to the SH4 is disabled. These registers have priority over the SB_ISTNRM, SB_ISTERR, and SB_ISTEXT registers; in addition, masking occurs regardless of the timing by which the interrupt was generated. This means that, for example, if a bit for an interrupt that is currently being generated is masked, and then the mask is released while the interrupt is still being generated, the same interrupt might be generated again.
  2145.  
  2146.  
  2147. Masked signals are assigned a priority at the level encoding stage, and are output as interrupt signals to the SH4. The order of priority is level 6 > level 4 > level 2. If there are no applicable sources, interrupt processing is not generated.
  2148. The DMA start signal is masked by the SB_PDTNRM and SB_PDTEXT registers on the PVR side, and by the SB_G2DTNRM and SB_G2DTEXT registers on the G2 side. Except for the fact that there are no error interrupt registers and that there is only one level, these registers mask their interrupts in the same manner as interrupts to the SH4 are masked.
  2149. For details on interrupt-related registers, refer to section 8.4.1.1.
  2150.  
  2151. �2.7.2 Interrupt Settings and Access Procedures
  2152. Specific procedures are necessary when modifying register-related interrupts to Holly. If these procedures are not followed, jumps to interrupt routines may occur with no value set in the INTEVT register, or interrupts that were presumed to have been canceled may be received again by mistake.
  2153.  
  2154. * Procedure 1 (normal case)
  2155.  
  2156. Use the following steps (1) to (4) to modify Holly register-related interrupts.
  2157.  
  2158. (1) For CPU processing, mask the objective interrupt using one of the following methods:
  2159. (1a) Execute SR.IMASK to set a priority higher than the objective interrupt, or
  2160. (1b) Set SR.BL to 1.
  2161. (2) Modify the Holly register-related interrupts as needed (if multiple modifications are needed, make them all at once here).
  2162. (3) Read the modified Holly register twice.
  2163. (4) Remove the mask applied in step (1).
  2164.  
  2165. * Procedure 2 (when canceling interrupts from external devices)
  2166.  
  2167. When canceling the interrupts from external devices that are controlled by Holly, special steps are required. There are four types of interrupts, from CD-ROM, AICA, modem and G2 expansion devices, with the following related registers: ISTEXT, IML2EXT, IML4EXT and IML6EXT. Steps (1) to (4) are the same as Procedure 1 above.
  2168.  
  2169. (1) For CPU processing, mask the objective interrupt using one of the following two methods:
  2170. (1.a) Execute SR.IMASK to set a priority above that of the objective interrupt, or
  2171. (1.b) Set SR.BL to 1.
  2172. (2) Access the interrupt control register of the external device (CD-ROM, AICA, modem or G2 expansion device) and cancel the interrupt (if multiple interrupts are to be canceled, cancel them all at once here).
  2173. (2.5) Read the ISTEXT register (external interrupt status) and confirm that the interrupt was canceled (if multiple interrupts have been canceled in (2), confirm each interrupt).
  2174. (3) Read the ISTEXT register twice.
  2175. (4) Remove the mask applied in step (1).
  2176.  
  2177. * Supplementary Issues
  2178.  
  2179. (a) The previous procedures are required when masked interrupts are not occurring. In other cases, errors should not occur if the above procedures are not followed.
  2180. <Required> When canceling the status of an unmasked (valid) interrupt.
  2181. <Not Required> When canceling the status of a masked (invalid) interrupt.
  2182. <Required> When an interrupt is masked (to disable the interrupt).
  2183. <Not Required> When canceling an interrupt mask (to re-enable the interrupt).
  2184. (b) Normally (when not set intentionally), SR.BL=1 during an interrupt processing routine, so when modifying a register within the interrupt routine, steps (1) and (4) are not required. However, even within the interrupt routine, when SR.BL=0 and multiple interrupts are enabled, the procedures must be followed. Outside of the interrupt routine, steps (1) through (4) must be followed (of course, if either (1a) or (1b) is satisfied, there is no need for steps (1) and (4)).
  2185. (c) Step (3) consists of dummy reads to be executed between steps (2) and (4). It ensures sufficient processing time for step (2). When continuously executing step (2), which externally accesses the CPU, and step (4), which internally accesses the CPU, step (4) may be executed in any order. Also, several clocks are required if the Holly status resulting from step (2) affects the internal CPU state.
  2186. (d) Failing to set the INTEVT register results in an INTEVT register value of 0.
  2187. (e) The dummy reads in step (3) must be executed until the interrupt is available to execute step (4) or the RTE command. However, two reads are not required for every single change: they are required only to allow the interrupts to be received after a modification has been made. Other types of accesses may be mixed without problem.
  2188.  
  2189. * Related Issues
  2190.  
  2191. (a) The Holly interrupt-related registers are as follows:
  2192.  
  2193. ISTNRM (0xA05F6900) normal interrupt status
  2194. ISTEXT (0xA05F6904) external interrupt status
  2195. ISTERR (0xA05F6908) error interrupt status
  2196. IML2NRM (0xA05F6910) Level2 normal interrupt mask control
  2197. IML2EXT (0xA05F6914) Level2 external interrupt mask control
  2198. IML2ERR (0xA05F6918) Level2 error interrupt mask control
  2199. IML4NRM (0xA05F6920) Level4 normal interrupt mask control
  2200. IML4EXT (0xA05F6924) Level4 external interrupt mask control
  2201. IML4ERR (0xA05F6928) Level4 error interrupt mask control
  2202. IML6NRM (0xA05F6930) Level6 normal interrupt mask control
  2203. IML6EXT (0xA05F6934) Level6 external interrupt mask control
  2204. IML6ERR (0xA05F6938) Level6 error interrupt mask control
  2205.  
  2206. (b) This procedure is required for internal CPU interrupt processing, as described in the hardware manual (section 19.2.3). In that case, only one dummy read is required in step (3).
  2207. (c) Error causes are as follows (for reference).
  2208. 1) Timing between "interrupt acknowledge" and "set INTEVT" processes: normal processing is as follows:
  2209.  
  2210. Interrupt occurs
  2211. ?
  2212. CPU acknowledges the interrupt and modifies internal state
  2213. ?
  2214. CPU changes to the interrupt status and sets INTEVT (for the pending interrupt)
  2215. ?
  2216. Interrupt processing starts
  2217. ?
  2218. Interrupt is canceled
  2219.  
  2220.  
  2221. However, if timing is such that the interrupt is canceled before INTEVT has been set, there is no interrupt to refer to, so INTEVT is set incorrectly, as follows:
  2222.  
  2223. Interrupt occurs
  2224. ?
  2225. CPU acknowledges the interrupt and modifies internal state
  2226. ?
  2227. Interrupt is canceled
  2228. ?
  2229. CPU changes to the interrupt status and sets INTEVT (for the pending interrupt)
  2230. <but there is no pending interrupt at this point!>
  2231. ?
  2232. Interrupt processing starts
  2233.  
  2234. The procedures described previously prevent the interrupt being canceled between the two processes (interrupt acknowledgement and INTEVT setting).
  2235.  
  2236. 2) Also, when the following interrupt routine finishes:
  2237.  
  2238. MOV.L R0,@R1 ; write to cancel interrupt
  2239. RTE
  2240. NOP
  2241.  
  2242. While the interrupt routine is being processed, the interrupt processing could be re-entered because the interrupt has not been canceled, or, even though it may have been canceled within Holly, the cancel has not been issued to the CPU. Therefore time must be allotted for the CPU to enter the interrupt cancel status.
  2243.  
  2244. MOV.L R0,@R1 ; write to cancel interrupt
  2245. MOV.L @R1, R0 ; dummy read 1
  2246. MOV.L @R1, R0 ; dummy read 2
  2247. RTE
  2248. NOP
  2249.  
  2250. The methods for using and accessing each register are described below.
  2251. SB_ISTNRM (0x005F 6900) normal interrupt status
  2252. This register is used to confirm and cancel normal interrupts. When a normal interrupt is generated internally by Holly, the corresponding bit in this register is set to "1." In addition, any of these interrupts can be cancelled (set to "0") by writing a "1" to the corresponding bit. Note that the two highest bits indicate the OR'ed result of all of the bits in SB_ISTEXT and SB_ISTERR, respectively, and writes to these two bits are ignored.
  2253.  
  2254. Example 1:
  2255. G2DE1INT and TAEOINT are being generated.
  2256. Example 2:
  2257. An error interrupt is being generated.
  2258. MIAINT is being generated.
  2259. Cancels all error interrupts.
  2260. MIAINT is now cancelled.
  2261. The error interrupt image in this register is now cancelled.
  2262. Example 3:
  2263. PCVOINT and PCHIINT are being generated.
  2264. Cancels PCHIINT.
  2265. Only PCHIINT is cancelled.
  2266. SB_ISTEXT (0x005F 6904) external interrupt status
  2267. This register is used to confirm external interrupts. This register is read-only. When an external interrupt is generated by a GD-ROM, AICA, modem, or expansion device, the corresponding bit in this register is set to "1." Note that these interrupts can be cancelled only by canceling the interrupt output directly at the generating source; they cannot be cancelled through this register.
  2268. Example:
  2269. G2MDMINT and G1GDINT are being generated.
  2270. SB_ISTERR (0x005F 6908) error interrupt status
  2271. This register is used to confirm and cancel error interrupts. When an error interrupt is generated, the corresponding bit in this register is set to "1." In addition, any of these interrupts can be cancelled (set to "0") by writing a "1" to the corresponding bit.
  2272. Example:
  2273. G2IAAINT and G1IAINT are being generated.
  2274. Cancels G2IAAINT.
  2275. Only G2IAAINT is cancelled.
  2276. In the meantime, TAINPINT has been generated as a new interrupt.
  2277. SB_IML2NRM (0x005F 6910) Level-2 normal interrupt mask control
  2278. SB_IML4NRM (0x005F 6920) Level-4 normal interrupt mask control
  2279. SB_IML6NRM (0x005F 6930) Level-6 normal interrupt mask control
  2280. These registers enable/disable (mask) normal interrupts for the SH4. When a bit is set to "1," the corresponding interrupt is generated for the SH4. This register is a read/write register. Priority is assigned to each interrupt according to their level, with level 6 being the highest priority. These registers mask interrupts without regard to the timing of the signal from the source that is generating the interrupt.
  2281.  
  2282. Example 1:
  2283. No normal interrupts are set for level 2.
  2284. Sets DTDE2INT as a level 2 interrupt.
  2285.  
  2286. Example 2:
  2287. Sets PCVOINT and PCVIINT as level 4 interrupts.
  2288. Sets PCVOINT as a level 6 interrupt.
  2289. Generates a level 6 interrupt.
  2290. Masks PCVOINT. Generates a level 4 interrupt.
  2291. Cancels the PCVOINT interrupt. The level 4 interrupt is cancelled.
  2292.  
  2293. SB_IML2EXT (0x005F 6914) Level-2 external interrupt mask control
  2294. SB_IML4EXT (0x005F 6924) Level-4 external interrupt mask control
  2295. SB_IML6EXT (0x005F 6934) Level-6 external interrupt mask control
  2296. These registers enable/disable (mask) external interrupts for the SH4. For details on how to use these interrupts, refer to the explanation for SB_IML2NRM.
  2297.  
  2298.  
  2299. SB_IML2ERR (0x005F 6918) Level-2 error interrupt mask control
  2300. SB_IML4ERR (0x005F 6928) Level-4 error interrupt mask control
  2301. SB_IML6ERR (0x005F 6938) Level-6 error interrupt mask control
  2302. These registers enable/disable (mask) error interrupts for the SH4. for details on how to use these interrupts, refer to the explanation for SB_IML2NRM.
  2303.  
  2304. SB_PDTNRM (0x005F 6940) PVR-DMA trigger select from normal interrupt
  2305. SB_PDTEXT (0x005F 6944) PVR-DMA trigger select from external interrupt
  2306. These interrupts are set when using interrupts as triggers for initiating DMA to the PVR. By setting a bit to "1," the corresponding interrupt signal can be used as a trigger for initiating DMA. These registers are read/write registers. Note that the DMA settings must have been made on the PVR side in order to actually initiate DMA.
  2307.  
  2308. Example:
  2309. Sets MVOINT as a PVR-DMA trigger.
  2310.  
  2311. SB_G2DRNRM (0x005F 6950) G2-DMA trigger select from normal interrupt
  2312. SB_G2DREX (0x005F 6954) G2-DMA trigger select from external interrupt
  2313. These interrupts are set when using interrupts as triggers for initiating DMA to a G2 device. By setting a bit to "1," the corresponding interrupt signal can be used as a trigger for initiating DMA. These registers are read/write registers. Note that the DMA settings must have been made on the G2 device side in order to actually initiate DMA.
  2314.  
  2315. Example:
  2316. Sets G1GDINT as a G2-DMA trigger.
  2317. Changes the G2-DMA trigger to G2AICINT.
  2318. G2AICINT is now the G2-DMA trigger.
  2319.  
  2320. �2.7.3
  2321. Notes Concerning Interrupts
  2322. The following SH4 values require special attention when using interrupts.
  2323.  
  2324. * BL bit (bit 28 of the SH4's SR register)
  2325. 0: Interrupts enabled
  2326. 1: Interrupts disabled
  2327.  
  2328. This bit is set to "1" when the SH4 accepts an interrupt. When a large number of interrupts are generated or interrupt processing is completed, the interrupt processing routine must set this bit back to "0."
  2329.  
  2330.  
  2331. * IMASK bit (bits 7 through 4 of the SH4's SR register)
  2332. Acceptance level setting
  2333. Interrupt levels of the level that is set or lower are masked.
  2334.  
  2335. [7654] Accepted levels
  2336. 000x NMI/6/4/2
  2337. 001x NMI/6/4
  2338. 010x NMI/6
  2339. 011x NMI
  2340. 100x NMI
  2341. : :
  2342. 111x NMI
  2343.  
  2344.  
  2345. * SH4 VBR register
  2346. Executes a JMP to the address VBR + 0600h when an interrupt is generated. (PC <= VBR + 0x0600)
  2347.  
  2348. * INTEVT (address 0xFF000028) (32-bit access r/(w))
  2349. bit11-0
  2350. Stores a value that corresponds to the level of the interrupt that was accepted when an interrupt is generated.
  2351. 0x01C0: NMI
  2352. 0x0320: level6
  2353. 0x0360: level4
  2354. 0x03A0: level2
  2355.  
  2356. Others
  2357. * ICR (address 0xFFD0 0000) (16-bit access r/w)
  2358. IRLM(bit7)
  2359. Set to "0." (initial value)
  2360.  
  2361.  
  2362.  
  2363. �3 The Graphics System
  2364.  
  2365. The Dreamcast graphics system consists of the graphics/interface chip HOLLY, which adopts the Power VR architecture, and its peripheral texture memory. The explanation below focuses primarily on HOLLY.
  2366. *There are two versions of the HOLLY chip for Dev.Box, HOLLY1, and HOLLY2, which has additional functions added onto HOLLY1. In this section, a dotted line will be used to indicate descriptions that apply to HOLLY2.
  2367.  
  2368. �3.1 Overview
  2369. �3.1.1 Graphics Architecture
  2370. �3.1.1.1 Basic Polygons
  2371. HOLLY supports three basic polygon shapes:
  2372.  
  2373. * Single Triangle polygons
  2374. * Single Quad polygons
  2375. * Stripped Triangle polygons
  2376.  
  2377. The Z, U, and V coordinate values of the fourth vertex of a Quad polygon and the Shading Color values are derived automatically from polygon surface equations that are calculated internally by the hardware. In addition, strip triangle polygons are supported for infinite strips. The sequencing and linking of each of the polygon vertices are illustrated below.
  2378.  
  2379.  
  2380.  
  2381. Fig. 3-1
  2382.  
  2383. In addition, HOLLY supports six polygon types:
  2384.  
  2385. * Non-Textured Flat Shaded
  2386. * Non-Textured Gouraud Shaded
  2387. * Textured Flat Shaded
  2388. * Textured Gouraud Shaded
  2389. * Textured Flat Shaded with Offset Color
  2390. * Textured Gouraud Shaded with Offset Color
  2391.  
  2392. Shading Color includes two data elements, "Base Color" and "Offset Color." The equation that determines the Shading Color on the basis of this data is specified by the control bit (Texture/Shading Instruction: refer to section 3.7.9.2) in the polygon parameters. Basically, the Base Color specifies the shading value for each vertex, and the Offset Color specifies the specular value for each vertex.
  2393.  
  2394. �3.1.1.2
  2395. Coordinate System
  2396. The coordinates that are specified for HOLLY are specified in terms of the screen coordinate system. An example of coordinate calculation is shown below.
  2397.  
  2398. Fig. 3-2
  2399. The coordinate values (fX, fY, fInvW) that are passed to the hardware in order to specify the coordinates of point P (x, y, z) in the above diagram are calculated as follows:
  2400.  
  2401. fInvW = (ez � sz) / (ez � z)
  2402. fX = x ? fInvW
  2403. fY = y ? fInvW
  2404.  
  2405. However, it is not necessary to multiply the UV coordinate value of the texture by fInvW.
  2406.  
  2407. �3.1.1.3 Display List
  2408. There are two HOLLY graphics blocks, one called the "Tile Accelerator (TA)," which assists in generating display lists, and one called the "CORE," which handles drawing functions. Polygon lists for drawing include the "TA parameters," which are input from the CPU to the TA, and the "CORE display list," which the CORE uses when drawing the graphics. The TA block converts the input TA parameters into the CORE display list, which is then automatically stored in the specified area in texture memory. The CORE block uses the CORE display list and texture data in texture memory to draw the polygons, and then stores the screen data in the frame buffer in texture memory.
  2409. Normally, the TA parameters are the polygon list that is prepared by the application. Strictly speaking, however, the application must also prepare a portion of the CORE display list. (Refer to section 3.7.)
  2410.  
  2411. Fig. 3-3
  2412. �3.1.1.4 Tile Partitioning and Surface Equations
  2413. HOLLY feature two graphics architectures: Tile partitioning and polygon surface equations.
  2414.  
  2415.  
  2416. Fig. 3-4 Tile Partitioning
  2417.  
  2418. With Tile partitioning, a graphics screen of up to 2048 pixels x 2048 pixels is divided into Tiles that are 32 pixels by 32 pixels. The graphics processing is then performed on these individual Tiles. When drawing a given polygon, that polygon is registered in a list, called the "Object List," which indicates in which Tiles that polygon exists. When polygons are drawn, only those polygons that are registered in the lists that correspond to each Tile are drawn. Because this processing is all performed by the hardware known as the "Tile Accelerator (TA)," applications do not need to be aware of the Tile partitions; they only need to send the vertex data for the triangle or Quad polygon to the Tile Accelerator. The hardware then solves the surface equation Ax + By + C using the coordinates for three vertices of the registered polygon and draws the pixels.
  2419.  
  2420. These two architectures offer a variety of benefits, and permit drawing through Tiles even without enough space for an entire screen in the Z buffer or the frame buffer. In addition, texturing and shading processing is only performed on those pixels within the Tile that are visible. On an actual screen, there are many pixels that are hidden by objects that are closer to the foreground, and processing speed is markedly improved by not performing texturing and shading processing on such pixels.
  2421.  
  2422. �3.1.1.5
  2423. Block Diagram
  2424. A block diagram of the CORE block, which handles graphics processing, is shown below.
  2425.  
  2426. Fig. 3-5 Block Diagram
  2427. �3.1.1.6
  2428. Triangle Setup
  2429. The Triangle Setup block consists of the ISP SETUP FPU and the TSP SETUP FPU. this block calculates the polygon surface equations and the texture and shading parameters.
  2430. The ISP SETUP FPU calculates the parameters A, B, and C for the surface equation Ax + By + C from the coordinates of three vertices based on the following adjoint matrix.
  2431.  
  2432. Solving this adjoint matrix yields the values of A, B, and C needed in order to describe the plane that passes through the three vertices that were provided. The result is:
  2433.  
  2434. which yields:
  2435.  
  2436.  
  2437. The resulting ? value can be used to perform culling processing for very small polygons.
  2438. Note: The x, y, and z values shown in the above equations are all screen coordinates, and are equivalent to (fX, fY, fInvW) shown in section 3.1.1.2.
  2439.  
  2440. The ISP SETUP FPU requires 14 clock cycles to calculate the parameters.
  2441. The TSP SETUP FPU calculates the surface equations Px + Qy + R for shading and texture, respectively. The number of parameters that are actually calculated depends on whether the calculations are being made in texture mode or shading mode.
  2442. In addition, the parameters that are produced by the TSP SETUP FPU are stored in a cache in the TSP block; the TSP SETUP FPU calculates the parameters only when a miss is generated in the cache.
  2443. The TSP SETUP FPU requires 48 to 70 clock cycles to calculate the parameters.
  2444.  
  2445. �3.1.1.7
  2446. ISP(Image Synthesis Processor)
  2447. The ISP performs on-chip depth sorting for triangles without requiring an external Z buffer. The ISP works on 32 x 32 Tiles, and performs its processing in a number of clock cycles equivalent to the number of lines in one triangle. All 1024 screen pixels located in a Tile are processed in parallel.
  2448. The processed pixels are sent to the Span RLC, which executes Run Length Encoding on 32 pixels in parallel in each clock cycle and sends the result to the Span Sorter. This approach maximizes the data transfer speed between the ISP and the TSP, and lessens the demand for buffering between these two modules.
  2449. An overview of the Span RLC is shown below.
  2450.  
  2451.  
  2452. Fig. 3-6 Overview of the Span RLC
  2453.  
  2454. The Span Sorter regroups the run length encoded spans from the ISP in the triangle sequence. Therefore, data for the triangles is supplied to the TSP at one time.
  2455. Span sorting offers the following benefits:
  2456. * Minimizes caching requirements for the TSP parameters.
  2457. * Provides the benefits of the Tile-based method (in terms of speed, cost, minimum bandwidth, and no Z buffer).
  2458. * Provides additional benefits beyond conventional methods. (Consistency with the Z buffer texture map)
  2459.  
  2460. �3.1.1.8 TSP(Texture and Shading Processor)
  2461. The TSP performs texture and shading processing, and draws in the Tile accumulation buffer. Once all Tiles have been drawn, the TSP writes the contents of the accumulation buffer to texture memory. The TSP has a local cache for parameters that have been calculated, which is used to minimize the recalculation of parameters by taking advantage of consistencies between visible polygons.
  2462. There is a 64 ? 64-bit texture cache for normal texels or the VQ texture code book, and a 64 ? 64-bit texture cache for VQ texture indices, for a total of 128 ? 64 bits.
  2463. The TSP performs perspective compensation for all texture and shading elements, U, V, Alpha, R, G, B, and Fog.
  2464.  
  2465. �3.1.1.9
  2466. Polygon List
  2467. HOLLY utilizes the following five lists:
  2468.  
  2469. (1) Opaque: Opaque polygon list
  2470. (2) Punch Through: Punch Through polygon list
  2471. (3) Opaque Modifier Volume: Opaque polygon and Punch Through Polygon
  2472. Modifier
  2473. (4) Translucent: Translucent polygon list
  2474. (5) Translucent Modifier Volume: Translucent Polygon Modifier Volume list
  2475.  
  2476. The Opaque list is for a non-textured polygon with no alpha blending, or for a textured polygon with no alpha blending in which all of the texels are opaque (with an alpha value of 1.0 only). The Punch Through is for a textured polygon with no alpha blending in which all of the texels are transparent or opaque (with an alpha value of 0.0 or 1.0 only). The Translucent List is for textured and non-textured polygons with alpha blending, or for a textured polygon with no alpha blending in which the texels are translucent (with an alpha value ranging from 0.0 to 1.0). In addition, Modifier Volume lists are for polygons that are used to distinguish different areas in order to give an object a three-dimensional feel through shadows, etc. There are two types of Modifier Volumes, one for Opaque and Punch Through polygons and one for Translucent polygons. (Refer to Section 3.4.3.)
  2477. These lists are drawn in order, starting from (1), for each Tile. When drawing Opaque polygons, the ISP processes the number of Opaque polygons that exist in the Tile in question, and then the TSP performs texturing and shading processing on those pixels that are visible. When drawing Punch Through polygons, the ISP sorts the polygons that exist in the Tile in question, starting form the front, and then the TSP performs texturing and shading processing on those pixels that are visible. This processing by the ISP and the TSP continues until all of the pixels in the Tile have been drawn. Furthermore, when drawing translucent polygons, the ISP draws the product of the number of translucent polygons that exist in the Tile in question multiplied by the number of overlapping polygons (when in Auto Sort mode), and then the TSP performs texturing and shading processing on all pixels in the translucent polygons. Therefore, it is important to be aware that drawing translucent polygons can require much more processing time than drawing Opaque polygons.
  2478. It is also necessary to note that this also applies to Opaque Modifier Volumes and Translucent Modifier Volumes.
  2479.  
  2480. �3.1.2
  2481. Drawing Function Overview
  2482. HOLLY has many drawing functions; some typical functions are listed below.
  2483.  
  2484. * On-chip deletion of hidden surfaces with 32-bit precision (Z buffer not needed)
  2485. * Reduction of memory size for display image data (strip buffer mode)
  2486. * Support for infinite strip Triangle polygons
  2487. * Generation of display lists for drawing individual Tiles through hardware (Tile Accelerator)
  2488. * Punch Through polygon drawing processing
  2489. * Texture rings with perspective compensation
  2490. * True color Gouraud shading with perspective compensation
  2491. * Translucent display with perspective compensation
  2492. * Support for full D3D source and destination blending
  2493. * Translucent polygon auto sort through hardware
  2494. * Shadow and satellite generation (Modifier Volume)
  2495. * Texture and Shading Color switching in special areas (Modifier Volume)
  2496. * Fog (indices, lines, vertices)
  2497. * Clipping of Tile units and pixel units
  2498. * Rendering to a texture map
  2499. * Dithering
  2500. * Full-screen scaling and filtering
  2501. * Flicker-free interlacing
  2502. * Support for bi-linear and tri-linear filtering
  2503. * 4x texture super sampling
  2504. * Texture sizes ranging from 8 ? 8 to 1024 ? 1024
  2505. * Mip-map textures
  2506. * Support for rectangular textures
  2507. * Texture UV flipping and clamping
  2508. * Approximately 1/8 texture compression using vector quantization (VQ textures)
  2509. * Support for 4BPP and 8BPP palette textures (1024-color palette RAM on chip)
  2510. * Support for YUV422 textures (includes YUV420 ? YUV422 data converter)
  2511. * Support for Bump Mapping
  2512.  
  2513. �3.1.3
  2514. Display Function Overview
  2515. The video display modes that are supported by this system are listed below.
  2516.  
  2517. Display mode Resolution (pixels) Interlace mode NTSC_320�240NI 320�240 Non-interlaced NTSC_320�240I 320�240 Single interlaced NTSC_640�240NI 640�240 Non-interlaced NTSC_640�240I 640�240 Single interlaced NTSC_640�480 640�480 Double interlaced PAL_320�240NI 320�240 Non-interlaced PAL_320�240I 320�240 Single interlaced PAL_640�240NI 640�240 Non-interlaced PAL_640�240I 640�240 Single interlaced PAL_640�480 640�480 Double interlaced VGA 640�480 Non-interlaced Note:
  2518. Single interlaced: The same image is displayed in odd and even fields (480 display lines).
  2519. Double interlaced: Separate images are displayed in odd and even fields.
  2520.  
  2521. Table 3-1 Display Mode List
  2522.  
  2523. �3.2 Memory Map
  2524. �3.3
  2525. Register Map
  2526. The HOLLY register map is listed below.
  2527.  
  2528. Address Name R/W Description 0x005F 8000 ID R Device ID 0x005F 8004 REVISION R Revision number 0x005F 8008 SOFTRESET RW CORE & TA software reset 0x005F 8014 STARTRENDER RW Drawing start 0x005F 8018 TEST_SELECT RW Test (writing this register is prohibited) 0x005F 8020 PARAM_BASE RW Base address for ISP parameters 0x005F 802C REGION_BASE RW Base address for Region Array 0x005F 8030 SPAN_SORT_CFG RW Span Sorter control 0x005F 8040 VO_BORDER_COL RW Border area color 0x005F 8044 FB_R_CTRL RW Frame buffer read control 0x005F 8048 FB_W_CTRL RW Frame buffer write control 0x005F 804C FB_W_LINESTRIDE RW Frame buffer line stride 0x005F 8050 FB_R_SOF1 RW Read start address for field - 1/strip - 1 0x005F 8054 FB_R_SOF2 RW Read start address for field - 2/strip - 2 0x005F 805C FB_R_SIZE RW Frame buffer XY size 0x005F 8060 FB_W_SOF1 RW Write start address for field - 1/strip - 1 0x005F 8064 FB_W_SOF2 RW Write start address for field - 2/strip - 2 0x005F 8068 FB_X_CLIP RW Pixel clip X coordinate 0x005F 806C FB_Y_CLIP RW Pixel clip Y coordinate 0x005F 8074 FPU_SHAD_SCALE RW Intensity Volume mode 0x005F 8078 FPU_CULL_VAL RW Comparison value for culling 0x005F 807C FPU_PARAM_CFG RW Parameter read control 0x005F 8080 HALF_OFFSET RW Pixel sampling control 0x005F 8084 FPU_PERP_VAL RW Comparison value for perpendicular polygons 0x005F 8088 ISP_BACKGND_D RW Background surface depth 0x005F 808C ISP_BACKGND_T RW Background surface tag 0x005F 8098 ISP_FEED_CFG RW Translucent polygon sort mode 0x005F 80A0 SDRAM_REFRESH RW Texture memory refresh counter 0x005F 80A4 SDRAM_ARB_CFG RW Texture memory arbiter control 0x005F 80A8 SDRAM_CFG RW Texture memory control 0x005F 80B0 FOG_COL_RAM RW Color for Look Up table Fog 0x005F 80B4 FOG_COL_VERT RW Color for vertex Fog 0x005F 80B8 FOG_DENSITY RW Fog scale value 0x005F 80BC FOG_CLAMP_MAX RW Color clamping maximum value 0x005F 80C0 FOG_CLAMP_MIN RW Color clamping minimum value Note: RW: read/write; R: read only; W: write only
  2529.  
  2530.  
  2531. Address Name R/W Description 0x005F 80C4 SPG_TRIGGER_POS RW External trigger signal HV counter value 0x005F 80C8 SPG_HBLANK_INT RW H-blank interrupt control 0x005F 80CC SPG_VBLANK_INT RW V-blank interrupt control 0x005F 80D0 SPG_CONTROL RW Sync pulse generator control 0x005F 80D4 SPG_HBLANK RW H-blank control 0x005F 80D8 SPG_LOAD RW HV counter load value 0x005F 80DC SPG_VBLANK RW V-blank control 0x005F 80E0 SPG_WIDTH RW Sync width control 0x005F 80E4 TEXT_CONTROL RW Texturing control 0x005F 80E8 VO_CONTROL RW Video output control 0x005F 80Ec VO_STARTX RW Video output start X position 0x005F 80F0 VO_STARTY RW Video output start Y position 0x005F 80F4 SCALER_CTL RW X & Y scaler control 0x005F 8108 PAL_RAM_CTRL RW Palette RAM control 0x005F 810C SPG_STATUS R Sync pulse generator status 0x005F 8110 FB_BURSTCTRL RW Frame buffer burst control 0x005F 8114 FB_C_SOF R Current frame buffer start address 0x005F 8118 Y_COEFF RW Y scaling coefficient 0x005F 811C PT_ALPHA_REF RW Alpha value for Punch Through polygon comparison 0x005F 8124 TA_OL_BASE RW Object list write start address 0x005F 8128 TA_ISP_BASE RW ISP/TSP Parameter write start address 0x005F 812C TA_OL_LIMIT RW Start address of next Object Pointer Block 0x005F 8130 TA_ISP_LIMIT RW Current ISP/TSP Parameter write address 0x005F 8134 TA_NEXT_OPB R Global Tile clip control 0x005F 8138 TA_ITP_CURRENT R Current ISP/TSP Parameter write address 0x005F 813C TA_GLOB_TILE_CLIP RW Global Tile clip control 0x005F 8140 TA_ALLOC_CTRL RW Object list control 0x005F 8144 TA_LIST_INIT RW TA initialization 0x005F 8148 TA_YUV_TEX_BASE RW YUV422 texture write start address 0x005F 814C TA_YUV_TEX_CTRL RW YUV converter control 0x005F 8150 TA_YUV_TEX_CNT R YUV converter macro block counter value 0x005F 8160 TA_LIST_CONT RW TA continuation processing 0x005F 8164 TA_NEXT_OPB_INIT RW Additional OPB starting address 0x005F 8200- 0x005F 83FC FOG_TABLE RW Look-up table Fog data 0x005F 8600- 0x005F 8F5C TA_OL_POINTERS R TA object List Pointer data 0x005F 9000- 0x005F 9FFC PALETTE_RAM RW Palette RAM Note: RW: read/write; R: read only; W: write only
  2532. Table 3-2 Register Map
  2533. �3.4
  2534. Drawing Function Details
  2535. �3.4.1 Background
  2536. In areas where nothing is drawn by the CORE display list, the background is drawn according to separately specified ISP/TSP Parameters. The background ISP/TSP Parameters are normally stored directly in texture memory without passing through the TA, and the address is specified in the ISP_BACKGND_T register. In addition, the depth value is specified in the ISP_BACKGND_D register.
  2537.  
  2538. Fig. 3-7
  2539. Normally, the CORE display list is stored in two parts, one for writing texture memory from the TA, and one for reading texture memory from the CORE. (double buffer processing) Similarly, the background ISP/TSP Parameters also are stored beforehand in two buffer areas in texture memory, with the most efficient approach being to specify through the ISP_BACKGND_T register the background ISP/TSP Parameters that are stored in the CORE display list that is used for drawing.
  2540.  
  2541.  
  2542. �3.4.2
  2543. Translucent Polygon Sort
  2544. There are two polygon sort modes for drawing translucent polygons: "Auto-sort mode" and "Pre-sort mode." The sort mode specification method differs according to the HOLLY version. In HOLLY1, either sort mode can be specified for individual screens according to the setting in the ISP_FEED_CFG register. In Sort mode, the specification differs according to the Region Array data type. For Region Array data type 1 (when bit 21 in the FPU_PARAM_CFG register is "0"), the "pre-sort mode" is specified for individual screens in the ISP_FEED_CFG register. For Region Array data type 2 (when bit 21 in the FPU_PARAM_CFG register is "1"), "pre sort" is specified for individual Tiles in the Region Array data.
  2545.  
  2546. �3.4.2.1 Auto-sort Mode
  2547. In auto-sort mode, the hardware automatically sorts polygons as individual pixels, and draws the pixels starting from the farthest Z value, regardless of the order in which the polygons were input to the TA (registered in the display list). Therefore, ? blending is performed properly even in a case where two translucent polygons intersect. However, because the polygons are sorted as individual pixels, sort processing must be performed for [the number of registered polygons] ? [the number of overlapping pixels], with the result that a large amount of processing time is required when a large number of translucent polygons overlap.
  2548.  
  2549.  
  2550. Fig. 38
  2551.  
  2552. Sprites (textured polygons that use transparent texels) must be drawn with translucent polygons, even if no ? blending is performed. Auto-sort mode is not recommended for use with Spites in 2D software that uses a lot of Spites because 3D sorting is not required, and because polygons may overlap much more frequently than might be initially expected.
  2553. Furthermore, in auto-sort mode "Depth Compare Mode," specified in the ISP/TSP Instruction Word, is disabled; Z values are always compared on the basis of "greater or equal." When two pixels have the same Z value, the polygon that was input to the TA first is drawn the farthest away.
  2554.  
  2555. �3.4.2.2
  2556. Pre-sort Mode
  2557. In pre-sort mode, polygons are drawn in the order in which they were input to the TA, as with a normal Z buffer system.
  2558. Because processing is only performed for the number of polygons registered, this mode requires less processing time than auto sort mode. However, because it is essential to sort the polygons before inputting the polygon data to the TA, this mode does increase the CPU's work load. Furthermore, alpha blending is not performed correctly when two polygons intersect.
  2559.  
  2560.  
  2561. Fig. 39
  2562. In addition, Translucent Modifier Volumes cannot be used in this mode.
  2563.  
  2564. �3.4.3 Punch Through Polygons
  2565. In drawing Punch Through polygons with the Holly2, the hardware automatically sorts the polygon at the pixel level, and draws the pixels in order according to their Z value, starting from the front, regardless of the order in which they were input to the TA (registered in the display list). When drawing, the hardware reads the texture data and draws only the pixels for which (texel alpha value) >= (PT_ALPHA_REF register value), and processing continues until all pixels within the Tile have been drawn. Normally, "0xFF (=1.0)" should be specified for the PT_ALPHA_REF register value. Pixels are drawn with an alpha value of 1.0. (Translucent processing is not performed.)
  2566. Depth Compare Mode specified in the ISP/TSP Instruction Word is invalid, and Z values are always compared on a "Greater or Equal" basis. When the Z values of two pixels are identical, the one belonging to the polygon that was input to the TA first is drawn behind the other.
  2567.  
  2568. �3.4.3.1 ISP Cache Size
  2569. Drawing processing in the Punch Through polygon ISP is performed in units of polygon groups with a number of vertices (ISP cache size) specified by "Punch Through chunk size" in the ISP_FEED_CFG register.
  2570. (1) The Punch Through polygon data for the number of vertices specified in the register is stored in the ISP cache.
  2571. (2) While automatically sorting the polygons in the ISP cache, the hardware begins drawing the pixels, starting from the front.
  2572. (3) The processing in step 2 is repeated until all polygons in the ISP cache have been processed.
  2573. (4) If there are more polygons registered in the Tile than the number of vertices specified, steps 1 through 3 are repeated until the registered polygons are all processed.
  2574.  
  2575. Normally, 0x040 to 0x080 (0x040 is recommended) is specified for the ISP cache size for Punch Through polygon processing. However, when many of a polygon's transparent texels (alpha value = 0.0) are overlapping, specifying a large ISP cache size may result in a worsened drawing processing efficiency; if this happens, adjust the ISP cache size to a more suitable level.
  2576. However, the ISP cache size for Punch Through polygons must be the no larger than the ISP cache size for Translucent polygons. ([Punch Through chunk size] ? [Cache size for translucency])
  2577.  
  2578. �3.4.3.2 Relationship with Translucent Polygons
  2579. Punch Through polygons are drawn in the same manner if they are registered as Translucent polygons, but normally drawing a polygon as a Punch Through polygon requires much less time than drawing the same polygon as a Translucent polygon. However, if bi-linear filtering is performed in a Punch Through polygon, some opaque texels might not be drawn, depending on the texel sampling position. This is because, in Punch Through polygons, only those pixels with an alpha value (after texture filtering) that is equal to or greater than the value in the PT_ALPHA_REF register (normally 10) are drawn. (Refer to section 3.4.7.2.2.)
  2580. When a Translucent polygon that is completely identical to a Punch Through polygon has been registered, those pixels with an alpha value of ten are drawn only through the Punch Through polygon; when the Translucent polygon is drawn, those pixels are judged to have already been drawn and are not drawn again. This feature can be used to improve the problem of the disappearance of opaque pixels when using bilinear filtering with Punch Through polygons, without extending the translucent polygon processing time very much.
  2581.  
  2582.  
  2583. Fig. 310
  2584.  
  2585. �3.4.4 Processing List Discarding
  2586. Because the HOLLY2 hardware automatically draws Punch Through polygons and Translucent polygons (in Auto sort mode) as individual pixels while sorting the polygons at the same time, it is not necessary for the CPU to sort the polygons before inputting them to the TA. However, due to the sort processing, the hardware has to process each registered polygon a number of times. In effect, the hardware is drawing a number of polygons equal to [number of registered polygons] x [number of overlaps].
  2587. In order to reduce the amount of such processing in Auto Sort mode, the HOLLY2 hardware is capable of performing processing called "discarding," in which polygons that have been completely drawn are removed ("discarded") from the processing list. This processing is specified through "Discard Mode" in the ISP_FEED_CFG register.
  2588.  
  2589.  
  2590. Fig. 311
  2591.  
  2592. In Punch Through polygon drawing processing, the Z value results of previously drawn Opaque polygons are referenced. Furthermore, in Translucent polygon drawing processing, the Z value results of Opaque polygons and Punch Through polygons are referenced. For example, a Punch Through polygon and a Translucent polygon that are fully hidden behind an Opaque polygon are both discarded in layer 1 processing, so they are only processed once.
  2593. Therefore, when creating model data in which many Punch Through polygons and Translucent polygons overlap, the drawing time can be reduced by inserting Opaque polygons between them.
  2594.  
  2595. �3.4.5
  2596. Modifier Volume
  2597. A Modifier Volume is polygon data that is used to define an area for adding shadows and otherwise generate a 3D fell for normal polygons; the Modifier Volume is not actually drawn on the screen. There are two areas on the screen as a whole that are defined ("area 0" and "area 1"), and the texture and Shading Color for each area can be changed through the Modifier Volume. This function can therefore be used to create a variety of effects, such as shadows, spotlights, or window masking.
  2598.  
  2599. Fig. 3-12
  2600. There are two types of Modifier Volumes: "opaque Modifier Volumes," which are effective only for Opaque polygons and Punch Through polygons; and "translucent Modifier Volumes," which are effective only for translucent polygons. Although there is no limit on the number of either type of Volume models that may be registered in lists, the maximum number of areas that can be defined is two.
  2601.  
  2602. Fig. 3-13
  2603.  
  2604.  
  2605. Volume models can be either a protruding shape or a recessed shape, as long as it is a closed shape; otherwise, the three-dimensional area definition will not be performed correctly. However, if planar area definition is sufficient, the Volume model does not need to be a three-dimensional object and does not need to be closed. In this case, the area of the Volume polygon that is deemed to be in front of the normal polygon is designated as "area 1." In addition, it is necessary to make a distinction between and specify the final polygon that forms a Volume model as opposed to the other polygons. (Refer to section 3.7.4.4.3.) If this specification is not made, area definition will not be performed properly.
  2606.  
  2607. �3.4.5.1 Inclusion and Exclusion Volumes
  2608. There are two types of Modifier Volumes: inclusion volumes and exclusion volumes. An inclusion volume makes the polygon surface that is inside the volume "area 1," while an exclusion volume makes the polygon surface that is inside the volume "area 0." Prior to area determination by volume, all polygon surfaces are "area 0". Therefore, and exclusion volume is used to make "area 0" inside of an "area 1" that was created by an inclusion volume.
  2609. CORE has one flag bit per pixel in order to maintain the area status of each individual pixel. When processing multiple volumes, area definition by a volume is performed for one model at a time, and the final area is determined by performing Boolean operations on each result versus the cumulative result of the Boolean operations performed for that pixel up to that point. The flag value defined by a volume is a "1" if that pixel is inside the volume, and a "0" if that pixel is outside the volume. If the final flag value is a "0," that pixel is in area 0; if the final flag value is a "1," that pixel is in area 1. Note that the initial flag value is "0."
  2610. The Boolean operations that are performed on the flag bits for inclusion volumes and exclusion volumes are as follows:
  2611.  
  2612. For an inclusion volume:
  2613. (New flag value) = (current flag value)|(result indicated by the volume)
  2614.  
  2615. For an exclusion volume:
  2616. (New flag value) = (current flag value)&(result indicated by the volume)
  2617.  
  2618. The inclusion volume and exclusion volume specifications are made in the volume instruction in the ISP/TSP Instruction Word. (Refer to section 3.7.9.1.)
  2619.  
  2620. �3.4.5.2 Volume Modes
  2621. There are two modes for processing that is performed on the area defined as area 1: "parameter selection volume mode" and "intensity volume mode." Processing performed on area 0 is the same as processing that is performed on a normal object. These modes are specified through the FPU_SHAD_SCALE register, and can be selected for an entire screen only.
  2622. In addition, it is possible to specify for each object whether processing is to be performed on area 1 or not. This specification is made in the Parameter Control Word for the display list that is input to the TA. (Refer to section 3.7.4.4.3.)
  2623.  
  2624.  
  2625. Parameter Selection Volume Mode
  2626. In this mode, there are two sets of ISP/TSP Parameters for one object, and the parameters that are used switch for each area that is defined. When using this mode, it is necessary to input to the TA the object data which enables the Modifier Volume with the specification "with Two Volume format." Parameter 0 that is input to the TA is used for area 0, and parameter 1 is used for area 1.
  2627. In this mode, everything that can be specified in the ISP/TSP Parameters, including textures and UV coordinates, can be changed between the two areas. This mode makes possible effects such as "spotlight (changing the Shading Color)," which brightens the area, or "window masking (changing the texture map)," which makes only the area translucent. However, one shortcoming of this mode is that the amount of data in the display list is large, because two sets of ISP/TSP Parameters must be stored.
  2628.  
  2629. Intensity Volume Mode
  2630. This mode is used to represent simple shadows with only one set of ISP/TSP Parameters. The parameters that are used for both areas are basically the same, but for area 1 the Base Color and Offset Color are multiplied by the 8-bit value that is specified in the FPU_SHAD_SCALE register.
  2631. This mode cannot be used correctly with Bump mapped polygons because the K1K2K3Q data changes.
  2632. Because the 8-bit data that is multiplied with the Shading Color data is set in a register, it is only possible to represent shadows with just one level of darkness on the screen, but if only simple shadows are needed, this mode permits them to be represented without increasing the amount of data in the display list.
  2633.  
  2634. �3.4.5.3 Modifier Volume Processing for Various Polygons
  2635. An Opaque Modifier Volume list is used for Modifier Volumes for Opaque polygons.
  2636. In HOLLY2, Modifier Volume processing on Opaque polygons is performed together with Modifier Volume processing on Punch Through polygons.
  2637. An Opaque Modifier Volume list is used for Modifier Volumes for Punch Through polygons. The Punch Through polygon processing is first performed for "area 0," and then only those pixels that form "area 1" due to the Modifier Volume are drawn again. Therefore, if the texture data and UV coordinate values that are used for parameter 0 and parameter 1 in Parameter Selection Volume mode differ, inconsistencies such as a pixel that was opaque in area 0 being transparent in area 1 can arise, resulting in not being able to draw the polygons correctly. Also, graphics cannot be correctly drawn even if parameters 0 and 1 have different Base Color alpha values.
  2638. Therefore, for Punch Through polygons, it is normally possible to change only the base color and offset color RGB values in parameter 0 and parameter 1.
  2639. The processing time for an Opaque Modifier Volume is simply equivalent to the drawing time for that number of polygons.
  2640. A Translucent Modifier Volume list is used for Modifier Volumes for Translucent polygons. Because only Auto-sort mode is supported, Modifier Volume processing is performed for each layer while sorting the polygons, starting from the back. Therefore, because each Translucent polygon is processed once for each layer that they overlap, a great deal more processing time is required in comparison with an Opaque Modifier Volume.
  2641.  
  2642. �3.4.6
  2643. Flow of Texture Mapping and Shading Processing
  2644. The following diagram illustrates the flow of texture mapping and shading. Color clamp processing is performed Fog processing, and ? blend processing is performed after Fog processing.
  2645. The pixel data that is drawn in units of Tiles is ultimately stored in the primary accumulation buffer, and from there it is transferred to the frame buffer in texture memory.
  2646.  
  2647.  
  2648.  
  2649.  
  2650. Fig.3-14
  2651.  
  2652. �3.4.6.1
  2653. Secondary Accumulation Buffer
  2654. Normally, drawing pixel data for individual Tiles is drawn in a buffer called the "Primary Accumulation Buffer." Another buffer, called the "Secondary Accumulation Buffer," is provided in order to permit the treatment of the result of overlapping multiple polygons as a single polygon.
  2655. The Secondary Accumulation Buffer is typically used for the following:
  2656.  
  2657. * Translucent polygons that have been subjected to trilinear filtering
  2658. * Translucent polygons that are Bump Mapped + Textured polygons
  2659. All that is necessary in order to be able to draw in the Secondary Accumulation Buffer is to set the DST Select bit (bit 24) in the TSP Instruction Word to "1". To use the results of the draw in the Secondary Accumulation Buffer as texture data, use a polygon that was drawn by drawing the data in the Secondary Accumulation Buffer to the Primary Accumulation Buffer (the Flush polygon), and set the SRC Select bit (bit 25) in the TSP Instruction Word to "1".
  2660. The pixel data that is stored when drawing to the Secondary Accumulation Buffer is ARGB 32-bit data of the same type that is normally drawn and stored in the Primary Accumulation Buffer. When drawing the result of alpha blending processing in the Secondary Accumulation Buffer to the Primary Accumulation Buffer as a Translucent polygon, it is essential to note that the pixel alpha values for the polygon in the Secondary Accumulation Buffer are used, so it is not possible to use the alpha value in the Base Color of the Flush polygon for control.
  2661. The Flush polygon is a polygon that is used to extract a shape specified by pixel data that was previously stored in the Secondary Accumulation Buffer and then draw that shape in the Primary Accumulation Buffer (Cut & Paste). It is necessary to once draw to the Secondary Accumulation Buffer for the pixel coordinates that are to be cut. The pixel data in the Secondary Accumulation Buffer is used as is, and texture mapping and shading processing (including Base Color, Offset Color, texture, and Texture/Shading Instructions) are ignored. Therefore, use normal Non-textured polygons for Flush polygons.
  2662. �3.4.7
  2663. Texture Mapping
  2664. �3.4.7.1 MIPMAP
  2665. When a polygon on which a texture has been mapped moves in the Z direction, the size of the polygon that is displayed changes. In this case, if the same texture is used, the appearance of the texture becomes distorted as it changes in conjunction with the movement of the polygon, and even flickering can occur in a texture that has been applied to a small polygon.
  2666. The solution for this type of case is to prepare textures of different sizes beforehand, and then perform processing that switches among these textures in accordance with the size of the polygon on which they are displayed. This processing is called "MIPMAP" processing. ("MIP" stands for the Latin phrase "Multim Im Parvo," or "many in a small space.") MIPMAP textures are prepared as square textures ranging in size from 1 x 1 to a specified size.
  2667.  
  2668. Fig. 3-15
  2669. The selection of a MIPMAP texture that accords with the displayed size of the polygon is performed according to a value, named "D," that is calculated by the CORE. For example, a texture of the specified size is used when 0.0 < D < 2.0, and the next smaller sized texture is used when 2.0?D < 3.0.
  2670. The precision of the calculation of D (that is, the equation that is used) can be selected from among two types through "Dcalc Ctrl" in the ISP/TSP Instruction Word. Each of the equations is shown below. Note that "a," "b," "c," "d," "e," "f," "p," "q," and "r" are texture mapping coefficients, "X" and "Y" are screen coefficients, and "X'" and "Y'" are the screen coefficients of the first vertex.
  2671.  
  2672. The equations that are used when "Dcalc Ctrl = 1" offer greater precision for small polygons, but consume much more computing (drawing) time. Note also that the D value that is calculated by these equations can be adjusted through "MIP-MAP D adjust" in the TSP Instruction Word.
  2673. �3.4.7.2 Texture Filtering
  2674. There are three filtering modes (listed below) for texture mapping. The mode is specified through "Filter Mode" in the TSP Instruction Word.
  2675.  
  2676. * Point sampling
  2677. * Bi-linear filtering
  2678. * Tri-linear filtering
  2679.  
  2680. The polygon sampling position (x, y) that is used when calculating texture coordinates (u, v) can be selected through the HALF_OFFSET register as either (0, 0) or (0.5, 0.5). Normally, (0.5, 0.5) is selected.
  2681. In addition, there is a function available, called "texture super-sampling," that enlarges the texture sampling point per pixel by a factor of four (by doubling the size in both the horizontal and vertical directions), thus increasing the image quality when the texture is compressed.
  2682.  
  2683. �3.4.7.2.1 Point Sampling
  2684. Point sampling uses the data from the texture coordinates (u, v) that were derived from the sampling point (x, y) as texture data for the drawing pixel.
  2685. Although this mode entails the least processing load of the different types of texture mapping processing, the quality of the image deteriorates if it is enlarged or compressed.
  2686.  
  2687.  
  2688.  
  2689. Fig. 3-16
  2690.  
  2691. �3.4.7.2.2
  2692. Bi-linear Filtering
  2693. Bi-linear filtering takes the weighted average of the data from the texture coordinates (u, v) that were derived from the sampling point (x, y) and the data from three adjacent texels (for a total of four texels), and uses the result as texture data for the drawing pixel.
  2694. Because the weighted average is taken from data for four texels, the quality of the image when expanded or compressed is superior to that produced by point sampling (although in some cases the image may appear to be out of focus). The processing time is practically the same as compared to point sampling when working with Twiddled-format textures, but when working with Non-Twiddled format textures, processing time can double in a worst-case instance.
  2695.  
  2696.  
  2697. Fig. 3-17
  2698.  
  2699. Because data for four texels is used for bilinear filtering, in a case where the texture coordinates calculated from the sampling point lie on the edge of the texture map, then the adjacent texels (those that lie on opposite edges of the texture map) are used, which may result in an unexpected pixel color. (This problem can be avoided by using the Texture UV clamp function.) It is important to note that this problem also occurs when using an extracted portion of a larger texture map.
  2700.  
  2701.  
  2702. Fig. 318
  2703.  
  2704. When bilinear filtering has been performed on a texture that contains transparent texels, the transparent texel data (both alpha values and color values) is also used in calculating the weighted average of the four texels, with the result being used for the alpha value of the drawing pixel.
  2705. The translucent polygon has been drawn by alpha value of calculating result, but note that it may have an influence on transparent texel color data at boundaries between transparent and opaque pixels.
  2706.  
  2707. In the case of Punch Through polygons in the HOLLY2, pixels are drawn only if their calculated alpha value is 1.0 (in other words, when the alpha value of all four texels is 1.0).
  2708. When drawing a polygon using a Punch through texture (a texture in which the alpha values are only 0.0 or 1.0), the drawing results at boundaries between transparent and opaque pixels differ, depending on whether the polygon is registered as a Punch Through polygon or a Translucent polygon. Although the boundary is neater in the case of a Translucent polygon, much more time is required to draw a Translucent polygon as opposed to a Punch Through polygon.
  2709.  
  2710.  
  2711. Fig. 3-19
  2712.  
  2713.  
  2714.  
  2715. �3.4.7.2.3
  2716. Tri-linear Filtering
  2717. When using one texture map, it is possible to improve the quality of the image by using bi-linear filtering instead of point sampling. In addition, MIPMAP processing is used in order to improve the quality of the image when the compression factor is large (i.e., the image has moved away along the Z axis). However, even if bi-linear filtering is used in conjunction with MIPMAP processing, it is possible to clearly see the switchovers between MIPMAP textures of different sizes. Tri-linear filtering takes the weighted average of the results produced by bi-linear filtering of MIPMAP textures of two different sizes, and uses the result as texture data for the drawing pixel.
  2718. Because the weighted average is taken from data for eight texels in all, this approach offers the best quality in enlarged and compressed images, and the switchovers between MIPMAP textures appear smooth. However, because this method requires the most processing time, it is not recommended for use with all polygons.
  2719.  
  2720. Fig. 3-20
  2721. As in the case of tri-linear filtering, it is important to note that unexpected pixel colors might be drawn, depending on the texture coordinates that are calculated. The same also applies to textures that include transparent texels.
  2722. When drawing a polygon with tri-linear filtering, the processing is performed twice for an Opaque polygon and three times for a translucent polygon. In other words, polygon parameters for two identically shaped polygons are required for an Opaque polygon, and polygon parameters for three identically shaped polygons are required for a translucent polygon.
  2723. ?Opaque Polygons?
  2724. Drawing an Opaque polygon with tri-linear filtering is performed by performing the following two polygon processes:
  2725. (1) Draw the polygon with "Tri-linear Pass A" specified for the Filter mode. In this case, the Blend Function should be DST := SRC x "1" + DST ? "0" (SRC Alpha Instruction = �1�, DST Alpha Instruction = �0�), and draw the polygon in the Primary Accumulation Buffer (SRC & DST select = "0").
  2726. The polygon is drawn with color data (as the SRC) produced by multiplying [1 - decimal portion of D] by the data produced through bi-linear filtering of the
  2727. MIPMAP texture with the higher resolution.
  2728. (2) Draw the polygon with "Tri-linear Pass B" specified for the Filter Mode. In this case, the Blend Function should be DST := SRC x "1" + DST ? "1" (SRC Alpha Instruction = �1�, DST Alpha Instruction = �0�), and draw the polygon in the Primary Accumulation Buffer (SRC & DST Alpha Instruction = "1").
  2729. The polygon is drawn with color data (as the SRC) produced by multiplying [decimal portion of D] by the data produced through bi-linear filtering of the MIPMAP texture with the lower resolution.
  2730. However, although the polygon for which "Pass A" was specified may be registered in an Opaque List, the polygon for which "Pass B" was specified must be registered in a translucent list.
  2731.  
  2732. ?Translucent Polygons?
  2733. A translucent polygon with tri-linear filtering is drawn by performing the following three polygon processes:
  2734. (1) Draw the polygon with "Tri-linear Pass A" specified for the Filter Mode. In this case, the Blend Function should be DST := SRC x "1" + DST ? "0" (SRC Alpha Instruction = �1�, DST Alpha Instruction = �0�), and draw the polygon in the Secondary Accumulation Buffer (SRC select = "0", DST select = "1").
  2735. The polygon is drawn with color data (as the SRC) produced by multiplying [1 - decimal portion of D] by the data produced through bi-linear filtering of the MIPMAP texture with the higher resolution. At this point, [1 - decimal portion of D] is calculated for the pixel alpha values and stored in the Secondary Accumulation Buffer. Normally, it is sufficient to specify the alpha value of the final polygon for the alpha value of the Base Color.
  2736. (2) Draw the polygon with "Tri-linear Pass B" specified for the Filter Mode. In this case, the Blend Function should be DST := SRC x "1" + DST ? "1" (SRC Alpha Instruction = �1�, DST Alpha Instruction = �0�), and draw the polygon in the Secondary Accumulation Buffer (SRC select = "0", DST select = "1").
  2737. The polygon is drawn with color data (as the SRC) produced by multiplying [decimal portion of D] by the data produced through bi-linear filtering of the MIPMAP texture with the lower resolution. At this point, [1 - decimal portion of D] is calculated for the pixel alpha values and stored in the Secondary Accumulation Buffer. Normally, it is sufficient to specify the alpha value of the final polygon for the alpha value of the Base Color.
  2738. (3) Using the data that was produced by tri-linear filtering in the Secondary Accumulation Buffer as the SRC, draw the polygon in the Primary Accumulation Buffer (SRC select = "1", DST select = "0"). The Blend Function (SRC/DST Alpha Instruction) may be specified as desired in this case. Normally, DST := SRC ? "SRC Alpha" + DST ? "Inverse SRC Alpha" (SRC Alpha Instruction = 4, DST Alpha Instruction = 5).
  2739. When the SRC data is stored in the Secondary Accumulation Buffer (SRC select = 1), the values in the Secondary Accumulation Buffer are used as is for the alpha and color values of the SRC pixels. The polygon's Shading Color and Texture/Shading instructions are ignored. Therefore, the alpha value of a tri-linear filtered Translucent polygon is specified by the polygon Base Colors from 1 and 2 above.
  2740.  
  2741. Naturally, all three polygons must be registered in a translucent list. In the HOLLY2, Trilinear filtering cannot be specified for a Punch Through polygon.
  2742.  
  2743. �3.4.7.2.4 Texture Super-Sampling
  2744. Texture super-sampling can be used in combination with the three filtering modes. This function doubles the texture sampling points per pixel in both the horizontal and vertical directions [(x, y), (x + 0.5, y), (x, y + 0.5), (x + 0.5, y + 0.5)], compresses the texture and improves the quality of the portion that is drawn. However, because this quadruples the amount of texture data that is read, drawing takes about three or four times as long as compared to when this function is not used.
  2745. This function is recommended for use only when it is necessary to improve the image quality of a polygon that has a texture that has an intricate pattern or fine lines and that has been compressed. In addition, because this function yields few benefits if it is used at the same time as full-screen filtering that used the X scaler and Y scaler, it is recommended that only the full-screen filtering be used, due to the negative impact on drawing performance that the texture super-sampling function has.
  2746.  
  2747. �3.4.7.3
  2748. Bump Mapping
  2749. Bump Mapping is a method that is used to create the appearance of raised and lowered areas on a flat polygon surface by varying the brightness of the surface. The brightness of each pixel is determined by the hardware on the basis of the light source vector specified for each polygon and by the normal line vector specified for each texel (Bump Map texture).
  2750. The following two data items are specified as parameters for Bump Mapped polygons.
  2751.  
  2752. (1) Bump Map parameters: K1K2K3Q (light source vector data)
  2753. (2) Bump Map texture: SR (texel normal line vector data)
  2754.  
  2755. The K1K2K3Q data for Bump Mapped polygons is set in the location where the normal polygon Offset Color data is stored, and the data for the third vertex is valid (for example, as the Shading Color data for Flat Shading). In the case of a strip polygon, the data for the third and subsequent vertices is valid.
  2756.  
  2757. Bump Map parameters (specified for individual polygons)
  2758. bit 31-24 23-16 15-8 7-0 K1 K2 K3 Q
  2759. Bump Map textures (specified for individual texels)
  2760. bit 15-8 7-0 S R
  2761. The RGB values of the texture data for Bump Mapped polygons are fixed to "white" (R = G = B = 0xFF), and the alpha value is the brightness (0x00 to 0xFF) that is calculated on the basis of the above parameters, where the darkest pixels are 0x00 and the brightest pixels are 0xFF. The color data for the drawing pixels is calculated from the texture data and the Base Color value according to the method specified in the Texture/Shading Instruction in the TSP Instruction Word.
  2762. When drawing the image of the Bump Mapped polygon itself, normally Decal Alpha is selected by the Texture/Shading instruction. In this case, the color of the darkest pixels is the color that is specified by the Base Color, and the color of the brightest pixels is white (the Bump Map Texel color). When using alpha blending, the pixel alpha color can be specified by the Base Color. for example, if a polygon is drawn with black (0xFF000000) specified for the Base Color for all pixels, a monochrome polygon with depressions and raised portions is produced.
  2763.  
  2764.  
  2765.  
  2766. Fig. 3-21
  2767.  
  2768. �3.4.7.3.1
  2769. Bump Mapping Algorithm
  2770. The following section describes the operations that the hardware performs in order to derive the ? values for the texture data from the six 8-bit parameters (K1, K2, K3, Q, S, and R) that were specified.
  2771. The two angles that indicate the vector to a point on a hemisphere (refer to diagram below) are set in S and R, the parameters that specify the normal line vector for each texel.
  2772.  
  2773.  
  2774. Fig. 3-22
  2775.  
  2776. The point indicated on the hemisphere (XS, YS, ZS) is expressed through the following equations.
  2777.  
  2778.  
  2779. In other words, the angles that express the normal line vector are specified with a value of 0 to 255, which in the case of S represents a range of angles from 0? to 90?, and in the case of R represents a range of angles from 0? to 360?. If "255" is specified, "256" (in other words, 90? or 360?) is assumed. Similarly, the light source vector can also be expressed by the following equations:
  2780.  
  2781.  
  2782. Because the brightness I of each texel is determined by the inner product of both vectors, the equation is as follows:
  2783.  
  2784.  
  2785.  
  2786. The alpha values for the drawing pixels are calculated by the hardware according to the following equations that allow the amount of change in the brightness to be specified so that various effects can be obtained. The Bump Map parameters K1, K2, and K3 are calculated according to the above equations, and set accordingly. ("0" is set for "0.0," and "255" is set for "1.0.")
  2787.  
  2788.  
  2789.  
  2790. �3.4.7.3.2 Bump Mapped + Textured Polygons
  2791. Bump Mapped polygons are not normally used by themselves; instead, they are used in combination with Textured polygons. Three examples of how to combine these polygons are described below. Normally, Method A is used. Although the result (the RGB value) produced by Method A and Method B is the same, the alpha value of the pixels that are drawn can be controlled for the whole polygon through method A (the alpha value is calculated from the alpha value in the Base Color of the Textured polygon and the alpha value of the texel), while method B does not permit control of the alpha value because alpha values in a Bump Mapped polygon are reflected on a pixel by pixel basis. The polygon Shading Color is specified on the Textured polygon side. In addition, both the Bump Mapped polygon and the Textured polygon are registered in a Translucent polygon list.
  2792.  
  2793. Fig. 3-23
  2794.  
  2795.  
  2796. To make an image that was formed by combining a Bump Mapped polygon with a Textured polygon into a Translucent polygon, use the Secondary Accumulation Buffer. When using method A above, specify the drawing buffer in the Secondary Accumulation Buffer, and then draw a polygon with the same shape (a Flush polygon) in the Primary Accumulation Buffer. In other words, three polygons are required: (1) Bump Mapped polygon, (2) Textured polygon, and (3) Flush polygon.
  2797. Example of a Translucent polygon formed by a Bump Mapped polygon + Textured polygon
  2798.  
  2799. Fig. 3-24
  2800. �3.4.8
  2801. Fog Processing
  2802. Fog processing can be specified for each polygon individually. There are two types of Fog processing: "Look Up table mode" and "Per Vertex" mode. These modes are specified through "Fog control" in the TSP Instruction Word. The two modes can both be used within the same screen, and the Fog Color for each can be specified independently (in the FOG_COL_PAL register or the FOG_COL_VERT register). In addition, Fog processing is performed prior to the ? blend processing.
  2803. The equation that is used to calculate the color in Fog processing is as follows:
  2804.  
  2805. Fogged_pixel = (1.0 � Fog_alpha) ? pixel_col + Fog_alpha ? Fog_col
  2806.  
  2807. Fogged_pixel: Color data after Fog processing
  2808. Fog_alpha: Fog coefficient (8-bit value)
  2809. pixel_col: Pixel color
  2810. Fog_col: Fog Color
  2811.  
  2812. �3.4.8.1 Look-up Table Mode
  2813. 128 Fog coefficients can be specified in the Fog table. The value that is obtained by interpolating between the two values that are retrieved from the table according to the pixel's Z (1/W) value becomes the Fog coefficient for the drawing pixel.
  2814.  
  2815.  
  2816. Fig. 325
  2817.  
  2818. F The 1/W value, which is used as the Fog table address, is obtained by multiplying the actual Z value for the drawing pixel by the value specified in the FOG_DENSITY register, clamped between 1.0 and 255.9999. The 7-bit Fog table address is formed as follows from the 1/W value that was calculated.
  2819.  
  2820. bit 6-4 3-0 Lower 3 bits for the 1/W index Upper 4 bits for the 1/W mantissa
  2821. (the sign bit and "1.0" bit are ignored)
  2822. The bit configuration of the FOG_DENSITY register is as shown below. For example, if specifying 255.0, set 0xFF07. In this case, if the Z value of the actual drawing pixel is 1/255.0, then 1/W = 1.0.
  2823.  
  2824. bit 15-8 7-0 8-bit mantissa
  2825. (bit 15 is the "1.0" bit) 8-bit index
  2826. (two's complement)
  2827. In addition, the following equation is used to derive the 1/W value from the table address value (index):
  2828.  
  2829. 1/W = ( pow(2.0, Index>>4) ? ( (Index & 0xF)+16) / 16.0) ) / FogDensity ;
  2830. The coefficient for when 1/W = 1.0 is stored at Fog table address 0 (the start of the table), and the coefficient for when 1/W = 256.0 is stored in table address 127. The 16-bit data in the Fog table consists of two 8-bit Fog coefficients. The Fog coefficient that is stored in the upper 8 bits is the coefficient where the value of 1/W is equal to that address, while the Fog coefficient that is stored in the lower 8 bits is the Fog coefficient that is used for interpolation when the Fog coefficient is larger than the address value (in other words, the Fog coefficient in the next address).
  2831.  
  2832. Address bit 15-8 bit 7-0 0x00 Coefficient when address = 0x00 Coefficient when address = 0x01 0x01 Coefficient when address = 0x01 Coefficient when address = 0x02 0x02 Coefficient when address = 0x02 Coefficient when address = 0x03 ������������������������������� 0x7E Coefficient when address = 0x7E Coefficient when address = 0x7E 0x7F Coefficient when address = 0x7F Coefficient when address = 0x7F
  2833. Look-up table mode includes processing called "Mode 2." For a polygon for which this mode is specified, the Base Color ? value and RGB value are replaced as follows:
  2834.  
  2835. Base Color ? value = Fog coefficient
  2836. Base Color RGB value = Fog Color value
  2837.  
  2838. This mode is used for polygons for which Fog processing is to be performed after ? blend processing. For example, when applying a color filter (which controls the transmission ratio of each color) to a textured polygon, the textured polygon is drawn first, and then a color filter polygon is blended on top of the first polygon with "other color" or "Inverse Other Color" specified. If Fog processing is performed on each polygon individually, the resulting image will not be correct.
  2839. To draw such a polygon, first blend and draw the textured polygon and the color filter polygon with no Fog processing. Then blend a third polygon, for which Mode 2 Fog processing is specified, on top of the other two polygons with "SRC Alpha" or "Inverse SRC Alpha" specified. This approach will yield the correct image if Fog processing is applied after the two polygons are blended.
  2840.  
  2841. �3.4.8.2 Per Vertex Mode
  2842. A Fog coefficient is specified for the ? value of the Offset Color data for each vertex of a polygon. In the case of a polygon for which Gouraud shading was specified, the Fog coefficient for each drawing pixel is derived by interpolating from the ? value of the Offset Color for each vertex. When Flat Shading is specified, the Fog coefficient is also constant.
  2843. The only difference between this mode and Look Up table mode is that the Fog coefficient is not retrieved from a table according to the Z value; instead, it is derived from the value specified for each vertex. The color operation equations that use the resulting Fog coefficient are completely identical in the two modes. In addition, with the normal Look Up table mode, once the table has been set, the hardware performs Fog processing automatically. In "Per Vertex" mode, however, the CPU has to calculate and set the Fog coefficient (? value) for each vertex each time, according to the polygon's position. This increases the load on the CPU. However, there are some effects that can be implemented in "Per Vertex" mode that cannot be implemented in Look Up table mode (for example, creating a Fog effect based on the Y value instead of the Z value).
  2844. Polygons for which this mode is specified must be set up so that an Offset Color is used (Offset bit = 1). If the polygon is not set up to use an Offset Color, Fog processing is not performed.
  2845. �3.4.9
  2846. Clipping
  2847. There are two types of clipping: Tile Clipping, which is performed on individual Tiles by the TA; and pixel clipping, which is performed on individual pixels when they are written to the frame buffer.
  2848.  
  2849. �3.4.9.1 Tile Clipping
  2850. Polygon data that is input to the TA can be clipped at the individual Tile level, so that polygon data (object) that is completely outside of the specified clipping area is not stored in texture memory. the Tile Clipping area in the TA is determined by the "Global Tile Clip area" (which is specified by the TA_GLOB_TILE_CLIP register), and the "User Tile Clip area" (which is specified by the User Tile Clip Control Parameters). Because the Global Tile Clip specification is a register specification, it can only be specified for an entire screen. The User Tile Clip specification can be selected for individual objects as either "off," "enabled inside area," or "enabled outside area." The size of the area can also be set individually for each object. (Refer to section 3.7.3.3.)
  2851.  
  2852.  
  2853. Fig. 3-26
  2854.  
  2855.  
  2856. For example, when drawing a screen that is divided into two Tiles as shown below, Tile Clipping only needs to be performed when inputting polygon for each data into the TA.
  2857.  
  2858.  
  2859.  
  2860. Fig. 3-27
  2861.  
  2862. �3.4.9.2
  2863. Pixel Clipping
  2864. Pixel data that is transferred from the accumulation buffer in the CORE to the frame buffer in texture memory can be clipped at the individual pixel level so that data that is outside of the specified clipping area is not stored in the frame buffer (but the polygon is drawn). Because the pixel clipping area is specified by the FB_X_CLIP register and the FB_Y_CLIP register, only one area can be specified on one screen. Note that pixels that are in the positions specified by the register are deemed to be inside of the area, and are therefore stored in the frame buffer.
  2865. If the size of the display screen is larger than that of the clipping area, any data that remains in frame buffer is displayed as is in the portion of the screen that lies outside of the clipping area.
  2866.  
  2867. Fig. 3-28
  2868.  
  2869. For example, when drawing a screen such as the one shown below where the window area does not coincide with Tile boundaries, use pixel clipping and draw twice within one frame.
  2870.  
  2871. Fig. 3-29
  2872. �3.4.10 Drawing to a Texture Map
  2873. The pixel data that is drawn in the accumulation buffer in the CORE is transferred to the texture memory address specified by the FB_W_SOF1 register and the FB_W_SOF2 register. These registers can be used to specify whether to store the screen data that has been drawn as texture data for subsequent use, or as frame buffer data for a TV display.
  2874.  
  2875. Register Specified addresses Access area FB_W_SOF1, 0x0000000?0x0FFFFFC 32-bit (frame buffer) FB_W_SOF2 0x1000000?0x1FFFFFC 64-bit (texture data)
  2876.  
  2877. Fig. 3-30
  2878.  
  2879. The data that is stored in the 32-bit area is separate from the data that is stored in the 64-bit area, and frame buffer data cannot be used as texture data and texture data cannot be used for TV display. Therefore, when performing environment mapping using the drawing results, the first drawing results are stored in a 64-bit area, and then the results of the second drawing that was done using the texture data is stored in the 32-bit area.
  2880. When texture data is stored in a 64-bit area, the data is stored according to the same frame buffer-related register settings as when stored in a frame buffer, so it is necessary to set the registers in a way that will produce correct texture data. Furthermore, when the drawing results that are stored in the 64-bit area are to be used for a texture, the texture format will be either Non-Twiddled Rectangular format or Stride format.
  2881.  
  2882. FB_W_CTRL
  2883. bit 2-0 Pixel format When drawing to a texture map 0 0555 KRGB 16 bit Can be used for drawing to a texture map 1 565 RGB 16 bit 2 4444 ARGB 16 bit 3 1555 ARGB 16 bit 4 888 RGB 24 bit Cannot be used for drawing to a texture map 5 0888 KRGB 32 bit 6 8888 ARGB 32 bit 7 Reserved Cannot be used
  2884. �3.4.11 X Scaler & Y Scaler
  2885. The X scaler and the Y scaler perform filtering and scaling in the X and Y directions when transferring pixel data from the accumulation buffer in the CORE to the frame buffer in texture memory. Because this filtering and scaling is not performed when the pixel data is transferred from the frame buffer to the DAC, the image that is displayed on the screen is identical to the pixel data in the frame buffer.
  2886.  
  2887.  
  2888.  
  2889. Fig. 3-31
  2890.  
  2891. �3.4.11.1 X Scaler
  2892. The X scaler filters every two pixels of pixel data in the X direction that is being drawn, scaling down the image by 1/2. Whether or not to use this function can be specified in the SCALER_CTL register.
  2893. The filtering coefficient is fixed at 0.5, and the averaged data of two adjacent pixels in the accumulation buffer is stored in the frame buffer as data for one pixel. Therefore, when using X filtering, it is necessary to draw with double the display resolution in the X direction.
  2894.  
  2895.  
  2896. Fig. 3-32
  2897.  
  2898. �3.4.11.2
  2899. Y Scaler
  2900. The Y scaler filters three lines of pixel data in the Y direction that is being drawn, scaling the image as specified. Filtering is performed only when scaling an image down, not when scaling an image up. When scaling an image down, the filtering coefficient is specified in the Y_COEFF register. The scaling coefficient is specified in the SCALER_CTL register.
  2901. When using Y filtering at the drawing resolution in the Y direction, it is sufficient to specify a reduction coefficient as close to 1.0x as possible (0x0401).
  2902. Y scaling produces an image by interpolation of lines above and below according to the results of line position calculation.
  2903.  
  2904.  
  2905.  
  2906. Fig. 3-33
  2907.  
  2908.  
  2909. �3.4.12 Flicker-free Interlacing
  2910. With an interlaced display, the Y scaler can be used to implement flicker-free filtering. However, because the Tiles must be drawn in sequence in the Y direction, the Region array data (refer to section 3.7) must be stored (arranged vertically) so that it is drawn in the Y direction.
  2911. There are two methods for implementing flicker-free filtering; the screen drawing intervals, the frame buffer memory size, and read control for display differ for each method.
  2912.  
  2913. Type Screen drawing interval Frame buffer memory size Read control for display A 1/30 second (NTSC) or 1/25 second (PAL) 480 lines Shift the start address one line for each field, skipping one line at a time when reading B 1/60 second (NTSC) or 1/50 second (PAL) 240 lines Display as is
  2914. �3.4.12.1
  2915. Type A
  2916. First, set the Y scaler scaling coefficient so that the reduction coefficient is as close to 1.0x (0x0401) as possible, and enable Y filtering. The result of filtering three lines of data is then stored in the frame buffer. In other words, the result of drawing 480 lines is stored in the frame buffer as 480 lines. Therefore, the screen needs to be drawn for each frame (in units of 1/30 or 1/25 seconds).
  2917. When displaying the image, shift the start address for the read from the frame buffer one line for each field, skipping one line at a time.
  2918.  
  2919.  
  2920. Fig. 3-34
  2921.  
  2922. Make the following settings in order to implement type A flicker-free filtering:
  2923.  
  2924. (1) Set the scaling coefficient for the Y direction so that the reduction coefficient is as close to 1.0x as possible.
  2925. (Set the "Vertical Scale Factor" in the SCALER_CTL register to "0x0401".)
  2926. (2) Control reads from the frame buffer for display one field at a time.
  2927.  
  2928. �3.4.12.2
  2929. Type B
  2930. First, perform filtering with 3 lines of data in the Y scaler, scale the data by 1/2, and then store in the frame buffer only that line data that is needed for the specified display field. In other words, although drawing must be performed with 480 lines, only 240 lines are needed for the pixel data that is stored in the frame buffer. However, because this processing is performed for individual Tiles when the pixel data that was drawn is transferred to the frame buffer, the data must be drawn in every field (in units of 1/50 or 1/60 second).
  2931.  
  2932. For display, the data only needs to be read as is from the frame buffer.
  2933.  
  2934.  
  2935. Fig. 3-35
  2936.  
  2937. Make the following settings in order to implement type B flicker-free filtering:
  2938.  
  2939. (1) Set the scaling coefficient for the Y direction for 1/2 reduction.
  2940. (Set the "Vertical Scale Factor" in the SCALER_CTL register to "0x0800".)
  2941. (2) Set the Y scaler to interlace mode.
  2942. (Set "Interlace" in the SCALER_CTL register to "1".)
  2943. (3) Switch the Y scaler setting back and forth between field 0 and field 1 in accordance with the screen display.
  2944. (Toggle "Field Select" in the SCALER_CTL register.)
  2945.  
  2946.  
  2947. �3.4.13
  2948. Strip Buffers
  2949. A strip buffer is a pixel data buffer that retains pixel data that has been drawn in Tile units for the specified number of lines, rather than an entire screen; in other words, a compressed frame buffer. Area for two strip buffers is allocated in texture memory; the size of one buffer can be specified over a range of 32 to 1024 lines, in units of 32 lines. The starting address of the strip buffer can be specified in the FB_W_SOF1 register and the FB_W_SOF2 register, and the strip buffer size can be specified in the FB_R_CTRL register.
  2950. Strip buffer processing is synchronized with the TV display, and performs the following operations:
  2951.  
  2952. (1) Stores 32-pixel ? 32-pixel data drawn in the accumulation buffer into strip buffer 1 in texture memory.
  2953. (2) Once strip buffer 1 has been filled with pixel data, the process of displaying the contents of strip buffer 1 on the screen begins, and the drawing pixel data for the next Tile is stored in strip buffer 2.
  2954. (3) Once strip buffer 2 has been filled with pixel data, the process waits until all of the pixel data in strip buffer 1 has been displayed on the screen. Once this happens, strip buffer 2 becomes the screen display strip buffer, and strip buffer 1 becomes the pixel data storage strip buffer again.
  2955. (4) Steps (1) through (3) are repeated until all of the lines on the display screen have been displayed.
  2956.  
  2957. When the strip buffers are used, less memory is required when compared to the frame buffer. However, the strip buffers are effective only in the following cases:
  2958.  
  2959. * When polygons are uniformly positioned over the entire screen. In other words, when the difference between the drawing time and the display time for the strip buffer size is small.
  2960. * When the number of polygons being drawn is small.
  2961.  
  2962. Because the strip buffers must operate in synchronization with the TV screen display, the drawing time required for the buffer size must not be longer than the corresponding screen display time. In other words, it is also essential that the strip buffer size be specified so that "drawing time < display time." The timing of drawing must be such that drawing is completed before the strip buffer is displayed at the beginning of the screen. In other words, drawing must be started before the start of screen display by at least a much of a margin equal to the time needed to display data equivalent to the size of the strip buffer. For example, when the strip buffer contains 64 lines, drawing must start at least 64 lines before the start of screen display. When drawing to the strip buffer is not completed in time for the screen display, the strip buffer is forcibly switched, drawing is halted, and an interrupt is generated. Naturally, the screen is not displayed correctly in this case.
  2963. When polygons are concentrated in a certain portion of the screen, the size of the strip buffer must be increased in order to maintain the relationship �drawing time < display time,� which is a restriction of the strip buffer. However, doing this will reduce drawing performance for processing of screen areas with few polygons, as processing will not proceed to the next drawing even though the previous one is quickly completed until termination of display.
  2964.  
  2965. When using the strip buffers, the region data array (see section 3.7) must be stored in such a manner that drawing proceeds in the X direction (horizontally). In addition, when there are 240 display screen lines, 256 lines are drawn and stored in the strip buffer, but the last 16 lines are not displayed.
  2966.  
  2967. The value that is specified for the screen buffer size must yield an even number when the number of display screen lines is divided by that value. Normally, in the case of NTSC and PAL (both interlaced and non-interlaced), the number of display screen lines is 240, so the strip buffer size should be either 32, 64, or 128. In the case of VGA, the number of display screen lines is 480, so the strip buffer size should be either 64, 128, or 256.
  2968. Furthermore, the X clipping function cannot be used. In other words, the size of the display screen in the horizontal direction must be specified for the X clipping values in the FB_X_CLIP register. For example, when the size of the display screen in the horizontal direction is 640 pixels, specify FB x clipping max = 639 and FB x clipping min = 0.
  2969.  
  2970. �3.4.14
  2971. Frame Buffer Drawing Data and Display Data
  2972. When drawing in Tile units in the CORE, the pixel data is 8-bit ARGB data, and ARGB are each processed as 8 bits for shading and alpha blending. When this pixel data that has been drawn is transferred to the frame buffer in texture memory, it is converted into the pixel format specified in the FB_W_CTRL register. The "4444 ARGB 16-bit" format that can be specified in FB_W_CTRL is a special format for drawing to the texture map only, and cannot be used to draw to the frame buffer.
  2973. Furthermore, when outputting to the DAC for the purpose of display, the data is read from the frame buffer in he pixel format that was specified in the FB_R_CTRL register, and is converted into Chroma + RGB 8-bit format. The chroma bit is used for forming a composite with an external screen, and is not normally used.
  2974.  
  2975.  
  2976. Fig. 3-36
  2977. When the pixel format in the frame buffer is 16 bits, it is important to note that the lower bit values of RGB that are discarded when the data is transferred from the CORE to the frame buffer differ from the lower bit values of RGB that are added when the data is output from the frame buffer to the DAC.
  2978. �3.5
  2979. Display Function Details
  2980. �3.5.1 Sync Pulse Generator
  2981. HOLLY supports display on both NTSC and PAL TVs and monitors. HOLLY includes a block called the "SPG" (Sync Pulse Generator) that generates the sync signals. Certain registers must be set in accordance with the display standard. For details on the registers, refer to section 8.4.2.
  2982. The settings for each of the registers in the SPG block for different display modes are listed below.
  2983. Ragister name NTSC
  2984. Non-interlace NTSC
  2985. Interlace PAL
  2986. Interlace PAL
  2987. Interlace VGA 320x240
  2988. 640x240 320x240
  2989. 640x240
  2990. 640x480 320x240
  2991. 640x240 320x240
  2992. 640x240
  2993. 640x480 640x480 SPG_LOAD 0x01060359 0x020C0359 0x0138035F 0x0270035F 0x020C0359 SPG_HBLANK 0x007E0345 0x007E0345 0x008D034B 0x008D034B 0x007E0345 SPG_VBLANK 0x00120102 0x00240204 0x002C026C 0x002C026C 0x00280208 SPG_WIDTH 0x03F1933F 0x07D6C63F 0x07F1F53F 0x07D6A53F 0x03F1933F SPG_CONTROL 0x00000140 0x00000150 0x00000180 0x00000190 0x00000100 VO_STARTX 0x000000A4 0x000000A4 0x000000AE 0x000000AE 0x000000A8 VO_STARTY 0x00120011 0x00120012 0x002E002E 0x002E002D 0x00280028 VO_CONTROL In case of 320?
  2994. 0x00160100
  2995. In case of 640?
  2996. 0x00160000 In case of 320?
  2997. 0x00160100
  2998. In case of 640?
  2999. 0x00160000 In case of 320?
  3000. 0x00160100
  3001. In case of 640?
  3002. 0x00160000 In case of 320?
  3003. 0x00160100
  3004. In case of 640?
  3005. 0x00160000 0x00160000 Note: When interlaced, the 240 lines are single-interlaced.
  3006.  
  3007. The screen display positions for the sync signals are specified in the VO_STARTX and VO_STARTY registers.
  3008.  
  3009. Fig. 3-37
  3010.  
  3011. �3.5.2 Frame Buffer Settings
  3012. The following eight registers are used for the frame buffer settings. For details on the contents of each register, refer to section 8.4.2.
  3013.  
  3014. Register name Description of settings FB_R_CTRL This register is used for settings concerning reads from the frame buffer.
  3015. vclk_div : Pixel clock setting
  3016. fb_strip_buf_en : Strip buffer enable
  3017. fb_stripsize : Strip buffer size
  3018. fb_chroma_threshold : Comparison ? value for chroma output
  3019. fb_concat : Lower bit value for concatenation in RGB
  3020. output
  3021. fb_depth : Frame buffer pixel format
  3022. fb_line_double : Line double read enable
  3023. fb_enable : Frame buffer read enable FB_W_CTRL This register is used for settings concerning writes to the frame buffer.
  3024. fb_alpha_threshold : Comparison value for ? value writes
  3025. fb_kval : Upper bit value for concatenation during a
  3026. write
  3027. fb_dither : Dithering enable
  3028. fb_packmode : Frame buffer pixel format FB_W_LINESTRIDE Specifies the line width (in units of 64 bits) for writes to the frame buffer. FB_R_SOF1 Specifies the starting address for reads from the frame buffer for field 1. FB_R_SOF2 Specifies the starting address for reads from the frame buffer for field 2. FB_R_SIZE Specifies the size when reading from the frame buffer.
  3029. FB modulus : Amount of data from the end of a line to
  3030. the data for the next line
  3031. FB y size : Number of lines in the frame buffer
  3032. FB x size : Number of pixels in the frame buffer FB_W_SOF1 Specifies the starting address for writes to the frame buffer for field 1. FB_W_SOF2 Specifies the starting address for writes to the frame buffer for field 2.
  3033. The following diagram illustrates the settings for reading from the frame buffer.
  3034.  
  3035.  
  3036.  
  3037. Fig. 3-38
  3038. �3.6
  3039. Texture Definition
  3040. The textures coordinates U and V are both normally specified in a range from (0.0 , 0.0) to (1.0, 1.0) with 32-bit IEEE floating-point values. It is also possible to discard the lower 16 bits and specify the coordinates with 16-bit floating-point values. When using 16-bit values, both coordinates are specified as a 32-bit value, with the upper 16 bits representing U and the lower 16 bits representing V.
  3041.  
  3042. Fig. 3-39 Texture Definition
  3043. �3.6.1
  3044. Texture Pixel Format
  3045. The texture pixel formats that can be used are listed below. These formats are specified through "Pixel Format" in the Texture Control Word.
  3046. Type Bit configuration Description RGB 1555 ? value: 1 bit; RGB values: 5 bits each 565 R value: 5 bits; G value: 6 bits; B value: 5 bits 4444 ? value: 4 bits; RGB values: 4 bits each YUV 32bit/2texel YUV 422 data, 8 bits each Bump Map 16bit/texel S value: 8 bits; R value: 8 bits Palette 4bit/texel 16 colors per texture 8bit/texel 256 colors per texture Table 3-3 Pixel Formats
  3047.  
  3048. �3.6.1.1 RGB Textures
  3049. RGB textures are expressed by 16 bits per texel. There are three different color formats.
  3050.  
  3051. RGB1555 Texture
  3052. bit 15 14-10 9-5 4-0 Alpha Red Green Blue
  3053. RGB565 Texture
  3054. bit 15-11 10-5 4-0 Red Green Blue
  3055. RGB4444 Texture
  3056. bit 15-12 11-8 7-4 3-0 Alpha Red Green Blue
  3057. �3.6.1.2 YUV Textures
  3058. YUV textures are expressed by 16 bits per texel, and one data item (YUV422 data) corresponds to two adjacent texels in the horizontal direction. The Y data for the left texel and the U data for both texels are collectively referred to as "Y0U" data, and the Y data for the right texel together with the V data for both texels are referred to as �Y1V� data. Each YUV data element is specified by an unsigned 8-bit value from 0 to 255.
  3059. MPEG data (YUV420 data in macro block units) is converted into YUV texture data by passing the data through the YUV data converter in the Tile Accelerator. (Refer to section 3.8.1.)
  3060.  
  3061. Y0U-data Y1V-data
  3062. bit 15-8 7-0 bit 15-8 7-0 Y0 U Y1 V The YUV texture data is converted within the CORE according to the following equations into RGB values for drawing. Note that the RGB values that are computed are clamped in the range 0 to 255.
  3063. R = Y + (11/8) ? (V-128)
  3064. G = Y - 0.25 ? (11/8) ? (U-128) - 0.5 ? (11/8) ? (V-128)
  3065. B = Y + 1.25 ? (11/8) ? (U-128)
  3066. ?= 255
  3067. �3.6.1.3
  3068. Bump Map Textures
  3069. Bump Map textures are expressed by 16 bits per texel; two 8-bit parameters are specified to express the normal line vector for each texel.
  3070.  
  3071. Bump Map Texture
  3072. bit 15-8 7-0 S R
  3073. The 8-bit parameters that are specified, S and R, set the two angles that define the vector to a point on a hemisphere, as shown in the illustration below.
  3074.  
  3075.  
  3076. Fig. 3-40
  3077.  
  3078.  
  3079. A point (x, y, z) on the hemisphere is expressed through the following equations:
  3080.  
  3081.  
  3082.  
  3083. In other words, the angles that express the normal line vector are specified with a value of 0 to 255, which in the case of S represents a range of angles from 0? to 90?, and in the case of R represents a range of angles from 0? to 360?. If "255" is specified, "256" (in other words, 90? or 360?) is assumed.
  3084. For details on the Bump Mapping algorithm, refer to section 3.4.7.3.1.
  3085.  
  3086. �3.6.1.4
  3087. Palette Textures
  3088. Palette textures are expressed by four or eight bits per pixel ("4BPP" or "8BPP," hereafter), which indicate the low-order address byte in palette RAM in the CORE. When the value specified by the palette selector in the Texture Control Word is added as the high-order address byte, the result is the address in palette RAM. In the case of 8BPP format, only the upper two bits of the palette selector are valid. Up to 1024 colors can be set in palette RAM.
  3089.  
  3090. 4BPP Palette Texture
  3091. bit 9-4 3-0 Palette Selector
  3092. (bit26-21) Texture Data
  3093. 8BPP Palette Texture
  3094. bit 9-8 7-0 Palette Selector
  3095. (bit26-25) Texture Data
  3096. The following table lists the four color data formats that can be specified in palette RAM. Only one format can be specified per screen, in the PAL_RAM_CTRL register. Multiple color data formats cannot co-exist. It is important to note that if a Filter Mode other than point sampling is set with the ARGB8888 format, drawing performance will be only about 50% of normal drawing performance.
  3097.  
  3098. Format Description ARGB1555 ? value: 1 bit; RGB values: 5 bits each RGB565 ? value: none; R value: 5 bits; G value: 6 bits; B value: 5 bits ARGB4444 ? value: 4 bit; RGB values: 4 bits each ARGB8888 ? value: 8 bit; RGB values: 8 bits each
  3099. ARGB1555 Palette
  3100. bit 15 14-10 9-5 4-0 Alpha Red Green Blue
  3101. RGB565 Palette
  3102. bit 15-11 10-5 4-0 Red Green Blue
  3103. ARGB4444 Palette
  3104. bit 15-12 11-8 7-4 3-0 Alpha Red Green Blue
  3105. ARGB8888 Palette
  3106. bit 31-24 23-16 15-8 7-0 Alpha Red Green Blue
  3107. �3.6.2
  3108. Texture Formats
  3109. The texture shapes that can be used are square and rectangular. There are eight sizes (represented by values of 2n, ranging from 8 to 1024) that can be set for the U size and the V size, each, in the TSP Instruction Word. If the same size is specified for U and V, the texture shape is square; if different sizes are specified, the texture shape is rectangular.
  3110. One type of rectangular texture is called a "stride texture," for which a multiple of 32 (from 32 to 512) is specified for the U size. This type of texture can be used when the result of drawing is to be used as a texture. Stride textures only support Non-Twiddled format. Because the U size is specified in the TEXT_CONTRL register, only one U size can be specified on one screen.
  3111. There are two formats for storing texture data in texture memory: Twiddled format and Non-Twiddled format. Furthermore, Twiddled format can be either compressed format or non-compressed format. In addition, among Twiddled format textures, there are textures known as MIPMAP textures, which store multiple textures that are switched according to the Z value of the polygon.
  3112.  
  3113. Storage format Compressed/
  3114. non-compressed MIPMAP Texture format Twiddled format Compressed MIPMAP Square Individual Square Non-compressed MIPMAP Square Individual Square Rectangular Non-Twiddle Non-compressed Individual Square Rectangular Stride
  3115. �3.6.2.1 Twiddled Format
  3116. Twiddled-format texture data is stored in a special order (a reverse "N") shown in the diagram below in order to minimize performance loss when reading texture data for drawing. Normal textures use this format. The Twiddled format specification is made through "scan order" in the Texture Control Word. (Refer to section 3.7.9.3.)
  3117.  
  3118.  
  3119. Fig. 3-41 Twiddle Format
  3120.  
  3121. Twiddled format textures can be either square or rectangular. The relationship between the texture data storage address and the UV coordinates is shown below.
  3122.  
  3123. <Squares>
  3124. The bits of the storage address are configured so that each bit of the UV coordinates alternate, starting from the low-order end. The least significant bit is bit 0 of the V coordinate (V0).
  3125.  
  3126. Example: �� U4 V4 U3 V3 U2 V2 U1 V1 U0 V0
  3127.  
  3128. <Rectangles>
  3129. The bits of the storage address are configured so that each bit of the UV coordinates alternate, starting from the low-order end. The least significant bit is bit 0 of the V coordinate (V0). Any extra bits for one coordinate are positioned in order at the high end.
  3130.  
  3131. Example: �� V5 V4 U3 V3 U2 V2 U1 V1 U0 V0
  3132.  
  3133. Twiddled format textures support all pixel formats. The data configuration for each type of data is listed below.
  3134.  
  3135. RGB & Bump Map Texture
  3136. bit 63-48 47-32 31-16 15-0 Texel (1,1) Texel (1,0) Texel (0,1) Texel (0,0)
  3137. YUV Texture
  3138. bit 63-48 47-32 31-16 15-0 Y1V (1,1) Y1V (1,0) Y0U (0,1) Y0U (0,0)
  3139. 4BPP Palette Texture
  3140. bit 63-60 59-56 55-52 51-48 47-44 43-40 39-36 35-32 Texel
  3141. (3,3) Texel
  3142. (3,2) Texel
  3143. (2,3) Texel
  3144. (2,2) Texel
  3145. (3,1) Texel
  3146. (3,0) Texel
  3147. (2,1) Texel
  3148. (2,0) bit 31-28 27-24 23-20 19-16 15-12 11-8 7-4 3-0 Texel
  3149. (1,3) Texel
  3150. (1,2) Texel
  3151. (0,3) Texel
  3152. (0,2) Texel
  3153. (1,1) Texel
  3154. (1,0) Texel
  3155. (0,1) Texel
  3156. (0,0)
  3157. 8BPP Palette Texture
  3158. bit 63-56 55-48 47-40 39-32 31-24 23-16 15-8 7-0 Texel
  3159. (1,3) Texel
  3160. (1,2) Texel
  3161. (0,3) Texel
  3162. (0,2) Texel
  3163. (1,1) Texel
  3164. (1,0) Texel
  3165. (0,1) Texel
  3166. (0,0)
  3167. <Note> The numbers in parentheses are the UV coordinates.
  3168.  
  3169. �3.6.2.2
  3170. Non-Twiddled Format
  3171. Non-Twiddled format texture data is stored in sequence, similar to bitmapped data. This format is used when the drawing results are to be used as texture data.
  3172. However, the drawing performance for this format is low compared to Twiddled format.
  3173.  
  3174.  
  3175. Fig. 3-42 Non-Twiddled Format
  3176.  
  3177. Non-Twiddled format textures support all shapes: square, rectangular, and stride. The relationship between the texture data storage address and the UV coordinates is shown below.
  3178.  
  3179. <Squares and rectangles>
  3180. (texture data storage address) = (V size) ? (V coordinate) + (U coordinate)
  3181.  
  3182. <Stride>
  3183. (texture data storage address) = (stride value) ? 32 ? (V coordinate) + (U coordinate)
  3184. However, "stride" corresponds to bits 4 through 0 of the TEXT_CONTROL register.
  3185.  
  3186. Non-Twiddled formats support all pixel formats, except for palette textures. For example, the data configuration (64 bits) of texture data with a size of 128 x 128 is as follows.
  3187.  
  3188. RGB & Bump Map Texture
  3189. Address bit 63-48 47-32 31-16 15-0 0x00 Texel (3,0) Texel (2,0) Texel (1,0) Texel (0,0) ����������������������������
  3190. Address bit 63-48 47-32 31-16 15-0 0x80 Texel (3,1) Texel (2,1) Texel (1,1) Texel (0,1)
  3191. YUV Texture
  3192. Address bit 63-48 47-32 31-16 15-0 0x00 Y1V (3,0) Y0U (2,0) Y1V (1,0) Y0U (0,0) ����������������������������
  3193. Address bit 63-48 47-32 31-16 15-0 0x80 Y1V (3,1) Y0U (2,1) Y1V (1,1) Y0U (0,1)
  3194. <Note> The numbers in parentheses are the UV coordinates.
  3195. �3.6.2.3
  3196. VQ Textures
  3197. One type of Twiddled format texture is a compressed texture data format that is compressed from 1/3 to 1/8 the normal size by a method called "VQ (Vector Quantization) compression." Textures stored in this format are called "VQ textures." This format is supported only for square RGB pixel format. The VQ texture specification is made through "VQ compressed" in the Texture Control Word. (Refer to section 3.7.9.3.)
  3198. A VQ texture consists of two types of data, an "index" and a "code book." The relationship between the index and the code book is similar to the relationship between palette texture data and palette data. The index indicates 2 texels (H) ? 2 texels (V) of the texture prior to compression, through a code book number. The code book is a grouping of units of data for four texels (64 bits), and usually consists of 256 ? 64 bits. The four-texel data of the code book is expanded in a reverse "N" shape, similar to Twiddled format.
  3199. The UV size of a texture in the TSP Instruction Word specifies the size of the texture before compression. In other words, the Index is one-half the specified UV size in the horizontal and vertical directions.
  3200.  
  3201.  
  3202.  
  3203. Fig. 3-43
  3204.  
  3205. The texture data sizes before and after compression are listed in the table below.
  3206.  
  3207. Texture size
  3208. U?V Amount of data prior to compression (bytes) Amount of data after compression (bytes) Compression ratio (%) Amount of data in index
  3209. (bytes) Amount of data in code book
  3210. (bytes) 16?16 512 2,176 425.00 64 256?8 32?32 2,048 2,304 112.50 256 256?8 64?64 8,192 3,072 37.50 1,024 256?8 128?128 32,768 6,144 18.75 4,096 256?8 256?256 131,072 18,432 14.06 16,384 256?8 512?512 524,288 67,584 12.89 65,536 256?8 1,024?1,024 2,097,152 264,192 12.60 262,144 256?8 2,048?2,048 8,388,608 1,050,624 12.52 1,048,576 256?8
  3211. It is predetermined that there are normally 256 code book elements per texture. The number of code book elements indicated for texture sizes of 32 ? 32 or smaller in the above table are the values at which data is not compressed, but instead increases in size. Normally, when dealing with textures that are 32 ? 32 or smaller, it is necessary to group several into a size of at least 64 ? 64 before compressing them.
  3212.  
  3213.  
  3214. For VQ textures, the two types of data, the index and the code book, are stored in texture memory. The index data is stored in the same manner as an 8BPP palette texture in Twiddled format, while for the code book 256 data elements, each corresponding to four texels, are stored. In addition, the data must be stored contiguously in texture memory (as shown below), with the code book in the lower addresses.
  3215. The texture address that is specified in the Texture Control Word is the starting address of the code book.
  3216.  
  3217.  
  3218. Fig. 3-44
  3219.  
  3220. The hardware determines that the texture address specified in the Texture Control Word is the start of the code book data, and uses the address produced by adding 256 x 64-bits to that address as the start of the index data. Therefore, in order to have a code book with less than 256 elements, use an address in the middle of the previous texture data as the texture address that is specified in the Texture Control Word, and then store index data only for the values that correspond to the code book data that was stored.
  3221.  
  3222.  
  3223. Fig. 3-45
  3224.  
  3225. It is possible to use the method for creating a code book with less than 256 elements in order to compress and store as individual elements data with a texture size of 32 ? 32 or less prior to compression. When doing so, the interval between the code book data starting address that is to be used and the corresponding index data starting address must be 2Kbytes (= 256 ? 64 bits), so the size of the code book data and the size of the index data must be identical as shown in the table below. (If they are not the same size, memory space will be wasted.)
  3226. The compression rate for data with a 64 ? 64 texture size before compression can be increased by reducing the code book data in the same manner.
  3227.  
  3228. Texture size
  3229. before
  3230. compression
  3231. U?V Amount of data before
  3232. compression
  3233. ?byte? Amount of data after
  3234. compression
  3235. ?byte? Compression factor (%) Index data amount
  3236. ?byte? Code book data amount
  3237. ?byte? 16?16 512 128 25.00 64 8?8 32?32 2,048 512 25.00 256 32?8 64?64 8,192 2,048 25.00 1,024 128?8
  3238.  
  3239. Fig. 3-46
  3240.  
  3241. When a VQ texture is stored in this way, it is possible for one index data element to be common to several code book data elements. For example, in the case illustrated above, Index 1 can use Code books 1 through 7, and Index 4 can use Code Books 4 through 7. This is because the hardware regards 256 elements starting from the specified texture address as code book data.
  3242. �3.6.2.4 MIPMAP Texture
  3243. A MIPMAP texture stores several textures, from 1 ? 1 up to a specified size, in texture memory, in order from small to large. However, because YUV textures have one data item per two texels, the 1 ? 1 size texture (only) is stored in RGB565 format. MIPMAP textures are only supported for Twiddle format squares; whether a texture is a MIPMAP texture or not is specified through "MIP Mapped" in the Texture Control Word.
  3244.  
  3245.  
  3246. Fig. 3-47
  3247.  
  3248. The texture address that is specified in the Texture Control Word is the starting address of the 1 ? 1 texture data. In the case of a VQ texture, the starting address of the code book data is specified.
  3249. In addition, the data in texel-3 is used for the code book data for the minimum size MIPMAP texture for VQ textures.
  3250.  
  3251.  
  3252. Fig. 3-48
  3253.  
  3254.  
  3255. The following tables list the offset values for the starting addresses where texture data is stored for each size of texture. In the case of a VQ texture, however, these values are the offset values for the starting address of the index data.
  3256.  
  3257. 4BPP palette textures 8BPP palette textures Texture size 4-bit offset value for starting address Texture size Byte offset value for starting address 1x1 0x00003 1x1 0x00003 2x2 0x00004 2x2 0x00004 4x4 0x00008 4x4 0x00008 8x8 0x00018 8x8 0x00018 16x16 0x00058 16x16 0x00058 32x32 0x00158 32x32 0x00158 64x64 0x00558 64x64 0x00558 128x128 0x01558 128x128 0x01558 256x256 0x05558 256x256 0x05558 512x512 0x15558 512x512 0x15558 1024x1024 0x55558 1024x1024 0x55558
  3258. Non-palette textures VQ textures Texture size Byte offset value for starting address Texture size Byte offset value for starting address 1x1 0x00006 1x1 0x00000 2x2 0x00008 2x2 0x00001 4x4 0x00010 4x4 0x00002 8x8 0x00030 8x8 0x00006 16x16 0x000B0 16x16 0x00016 32x32 0x002B0 32x32 0x00056 64x64 0x00AB0 64x64 0x00156 128x128 0x02AB0 128x128 0x00556 256x256 0x0AAB0 256x256 0x01556 512x512 0x2AAB0 512x512 0x05556 1024x1024 0xAAAB0 1024x1024 0x15556 �3.6.3
  3259. Color Data Extension
  3260. Texture data that is loaded is handled within the CORE as 8-bit values for ?, R, G, and B, respectively.
  3261.  
  3262. <In Twiddled format>
  3263. In the case of a Twiddled format texture, the deficiency in the number of bits is made up by appending the high-order bits (starting from the MSB) of the value at the low-order end of the value so that there are 8 bits present, as shown in the diagram below. An ? value of 0x00 indicates complete transparency, while an ? value of 0x00 indicates complete opacity.
  3264.  
  3265.  
  3266. Fig. 3-49
  3267.  
  3268. <In Non-Twiddled format>
  3269. In the case of a Non-Twiddled format texture, zeroes are appended at the low-order end of each value, as shown in the diagram below. However, when there is only one bit, that bit is repeated for the remaining seven bits similar to the case for Twiddled format.
  3270. Non-Twiddled format textures are used in order to use as a texture an image that was drawn by the CORE. If the dithering function is used when the image that was drawn is stored in texture memory, the data that is drawn may be the original texture data "+ 1." If this is repeated, the "+ 1" error accumulates in the data for the drawn image, with the possibility that the result will be completely different from the original texture data. Therefore, when color data for a Non-Twiddled format texture is extended, adding zeroes at the low-order end of the data minimizes this color data error.
  3271.  
  3272.  
  3273. Fig. 3-50
  3274. �3.6.4 Texture Format Combinations
  3275.  
  3276. Texture Control Word Supplement bit29-27 bit 31 30 26 25 Pixel
  3277. Format MIP
  3278. Mapped VQ
  3279. Compressed Scan
  3280. Order Stride
  3281. Select Any of
  3282. RGB1555, RGB565, RGB4444, YUV422, or
  3283. Bump Map 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 RGB only 1 0 0 0 Square only 1 1 0 0 RGB Square only 4BPP or
  3284. 8BPP palette 0 0 - - Twiddled format 0 1 - - Twiddled format 1 0 - - Twiddled format & square 1 1 - - Twiddled format & square <Notes>
  3285. * When "scan order" is "0," "stride select" is ignored.
  3286. * When "scan order" is "1," "MIP mapped" is ignored.
  3287. * When "scan order" is "1" and "stride select" is "1," the texture U size is specified by the stride value (bits 4 to 0) in the TEXT_CONTROL register.
  3288. * When "MIP mapped" is "1," "V size" in the TSP Instruction Word is ignored and the texture is square.
  3289.  
  3290. �3.6.5
  3291. Efficient Storage in Texture Memory
  3292. The storage status of texture data in texture memory has a major impact on drawing performance. Texture memory is divided into hardware "pages" (2048-byte areas), and in order to avoid having a negative effect on drawing performance it is important to store texture data within one page. 2048 bytes of data is equivalent to one 16-bit texture with a size of 32 ? 32.
  3293. When storing textures of varying sizes, drawing performance can be kept at a maximum by storing combinations of sizes in a well-planned manner so that no texture spans a page boundary. Even if one texture has 2K or more of data, a deterioration of drawing performance can be prevented by avoiding having texture data span page boundaries as much as possible.
  3294. In the case of VQ textures, the code book size is 2K, so it is most efficient to locate the starting address of a code book at a 2K boundary.
  3295.  
  3296.  
  3297. Fig. 3-51
  3298.  
  3299. �3.7
  3300. Display List Details
  3301. HOLLY includes two drawing blocks among its rendering blocks: the Tile Accelerator (TA), which assists in display list generation, and the CORE, which draws polygons in individual 32 ? 32-pixel Tiles.
  3302. HOLLY polygon drawing display lists include three types of data for the CORE ("Region Array," "Object List," and "ISP/TSP Parameters"), and three types of data for the TA ("Control Parameters," "Global Parameters," and "Vertex Parameters"). The data for the CORE is stored in the texture memory that is connected to the HOLLY. From its three types of data, the TA generates the Object List and ISP/TSP Parameters for the CORE and stores them in texture memory.
  3303. Therefore, four types of data are normally required: the Control Parameters, Global Parameters, and Vertex Parameters that are input to the TA, and the Region Array that the CPU stores directly in texture memory. Furthermore, the texture data is stored in texture memory in the format specified by the CORE.
  3304.  
  3305. Fig. 3-52
  3306.  
  3307. The ISP/TSP Parameters include polygon vertex data and shading data, and the Object List is a collection of the starting address of the data (ISP/TSP Parameters) for the polygons that are included within the same Tile. The Region Array specifies the positions of the Tiles on the screen and the starting addresses in the Object List that correspond to those Tiles.
  3308.  
  3309.  
  3310. Fig. 3-53
  3311.  
  3312. Normally, a display list that is stored in texture memory is used by switching between two buffers: one for the current screen, which is read by the CORE in order to draw, and one for the next screen, which is written by the CPU through the TA. The data for these two buffers can be switched for each frame through the REGION_BASE register and the PARAM_BASE register for the CORE and the TA_OL_BASE register and the TA_ISP_BASE register for the TA.
  3313. In addition, because the data values in the Region Array are determined uniquely on the basis of the number of screen Tiles, etc., they only need to be overwritten when the scene that is displayed changes, for example. In other words, once the initial two buffers' worth of Region Array data have been stored, they normally can be left as is until there is a need to overwrite them.
  3314. There are three types of data that are stored in the texture memory: the CORE display list, the texture data, and the frame buffer or strip buffer. Some of this data is used on the 64-bit bus, and some is used on the 32-bit bus. Therefore, it is necessary to store the data in texture memory in either the 64-bit access area or the 32-bit access area, whichever is appropriate.
  3315.  
  3316. Data being stored Mapping area where stored Display list 32-bit access area Texture data 64-bit access area Frame buffer or
  3317. strip buffer 32-bit access area
  3318. (64-bit access area*) * Used when using data that was already drawn as texture data.
  3319.  
  3320. There are two types of paths from the CPU bus to texture memory: one through the TA and one through a circuit called the PVR I/F. The paths through the TA permit only 32-byte burst writes through the SH4 store queue or through DMA; reading is not possible. Although reading and writing are both possible with the path through the PVR interface, this path is slower than the paths through the TA. Therefore, data transfers to texture memory are normally performed on the paths through the TA. There are four paths through the TA:
  3321.  
  3322. (1) A path that generates the Object List and ISP/TSP Parameters, and stores them in the 32-bit access area
  3323. (2) A path that converts YUV data into YUV-422 data and stores the result in the 64-bit access area
  3324. (3) A direct path to the 64-bit access area
  3325. (4) A direct path to the 32-bit access area
  3326.  
  3327. Path 1 is used to generate the Object List and ISP/TSP Parameters from the three types of TA input parameters (Control Parameters, Global Parameters, and Vertex Parameters), and then store the results in texture memory. Polygon data is normally transferred on this path. Note that the CPU creates the Region Array, and transfers it to texture memory through path 4. Path 2 is used to convert YUV data that was input in macro block units (16 pixels ? 16 pixels) into YUV-422 texture data for the CORE, and then store the results in texture memory. MPEG data is transferred on this path. Other texture data is transferred to texture memory through path 3. This path specification is made through the address of the transfer destination. For details, refer to "2.6 Data Transfers."
  3328.  
  3329.  
  3330.  
  3331. Fig. 3-54
  3332.  
  3333.  
  3334.  
  3335. Three types of data are input to the TA:
  3336.  
  3337. (1) Polygon data: TA input parameters for the display list
  3338. (2) YUV data: YUV data for individual macro blocks
  3339. (3) Direct data: Data that is written directly into texture memory (64 bits or 32 bits)
  3340.  
  3341. Distinctions are made between each type of data through the address (mapping area) indicated when the data is input to the TA. Regarding the input order, polygon data and other data (YUV data and direct data) can be combined freely, in units of 32 bytes. However, if YUV data and direct data are to be input together, the direct data must not be input until a macro block of YUV data (384 bytes of YUV420 data or 512 bytes of YUV422 data) has been input.
  3342.  
  3343.  
  3344.  
  3345. Fig. 3-55
  3346. �3.7.1
  3347. Polygon List Input
  3348. HOLLY utilizes the following five polygon lists. "Punch Through" is an Opaque polygon that uses texture data that only has texels with an alpha value of either 0.0 (transparent) or 1.0 (opaque)).
  3349. (1) Opaque: Opaque polygon
  3350. (2) Opaque Modifier Volume: Opaque polygon & Punch Through Modifier Volume
  3351. (3) Translusent: Translucent polygon
  3352. (4) Translusent Modifier Volume: Translucent polygon Modifier Volume
  3353. (5) Punch Through*: Punch Through polygon (*added for HOLLY2)
  3354. When inputting the polygon data to the TA, it is necessary to first perform a "TA reset" or a "list initialization," and then input the polygons grouped, by type. Only those lists of the necessary types need to be input; it is not necessary to input polygon lists for all five (five, in the case of HOLLY2) types. The order in which each list is input does not matter. However, each list can only be input once; a list of the same type of polygons cannot be input twice or more.
  3355.  
  3356. Fig. 3-56
  3357.  
  3358. The flow for inputting polygon lists to the TA (and parameters for the TA) is shown below (HOLLY1 only):
  3359. Following figure is deleted.
  3360.  
  3361. Fig. 3-57
  3362.  
  3363. (The following description, and the description from section 3.7.1.1 to 3.7.1.4 apply to HOLLY2.)
  3364.  
  3365. HOLLY2 HOLLY supports "multipass operation," in which polygon lists are input several times in succession. In multipass operation, "list continuation processing" is inserted after a list is input, and then processing continues with the input of the next list. This allows a list of the same type of polygon to be divided into several lists and input as more than one list of the same type.
  3366.  
  3367.  
  3368. Fig. 3-58
  3369.  
  3370. �3.7.1.1
  3371. TA Parameter Input Flow
  3372. The flow of polygon list input to the TA (TA parameter input) is shown below.
  3373.  
  3374.  
  3375. Fig. 3-59
  3376.  
  3377. The total OPB size for all of the lists that will be input to the TA must be taken into consideration when determining the value that is to be set in the TA_NEXT_OPB_INIT register before list initialization. In addition, before performing the continuation processing for the second and subsequent lists, it is necessary to change the value in the TA_OL_BASE register to the OPB starting address for that list. If necessary, also change the value in the TA_GLOB_TILE_CLIP register and in the TA_ALLOC_CTRL register.
  3378. The dummy read during TA initialization and list continuation processing is inserted in order to prevent the TA parameter input operation from being performed before the write to the TA registers due to differences in the data paths within the circuitry. Therefore, the dummy read does not have to be performed specifically on the register indicated above; any TA register is fine.
  3379. �3.7.1.2 TA Register Settings for List Input
  3380. When list initialization is performed via the TA_LIST_INIT register, the TA sets up the area from the address that is specified in the TA_OL_BASE register to the address that is specified in the TA_NEXT_OPB_INIT register as the OPB initial area in texture memory. The OPB initial area size that is needed for one TA input list is the product of the total OPB size for all lists specified by the TA_ALLOC_CTRL register before the input of that list, multiplied by the number of Tiles in the Global Tile Clip area that is specified by the TA_GLOB_TILE_CLIP register. The amount of memory that should be reserved in texture memory as the OPB initial area is the sum of the OPB initial area size for the one list added together for each of the polygon lists that are input to the TA.
  3381.  
  3382. (OPB initial area size for one list) = {(Opaque list OPB size)
  3383. + (Opaque Modifier Volume list OPB size)
  3384. + (Translucent List OPB size)
  3385. + (Translucent Modifier Volume list OPB size)
  3386. + (Punch Through list OPB size)
  3387. x (Number of Tiles in Global Tile Clip area) x 4 bytes
  3388. x 4byte
  3389.  
  3390. (OPB initial area size for list initialization) = (OPB initial area size for first list input)
  3391. + (OPB initial area size for second list input)
  3392. + (OPB initial area size for third list input)
  3393. + ... ...... .... + ... ......... +... ... ... ...
  3394.  
  3395. The value in the TA_NEXT_OPB_INIT register, which should be set prior to list initialization, is the sum starting address value of the Object List that is stored in texture memory and the OPB initial area size.
  3396.  
  3397. (TA_NEXT_OPB_INIT register value) = (TA_OL_BASE register value at list initialization)
  3398. + (OPB initial area size at list initialization)
  3399.  
  3400. In addition, it is necessary to change the value in the TA_OL_BASE register before the list continuation processing that is performed through the TA_LIST_CONT register; the value is the sum of the Object List starting address and the total of the previously input OPB initial area sizes.
  3401.  
  3402. (TA_OL_BASE register value prior to list continuation processing)
  3403. = (Value in the TA_OL_BASE register at list initialization)
  3404. + (total of the previously input OPB initial area sizes)
  3405.  
  3406. When the values in the TA_GLOB_TILE_CLIP register and the TA_ALLOC_CTRL register are changed for each list, be certain to change them prior to the list continuation processing that is performed through the TA_LIST_CONT register.
  3407.  
  3408.  
  3409. An example of the processing for inputting TA parameters twice described below.
  3410.  
  3411.  
  3412. Fig. 3-60
  3413.  
  3414. In this example, the settings for each register are determined as follows:
  3415.  
  3416. (1) Determine the starting address and limit address for storing the Object List and the ISP/TSP Parameters.
  3417. TA_OL_BASE = 0x00200000, TA_OL_LIMIT = 0x0027FFE0,
  3418. TA_ISP_BASE = 0x00280000, TA_ISP_LIMIT = 0x00300000
  3419. (2) Determine the drawing enabled areas for the polygon lists that will be input first and second.
  3420. In both cases: 2 Tiles ? 2 Tiles ? TA_GLOB_TILE_CLIP = 0x00010001
  3421.  
  3422. (3) Determine the list types and OPB sizes for the polygon lists that will be input first and second.
  3423. First list: Input all five types; OPB sizes: OP = 16, OMV = 8, TR = 16, TMV = 8, and PT = 16
  3424. ? first TA_ALLOC_CTRL = 0x00021212
  3425. Second list: Input OP and PT; OPB sizes: OP = 16, PT = 16
  3426. ? second TA_ALLOC_CTRL = 0x00020002
  3427. (4) Based on the drawing enabled area and the input list OPB size, calculate the total OPB initial area for the two lists.
  3428. First list: (16 + 8 + 16 + 8 + 16) x 4 Tiles x 4 bytes = 1024 bytes = 0x400
  3429. ? second TA_OL_BASE = 0x00200400
  3430. Second list: (16 + 16) ? 4 Tiles ? 4 bytes = 512 bytes
  3431. Total: 1024 + 512 = 1536 bytes = 0x600 ? TA_NEXT_OPB_INIT = 0x00200600
  3432. �3.7.1.3 Region Array Data Storage
  3433. The TA creates Object Lists and ISP/TSP Parameters for the same number of groups as the number of times that a list was input, basing the parameters on a polygon list that was input in several passes using the multipass function. The same quantity of Region Array data in this instance is as the number of lists that were input for one Tile is required.
  3434.  
  3435.  
  3436. Fig. 3-61
  3437.  
  3438. When drawing using a CORE display list that was created from a polygon list that was input in several pieces to the TA, drawing must continue in the same Tile. Therefore, it is necessary to store Region Array data for the same Tile in consecutive areas in texture memory. The Z Clear bit and Flush Accumulate bit within the Region Array data must be controlled according to whether the data is for the first drawing or last drawing to the same Tile.
  3439.  
  3440.  
  3441. Fig. 3-62
  3442. �3.7.1.4
  3443. Object List Starting Address for Each List
  3444. The TA stores the first OPB for each Tile from the polygon lists that were input in texture memory according to consistent rules. If a list was input in several pieces through multipass processing, a new OPB is stored each time.
  3445. The Object List starting addresses (List Pointers) for the five types of lists that are specified in the Region Array data for each Tile corresponding to each list input can be determined through the following calculations:
  3446.  
  3447. (Opaque List Pointer for Nth list input)
  3448. = OL_base + OP_size x T_num x 0x4
  3449.  
  3450. (Opaque Modifier Volume List Pointer for Nth list input)
  3451. = OL_base + (OP_size ? GC_Tile + OM_size ? T_num) ? 0x4
  3452.  
  3453. (Translucent List Pointer for Nth list input)
  3454. = OL_base + [(OP_size + OM_size) ? GC_Tile + TR_size ? T_num) ? 0x4
  3455.  
  3456. (Translucent Modifier Volume List Pointer for Nth list input)
  3457. = OL_base + [(OP_size + OM_size + TR_size) ? GC_Tile + TM_size ? T_num) ? 0x4
  3458.  
  3459. (Punch through List Pointer for Nth list input)
  3460. = OL_base + [(OP_size + OM_size + TR_size + TM_size) ? GC_Tile + PT_size ? T_num) ? 0x4
  3461.  
  3462. OL_base: Object list starting address for Nth list input (TA_OL_BASE register value)
  3463. GC_Tile: Total number of Tiles in Global Tile Clip area for Nth list input
  3464. OP_size: Opaque list OPB size for Nth list input
  3465. OM_size: Opaque Modifier Volume list OPB size for Nth list input
  3466. TR_size: Translucent List OPB size for Nth list input
  3467. TM_size: Translucent Modifier Volume list OPB size for Nth list input
  3468. PT_size: Punch Through list OPB size for Nth list input
  3469. T_num: Number of Tiles in Global Tile Clip area prior to the Tile for which the address is being derived
  3470.  
  3471.  
  3472. Fig. 3-63
  3473.  
  3474. Storage of OPBs for each Tile by TA is done in the horizontal direction, starting from the upper left corner of the screen and continuing until the Tile on the right edge of the screen, followed by the Tiles one row down, starting from the left end again, and so on.
  3475.  
  3476.  
  3477. An example of Region Array data for an Object List that was created when TA parameters were input three times is shown below. (Refer to section 3.7.7.)
  3478.  
  3479.  
  3480. Fig. 3-64
  3481.  
  3482. For example, the calculations for the List Pointers that specify Region Array for the first time for Tile (1, 0) are as follows:
  3483.  
  3484. ?Opaque List Pointer?
  3485. = 0x00200000 + 16 ? 2 ? 0x4 ? 0x00200080
  3486.  
  3487. ?Opaque Modifier Volume List Pointer?
  3488. = 0x00200000 +?16 ? 4 +8 ? 2?? 0x4 ? 0x00200140
  3489.  
  3490. ?Translucent List Pointer?
  3491. = 0x00200000 + ??16?8?? 4 + 16 ? 2?? 0x4 ? 0x00200200
  3492.  
  3493. ?Translucent Modifier Volume List Pointer?
  3494. = 0x00200000 + ??16 + 8 + 16?? 4?8 ? 2?? 0x4 ? 0x002002C0
  3495.  
  3496. ?Punch Through List Pointer?
  3497. = 0x00200000 + ??16 + 8 + 16 + 8?? 4 + 16 ? 2?? 0x4 ? 0x00200380
  3498.  
  3499. �3.7.2
  3500. Tile Arrangement
  3501. The Region Array is the first data that the CORE reads when drawing Tiles; the Region Array data indicates the positions of the Tiles in the screen. Because the CORE draws the Tiles in the order indicated in the Region Array data that is stored in texture memory, the user can freely specify the direction in which drawing proceeds within a screen. This order in which the Region Array data is stored in texture memory is called the "Tile arrangement."
  3502. Because the CPU creates the Region Array directly and stores it in texture memory, the Tile arrangement can be set freely, but the two methods that are used normally are "vertical arrangement" and "horizontal arrangement."
  3503.  
  3504.  
  3505. Fig. 3-65
  3506.  
  3507. The starting address of the Object List data is also specified in the Region Array data. Because the TA generates the Object List automatically, the address must be set accordingly. (Refer to section 3.7.3.4.) Because storage of Object List data by the TA in texture memory is done in the horizontal direction, address calculation requires special care when stacking Tiles vertically.
  3508. The drawing performance of the CORE can vary slightly, depending on the Tile arrangement. For reasons concerning the CORE's internal parameter cache hit rate, arranging the Tiles in the Y direction offers slightly better drawing performance than the X direction.
  3509. Note also that the Tile arrangement may be restricted, depending on the functions that are being used. If Y-direction filtering is to performed, it will not be performed correctly if the Tiles are not arranged in the Y direction. (Refer to section 3.4.10.) When using the strip buffer, the Tiles must be arranged in the X direction. (Refer to section 3.4.13.)
  3510.  
  3511. �3.7.3
  3512. Tile Accelerator
  3513. The TA performs the following processing in order to generate the CORE display list (Object List and ISP/TSP Parameters).
  3514. * Partitioning infinite strip polygon data
  3515. * Dividing polygons into Tiles
  3516. * Clipping Tiles
  3517. * Generating the Object List
  3518. * Generating the ISP/TSP Parameters
  3519.  
  3520. �3.7.3.1 Strip Partitioning
  3521. Polygon data (Triangle polygons) that is input to the TA is compatible with infinite strips, but the CORE only supports strips with a maximum number of six triangles. Therefore, the TA partitions infinite strip polygon data into strips of 1 to 6 triangles, and then stores the data in texture memory. The number of triangles (the strip number) in the partitioned strips can be specified within the polygon data that is input. In addition, the "end of strip" bit must be set in the last vertex data in the strip. If the last partitioned strip has fewer triangles than the number specified, then when the vertex data at the end of the strip is input, the TA generates the polygon data with that strip number.
  3522. The TA does not support strips of Spites (Quad polygons) or Modifier Volumes (Triangle polygons).
  3523.  
  3524.  
  3525.  
  3526. Fig. 3-66
  3527.  
  3528.  
  3529. �3.7.3.2
  3530. Tile Division
  3531. The TA supports a drawing screen of up to 1280 pixels (H) ? 480 pixels (V). Because the Tile size is fixed at 32 pixels ? 32 pixels, the number of Tiles on the screen is 40 Tiles (H) ? 15 Tiles (V) (for a total of 600 Tiles).
  3532.  
  3533.  
  3534. Fig. 3-67
  3535.  
  3536. The CORE requires an Object List that shows the starting address of the polygon data (the ISP/TSP Parameters) that is included in each Tile. In order to generate this Object List, the TA divides the polygons that are input into Tiles. This processing converts the floating-point X and Y vertex coordinates that were input into integer values by truncating the decimal portion, then determines the rectangle area (which consists of all of the individual Tiles that enclose the entire polygon) on the basis of the minimum and maximum X and Y coordinates. All of the Tiles within the area are deemed to contain part of the polygon.
  3537. After being input to the TA and then partitioned into strips, the polygon data is registered in the Object List for the Tiles inside the bounding box. Therefore, the polygon is registered even in the Object List for Tiles which do not actually contain part of the polygon, so the amount of Object List data may be larger than what might be expected. Note especially that in the case of a long, thin polygon that is displayed on an angle will result in most Tiles being such "wasted" Tiles.
  3538.  
  3539.  
  3540. Fig. 3-68
  3541.  
  3542. �3.7.3.3
  3543. Tile Clipping
  3544. When dividing a polygon into Tiles, it is possible to specify the clipping area in units of Tiles. Each polygon is then registered in Object Lists only for Tiles within the valid drawing area. There are two types of clipping areas that can be specified: a Global Tile Clipping area (that is valid for all polygons) and a User Tile Clipping area (that can be specified for individual polygons). For each type, the rectangular area is specified through the numbers of the Tiles that occupy the upper left and lower right corners. The Global Tile Clipping area values are specified through the TA_GLOB_TILE_CLIP register, and the User Tile Clipping area values are specified through the User Tile Clipping parameter (a Control Parameter). The inside of the Global Tile Clipping area is always the valid area, while for the User Tile Clipping area it is possible to select either "off," "inside valid," or "outside valid." The valid drawing area is determined by ANDing these two areas together (i.e., by taking the logical product).
  3545. The Global Tile Clipping and User Tile Clipping areas are both used for Modifier Volume polygons.
  3546.  
  3547. Fig. 3-69
  3548.  
  3549.  
  3550. Fig. 3-70
  3551. �3.7.3.4 Object List Generation
  3552. Polygons that are input to the TA are registered in an Object List that corresponds to the Tiles that are located in the bounding box as a result of Tile division. The TA has a built-in 600-Tile buffer, called the "object List Pointer buffer," that is used to retain individual Tile data that is necessary in order to generate the Object List. The CPU can read this information by using the TA_OL_POINTERS register.
  3553. The Object List consists of a data block that ranges in size from 8, 16, 32 ? 32 bits, called the "Object Pointer Block (OPB);" the size of the OPB can be specified for each type of list through the TA_ALLOC_CTRL register. The OPB that the TA stores in texture memory corresponds to the Tiles in the Global Tile Clipping area; no Object List is stored for Tiles outside of the area. Note that no parameters are input to the TA for lists of a type for which "no list" was specified for the OPB size.
  3554. Once the list that is currently being input is ended by inputting the "end of list" Control Parameter, the TA automatically stores the "end of list" data (Refer to "Object Pointer Block Link Data" in section 3.7.8) in the Object Pointer Block for each Tile.
  3555.  
  3556. �3.7.3.4.1 List Initialization Processing and List Continuation Processing
  3557. The description in this section is separate for HOLLY1 and HOLLY2, because the processing is different.
  3558. In HOLLY1, if list initialization is performed through the TA_LIST_INIT register, the TA allocates an Object List data area in texture memory, starting from the address that is specified in the TA_OL_BASE register. The amount of memory that is allocated is twice the number of Tiles in the Global Tile Clipping area specified in the TA_GLOB_TILE_CLIP register for the OPB size that was specified in the TA_ALLOC_CTRL register for each list type. In addition, the order of the Tiles stored in memory is (1) from left to right and (2) from top to bottom. The order of the lists is (1) opaque, (2) opaque Modifier Volume, (3) translucent, and (4) translucent Modifier Volume.
  3559.  
  3560. The amount of memory allocated for the Object List upon initialization =
  3561. ?(OPB size for Opaque Lists)
  3562. (OPB size for opaque Modifier Volume lists)
  3563. (OPB size for translucent lists)
  3564. (OPB size for translucent Modifier Volume lists)?
  3565. ? (number of Tiles in the Global Tile Clipping area)
  3566. ? 32 bits
  3567.  
  3568. Fig. 3-71
  3569. In this way, the TA stores the initial Object Pointer Block for each Tile in texture memory according to fixed rules. Therefore, the starting addresses of the Object Lists for the four lists that must be set in the Region Array can be derived according to the following calculations:
  3570.  
  3571. (Object list starting address for Opaque List)
  3572. = OL_base ? OP_size ? TP_num ? 4h
  3573.  
  3574. (Object list starting address for opaque Modifier Volume list)
  3575. = OL_base ??OP_size ? GC_Tile ? OM_size ? T_num? ? 4h
  3576.  
  3577. (Object list starting address for translucent list)
  3578. = OL_base ???OP_size?OM_size? ? GC_Tile ? TP_size�T_num? ? 4h
  3579.  
  3580. (Object list starting address for translucent Modifier Volume list)
  3581. = OL_base ???OP_size?OM_size?TP_size? ? GC_Tile ? TP_size ? T_num? ? 4h
  3582.  
  3583. OL_base: Object list base address
  3584. OL_base: Object list base address
  3585. GC_Tile: Total number of Tiles in the Global Tile Clipping area
  3586. OP_size: OPB size for Opaque List
  3587. OM_size: OPB size for opaque Modifier Volume list
  3588. TP_size: OPB size for translucent list
  3589. TM_size: OPB size for translucent Modifier Volume list
  3590. T_num: Number of Tiles in the Global Tile Clipping area prior to the Tile in question
  3591.  
  3592.  
  3593. Fig. 3-72
  3594.  
  3595. In HOLLY2, list continuation processing has been added to the HOLLY1 specifications; If list initialization is performed through the TA_LIST_INIT register, the TA initializes its internal status, loads the value in the TA_NEXT_OPB_INIT register into the TA_NEXT_OPB register, and then allocates space in texture memory as the OPB initial area, from the address that is specified in the TA_OL_BASE register to the address that is specified in the TA_NEXT_OPB_INIT register.
  3596. If list continuation processing is performed through the TA_LIST_CONT register, the TA initializes its internal status in the same manner as before, but leaves the TA_NEXT_OPB register unchanged. As a result, the additional OPB for the list that is continuing to be input is stored after the OPB that was input last time.
  3597. The sequence of the Tile OPBs that are stored in texture memory is the same as when Tiles are arranged horizontally. The order of the lists is: (1) Opaque (2) Opaque Modifier Volume (3) Translucent (4) Translucent Modifier Volume (5) Punch Through.
  3598.  
  3599.  
  3600.  
  3601. Fig. 3-73
  3602.  
  3603. �3.7.3.4.2
  3604. Adding an OPB
  3605. The number of objects that can be registered in one Object Pointer Block is (OPB size - 1).
  3606. In HOLLY1, if the number of objects that are included in that Tile exceeds that value, the TA adds a new Object Pointer Block in texture memory. The TA automatically stores the starting address for the newly added OPB in the final data of the OPB. (Refer to "Object Pointer Block Link Data" in section 3.7.8.)
  3607. Following figure is deleted.
  3608.  
  3609.  
  3610. Fig. 3-74
  3611.  
  3612. When adding a new Object Pointer Block, the address direction can be specified through the TA_ALLOC_CTRL register.
  3613.  
  3614.  
  3615. Fig. 3-75
  3616. In HOLLY2, If the number of objects that are included in a Tile exceed that value, the TA allocates an additional OPB area sufficient for the OPB size of that list, starting form the address indicated by the TA_NEXT_OPB register, and stores a pointer for the excess object in that address. At the same time, the value in the TA_NEXT_OPB register, which is the starting address of the additional OPB, is automatically stored in the last address of the OPB that was stored previously. (Refer to "Object Pointer Block Link Data," section 3.7.8.) In addition, the value in the TA_NEXT_OPB register is updated to the starting address of the next additional OPB.
  3617. When a list is input on a continuation basis, the additional OPB is added after the address where the previous OPB was stored.
  3618.  
  3619.  
  3620. Fig. 3-76
  3621.  
  3622.  
  3623. The direction of the addresses when adding a new OPB can be specified in the TA_ALLOC_CTRL register.]
  3624.  
  3625.  
  3626. Fig. 3-77
  3627. �3.7.3.4.3
  3628. Processing When a Limit Address Is Exceeded
  3629. If the Object List data storage address has exceeded the Object List limit address specified in the TA_OL_LIMIT register, that Object List data is not stored in texture memory. In this event, the TA stores the "End of List" Object List data at the limit address, and links to this "End of List" the OPBs for all of the Tiles for which additional OPBs could not be stored. Therefore, the address that is specified in the TA_OL_LIMIT register cannot be used for other data, etc.
  3630.  
  3631.  
  3632. Fig. 3-78
  3633.  
  3634.  
  3635. �3.7.3.5
  3636. ISP/TSP Parameter Generation
  3637. Polygon lists that are input from the CPU are rearranged by the TA into ISP/TSP Parameter format, and are stored in texture memory in order, starting from the address that is specified in the TA_ISP_BASE register. In HOLLY2, When a list is input on a continuation basis, the ISP/TSP Parameters are stored after the address where the parameters were stored the previous time. However, data for polygons that do not exist at all within the effective drawing area jointly defined by the Global Tile Clipping area and the User Tile Clipping areas is discarded and is not stored in texture memory.
  3638. Furthermore, polygon data is not stored in an address that exceeds the ISP/TSP Parameter limit address that was specified in the TA_ISP_LIMIT register. Therefore, a display list in which the limit address was exceeded cannot be used for drawing. Users must take into consideration the size of the ISP/TSP Parameter data that will be stored in texture memory, based on number of polygons that are to be input to the TA, when specifying the limit address.
  3639. Three formats are supported for the Shading Color data within the polygon data that is input to the TA: "Packed Color," "Floating Color," and "intensity." However, the CORE supports "Packed Color" only. Therefore, the TA converts the shading data that is input into 32-bit Packed Color format before storing the data in texture memory.
  3640.  
  3641. <Shading data conversion>
  3642. Floating Color ? Packed Color
  3643. The TA converts each element of ARGB data into a fixed decimal value between 0.0 and 1.0, multiples the value by 255, and packs the result in a 32-bit value.
  3644.  
  3645. Intensity ? Packed Color
  3646. Regarding alpha values, the TA converts the specified Face Color Alpha value into a fixed decimal value between 0.0 and 1.0, multiples the value by 255, and derives an 8-bit value. Regarding RGB values, the TA converts the specified Face Color R/G/B value into a fixed decimal value between 0.0 and 1.0, multiples the value by 255, converts the intensity value into a fixed decimal value between 0.0 and 1.0, multiplies the converted R/G/B value and the converted intensity value together, multiplies that result by 255, and derives an 8-bit value for each of R, G, and B. Finally, the TA packs each 8-bit value into a 32-bit value.
  3647.  
  3648. �3.7.4
  3649. Explanation of TA Parameters
  3650. There are three types of polygon data that are input to the TA: Control Parameters, Global Parameters, and Vertex Parameters. One data element consists of 32 or 64 bytes of each. The first four bytes of each type of parameter are called the Parameter Control Word, which is used for determining the parameter settings and type.
  3651. The Control Parameters are used for special processing, such as ending the Object List. The Global Parameters consist of various settings that apply to the polygons that are expressed by the Vertex Parameters, which are input after the Global Parameters. In the case of a Triangle polygon, a minimum of at least three Vertex Parameters is required. The Vertex Parameters contain vertex data for polygons that also use the settings in the Global Parameters that were input previously.
  3652. The Global Parameters and Vertex Parameters must be grouped together for input by list type (opaque, translucent, etc.) Furthermore, although there are no restrictions on the input order for the four types of lists (opaque, etc.), parameters for polygons of one particular type may only be input once.
  3653.  
  3654. �3.7.4.1 Control Parameter
  3655. The Control Parameters are used for special processing, such as ending the Object List.
  3656. Parameter type Processing End Of List Ends the list for the type (opaque, translucent, etc.) that is currently being input. This parameter must be input last in the list for each type. User Tile Clip Specifies the User Tile Clipping values. The specified values remain valid until they are updated. The clipping values specify the Tile number for the Tiles in the upper left and lower right corners of the rectangular area. Only the lower six bits are valid for Tile numbers in the X direction. Only the upper four bits are valid for Tile numbers in the Y direction. In addition, do not specify a value greater than 39 (0x27) for the Tile number in the X direction, or greater than 14 (0xE) for the Tile number in the Y direction.
  3657. User Clip X Min: Upper left Tile number in the X direction (0 to 39)
  3658. User Clip Y Min: Upper left Tile number in the Y direction (0 to 14)
  3659. User Clip X Max: Lower right Tile number in the X direction (0 to 39)
  3660. User Clip Y Max: Lower right Tile number in the Y direction (0 to 14) Object List Set This is used to register polygons of a type that is not supported by the TA, or to register just an Object List. The specified Object Pointer data is stored in the Object List for the Tiles in the specified bounding box.
  3661. In the Object Pointer value, specify the data that is to be stored in the Object List.
  3662. In the bounding box values, specify the upper left and lower right Tile numbers that define the rectangular area that includes the object. Only the lower six bits are valid for Tile numbers in the X direction. Only the upper four bits are valid for Tile numbers in the Y direction. In addition, do not specify a value greater than 39 (0x27) for the Tile number in the X direction, or greater than 14 (0xE) for the Tile number in the Y direction.
  3663. Bounding Box X Min: Upper left Tile number in the X direction (0 to 39)
  3664. Bounding Box Y Min: Upper left Tile number in the Y direction (0 to 14)
  3665. Bounding Box X Max: Lower right Tile number in the X direction (0 to 39)
  3666. Bounding Box Y Max: Lower right Tile number in the Y direction (0 to 14) Once the End of List parameter has been input and all of the data for polygons of the type currently being input have been stored in texture memory, one of four types of interrupt signals (corresponding to the polygon type) is output. As a result of this interrupt request, the CPU knows that the TA has completed processing for that polygon type.
  3667. When performing clipping processing that uses a User Tile Clipping area, the clipping values must already be specified beforehand through the User Tile Clip parameters.
  3668.  
  3669. <Using Object List Set>
  3670. Use the Object List Set parameters in the following cases:
  3671.  
  3672. (1) When you only want to register an Object List, without storing the ISP/TSP Parameters again for polygons that will be absolutely unchanged on the screen
  3673. (2) When you only want to register a type of polygon that the TA does not support (such as a Gouraud shaded Quad polygon)
  3674.  
  3675. Input the Object List Set parameters after the list has been initialized by the TA_LIST_INIT register, or after the End Of List parameter. First, store the ISP/TSP Parameters that were generated by the CPU directly in the texture memory, and then set the last address value in the TA_ISP_BASE register. For the data in the parameters, set the values for the bounding box for the polygon to be registered under the ISP/TSP Parameters that were already stored, and set the Object Pointer value that specifies the starting address, etc., for the ISP/TSP Parameters. Once the Object List Set parameters have been completely input, input the remaining polygon data as normal parameters.
  3676.  
  3677. �3.7.4.2
  3678. Global Parameter
  3679. The Global Parameters consist of three types of control data that are stored in texture memory as the ISP/TSP Parameters, and parameters that specify the data configuration of the Vertex Parameters that are input subsequently.
  3680. Parameter type Processing Polygon This is used when the list type is either Opaque or Translucent. There are five types of parameters with different data configurations. The Vertex Parameters that are input subsequently are used to generate Triangle polygon data for the strip number that is specified in the Parameter Control Word.
  3681. These parameters specify the Face Color when the Shading Color type in the Vertex Parameters is "Intensity" format. The Face Color is the color data (a 32-bit floating-point decimal value) that is multiplied by the vertex intensity value. There are two types of Face Colors: one for the Base Color and one for the Offset Color.
  3682. Face Color: for Base Color
  3683. Face Offset Color: for Offset Color
  3684. Input polygons for which the settings will change inside and outside of the volume in "with Two Volumes" format. In "with Two Volumes" format, two TSP Instruction Words, two Texture Control Words, and two Face Colors are set.
  3685. Also specify Sort-DMA data, if necessary. Sprite This is used when the list type is either Opaque or Translucent.
  3686. The Vertex Parameters that are input subsequently are used to generate flat shaded independent Quad polygon data.
  3687. Specify the Base Color and Offset Color for Flat Shading. (Both use 32-bit packed ARGB data.)
  3688. Also specify Sort DMA data, if necessary. Modifier
  3689. Volume This is used when the list type is either Opaque Modifier Volume or Translucent Modifier Volume.
  3690. The Vertex Parameters that are input subsequently are used to generate independent Triangle polygon data. The Triangle polygon data in the Vertex Parameters that are input after the Global Parameter that was specified as the end of the volume in the Parameter Control Word is registered in all of the Tile Object Lists that encompass the entire volume.
  3691.  
  3692. When transferring translucent polygon data by using the Sort-DMA function (refer to 2.6.5.3), it is necessary to set the Sort-DMA data. In addition, when using the Sort-DMA function, the "Polygon Type 1" Global Parameter must not be used.
  3693. Data Description Data Size
  3694. for Sort-DMA This specifies in 32-byte units the data size (including the Control Parameters, the Global Parameters, and the Vertex Parameters) of the objects that includes the Global Parameters in question. Only the lower 8 bits are valid; if "0" is specified, it is treated as "256." Note that "1" through "3" may not be specified. Next Address for Sort-DMA This specifies the offset address value for the object parameters that are to be transferred next. The actual address is the sum of the base address value specified in the SB_SDBAAW (0x005F 6814) register plus this value. Only the lower 27 bits are valid. The SB_SDLAS register (0x005F 681C) is used to specify whether this value is specified in 1-byte or 32-byte units. The following values have special meanings:
  3695. Link End Code (0x0000 0001): Link table read
  3696. Link All End Code (0x0000 0002): Sort-DMA end
  3697. �3.7.4.3 Vertex Parameter
  3698. The Vertex Parameters specify a variety of data for the vertices. The Vertex Parameters must always be input after the Global Parameters. The data configuration of the Vertex Parameters is determined by the type of Global Parameters (Polygon/Sprite/Volume Modifier) that were input previously and the Parameter Control Word.
  3699. Parameter type Processing Polygon This is used when the Global Parameters that were input previously were of the Polygon type.
  3700. There are 15 types of parameters with different data configurations, and it is necessary to input a minimum of three. "End of Strip" must be specified at the end of the object. If the parameters are to be input in "with Two Volumes" format, set two each of the UV, Base/Offset Color, and Base/Offset Intensity parameters for the inside and outside of the volume. Sprite This is used when the Global Parameters that were input previously were of the Sprite type.
  3701. There are two types of parameters with different data configurations. Specify data for four vertices for one polygon to generate Flat-Shaded independent Quad polygon data. Modifier
  3702. Volume This is used when the Global Parameters that were input previously were of the Modifier Volume type.
  3703. Specify data for three vertices for one polygon to generate independent Triangle polygon data for the Modifier Volume.
  3704. Data Data X, Y, Z Vertex coordinates (IEEE single-precision floating point values)
  3705. Specify the screen coordinates for X and Y, and a reciprocal (1/z or 1/w) for Z. U, V Texture coordinates (16-bit or 32-bit floating point values)
  3706. For 32-bit UV, specify IEEE single-precision floating point values. For 16-bit UV, extract the upper 16 bits of the 32-bit floating point values for U and V respectively, and specify a 32-bit value consisting of U as the upper 16 bits and V as the lower 16 bits. Base/Offset Color Shading Color data (32-bit integers) for Packed Color format
  3707. Store these values as is in the ISP/TSP Parameters. Base/Offset Color
  3708. Alpha/R/G/B Shading Color data (32-bit floating-point values) for Floating Color format
  3709. Convert each data element into an 8-bit integer (0 to 255), group them into 32-bit values, and store them in the ISP/TSP Parameters. Base/Offset Intensity Shading Color data (32-bit floating-point values) for Intensity format
  3710. Convert the Face Color alpha values specified in the Global Parameters into 8-bit integers (0 to 255). Multiply the RGB values by the corresponding Face Color R/G/B value, and convert the result into an 8-bit integer (0 to 255). Combine each 8-bit value thus obtained into a 32-bit value and store it in the ISP/TSP Parameters. In the case of the Polygon type, the last Vertex Parameter for an object must have "End of Strip" specified. If Vertex Parameters with the "End of Strip" specification were not input, but parameters other than the Vertex Parameters were input, the polygon data in question is ignored and an interrupt signal is output.
  3711. When using Bump Mapping, input the Bump Map parameters instead of the Offset Color. The Shading Color type must be set to something other than Intensity format. The Bump Map parameters are valid for the third and subsequent vertices from the start of the strip.
  3712. In the case of a flat-shaded polygon, the Shading Color data (the Base Color, Offset Color, and Bump Map parameters) become valid starting with the third vertex after the start of the strip.
  3713.  
  3714. �3.7.4.4 Parameter Control Word
  3715. This data is used to determine the data configuration and type of each parameter. The Parameter Control Word is added to the first four bytes.
  3716.  
  3717. bit 31-24 23-16 15-0 Para Control Group Control Obj Control
  3718. �3.7.4.4.1 Para Control
  3719. This is the control data for all of the parameters. The End Of Strip bit (only) is valid only in the Vertex Parameters.
  3720.  
  3721. bit 31-29 28 27-26 25-24 Para Type End Of Strip Reserved List Type
  3722. The control data for HOLLY2 is shown below.
  3723. bit 31-29 28 27 26-24 Para Type End Of Strip Reserved List Type
  3724. Para Type
  3725. Specifies the parameter type.
  3726.  
  3727. Parameter type Parameter Hex Code Control Parameter End Of List 0 User Tile Clip 1 Object List Set 2 Reserved 3 Global Parameter Polygon or Modifier Volume 4 Sprite 5 Reserved 6 Vertex Parameter 7
  3728. End Of Strip
  3729. Valid only in the Vertex Parameters. A parameter in which this bit is "1" ends a strip. The Spite and Modifier Volume Vertex Parameter must be set to "1".
  3730.  
  3731. List_Type
  3732. Specifies the Object List type. This value is valid in the following four cases:
  3733.  
  3734. (a) The first Global Parameter that was input after list initialization through the TA_LIST_INIT register or after list continuation processing through the TA_LIST_CONT register.
  3735. (b) The first Global Parameter that was input after an End Of List parameter was input
  3736. (c) The first Object List Set parameter that was input after list initialization through the TA_LIST_INIT register or after list continuation processing through the TA_LIST_CONT register.
  3737. (d) The first Object List Set parameter that was input after an End Of List parameter was input
  3738.  
  3739. List type Code Parameters that can be used Opaque 0 Polygon or Sprite Opaque Modifier Volume 1 Modifier Volume Translucent 2 Polygon???Sprite Translucent Modifier Volume 3 Modifier Volume Punch Through (HOLLY2) 4 Polygon or Sprite Reserved (HOLLY2) 5~7 Prohibited
  3740. �3.7.4.4.2 Group Control
  3741. This is the control data for an object group. This is valid only in Global Parameters.
  3742.  
  3743. bit 23 22-20 19-18 17-16 Group_En Reserved Strip_Len User_Clip
  3744. Group_En
  3745. Set "1" in order to update the Strip_Len and User_Clip settings. If "0" is set, the existing settings are used.
  3746.  
  3747. Strip_Len
  3748. Specifies the length of the strip that is to be partitioned. This is valid only when Group_En is "1".
  3749.  
  3750. Code strip??? 0 1 strip 1 2 strip 2 4 strip 3 6 strip
  3751. User_Clip
  3752. Specifies how the User Tile Clipping area is to be used. This is valid only when Group_En is "1".
  3753.  
  3754. Code User Tile Clipping 0 Disable 1 Reserved 2 Inside enable 3 Outside enable
  3755. �3.7.4.4.3 Obj Control
  3756. This data sets an object. This is valid only in Global Parameters.
  3757.  
  3758. bit 15-8 7 6 5-4 3 2 1 0 Reserved Shadow Volume Col_Type Texture Offset Gouraud 16bit_UV
  3759. Shadow
  3760. The value of this bit is used in "Shadow bit (bit 24)" of the Object List. This bit must be set to "1" for parameters in "with Two Volumes" format. In Intensity Volume Mode, set this bit to "1" in order to perform shadow processing on a polygon.
  3761.  
  3762. Volume
  3763. This specifies whether the parameters are in "with Two Volumes" format, or whether or not the polygon is the last Triangle polygon in the volume. In the case of the Modifier Volume type, the Volume Instruction (bits 31 to 29) in the ISP/TSP Instruction Word must be set correctly, along with this bit. In the case of the Sprite type, set this bit to "0."
  3764.  
  3765. Parameter type Bit Value Explanation Polygon 0 For a format other than "with Two Volumes" 1 For "with Two Volumes" format Modifier Volume 0 For a Triangle polygon that is not the last in the volume 1 For a Triangle polygon that is the last in the volume
  3766. Shadow Bit and Volume Bit Combinations
  3767. Shadow Volume Explanation Polygon Modifier Volume 0 0 Normal polygons, or polygons for which shadow processing is not performed (in Intensity Volume mode) Triangle polygons that are not the last in the volume 0 1 Reserved Triangle polygon that is the last in the volume 1 0 Polygons for which shadow processing is performed (in Intensity Volume mode) Reserved 1 1 Polygons in "with Two Volumes" format Reserved
  3768.  
  3769. Col_Type
  3770. Specifies the format for the Shading Color data that is to be input. For Intensity format, if the Face Color that was used for the previous object is to be used for the current object, the amount of data that has to be transferred can be reduced by specifying "Intensity Mode 2," since the same Face Color data does not have to be input again.
  3771.  
  3772. Code Color data format Description 0 Packed Color 8-bit values for each of A, R, G, and B 1 Floating Color 32-bit floating-point values for each of A, R, G, and B 2 Intensity Mode 1 The Face Color is specified by the immediately preceding Global Parameters. 3 Intensity Mode 2 The previous Face Color value that was specified by Global Parameters in Intensity Mode 1 is used for the Face Color. Note that a polygon for which this mode is used must only be input after a Mode 1 polygon has been input at least once. It is not necessary for the Mode 1 polygon to have immediately preceded this polygon.
  3773. Texture
  3774. Set this bit to "1" when using a texture. The value of this bit is used in the Texture bit in the TSP Instruction Word in the ISP/TSP Parameters.
  3775.  
  3776. Offset
  3777. Set this bit to "1" when using an Offset Color. The value of this bit is used in the Offset bit in the TSP Instruction Word in the ISP/TSP Parameters.
  3778. Set this bit to "1" for a Bump Mapped polygon.
  3779.  
  3780. Gouraud
  3781. Set this bit to "1" when using Gouraud Shading. When this bit is "0," Flat Shading is set and the Shading Color data for the third and subsequent vertices becomes valid. The value of this bit is used in the Gouraud Shading bit in the TSP Instruction Word in the ISP/TSP Parameters.
  3782. Set "0" in the case of a Spite.
  3783.  
  3784. 16bit_UV
  3785. Set this bit to "1" when using 16-bit values for the Texture UV coordinate values. If this bit is "0," 32-bit values are used. The value of this bit is used in the 16-bit UV bit in the TSP Instruction Word in the ISP/TSP Parameters.
  3786. Set "1" in the case of a Spite.
  3787.  
  3788. Four bits in the ISP/TSP Instruction Word are overwritten with the corresponding bit values from the Parameter Control Word.
  3789.  
  3790. Parameter Control Word ISP/TSP Instruction Word Bit 3 Texture --> Bit 25 Texture Bit 2 Offset --> Bit 24 Offset Bit 1 Gouraud --> Bit 23 Gouraud shading Bit 0 16bit_UV --> Bit 22 16 Bit UV
  3791. �3.7.5
  3792. Parameter Format
  3793. The three types of parameters (Control Parameters, Global Parameters, and Vertex Parameters) are actually input to the TA in the form of 64-bit data. The data configuration used is shown below.
  3794.  
  3795. bit 63-32 bit 31-0 0x04 0x00 0x0C 0x08 0x14 0x10 0x1C 0x18 0x24 0x20 0x2C 0x28 0x34 0x30 0x3C 0x38
  3796.  
  3797. �3.7.5.1 Control Parameter Format
  3798.  
  3799. End Of List 0x00 Parameter Control Word(0x0000 0000) 0x04 (ignored) 0x08 (ignored) 0x0C (ignored) 0x10 (ignored) 0x14 (ignored) 0x18 (ignored) 0x1C (ignored)
  3800. User Tile Clip 0x00 Parameter Control Word(0x2000 0000) 0x04 (ignored) 0x08 (ignored) 0x0C (ignored) 0x10 User Clip_X_Min <-- invalid bit 5-0 0x14 User Clip_Y_Min <-- invalid bit 3-0 0x18 User Clip_X_Max <-- invalid bit 5-0 0x1C User Clip_Y_Max <-- invalid bit 3-0
  3801. Object List Set 0x00 Parameter Control Word(0x4000 0000) 0x04 Object Pointer 0x08 (ignored) 0x0C (ignored) 0x10 Bounding Box X_Min <-- invalid bit 5-0 0x14 Bounding Box Y_Min <-- invalid bit 3-0 0x18 Bounding Box X_Max <-- invalid bit 5-0 0x1C Bounding Box Y_Max <-- invalid bit 3-0
  3802.  
  3803. �3.7.5.2
  3804. Global Parameter Format
  3805.  
  3806. Polygon Type 0
  3807. (Packed/Floating Color) Polygon Type 1
  3808. (Intensity, no Offset Color) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 ISP/TSP Instruction Word 0x04 ISP/TSP Instruction Word 0x08 TSP Instruction Word 0x08 TSP Instruction Word 0x0C Texture Control Word 0x0C Texture Control Word 0x10 (ignored) 0x10 Face Color Alpha 0x14 (ignored) 0x14 Face Color R 0x18 Data Size for Sort DMA 0x18 Face Color G 0x1C Next Address for Sort DMA 0x1C Face Color B
  3809. Polygon Type 2
  3810. (Intensity, use Offset Color) Polygon Type 3
  3811. (Packed Color, with Two Volumes) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 ISP/TSP Instruction Word 0x04 ISP/TSP Instruction Word 0x08 TSP Instruction Word 0x08 TSP Instruction Word 0 0x0C Texture Control Word 0x0C Texture Control Word 0 0x10 (ignored) 0x10 TSP Instruction Word 1 0x14 (ignored) 0x14 Texture Control Word 1 0x18 Data Size for Sort DMA 0x18 Data Size for Sort DMA 0x1C Next Address for Sort DMA 0x1C Next Address for Sort DMA 0x20 Face Color Alpha 0x24 Face Color R 0x28 Face Color G 0x2C Face Color B 0x30 Face Offset Color Alpha 0x34 Face Offset Color R 0x38 Face Offset Color G 0x3C Face Offset Color B
  3812. Polygon Type 4
  3813. (Intensity, with Two Volumes) 0x00 Parameter Control Word 0x04 ISP/TSP Instruction Word 0x08 TSP Instruction Word 0 0x0C Texture Control Word 0 0x10 TSP Instruction Word 1 0x14 Texture Control Word 1 0x18 Data Size for Sort DMA 0x1C Next Address for Sort DMA 0x20 Face Color Alpha 0 0x24 Face Color R 0 0x28 Face Color G 0 0x2C Face Color B 0 0x30 Face Color Alpha 1 0x34 Face Color R 1 0x38 Face Color G 1 0x3C Face Color B 1
  3814.  
  3815.  
  3816.  
  3817. Sprite (Packed Color) 0x00 Parameter Control Word 0x04 ISP/TSP Instruction Word 0x08 TSP Instruction Word 0x0C Texture Control Word 0x10 Base Color 0x14 Offset color 0x18 Data Size for Sort DMA 0x1C Next Address for Sort DMA
  3818. Modifier Volume 0x00 Parameter Control Word 0x04 ISP/TSP Instruction Word 0x08 (ignored) 0x0C (ignored) 0x10 (ignored) 0x14 (ignored) 0x18 (ignored) 0x1C (ignored)
  3819.  
  3820. <Notes>
  3821. * If textures are not used, the Texture Control Word is ignored.
  3822. * In the case of Polygon Type 4 (Intensity, with Two Volumes), the Face Color is used in both the Base Color and the Offset Color.
  3823. * The seventh (0x18) and eighth (0x1C) data items in all Global Parameter configurations, except for Polygon Type 1 and Modifier Volume, are Sort-DMA parameters. It is necessary to set these parameters if data is to be transferred using Sort-DMA.
  3824.  
  3825. �3.7.5.3
  3826. Vertex Parameter Format
  3827. In HOLLY2, there are changes to the parameters for polygon types 0 and 2. Refer to the end of this section for details.
  3828.  
  3829. Polygon Type 0
  3830. (Non-Textured, Packed Color) Polygon Type 1
  3831. (Non-Textured, Floating Color) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 (ignored) 0x10 Base Color Alpha 0x14 (ignored) 0x14 Base Color R 0x18 Base Color 0x18 Base Color G 0x1C (ignored) 0x1C Base Color B
  3832. Polygon Type 2
  3833. (Non-Textured, Intensity) 0x00 Parameter Control Word 0x04 X 0x08 Y 0x0C Z 0x10 (ignored) 0x14 (ignored) 0x18 Base Intensity 0x1C (ignored)
  3834. Polygon Type 3
  3835. (Packed Color) Polygon Type 4
  3836. (Packed Color, 16bit UV) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 U 0x10 U / V 0x14 V 0x14 (ignored) 0x18 Base Color 0x18 Base Color 0x1C Offset Color 0x1C Offset Color
  3837. Polygon Type 5
  3838. (Floating Color) Polygon Type 6
  3839. (Floating Color, 16bit UV) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 U 0x10 U / V 0x14 V 0x14 (ignored) 0x18 (ignored) 0x18 (ignored) 0x1C (ignored) 0x1C (ignored) 0x20 Base Color Alpha 0x20 Base Color Alpha 0x24 Base Color R 0x24 Base Color R 0x28 Base Color G 0x28 Base Color G 0x2C Base Color B 0x2C Base Color B 0x30 Offset Color Alpha 0x30 Offset Color Alpha 0x34 Offset Color R 0x34 Offset Color R 0x38 Offset Color G 0x38 Offset Color G 0x3C Offset Color B 0x3C Offset Color B
  3840. Polygon Type 7
  3841. (Intensity) Polygon Type 8
  3842. (Intensity, 16bit UV) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 U 0x10 U / V 0x14 V 0x14 (ignored) 0x18 Base Intensity 0x18 Base Intensity 0x1C Offset Intensity 0x1C Offset Intensity
  3843. Polygon Type 9
  3844. (Non-Textured, Packed Color,
  3845. with Two Volumes) Polygon Type 10
  3846. (Non-Textured, Intensity,
  3847. with Two Volumes) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 Base Color 0 0x10 Base Intensity 0 0x14 Base Color 1 0x14 Base Intensity 1 0x18 (ignored) 0x18 (ignored) 0x1C (ignored) 0x1C (ignored)
  3848. Polygon Type 11
  3849. (Textured, Packed Color,
  3850. with Two Volumes) Polygon Type 12
  3851. (Textured, Packed Color, 16bit UV,
  3852. with Two Volumes) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 U0 0x10 U0 / V0 0x14 V0 0x14 (ignored) 0x18 Base Color 0 0x18 Base Color 0 0x1C Offset Color 0 0x1C Offset Color 0 0x20 U1 0x20 U1 / V1 0x24 V1 0x24 (ignored) 0x28 Base Color 1 0x28 Base Color 1 0x2C Offset Color 1 0x2C Offset Color 1 0x30 (ignored) 0x30 (ignored) 0x34 (ignored) 0x34 (ignored) 0x38 (ignored) 0x38 (ignored) 0x3C (ignored) 0x3C (ignored)
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858. Polygon Type 13
  3859. (Textured, Intensity,
  3860. with Two Volumes) Polygon Type 14
  3861. (Textured, Intensity, 16bit UV,
  3862. with Two Volumes) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 U0 0x10 U0 / V0 0x14 V0 0x14 (ignored) 0x18 Base Intensity 0 0x18 Base Intensity 0 0x1C Offset Intensity 0 0x1C Offset Intensity 0 0x20 U1 0x20 U1 / V1 0x24 V1 0x24 (ignored) 0x28 Base Intensity 1 0x28 Base Intensity 1 0x2C Offset Intensity 1 0x2C Offset Intensity 1 0x30 (ignored) 0x30 (ignored) 0x34 (ignored) 0x34 (ignored) 0x38 (ignored) 0x38 (ignored) 0x3C (ignored) 0x3C (ignored)
  3863. Sprite Type 0
  3864. (for Line) Sprite Type 1
  3865. (for Sprite) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 AX 0x04 AX 0x08 AY 0x08 AY 0x0C AZ 0x0C AZ 0x10 BX 0x10 BX 0x14 BY 0x14 BY 0x18 BZ 0x18 BZ 0x1C CX 0x1C CX 0x20 CY 0x20 CY 0x24 CZ 0x24 CZ 0x28 DX 0x28 DX 0x2C DY 0x2C DY 0x30 (ignored) 0x30 (ignored) 0x34 (ignored) 0x34 AU / AV 0x38 (ignored) 0x38 BU / BV 0x3C (ignored) 0x3C CU / CV
  3866. Modifier Volume 0x00 Parameter Control Word 0x04 AX 0x08 AY 0x0C AZ 0x10 BX 0x14 BY 0x18 BZ 0x1C CX 0x20 CY 0x24 CZ 0x28 (ignored) 0x2C (ignored) 0x30 (ignored) 0x34 (ignored) 0x38 (ignored) 0x3C (ignored) The polygon type 0 and 2 parameter formats that were changed in HOLLY2 are shown below.
  3867. * In both polygon type 0 and type 2, 0x10 and 0x18 are reversed, compared with HOLLY1.
  3868.  
  3869. Polygon Type 0
  3870. (Non-Textured, Packed Color) Polygon Type 2
  3871. (Non-Textured, Intensity) 0x00 Parameter Control Word 0x00 Parameter Control Word 0x04 X 0x04 X 0x08 Y 0x08 Y 0x0C Z 0x0C Z 0x10 *(ignored) 0x10 * (ignored) 0x14 (ignored) 0x14 (ignored) 0x18 * Base Color 0x18 * Base Intensity 0x1C (ignored) 0x1C (ignored)
  3872. �3.7.6
  3873. Overview of TA Parameters
  3874. �3.7.6.1 Notes When Using the TA
  3875. The following points must be noted when using the Tile Accelerator to generate display lists for the CORE.
  3876.  
  3877. <Register-related>
  3878. * Set the TA_GLOB_TILE_CLIP register, the TA_ALLOC_CTRL register and the TA_NEXT_OPB_INIT register in HOLLY2 before initializing lists through the TA_LIST_INIT register.
  3879. * In HOLLY2, be certain to change the TA_OL_BASE register to the correct address before performing list continuation processing through the TA_LIST_CONT register.
  3880. * If the address in texture memory where the Object List is stored exceeds the address specified in the TA_OL_LIMIT register, respectively, the TA outputs an interrupt. Although the display list is generated correctly in this case, the resulting image will not appear as expected.
  3881. * If the address in texture memory where the ISP/TSP Parameters are stored exceeds the address specified in the TA_ISP_LIMIT register, the TA outputs an interrupt. The display list (ISP/TSP Parameters) is not generated correctly in this case, and therefore should not be used for drawing. It is necessary in this case to reconsider the memory allocations and to start over from list initialization. Users must take into consideration the size of the memory needed for the ISP/TSP Parameters, based on number of polygons that are to be input to the TA, when allocating memory.
  3882.  
  3883. <Parameter input-related>
  3884. * The five types of polygon data (Opaque, Opaque Modifier Volume, Translucent, Translucent Modifier Volume, and Punch Through) (five types in the case of HOLLY2,) must all be grouped and input together. The End Of List parameter must also be input at the end of each list.
  3885. * Although there are no restrictions concerning the order in which the five types of lists are input (five types, in the case of HOLLY2), only one list of each type may be input. In HOLLY2, when inputting a list in several pieces, list continuation processing through the TA_LIST_CONT register must be used.
  3886. * If "No List" is specified for the Object Pointer Block size in the TA_ALLOC_CTRL register for a certain type of list, parameters for that type of list may not be input.
  3887. * After initializing the lists through the TA_LIST_INIT register, input the User Tile Clipping area parameters first so that the User Tile Clipping values are set.
  3888. * Input the Object List Set parameter either after initializing the lists through the TA_LIST_INIT register, or after an End Of List parameter.
  3889. * When inputting data for a Triangle polygon, input at least three Vertex Parameters.
  3890. * When inputting data for a strip of Triangle polygons, End Of Strip must be specified in the last Vertex Parameter of the strip.
  3891. * If there is no need to change the Global Parameters, a Vertex Parameter for the next polygon may be input immediately after inputting a Vertex Parameter for which "End of Strip" was specified.
  3892. * When inputting polygon data using Intensity Mode 2, it is essential for polygon data in Intensity Mode 1 to already have been input at least once. It is not necessary, however, for the Mode 1 polygon to have immediately preceded the Mode 2 polygon.
  3893. * When inputting data for a Modifier Volume, input Global Parameters that indicate that the data being input is for a Modifier Volume, before inputting the Vertex Parameters for the last polygon of the Volume.
  3894.  
  3895.  
  3896. <Miscellaneous>
  3897. * The TA generates Object Lists and the ISP/TSP Parameters; the Region Array is created by the CPU and then stored directly in texture memory.
  3898. * When inputting data for an independent Triangle polygon or Quad polygon, efficient display lists will be generated if data for polygons that are likely to be included in the same Tiles are input together.
  3899. * In order to prevent memory space that will not be used from being allocated for the Object Pointer Block for a list of a type that will not be displayed on the screen, it is recommended that "No List" be set in the TA_ALLOC_CTRL register.
  3900.  
  3901. �3.7.6.2 Parameter Combinations
  3902. The data configurations and combinations of the Global Parameters and the Vertex Parameters are determined according to the Parameter Control Word setting in the Global Parameters.
  3903.  
  3904. List_Type Parameter Control Word Global
  3905. Parameter Vertex
  3906. Parameter bit 6 5-4 3 2 1 0 Volume Col_Type Texture Offset Gouraud 16bit_UV Opaque 0 0 0 (0) x invalid Polygon Type 0 Polygon Type 0 /Translucent 0 1 0 (0) x invalid Polygon Type 0 Polygon Type 1 0 2 0 (0) x invalid Polygon Type 1 Polygon Type 2 0 3 0 (0) x invalid Polygon Type 0 Polygon Type 2 1 0 0 (0) x invalid Polygon Type 3 Polygon Type 9 1 2 0 (0) x invalid Polygon Type 4 Polygon Type 10 1 3 0 (0) x invalid Polygon Type 3 Polygon Type 10 0 0 1 x x 0 Polygon Type 0 Polygon Type 3 0 0 1 x x 1 Polygon Type 0 Polygon Type 4 0 1 1 x x 0 Polygon Type 0 Polygon Type 5 0 1 1 x x 1 Polygon Type 0 Polygon Type 6 0 2 1 0 x 0 Polygon Type 1 Polygon Type 7 0 2 1 1 x 0 Polygon Type 2 Polygon Type 7 0 2 1 0 x 1 Polygon Type 1 Polygon Type 8 0 2 1 1 x 1 Polygon Type 2 Polygon Type 8 0 3 1 x x 0 Polygon Type 0 Polygon Type 7 0 3 1 x x 1 Polygon Type 0 Polygon Type 8 1 0 1 x x 0 Polygon Type 3 Polygon Type 11 1 0 1 x x 1 Polygon Type 3 Polygon Type 12 1 2 1 x x 0 Polygon Type 4 Polygon Type 13 1 2 1 x x 1 Polygon Type 4 Polygon Type 14 1 3 1 x x 0 Polygon Type 3 Polygon Type 13 1 3 1 x x 1 Polygon Type 3 Polygon Type 14 (0) (0) 0 (0) (0) invalid Sprite Sprite Type 0 (0) (0) 1 x (0) (1) Sprite Sprite Type 1 Opaque
  3907. /Translucent
  3908. Modifier
  3909. Volume
  3910. All invalid
  3911. Modifier Volume
  3912. Modifier Volume
  3913. <Note>
  3914. * "x" in the table indicates "Don't care."
  3915. * A value in parentheses indicates that the setting in question is fixed at that value, and that the Parameter Control Word setting will be ignored.
  3916. * When in "Non-Textured" mode (i.e., the Texture bit is "0"), the set value for the Offset bit is ignored; the value is fixed at "0."
  3917. �3.7.6.3 Parameter Input Example
  3918.  
  3919. Input Parameter Description
  3920. The values in parentheses are the Parameter Control Word settings. Opaque polygon Control Parameter
  3921. (User Tile Clip) User Tile clipping value set (0x2000 0000) Global Parameter 0
  3922. (Polygon Type 2) Global Parameters for object 0 (0x8086 002E)
  3923. 2strip, Clip inside enable, Intensity, Textured, use Offset, Gouraud, 32bitUV Vertex Parameter 0
  3924. (Polygon Type 7) Vertex data 0 (0xE000 0000) Vertex Parameter 1
  3925. (Polygon Type 7) Vertex data 1 (0xE000 0000) Vertex Parameter 2
  3926. (Polygon Type 7) Vertex data 2 (0xE000 0000) Vertex Parameter 3
  3927. (Polygon Type 7) Vertex data 3 (0xE000 0000) Vertex Parameter 4
  3928. (Polygon Type 7) Vertex data 4 (0xFFFF FFFF)
  3929. End Of Strip Global Parameter 1
  3930. (Polygon Type 0) Global Parameters for object 1?0x8000 003E?
  3931. 2strip, Clip inside enable, Intensity, Textured, use Offset, Gouraud, 32bitUV Vertex Parameter 0
  3932. (Polygon Type 7) Vertex data 0 (0xE000 0000) Vertex Parameter 1
  3933. (Polygon Type 7) Vertex data 1 (0xE000 0000) Vertex Parameter 2
  3934. (Polygon Type 7) Vertex data 2 (0xE000 0000) Vertex Parameter 3
  3935. (Polygon Type 7) Vertex data 3 (0xE000 0000) Vertex Parameter 4
  3936. (Polygon Type 7) Vertex data 4 (0xE000 0000) Vertex Parameter 5
  3937. (Polygon Type 7) Vertex data 5 (0xE000 0000) Vertex Parameter 6
  3938. (Polygon Type 7) Vertex data 6 (0xFFFF FFFF)
  3939. End Of Strip Vertex Parameter 0
  3940. (Polygon Type 7) Vertex data 0 (0xE000 0000) Vertex Parameter 1
  3941. (Polygon Type 7) Vertex data 1 (0xE000 0000) Vertex Parameter 2
  3942. (Polygon Type 7) Vertex data 2 (0xE000 0000) Vertex Parameter 3
  3943. (Polygon Type 7) Vertex data 3 (0xFFFF FFFF)
  3944. End Of Strip Global Parameter 2
  3945. (Polygon Type 3) Global Parameters for object 2?0x8088 004A?
  3946. 4strip, Clip disable, Two Volume, Packed, Textured, no Offset, Gouraud, 32bitUV Vertex Parameter 0
  3947. (Polygon Type 11) Vertex data 0 (0xE000 0000) Vertex Parameter 1
  3948. (Polygon Type 11) Vertex data 1 (0xE000 0000) Vertex Parameter 2
  3949. (Polygon Type 11) Vertex data 2 (0xE000 0000) Vertex Parameter 3
  3950. (Polygon Type 11) Vertex data 3 (0xE000 0000) Vertex Parameter 4
  3951. (Polygon Type 11) Vertex data 4 (0xE000 0000) Vertex Parameter 5
  3952. (Polygon Type 11) Vertex data 5 (0xE000 0000) Vertex Parameter 6
  3953. (Polygon Type 11) Vertex data 6 (0xFFFF FFFF) Vertex Parameter 7
  3954. (Polygon Type 11) Vertex data 7 (0xFFFF FFFF)
  3955. End Of Strip Control Parameter
  3956. (End Of List) End of Opaque polygon list (0x0000 0000)
  3957. Continued on next page
  3958.  
  3959. Continued from previous page
  3960. Translucent Polygon Control Parameter
  3961. (Object List Set) Object list setting for object-3 (0x4000 0000) Control Parameter
  3962. (Object List Set) Object list setting for object-4 (0x4000 0000) Control Parameter
  3963. (Object List Set) Object list setting for object-5 (0x4000 0000) Global Parameter 6
  3964. (Polygon Type 0) Global Parameters for object-6 (0x828C 0010)
  3965. 6strip, Clip disable, Floating Color, Non-Textured, no Offset, Flat Vertex Parameter 0
  3966. (Polygon Type 6) Vertex data 0 (0xE000 0000) Vertex Parameter 1
  3967. (Polygon Type 6) Vertex data 1 (0xE000 0000) Vertex Parameter 2
  3968. (Polygon Type 6) Vertex data 2 (0xE000 0000) Vertex Parameter 3
  3969. (Polygon Type 6) Vertex data 3 (0xE000 0000) Vertex Parameter 4
  3970. (Polygon Type 6) Vertex data 4 (0xFFFF FFFF)
  3971. End Of Strip Control Parameter
  3972. (User Tile Clip) User Tile clipping value set (0x2000 0000) Global Parameter 7
  3973. (Sprite) Global Parameters for object-7 (0xA283 000D)
  3974. Clip outside enable, Packed Color, Textured, use Offset, Flat, 16bit UV Vertex Parameter
  3975. (Sprite Type 1) Quad polygon vertex data 0 (0xF000 0000) Vertex Parameter
  3976. (Sprite Type 1) Quad polygon vertex data 1 (0xF000 0000) Vertex Parameter
  3977. (Sprite Type 1) Quad polygon vertex data 2 (0xF000 0000) Global Parameter 8
  3978. (Sprite) Global Parameters for object-8 (0xA200 000D)
  3979. Clip outside enable, Packed Color, Textured, use Offset, Flat, 16bit UV Vertex Parameter
  3980. (Sprite Type 1) Quad polygon vertex data 0 (0xF000 0000) Global Parameter 9
  3981. (Sprite) Global Parameters for object-9 (0xA200 000D)
  3982. Clip outside enable, Packed Color, Textured, use Offset, Flat, 16bit UV Vertex Parameter
  3983. (Sprite Type 1) Quad polygon vertex data 0 (0xF000 0000) Global Parameter 10
  3984. (Sprite) Global Parameters for object-10 (0xA280 0000)
  3985. Clip disable, Packed Color, Non-Textured, no Offset, Flat Vertex Parameter
  3986. (Sprite Type 0) Quad polygon vertex data 0 (0xF000 0000) Control Parameter
  3987. (End Of List) End of translucent polygon list (0x0000 0000) Opaque Modifier Volume Control Parameter
  3988. (User Tile Clip) User Tile clipping value set (0x2000 0000) Global Parameter 0
  3989. (Modifier Volume) Global Parameters for Modifier Volume 0 (0x8182 0000)
  3990. Clip inside enable, normal triangle in the volume Vertex Parameter 0
  3991. (Modifier Volume) Triangle polygon vertex data 0 (0xF000 0000) Vertex Parameter 1
  3992. (Modifier Volume) Triangle polygon vertex data 1 (0xF000 0000) Vertex Parameter 2
  3993. (Modifier Volume) Triangle polygon vertex data 2 (0xF000 0000) Vertex Parameter 3
  3994. (Modifier Volume) Triangle polygon vertex data 3 (0xF000 0000) Vertex Parameter 4
  3995. (Modifier Volume) Triangle polygon vertex data 4 (0xF000 0000) Global Parameter 0
  3996. (Modifier Volume) Global Parameters for Modifier Volume 0 (0x8100 0040)
  3997. Clip inside enable, last triangle in the volume Vertex Parameter 5
  3998. (Modifier Volume) Triangle polygon vertex data 5 (0xF000 0000) Control Parameter
  3999. (End Of List) End of Opaque Modifier Volume list (0x0000 0000)
  4000. �3.7.7
  4001. Region Array Data Configuration
  4002. The Region Array stores Pointer data that points to the starting addresses of the Object Lists when the five types (five types, in HOLLY2) of lists are being drawn in individual Tiles. The CPU creates the Region Array and stores it directly in texture memory.
  4003. In HOLLY1, The data for one Tile consists of 5 x 32-bit pieces of data, as shown below: the header word and four pointers.
  4004. In addition, the starting address that is used when the CORE reads the Region Array is specified by the REGION_BASE register.
  4005.  
  4006. bit 31 30-14 13-8 7-2 1-0 Last
  4007. Region Reserved Tile Y
  4008. position (? 32) Tile X
  4009. position (? 32) Reserved Opaque List Pointer Opaque Modifier Volume List Pointer Translucent List Pointer Translucent Modifier Volume List Pointer
  4010. Last Region
  4011. Specifies the end of the Tiles to be drawn. This bit must be set to "1" for the last Tile.
  4012.  
  4013. Tile Y & X
  4014. Specifies the position of the upper left corner coordinates of the Tile on the drawing screen. The actual values are the specified values multiplied by 32.
  4015.  
  4016. List Pointer
  4017. The bit configuration of the four types of List Pointers is as shown below.
  4018.  
  4019. bit 31 30-24 23-2 1-0 Empty
  4020. PTR Reserved Pointer to Object List
  4021. (32bit resolution) 00
  4022. Empty PTR
  4023. Set a "1" when the type of list in question does not exist. Set "1" for a polygon list that was input to the TA with "No List" specified in the TA_ALLOC_CTRL register. When this bit is "1," the other bits have no meaning. Therefore, setting "1" is sufficient.
  4024.  
  4025. Pointer to Object List
  4026. Specifies the absolute address of the first Object List for that type of list (the starting address of the Object List corresponding to each Tile). Specify this value on a 32-bit boundary.
  4027.  
  4028.  
  4029. In HOLLY2, there are two types of data configurations for one Tile: type 1 and type 2. The type selection can be made through the FPU_PARAM_CFG register. Just as in HOLLY1, the starting address for when the CORE loads the Region Array is specified by the REGION_BASE register.
  4030.  
  4031. [Type 1]
  4032. bit 31 30 29 28 27-14 13-8 7-2 1-0 Last
  4033. Region Z
  4034. Clear 0 Flush
  4035. Accumulate Reserved Tile Y
  4036. position (?32) Tile X
  4037. position (?32) Reserved Opaque List Pointer Opaque Modifier Volume List Pointer Translucent List Pointer Translucent Modifier Volume List Pointer
  4038. [Type 2]
  4039. bit 31 30 29 28 27-14 13-8 7-2 1-0 Last
  4040. Region Z
  4041. Clear Pre
  4042. Sort Flush
  4043. Accumulate Reserved Tile Y
  4044. position (?32) Tile X
  4045. position (?32) Reserved Opaque List Pointer Opaque Modifier Volume List Pointer Translucent List Pointer Translucent Modifier Volume List Pointer Punch Through List Pointer
  4046. Last Region
  4047. Specifies whether the region is the final drawing data for the screen. When drawing several times in the same Tile (multipass processing), specify "1" for this bit only in the very last drawing data for the Tile that is being drawn last on the screen.
  4048. Setting Description of processing 0 Normal drawing data 1 End of screen drawing data
  4049. Z Clear
  4050. Specifies whether to clear the internal Z buffer or not before performing drawing processing for this Tile. When drawing several times in the same Tile (multipass processing), specify "0" for this bit only in the first drawing data to a given Tile.
  4051. Setting Description of processing 0 Clear Z buffer 1 Do not clear Z buffer
  4052. Pre Sort
  4053. Specifies the Translucent polygon sort mode for drawing processing for this Tile. This bit is valid only in the type 2 data configuration.
  4054. Setting Description of processing 0 Auto-sort mode 1 Pre-sort mode
  4055. Flush Accumulate
  4056. Specifies whether to copy the drawing results to the frame buffer or not after completing drawing processing for this Tile. When drawing several times in the same Tile (multipass processing), specify "1" for this bit only in the very last drawing data for the Tile.
  4057. Setting Description of processing 0 Copy to the frame buffer 1 Do not copy to the frame buffer
  4058. Tile Y & X
  4059. Specifies the position of the upper left corner coordinates of the Tile on the drawing screen the same as HOLLY1. Actual coordinates are 32 times the specified value.
  4060.  
  4061. List Pointer
  4062. In HOLLY1 there are four types of lists, but in HOLLY2, with the addition of Punch Through, there are five types. The bit configuration and contents of the List Pointer are the same as in HOLLY1.
  4063. The bit structure of the five types of List Pointers is as follows:
  4064.  
  4065. Bit 31 30 to 24 23 to 2 1 and 0 Empty PTR Reserved Pointer to Object List (32-bit resolution) 00
  4066. Empty PTR
  4067. Set a "1" when the type of list in question does not exists. Set "1" for a polygon list that was input to the TA with "No List" specified in the TA_ALLOC_CTRL register. When this bit is "1," the other bits have no meaning. Therefore setting "1" is sufficient.
  4068.  
  4069. Pointer to Object List
  4070. Specifies the absolute address of the first Object List for that type of list (the starting address of the Object List corresponding to each Tile). Specify this value on a 32-bit boundary.
  4071.  
  4072. In both HOLLY1 and HOLLY2, the Region Array is not generated by the TA; instead, it has to be created by the CPU and stored directly in texture memory.(refer to 3.7.1) Normally, when the TA is used to create the display list for the CORE, the Region Array data is created in the following manner:
  4073.  
  4074. * Only data for Tiles within the Global Tile Clipping area are stored.
  4075. * "1" is set in the Empty PTR bit for List Pointers of types that are not used on the screen. "1" should also be set for the List Pointers of Tiles that definitely do not contain a polygon in that list.
  4076. * The address values that were calculated on the basis of the Object Lists generated by the TA are set as the data for the Pointer to Object List data in the List Pointers.
  4077.  
  4078. �3.7.8
  4079. Object List Data Configuration
  4080. Object lists contain pointers (for the starting addresses of the ISP/TSP Parameters) for the objects that are included in each Tile. Object lists consist of a grouping of Object Pointer Blocks of a size specified by the TA_ALLOC_CTRL register. The TA automatically creates Object Lists from the polygon data that was input, and stores them in texture memory. An Object List consists of 32-bits per object, and includes the following four types:
  4081. When the list is generated by the TA, this data is generated automatically on the basis of the parameters that were input to the TA.
  4082.  
  4083. Triangle Strip: Used for Triangle polygons in a strip.
  4084. Bit 31 30-25 24 23-21 20-0 0 Mask Shadow Skip Triangle Strip Start T0 T1 T2 T3 T4 T5 (32bit word address)
  4085. Triangle Array: Used for an independent Triangle polygon.
  4086. Bit 31-29 28-25 24 23-21 20-0 100 Number of Triangles Shadow Skip Triangle Array Start
  4087. (32bit word address)
  4088. Quad Array: Used for an independent Quad polygon.
  4089. Bit 31-29 28-25 24 23-21 20-0 101 Number of Quads Shadow Skip Quad Array Start
  4090. (32bit word address)
  4091. Object Pointer Block Link: Used when linking to an Object Pointer Block, and at the end of a list.
  4092. bit 31-29 28 27-24 23-2 1-0 111 End of
  4093. List Reserved Next Pointer Block
  4094. (32bit word address) 00
  4095. Mask
  4096. Set only those bits that correspond to those stripped Triangle polygons that are included in the Tile in question. When the list is generated by the TA, this determination is made by the TA for each polygon, and this bit is set automatically.
  4097.  
  4098. Shadow
  4099. This bit is set to "1" for objects for which the TSP parameters are switched, depending on whether the object is inside or outside of a Modifier Volume. In Intensity Shadow Mode, this bit specifies whether shadow processing is performed or not. When the list is generated by the TA, the value of the Shadow bit in the Parameter Control Word is automatically set.
  4100.  
  4101. Skip
  4102. Specifies the data size (? 32 bits) for one vertex in the ISP/TSP Parameters. Normally, the actual data size is "Skip + 3," but if Parameter Selection Volume Mode is enabled and the Shadow bit described above is set to "1," the actual data size is "Skip ? 2 + 3." When the list is generated by the TA, the value shown in the table below is set automatically, based on the value of the Parameter Control Word in the TA parameters.
  4103. Parameter Control Word Skip value Texture Offset 16bit_UV 0 invalid invalid 001 1 0 0 011 1 0 1 010 1 1 0 100 1 1 1 011 Number of Triangles/Quads
  4104. When the ISP/TSP Parameters for polygon data that is included within the same Tile is stored contiguously in texture memory, this field specifies the number that are contiguous. This value is "0" in the case of only one (noncontiguous) polygon, and "1" in the case of two contiguous polygons. Normally, this field is only used with independent Triangle polygons or Quad polygons. When the list is generated by the TA, this value is set automatically.
  4105.  
  4106. End of List
  4107. Set this bit to "1" at the end of the Object List data for the Tile in question. When the list is generated by the TA, this value is set automatically according to the End Of List parameter.
  4108.  
  4109. Triangle Strip Start
  4110. Triangle/Quad Array Start
  4111. Specifies the starting address of the object data (the ISP/TSP Parameters) at a 32-bit boundary. The actual address in texture memory is derived by adding this value to the value in the PARAM_BASE register. When the list is generated by the TA, this value is set automatically.
  4112.  
  4113. Next Pointer Block
  4114. Specifies the starting address of the next Object Pointer Block at a 32-bit boundary. When the list is generated by the TA, this value is set automatically.
  4115.  
  4116. �3.7.9
  4117. ISP/TSP Parameter Data Configuration
  4118. The ISP/TSP Parameters consist of the ISP/TSP Instruction Word, the TSP Instruction Word, the Texture Control Word, and, for strips with a strip number of 1 to 6, vertex coordinates, Texture UV coordinates, and Shading Colors (Base, Offset).
  4119.  
  4120. ISP/TSP Instruction Word TSP Instruction Word Texture Control Word Vertex X Vertex Y Vertex Z Texture U Texture V Base Color Offset Color For triangle strips, the gray area is repeated up to 7 times.
  4121. For a polygon with two volumes, the Texture UV and the Shading Color are both needed for each vertex.
  4122.  
  4123. Vertex X, Y, Z
  4124. The vertex coordinates are IEEE single-precision floating point values. Set the screen coordinates for X and Y, and either 1/z or 1/w for Z. The Z value for the fourth vertex of a Quad polygon does not need to be specified because it is generated in the CORE. When the list is generated by the TA, the Vertex Parameter values are set automatically.
  4125.  
  4126. Texture U, V
  4127. If a texture is used on a polygon, the UV coordinates of the texture have to be specified. These coordinates can be specified in two formats. If the "16-bit UV" bit in the ISP/TSP Instruction Word is "0," set two IEEE single-precision floating point values. If the "16-bit UV" bit is "1," extract the upper 16 bits of each of the 32-bit floating point values U and V, and set them as one data item, with U as the upper 16 bits and V as the lower 16 bits. When the list is generated by the TA, the Vertex Parameter values are set automatically.
  4128.  
  4129. Base Color, Offset Color
  4130. Shading Color data includes Base Color, Offset color, and Bump Map parameters. If a polygon does not use a texture, or if the Offset bit (in the ISP/TSP Instruction Word) is "0," the Offset Color is not needed. In addition, the Bump Map parameters (K1K2K3Q) are stored instead of the Offset Color when a Bump Map texture is used, and the data is valid for the third and subsequent vertices.
  4131. In the case of a Flat-Shaded polygon, the data is valid for the third and subsequent vertices. The alpha value of the Base/Offset Color is valid only when the "Use Alpha" bit (in the TSP Instruction Word) is "1." An alpha value of "0x00" indicates that the polygon is completely transparent, while an alpha value of "0xFF" indicates that the polygon is completely opaque. In addition, the alpha value of the Offset Color is used as the Fog coefficient when Fog Control (in the TSP Instruction Word) is set to Per Vertex mode. The values for the fourth vertex in a Quad polygon do not need to be specified because they are generated within the CORE. When the list is generated by the TA, the Vertex Parameter values are set automatically.
  4132.  
  4133. Base/Offset Color ?Packed Color?
  4134. bit 31-24 23-16 15-8 7-0 Alpha Red Green Blue
  4135. Bump Map Parameter
  4136. bit 31-24 23-16 15-8 7-0 K1 K2 K3 Q
  4137. Examples of ISP/TSP Parameters for various types of polygons are shown below.
  4138.  
  4139.  
  4140. Fig. 3-79
  4141.  
  4142. �3.7.9.1 ISP/TSP Instruction Word
  4143. When the list is generated by the TA, the ISP/TSP Instruction Word in the Global Parameters is used for the ISP/TSP Instruction Word that is stored in texture memory. However, bits 3 through 0 (Texture/Offset/Gouraud/16bit_UV) of the Parameter Control Word in the Global Parameters are used for bits 25 through 22 of the ISP/TSP Instruction Word (Texture/Offset/Gouraud shading/16bit_UV).
  4144.  
  4145. Opaque or Translucent
  4146. bit 31-29 28-27 26 25 24 23 22 21 20 19-0 Depth
  4147. Compare mode Culling
  4148. Mode Z Write
  4149. Disable Texture Offset Gouraud
  4150. shading 16Bit
  4151. UV Cache
  4152. Bypass Dcalc
  4153. Ctrl Reserved
  4154. Opaque Modifier Volume or Translucent Modifier Volume
  4155. bit 31-29 28-27 26-0 Volume
  4156. Instruction Culling
  4157. Mode Reserved
  4158. Depth Compare Mode
  4159. This bit is used in combination with the Z Write Disable bit, and supports compare processing, which is required for OpenGL and D3D versus Z buffer updates. It is important to note that, because the value of either 1/z or 1/w is referenced for the Z value, the closer that the polygon is, the larger that the Z value will be.
  4160. This setting is ignored for Translucent polygons in Auto-sort mode; the comparison must be made on a "Greater or Equal" basis. This setting is also ignored for Punch Through polygons in HOLLY2; the comparison must be made on a "Less or Equal" basis.
  4161.  
  4162. Setting Depth Function 0 Never 1 Less 2 Equal 3 Less Or Equal 4 Greater 5 Not Equal 6 Greater Or Equal 7 Always
  4163. Culling Mode
  4164. This specifies the back-face culling mode. The "No Culling" specification means that culling is not performed. The value that is specified in the FPU_CULL_VAL register is used in the remaining three specifications.
  4165.  
  4166. Setting Culling Mode Processing 0 No culling no culling 1 Cull if Small Cull if ( |det| < fpu_cull_val ) 2 Cull if Negative Cull if ( |det| < 0 ) or
  4167. ( |det| < fpu_cull_val ) 3 Cull if Positive Cull if ( |det| > 0 ) or
  4168. ( |det| < fpu_cull_val )
  4169. This specification eliminates extremely small Triangle and Quad polygons, in addition to normal back-face culling. The FPU_CULL_VAL register requires at least a 4-bit mantissa (plus an 8-bit index), and the value must be positive. The "det" value is a Triangle Adjoint Matrix, and is equal to the screen area for the Triangle.
  4170. The adjoint matrix is derived in the manner described below.
  4171. Transform a plane equation ax + by + c = d into Ax + By + 1 = C, and find the values A, B, and C that simultaneously satisfy the three vertices (x0, y0, z0), (x1, y1, z1), and (x2, y2, z2) that were given. First, from the three vertices we can derive the following matrix:
  4172.  
  4173. Solving this inverse matrix yields the values A, B, and C that express the plane that passes through the three vertices. That result is:
  4174.  
  4175. Therefore:
  4176.  
  4177. This ? becomes "det." (In the case of a homogenous coordinate system (the screen coordinates), the above values are all multiplied by 1/W.)
  4178.  
  4179. Z Write Disable
  4180. If the Z Write Disable bit is set to "1," the Z value comparison is executed normally and the image is drawn, but the Z value is not updated, even if the polygon is visible, for example. This is used for OpenGL depth masking.
  4181.  
  4182. Texture
  4183. This specifies whether a texture is to be used on a polygon or not. Set "1" if a texture is to be used. When the list is generated by the TA, the Texture bit in the Parameter Control Word is automatically set here.
  4184.  
  4185. Offset
  4186. This specifies whether an Offset Color is to be used or not. When this bit is set to "1," the offset value is added to the shading calculation; if this bit is "0," an offset value of "0" is added to the calculation. In the case of Gouraud shading, the offset value is interpolated between vertices. When the list is generated by the TA, the Offset bit in the Parameter Control Word is automatically set here.
  4187. In the case of a Bump Mapped polygon, this setting must be set to use Offset Color. Set the Bump Map parameters (K1K2K3Q) instead of the Offset Color value.
  4188.  
  4189. Gouraud shading
  4190. This specifies the type of shading. If this bit is set to "1," Gouraud shading is used, in which each of the vertex colors is interpolated according to the perspective. If this bit is set to "0," Flat Shading is used with the color from the third vertex. Note that the amount of data stored in memory is the same in either case. When the list is generated by the TA, the Gouraud bit in the Parameter Control Word is automatically set here.
  4191. Note that the amount of data for the ISP/TSP Parameters that is stored in texture memory is the same, whether Flat Shading is specified or Gouraud shading is specified. When Flat Shading is specified, the Base Color and Offset Color from the third vertex are valid.
  4192. In the case of a Bump Mapped polygon, Flat Shading must be specified.
  4193.  
  4194. 16Bit UV
  4195. This specifies the number of bits that are used for the Texture UV values. If the Texture bit is "1" and this bit is "1," a pair of UV values is set as a single 32-bit data item by discarding the lower 16 bits of the 32-bit floating point values and combining the remaining bits. When the list is generated by the TA, the 16bit_UV bit in the Parameter Control Word is automatically set here.
  4196. When the UV value is 16 bits, the bit configuration is as shown below.
  4197.  
  4198. bit 31-16 15-0 16bit U 16bit V
  4199. Cache Bypass
  4200. This bit specifies whether or not to use the TSP parameter cache; if the cache is not to be used, set this bit to "1." Because the TSP parameters for polygons that are not included in any Tiles except for just one are only used once, there is no need to store those parameters in the cache. Therefore, this bit is used to prevent performance from suffering due to such TSP parameters being needlessly stored in the cache. When the list is generated by the TA, this bit is set automatically.
  4201.  
  4202. Dcalc Ctrl
  4203. This bit specifies the precision of the calculations that are performed when calculating the D value that is used as an indicator of when to change textures in MIPMAP processing.
  4204. When this bit is set to "0," the calculations are as shown below. "a," "b," "c," "d," "e," "f," "p," "q," and "r" are texture mapping coefficients, and "X" and "Y" are screen coordinates.
  4205.  
  4206.  
  4207.  
  4208. When this bit is set to "1," the calculations are as shown below. "X'" and "Y'" are the screen coordinates for the first vertex.
  4209.  
  4210.  
  4211.  
  4212. Setting this bit to "1" results in more precise calculations for small polygons, but the calculation time (drawing time) is longer.
  4213.  
  4214. Volume Instruction
  4215. The CORE supports inclusion and exclusion volumes that are formed by Triangle polygons, and inclusion and exclusion volumes that are formed by Quad polygons. It is necessary, for each object, to specify the type and the last of the polygons that form a volume. However, the TA only supports volumes that are formed by Triangle polygons.
  4216. Because the Z comparison must be consistent for polygons that form a volume, the bit that is used to specify the Depth Compare Mode in data for a normal object is used to specify the Volume Instruction in data for a Modifier Volume object.
  4217.  
  4218. Setting Volume Instruction 0 �Normal� Polygon 1 Inside Last Polygon 2 Outside Last Polygon 3-7 Reserved
  4219. "Normal Polygon" indicates a polygon other than the last polygon that forms the volume. "Inside Last Polygon" indicates the last polygon that forms an inclusion volume. "Outside Last Polygon" indicates the last polygon that forms an exclusion volume. When the list is generated by the TA, this bit must be set properly by the CPU.
  4220. The Culling Mode bit is the same as for data for a normal object, but if any but the very smallest polygons are culled, the display image may not appear as expected.
  4221.  
  4222. �3.7.9.2
  4223. TSP Instruction Word
  4224. The TSP Instruction Word that was input to the TA in the Global Parameters is used as is for the TSP Instruction Word that is stored in texture memory.
  4225.  
  4226. bit 31-29 28-26 25 24 23-22 21 20 19 18-17 SRC Alpha Instr DST Alpha Instr SRC
  4227. Select DST
  4228. Select Fog Control Color
  4229. Clamp Use
  4230. Alpha Ignore Tex.
  4231. Alpha Flip UV
  4232. bit 16-15 14-13 12 11-8 7-6 5-3 2-0 Clamp UV Filter Mode Super-Sample
  4233. Texture MIP-Map �D�
  4234. adjust Texture/Shading
  4235. �Instruction� Texture
  4236. U Size Texture
  4237. V Size
  4238. SRC/DST Alpha Instruction
  4239. Accumulation buffer control is performed through two 3-bit values (SRC Alpha Instr and DST Alpha Instr) and two 1-bit values (SRC Select and DST Select). The first two 3-bit values specify the ? blending function for the source and the destination, respectively, and the two 1-bit values specify the source and the destination. Used in combination, these bits can support all OpenGL and D3D texture blending functions.
  4240. The SRC Select bit and the DST Select bit specify whether or not to use the secondary accumulation buffer that can be used for polygons that have multiple textures, such as Bump Mapped polygons. This type of special effect can be implemented by using the secondary accumulation buffer while repeating opaque operations in a different texture/shading mode.
  4241.  
  4242. With the blending function, the RGBA values of the SRC and the DST are combined and then written back to the DST. A mathematical representation of the write-back function is shown below.
  4243.  
  4244. DST := SRC ? BlendFunction(SRC Alpha Instruction) +
  4245. DST ? BlendFunction(DST Alpha Instruction)
  4246.  
  4247. In this equation, "BlendFunction(Instruction)" returns the RGBA coefficient that was calculated from the SRC and DST color data in accordance with the 3-bit instructions that were specified in the SRC Alpha Instr and the DST Alpha Instr. The instruction codes are listed below.
  4248.  
  4249. Setting Instruction Coefficient 0 Zero (0, 0, 0, 0) 1 One (1, 1, 1, 1) 2 �Other� Color (OR, OG, OB, OA) 3 Inverse �Other� Color (1-OR, 1-OG, 1-OB, 1-OA) 4 SRC Alpha (SA, SA, SA, SA) 5 Inverse SRC Alpha (1-SA, 1-SA, 1-SA, 1-SA) 6 DST Alpha (DA, DA, DA, DA) 7 Inverse DST Alpha (1-DA, 1-DA, 1-DA, 1-DA)
  4250. "Other Color" and "Inverse Other color" mean that the DST color is to be used when specified for an SRC instruction, and that the SRC color data is to be used when specified for a DST instruction.
  4251. After the coefficients have been determined and have been multiplied with SRC/DST, respectively, the addition operation is selected. At this point, check for overflows and clamp the derived value as appropriate.
  4252. In the case of an Opaque polygon, "1" must be specified in the SRC instruction and "0" must be specified in the DST instruction.
  4253.  
  4254. In the case of a HOLLY2 Punch Through polygon, "4" (SRC Alpha) must be specified in the SRC instruction and "5" (Inverse SRC Alpha) must be specified in the DST instruction.
  4255.  
  4256. SRC/DST Select
  4257. These two bits select the source/destination data for the blending function.
  4258. When the SRC Select bit is "1," the contents of the secondary accumulation buffer are used as the source data instead of the color data that resulted from the shading/texturing calculations for the current polygon. The value in the Secondary Accumulation Buffer is also used for the pixel alpha value. This function is used to blend the result (that was stored in the secondary accumulation buffer) of operations performed on multiple textures with the current polygon color data and then return the new result to the primary accumulation buffer.
  4259. When the DST Select bit is "1," the contents of the secondary accumulation buffer are used as the destination data instead of the Shading/Texturing color data that is stored in the primary accumulation buffer. This function is used to blend the current polygon color data with the contents of the secondary accumulation buffer and then return the results to the secondary accumulation buffer. This specification applies to all DST data resulting from the blending calculations described earlier.
  4260.  
  4261. Fog Control
  4262. There are separate Fog Color registers for Look Up Table mode and Per Vertex mode (the FOG_COL_RAM register and the FOG_COL_VERT register).
  4263.  
  4264. Setting Fog Mode Explanation 00 Look Up Table Generates the Fog ? value through linear interpolation of the table data corresponding to the depth value. 01 Per Vertex Uses the Offset Color ? value for the Fog ? value. This value is interpolated if the Gouraud bit is set to "1," and is constant if Flat Shading is specified. If the Offset bit is not set to "1," "No Fog" mode is in effect. 10 No Fog Fog processing is not performed. 11 Look Up Table
  4265. Mode 2 Substitutes the polygon color for the Fog Color, and the polygon ? value for the Fog ? value.
  4266. Color Clamp
  4267. Color clamp processing is performed before Fog processing. There are two registers, one for underflows and one for overflows (the FOG_CLAMP_MIN register and the FOG_CLAMP_MAX register).
  4268.  
  4269. Use Alpha
  4270. When this bit is "1," the ? value in the vertex's Shading Color data is valid; if Gouraud Shading is in effect, then values between vertices are interpolated. If this bit is "0," the polygon is regarded to be completely opaque (? value = 1.0).
  4271.  
  4272. Ignore Texture Alpha
  4273. If a texture has an ? value, this bit can be used to ignore that ? value. When this bit is "1," the ? value of the texture is regarded to be completely opaque (? value = 1.0). This bit is valid only in regards to the ? value of textures.
  4274.  
  4275.  
  4276. Flip UV
  4277. These bits specify whether or not to use the flip function for each individual texture size, in either the U direction or the V direction. Bit 18 is used for the U direction, and bit 17 is used for the V direction; if the bit in question is "1," the texture flips in that direction.
  4278.  
  4279.  
  4280. Fig. 3-80
  4281.  
  4282. Clamp UV
  4283. These bits specify whether or not to use the clamp function in either the U direction or the V direction. The clamp function is used if the bit is "1." If the clamp function is enabled, the flip function is disabled.
  4284.  
  4285. Filter Mode
  4286. These bits specify the mode of the texture filter function.
  4287.  
  4288. Setting Filter mode 00 Point Sampled 01 Bilinear Filter 10 Tri-linear Pass A 11 Tri-linear Pass B
  4289. The tri-linear filter consists of two processes; one object results from Pass A and Pass B. In order to implement the Tri-linear filter, the CPU needs to register the object twice (once as an object with the "Pass A" specification, and once as an object with the "Pass B" specification. The Tri-linear filter is valid only when MIPMAP is specified for a texture, but in other Filter Modes, textures for which MIPMAP is not specified can also be used. In the case of a texture for which MIPMAP is specified, the CORE automatically selects the appropriate MIPMAP level.
  4290. If an attempt is made to apply tri-linear filter processing to an object for which the "MIP Mapped" bit is not set to "1," the object is processed in "Point Sampled" mode.
  4291.  
  4292. Super-Sample texture
  4293. If this bit is set to "1," the quality of the texture filter function is enhanced through super-sampling. However, drawing time is extended considerably. If MIPMAP is being used, the CORE automatically selects the MIPMAP level with the next highest resolution.
  4294.  
  4295.  
  4296. MIP-map D Adjust
  4297. The D value used for MIPMAP is calculated internally by the CORE, but fine adjustments are necessary when forcibly enlarging or reducing the image in order to find where aliasing and blurring occur. The D value calculated by the core is multiplied by the specified adjustment value. This value is a 4-bit unsigned fixed decimal value, with a 2-bit decimal portion. Example values are shown in the table below.
  4298.  
  4299. Example setting Actual value 00.00 Illegal 00.01 0.25 01.00 1.0 11.11 3.75 <Note> Because a value of "0.0" is invalid for D, it must not be specified.
  4300.  
  4301. The D value is determined according to the following equation.
  4302.  
  4303.  
  4304.  
  4305. For example, if the D value is "1," a full-resolution texture map is used. If the D value is "2," a half-resolution texture map is used.
  4306.  
  4307. Texture/Shading Instruction
  4308. This determines the method for combining the Shading Color values (Base Colors ?, and Offset Colors) interpolated between vertices with texture ? values and texture color values. However, this setting is invalid for Non-Textured polygons.
  4309.  
  4310. Setting Mode Explanation 0 Decal PIXRGB = TEXRGB + OFFSETRGB
  4311. PIXA = TEXA 1 Modulate The texture color value is multiplied by the Shading Color value. The texture ? value is substituted for the Shading ? value.
  4312. PIXRGB = COLRGB ? TEXRGB + OFFSETRGB
  4313. PIXA = TEXA 2 Decal Alpha The texture color value is blended with the Shading Color value according to the texture ? value.
  4314. PIXRGB = (TEXRGB ? TEXA) +
  4315. (COLRGB ? (1- TEXA) ) +
  4316. OFFSETRGB
  4317. PIXA = COLA 3 Modulate Alpha The texture color value is multiplied by the Shading Color value. The texture ? value is multiplied by the Shading ? value.
  4318. PIXRGB= COLRGB ? TEXRGB + OFFSETRGB
  4319. PIXA = COLA ? TEXA
  4320. In HOLLY2, In the case of a Punch Through polygon, only those pixels for which the shading alpha value (PIX[A]) that results from this instruction is 1.0 (0xFF) are drawn.
  4321.  
  4322. U Size
  4323. This specifies the U size of the texture.
  4324.  
  4325. Setting Size (texels) 0 8 1 16 2 32 3 64 4 128 5 256 6 512 7 1024
  4326. In the case of a stride texture (where Scan Order = 1 and Stride Select = 1 in the Texture Control Word), the texture U size is specified by the stride value (bits 4 through 0) in the TEXT_CONTROL register. However, this U size value is the value that is used for calculating the texture coordinates. The value that is specified here must be greater than the U size of the stride texture.
  4327.  
  4328. <Example: Polygon that uses a 320 x 240 stride texture>
  4329. ? TEXT_CONTROL register: stride = 0xA
  4330. ? TSP Instruction Word: U Size = 0x6, V Size = 0x5(512�256)
  4331. ? 2 stripped polygon UV coordinates: [Vertex 1] U = 0.0, V = 240/256
  4332. [Vertex 2] U = 0.0, V = 0.0
  4333. [Vertex 3] U = 320/512, V = 240/256
  4334. [Vertex 4] U = 320/512, V = 0.0
  4335.  
  4336. V Size
  4337. This specifies the V size of the texture. However, this value is ignored and the V size becomes the same as the U size if the Scan Order bit is "0" and the MIP mapped bit is "1." The correspondence between the settings and the actual size is the same as shown for U Size above.
  4338. �3.7.9.3
  4339. Texture Control Word
  4340. The Texture Control Word in the Global Parameters that were input to the TA are used as is for the Texture Control Word that is stored in texture memory.
  4341.  
  4342. RGB/YUV Texture or Bump Map
  4343. bit 31 30 29-27 26 25 24-21 20-0 MIP
  4344. Mapped VQ
  4345. Compressed Pixel Format Scan
  4346. Order Stride
  4347. Select Reserved Texture Address
  4348. (64bit word address)
  4349. Palette Texture
  4350. bit 31 30 29-27 26-21 20-0 MIP
  4351. Mapped VQ
  4352. Compressed Pixel Format Palette
  4353. Selector Texture Address
  4354. (64bit word address)
  4355. MIP Mapped
  4356. If the texture is being MIP-mapped, set this bit to "1." This bit is valid only when the Scan Order bit is "0."
  4357.  
  4358. VQ Compressed
  4359. If the texture is a VQ texture, set this bit to "1." A VQ texture is a texture that has been compressed using a code book with 256 codes that correspond to 2 ? 2 pixels.
  4360. In the case of a palette texture, the texture is compressed using a code book that corresponds to 2 ? 4 pixels (8BPP) or 4 ? 4 pixels (4BPP).
  4361.  
  4362. Pixel Format
  4363. This specifies the pixel format of the texture.
  4364.  
  4365. Setting Pixel Format Description 0 1555 ? value: 1 bit; RGB values: 5 bits each 1 565 R value: 5 bits; G value: 6 bits; B value: 5 bits 2 4444 ? value: 4 bits; RGB values: 4 bits each 3 YUV422 32 bits per 2 pixels; YUYV values: 8 bits each 4 Bump Map 16 bits/pixel; S value: 8 bits; R value: 8 bits 5 4 BPP Palette Palette texture with 4 bits/pixel 6 8 BPP Palette Palette texture with 8 bits/pixel 7 Reserved Regarded as 1555
  4366. If the Filter Mode is a mode other than Point Sampling, twice as much processing time per pixel is required for a YUV422 texture.
  4367.  
  4368. Scan Order
  4369. Set this bit to "1" when the texture is Non-Twiddled format. When this bit is set to "0," the texture is Twiddled format. When this bit is "1," the MIP Mapped bit is ignored. Using Non-Twiddled format textures results in lower processing performance than when Twiddled format is used.
  4370.  
  4371. Stride Select
  4372. When this bit is "1," the U size of the texture is specified by the TEXT_CONTROL register (i.e., the U Size bit is ignored). The U size is then the value in the register multiplied by 32. This bit is valid only when the Scan Order bit is "1."
  4373.  
  4374.  
  4375. Texture Address
  4376. This address value, given in units of 64-bits, is the starting address for the texture data. In the case of a VQ texture, this specifies the starting address of the Code Book.
  4377.  
  4378. Palette Selector
  4379. This specifies the palette number. The actual palette address is the upper portion of the texture value (4 bits or 8 bits) with this value appended. In 8BPP Palette mode, however, only the upper two bits are valid.
  4380.  
  4381. 4BPP Palette
  4382. bit 9-4 3-0 Palette Selector
  4383. (bit 26-21) Texture data
  4384. (4 bits)
  4385. 8BPP Palette
  4386. bit 9-8 7-0 Palette Selector
  4387. (bit 26-25) Texture data
  4388. (8 bits)
  4389. The color format for a palette format texture is specified by the PAL_RAM_CTRL register, and can be selected from among four types: 1555, 565, 4444, and 8888. When the color format is 8888 mode, texture filtering performance is reduced by half.
  4390.  
  4391. �3.8
  4392. Details on Miscellaneous Functions
  4393. �3.8.1 YUV-data Converter
  4394. The Tile Accelerator has a YUV-data converter that converts YUV420- or YUV422-format data into YUV422-format texture data in macro block units (16 pixels ? 16 pixels), and then stores the data in texture memory. DMA transfers from system memory to the TA are performed one macro block of YUV data at a time. The transfer order of each type of data must be as shown below.
  4395.  
  4396. For YUV420 format
  4397. (1) Transfer U data for 16 ? 16 pixels (64 bytes).
  4398. (2) Transfer V data for 16 ? 16 pixels (64 bytes).
  4399. (3) Transfer Y data for 16 ? 16 pixels (256 bytes).
  4400.  
  4401. The U and V data are each stored in the internal buffer one time; once half of the Y data has been loaded into the internal buffer, transfer to texture memory begins. Once texture data for 16 ? 8 pixels has been output, the other half of the Y data is loaded into the internal buffer and then the texture data for the remaining 16 ? 8 pixels is transferred to texture memory.
  4402.  
  4403. For YUV422 format
  4404. (1) Transfer U data for 16 ? 8 pixels (64 bytes).
  4405. (2) Transfer V data for 16 ? 8 pixels (64 bytes).
  4406. (3) Transfer Y data for 16 ? 8 pixels (128 bytes).
  4407. (4) Transfer remaining U data for 16 ? 8 pixels (64 bytes).
  4408. (5) Transfer remaining V data for 16 ? 8 pixels (64 bytes).
  4409. (6) Transfer remaining Y data for 16 ? 8 pixels (128 bytes).
  4410.  
  4411. The U and V data are each stored in the internal buffer one time; once the Y data has been loaded into the internal buffer, transfer to texture memory begins. Once texture data for 16 ? 8 pixels has been output, the other half of the U, V, and Y data is loaded into the internal buffer and then the texture data for the remaining 16 ? 8 pixels is transferred to texture memory.
  4412.  
  4413. If the TA_YUV_TEX_BASE register is written to, the YUV-data Converter initializes the address where data is stored in texture memory to the value stored in the TA_YUV_TEX_BASE register, and then begins operating, assuming the first data that is input to be U data.
  4414. Once the number of macro blocks of texture data specified by YUV_U_Size and YUV_V_Size in the TA_YUV_TEX_CTRL register have been stored in texture memory, the YUV Data Converter outputs an interrupt and then automatically resets the storage address to the value stored in the TA_YUV_TEX_BASE register. Note that the texture data is transferred to texture memory in Non-Twiddled format.
  4415.  
  4416.  
  4417. The order in which YUV data is stored in system memory is shown below. The data is transferred consecutively through DMA transfer.
  4418.  
  4419. < For YUV420 format>
  4420. (1) U-data(16 ? 16pixel) (2) V-data(16 ? 16pixel)
  4421. (3) Y0-data(8 ? 8pixel) (4) Y1-data(8 ? 8pixel) (5) Y2-data(8 ? 8pixel) (6)Y3-data(8 ? 8pixel)
  4422. < For YUV422 format>
  4423. (1) U0-data(16 ? 8pixel) (2) V0-data(16 ? 8pixel) (3) Y0-data(8 ? 8pixel) (4) Y1-data(8 ? 8pixel)
  4424. (5) U1-data(16 ? 8pixel) (6) V1-data(16 ? 8pixel) (7) Y2-data(8 ? 8pixel) (8) Y3-data(8 ? 8pixel)
  4425.  
  4426.  
  4427.  
  4428. Fig. 3-81
  4429. DMA transfer of macro blocks from system memory is performed in the order shown below, starting form the upper left corner of the screen and continuing for the amount specified by YUV_U_Size and YUV_V_Size in the TA_YUV_TEX_CTRL register.
  4430.  
  4431.  
  4432. Fig. 3-82
  4433.  
  4434. The YUV data that is input is stored in 16 ? 16-pixel units in texture memory by the method specified in the TA_YUV_TEX_CTRL register.
  4435.  
  4436. < YUV_Tex = 0:>
  4437. The YUV data that is input is stored in texture memory as one texture with a size of [(YUV_U_Size + 1) ? 16] (H) ? [(YUV_V_Size + 1) ? 16] (V). This format has a weakness in that storage time is longer because the storage addresses in texture memory will not be continuous every 16 pixels (32 bytes) in the horizontal direction.
  4438.  
  4439. < When YUV_Tex = 1:>
  4440. [(YUV_U_Size + 1) ? (YUV_V_Size + 1)] textures of the macro size (16 ? 16 pixels) are stored in texture memory. Storage time is shorter, because the storage addresses in texture memory are continuous. However, each texture must be used with a different polygon and arranged on screen.
  4441.  
  4442. Fig. 3-83
  4443.  
  4444.  
  4445. �4 Peripheral Interface
  4446.  
  4447. This system is equipped with two bus interfaces, the G1 Bus and the G2 Bus, for interfacing with peripheral devices such as the audio chip AICA, the GD-ROM (the name for the CD-ROM drive in this system), and a modem. The devices are grouped into asynchronous and synchronous devices, and each device is assigned to one of these interfaces. The interfaces are described below.
  4448.  
  4449. �4.1 G1 Bus
  4450. The G1 Bus is used to read country codes and access asynchronous devices that are connected to the G1 Bus, such as the GD-ROM, system ROM, and FLASH memory. This interface is designed to handle large volumes of data from the GD-ROM, for system bootup, and to access environment settings, etc. Each of the devices connected to this bus is accessed by a different method, as described below.
  4451. The general setting registers for the G1 Bus are located in the SB block; the only type of access that is possible from the SH4 is 4-byte access in the non-cache area. There are separate device setting registers for the GD-ROM.
  4452. The only interrupts from external devices connected to the G1 Bus are those from the GD-ROM device; these are level interrupts that are input from the device. The interrupt source can be determined by reading the GD-ROM device registers; reading the drive's status register clears the interrupt. (For details on interrupt sources, refer to section 8.5.2.)
  4453.  
  4454. �4.1.1 GD-ROM
  4455. The CD-ROM that is installed in the Dreamcast System is called the "GD-ROM," and is used to supply large amounts of music data, game data, and program source code to the host system from Sega's proprietary "GD-ROM" discs. The music data (CD-DA) from the GD-ROM is output as digital audio data to the AICA audio chip on a 48Fs (Fs = 44.1KHz) cycle. The GD-ROM also supplies a 33.8688MHz clock signal (the audio clock source) to the AICA. The GD-ROM is located on the system's G1 Bus, and in addition to the digital audio music data, the GD-ROM supplies program source code and data to the system through the G1 Bus. The Dreamcast System's main program can only be started up from CD media. The GD-ROM also supports a wide variety of proprietary media.
  4456. The main specifications of the GD-ROM drive are listed below:
  4457.  
  4458. * Access time (1/3 stroke): 250ms or less
  4459. * Normal area: 4x; high-density area: 6 to 12x (CAV: 2000rpm)
  4460. * Buffer memory: 128K
  4461. * CD-DA shock-proof function built in
  4462. * Ball chucking
  4463. * Multiple security functions
  4464. * Can read the following types of discs:
  4465. - GD-ROM
  4466. - CD-DA, CD-ROM
  4467. - Photo CD, video CD
  4468. - CD Extra, CD + G, CD + EG
  4469. * The following disc types are rejected:
  4470. - CD-I, CD-I Ready (playback possible)
  4471.  
  4472. Regarding the disc specifications, the basic physical formats have separate audio and data tracks, and a single disc includes both a "single-density (program) area," which consists of normal density tracks, and a "high-density (program) area," which consists of high density tracks
  4473. The physical format of the "single-density (program) area" conforms with the "RED BOOK" and "YELLOW BOOK" CD-ROM standards, and the physical format conforms with ISO9660. This format can be played back by a normal CD-ROM drive.
  4474. The physical format of the "high-density (program) area" conforms with a proprietary Sega standard, and the physical format conforms with ISO9660. This format can only be played back by a CD-ROM drive that conforms with the Sega standard.
  4475. �4.1.1.1 Register Map
  4476. Regarding register access for the GD-ROM device, read/write accesses to data registers are made in 16-bit (2-byte) sizes, while read/write accesses to other registers are made in 8-bit (1-byte) sizes. The GD-ROM device register map is shown below.
  4477.  
  4478. Address Function ( Read / Write ) 0x005F 7000 Reserved 0x005F 7018 Alternate Status / Device Control : Reserved 0x005F 7080 Data / Data 0x005F 7084 Error / Features 0x005F 7088 Interrupt Reason / Sector Count 0x005F 708C Sector Number / Sector Number 0x005F 7090 Byte Control Low / Byte Control Low 0x005F 7094 Byte Control High / Byte Control High 0x005F 7098 Drive Select / Drive Select 0x005F 709C Status / Command Table 4-1
  4479.  
  4480. �4.1.1.2 Access Methods
  4481. Although the GD-ROM access timing is based on the ATA standard (the electrical interface conforms with ATA-3), the GD-ROM supports only the timing modes listed below. (The GD-ROM does not support "Single Word-DMA" from the ATA standard.)
  4482.  
  4483. (1) PIO Modes 0 to 4
  4484. Accesses to the GD-ROM by the CPU are only possible as byte or word accesses at 4-byte boundaries in the non-cacheable area. In this case, external accesses are single byte or word accesses.
  4485.  
  4486. (2) Multi Word DMA Modes 0 to 2
  4487. Read accesses from the GD-ROM by means of DMA permit transfer of any number of bytes at 1-byte boundaries. However, because internal operation is based on 32-byte burst access, if a number of bytes that is not evenly divisible by 32 are transferred, the excess transfer capacity is filled with zeroes. In this case, external accesses are performed as (number of transfer bytes/2) word accesses. If the GD-ROM is accessed in the middle of a DMA transfer, the bus is released for the access (*interrupting the transfer) as long as the G1 Bus signals G1DREQ and G1DACKN are not active.
  4488.  
  4489. For details on access methods, refer to the GD-ROM protocol SPI specifications.
  4490.  
  4491. �4.1.1.3 Initial Settings
  4492. �4.1.1.4 Access Procedure
  4493.  
  4494. �4.1.2
  4495. System ROM
  4496. The system ROM stores the system data and boot routines for the Dreamcast System, and is accessed by the CPU. The following data is stored in the system ROM:
  4497.  
  4498. (1) IPL codes: Boot processing and system configuration
  4499. (2) Multiplayer interface
  4500. (3) Dreamcast-OS core
  4501.  
  4502. The system ROM is mapped in SH4 area 0, and the duration of the address setup and hold times and the read and write pulses in the bus cycle can be specified through register settings. Access is possible as 1-, 2-, 4-, or 32-byte access.
  4503. The following table shows the contents of the ROM specifications that are used in the Dreamcast system.
  4504.  
  4505. Type Mask ROM ROM size (capacity) 16Mbit Bus width 8/16bit Access time 100ns?240ns Table 4-2 ROM Specifications
  4506.  
  4507. �4.1.2.1 Access Methods
  4508. Access to ROM and the FLASH memory (described later) is always performed from the CPU, and is possible as 1-, 2-, 4-, or 32-byte access. Note that 32-byte access can only be made to the cache area.
  4509.  
  4510. �4.1.2.2 System Initial Settings
  4511. �4.1.2.3 Access Procedure
  4512.  
  4513. �4.1.3
  4514. FLASH Memory
  4515. FLASH memory is used for backing up data for hermits, IDs, and communications. The size of FLASH memory is 128K (8-bit bus) and has an 8K protected area. Data can be written/erased a minimum of 100,000 times.
  4516.  
  4517. �4.1.3.1 System Initial Settings
  4518. �4.1.3.2 Access Procedure
  4519.  
  4520. �4.1.4
  4521. System Code
  4522. The system code is set by pull-up/pull-down resistors connected to the A/D lines (HOLLY pins: G1MRA[18:11]) on the G1 Bus on the board. The CPU can read the system code that is set on the board by reading SB_G1SYSM (0x005F74B0) in the G1 Interface Block Control Registers. For details on the register, refer to section 8.4.1.3, "G1 Interface."
  4523. The system code includes four bits, G1MRA [18:15], which identifies the unit as a product or a development unit. The system code settings are described below. (Note that in the table "0" indicates that the line is pulled down, and"1" indicates that the line is pulled up. Any settings that are not shown in the table below are reserved.
  4524.  
  4525. G1MRA System 18 17 16 15 0 0 0 0 Mass production unit 1 1 0 0 SET4-8M 1 0 0 0 SET4-32M 1 0 0 1 Dev.Box-16M 1 0 1 0 Dev.Box-32M 1 1 0 1 Graphics box Other codes Reserved Table 4-3
  4526.  
  4527. G1MRA[14:11] is the country code. The settings are described below.
  4528. (Note that, in the table, "0" signifies "pull down" and "1" signifies "pull up;" any settings not shown in the table are "Reserved.")
  4529.  
  4530. G1MRA Destination region 14 13 12 11 0 0 0 1 Japan, South Korea, Asia NTSC 0 1 0 0 North America, Brazil, Argentina 1 1 0 0 Europe Table 4-4
  4531.  
  4532. Note that the language that is shown on the initial setting screen is Japanese for both Asia NTSC and South Korea, and English for the Brazil PAL/M region and the Argentina PAL/N region.
  4533.  
  4534. �4.1.4.1 Initial Setting
  4535. None.
  4536. �4.1.4.2 Access Procedure
  4537. This register can only be accessed by 32-bit access, because it is a HOLLY internal register.
  4538.  
  4539. �4.2
  4540. G2 Interface
  4541. The G2 interface is used to access the AICA audio chip, a modem, and any expansion devices that are connected to the G2 Bus, which is synchronized with a 25MHz clock.
  4542.  
  4543. �4.2.1 Interface
  4544. The G2 bus is an expansion bus (a bus for the connection of expansion devices) that is used for connection with the audio IC AICA or a modem.
  4545. The control block for this bus does not have a target function (a function that would permit access by a device connected to the G2 bus), only a master function (a function that permits access to a device that is connected to the G2 bus). In other words, devices that are connected to the G2 bus only function as targets.
  4546. Therefore, a device that is connected to the G2 bus cannot be accessed directly from buses other than the G2 bus, such as the CPU bus. In addition, a device that is connected to the G2 bus cannot transfer data to another device that is connected to the G2 bus. Data transfers between devices that are connected to the G2 bus are accomplished through repeated read/write operations by the CPU, etc.
  4547. Data transfers involving devices that are connected to the G2 bus are conducted with a 16-bit data bus. The bus operation clock is 25MHz, so accesses to expansion devices are made using 1/16 or less of the CPU bandwidth. (The CPU's internal clock is 200MHz, and the register width is 32 bits.)
  4548.  
  4549. The G2 bus control block includes a CPU write FIFO buffer that operates either as 8 levels x 4 bytes or 1 level x 32 bytes. Writes to the G2 bus registers and to devices that are connected to the G2 bus are performed through the write FIFO buffer. Reads can only be initiated once the write FIFO is empty. Therefore, if an attempt is made to perform a read from the G2 bus after having performed a write to a slow device that is connected to the G2 bus, all functions that link the CPU to the G2 bus (CPU bus <-> SB <-> G2 bus) will lock up until the read is completed. In order to prevent the buses from locking up, it is necessary to check the state of the write FIFO buffer when accessing a slow device.
  4550.  
  4551. The G2 bus control block includes a DMA transfer function ("G2-DMA," hereafter) that is used to transfer data via the G2 bus without depending on the CPU. G2-DMA is supported for four channels that operate independently, and are used for data transfers between system memory and devices that are connected to the G2 bus. Data is transferred in units of 32 bytes. The G2 bus also includes a control input line that is used to initiate G2-DMA transfers. G2-DMA operates without regard to the status of the write FIFO buffer. when G2-DMA and the CPU are both accessing the G2 bus, their priority ranking alternates. In addition, the priority among the G2-DMA channels is switched on a round-robin basis.
  4552.  
  4553. The G2 bus includes three interrupt inputs: the AICA and the modem each control one, and the third is used by external expansion devices connected to the G2 bus. When multiple external expansion devices are connected to the G2 bus, the one interrupt input is shared by all of the devices.
  4554. If an interrupt is generated because the CPU accessed a device that is connected to the G2 bus, but the area being accessed has no corresponding device that is connected, or if a CPU timeout interrupt is generated during a G2-DMA transfer, the interrupt is generated even if G2-DMA has completed its data transfer.
  4555. Furthermore, an interrupt is generated and G2-DMA is not initiated: if an invalid value is set in the G2-DMA register; if an invalid value is set in the SB_ADSTAG register or the SB_ADSTAR register (when ch0:AICA in either case) and G2-DMA is enabled; or an address that is outside of the range set by the SB_G2APRO register is set in the SB_ADSTAR register (when ch0:AICA) and G2-DMA is enabled.
  4556.  
  4557. For details on setting up and using interrupts, refer to sections 2.7, 8.4.1.1, and 8.5.
  4558.  
  4559. For details on AICA and modem devices for connection to the G2 bus, and for explanations of restrictions concerning the creation of new devices for connection to the G2 bus, refer to the corresponding sections.
  4560.  
  4561. The term "CPU" refers to a controller that is not the G2 control block and is not a device that is connected to the G2 bus.
  4562.  
  4563.  
  4564. <<Addresses Used for the G2 Bus>>
  4565. The addresses listed below (Table 4-5) are allocated to the G2 bus. Table 4-6 indicates valid addresses. (Note that the addresses that are indicated are physical addresses, and are different from the logical addresses that the CPU uses.)
  4566. Address range Size Contents 0x005F7800 - 0x005F7BFF 1KB G2 bus control register area 0x00600000 - 0x0067FFFF 512KB G2 bus access area (primarily for modem) 0x00700000 - 0x01FFFFFF 25MB G2 bus access area (primarily for AICA) 0x02700000 - 0x03FFFFFF 25MB G2 bus access area (AICA image) 0x14000000 - 0x17FFFFFF 64MB G2 bus access area (unused; for expansion) Table 4-5
  4567.  
  4568. Address range Size Access Contents 0x005F7800 - 0x005F78FF 256B 4 G2 bus control registers 0x00600000 - 0x006007FF 2KB 1/2/4 Asynchronous cycle area (for modem)... Note 2 0x00620000 - 0x0062FFFF 64KB 1/2/4 /32 Synchronous cycle 16-bit address area (unused; for expansion) 0x00700000 - 0x00FFFFFF 9MB 1/2/4 /32 Synchronous cycle 32-bit address area (for AICA)...Note 3 0x01000000 - 0x01FFFFFF 16MB 1/2/4 /32 Synchronous cycle 32-bit address area (unused; for expansion) 0x02700000 - 0x02FFFFFF 9MB 1/2/4 /32 Synchronous cycle 32-bit address area (AICA image) 0x03000000 - 0x03FFFFFF 16MB 1/2/4 /32 Synchronous cycle 32-bit address area (unused; for expansion) 0x14000000 - 0x17FFFFFF 64MB 1/2/4 /32 Synchronous cycle 32-bit address area (unused; for expansion) Note 1: "Access" indicates the byte size that can be accessed, as follows:
  4569. 32: 32-byte continuous access permitted
  4570. 4: 4-byte (long word) access permitted
  4571. 2: 2-byte (word) access permitted
  4572. 1: 1-byte access permitted
  4573. - : Access not permitted
  4574. Note 2: In the asynchronous cycle area, only 1-/2-/4-byte access is permitted, at +0 addresses. Byte access at +1, +2, and +3 addresses, 2-byte (word) access at +2 addresses and 32-byte continuous access is prohibited.
  4575. Note 3: Access to AICA areas is as shown in the above table, but refer to the section corresponding to the actual AICA chip.
  4576. Table 4-6
  4577.  
  4578.  
  4579. Access to the following addresses is prohibited:
  4580. Address range Size Contents 0x005F7900 - 0x005F7BFF 768B Test area 0x00600800 - 0x0061FFFF 126KB Test area 0x00630000 - 0x0067FFFF 340KB Test area Table 4-7
  4581.  
  4582. Accesses to addresses other than those listed in the above tables are not G2 bus accesses.
  4583.  
  4584. <<Restrictions Concerning the G2 Bus>>
  4585. ? Access to the G2 bus control registers must be made as 4-byte long word access.
  4586. ? In the asynchronous cycle area, access to addresses for which address bits A1 and A0 are 0b00 (0x00600000, 0x00600004, etc.) is performed as 1-/2-/4-byte accesses, and the lower 8-bits of data are valid. 1-/2-byte accesses to addresses for which address bits A1 and A0 are not 0b00 are prohibited.
  4587. ? Synchronous cycle 16-bit address areas can be accessed either through 1-byte, 2-byte (word), 4-byte (long-word) or 32-byte continuous access. However, these areas are unused in the standard configuration.
  4588. ? Synchronous cycle 32-bit address areas can be accessed either through 1-byte, 2-byte (word), 4-byte (long-word) or 32-byte continuous access. However, these areas are unused in the standard configuration, except for AICA. note that there are restrictions on usage for AICA; refer to the corresponding sections.
  4589. ? The availability of DMA on the G2 bus is indicated below.
  4590. The folowing DMA transfers are usble:
  4591. 1) AICA-DMA: System memory ? AICA (Mode that appears empty at CPU initiation)
  4592. 2) EXT-DMA0: System memory ? External expansion device (Mode that appears empty at CPU initiation)
  4593. External expansion device ? System memory (Mode that appears empty at CPU initiation)
  4594. 3) EXT-DMA1 System memory ? External expansion device (Mode that appears empty at CPU initiation)
  4595. External expansion device ? System memory (Mode that appears empty at CPU initiation)
  4596. 4) GD-DMA: GD-ROM ? external expansion device
  4597. Use of the following DMA transfers is prohibited:
  4598. 1) AICA-DMA: System memory ? AICA (Any mode other than the mode that appears empty at CPU initiation)
  4599. AICA ? system memory
  4600. 2) EXT-DMA0: (Any mode other than the mode that appears empty at CPU initiation)
  4601. 3) EXT-DMA1: (Any mode other than the mode that appears empty at CPU initiation)
  4602. 4) GD-DMA: External expansion device ? GD-ROM
  4603. AICA ? GD-ROM
  4604.  
  4605. ? Software access restrictions are listed below:
  4606. ? If the SH4 accesses the G2 bus at the same time that GD-DMA <<GD -> AICA>> or <<GD ? EXT>> is being executed, a 16[micro]s or longer cycle may be generated on the Root bus (the internal bus) causing Maple to overflow. Therefore, access to the G2 bus should wait until GD-DMA ends and after the buffer has been confirmed as being empty. Details are provided below:
  4607. ? GD-DMA <<GD-ROM ? AICA>> and an SH4 G2 bus access cannot both occur at the same time. If the SH4 accesses the G2 bus while there is burst write data for AICA in the G2 interface buffer and the AICA buffer, the SH4 needs to wait only for the duration of the AICA 32-byte transfer. (This is because, if there is burst data in the G2 buffer, the next data is not accepted from the SH4 interface until the buffer becomes empty.)
  4608. ? GD-DMA <<GD-ROM -> EXT>> and an SH4 AICA read access cannot both occur at the same time. If the SH4 performs an AICA read while there is write data for an external expansion device in the G2 interface buffer, the SH4 needs to wait only for the duration of the write to the external expansion device and the AICA read.
  4609.  
  4610. �4.2.2
  4611. AICA
  4612. The AICA chip controls the sound system.
  4613. The main specifications for the AICA sound chip are listed below.
  4614. * Sampling frequency: 44.1KHz
  4615. * Dedicated sound processor (ARM7DI) on chip; provides seven interrupts with priority levels through register flags
  4616. * Parallel processing DSP that is specialized for voice processing
  4617. * 128 steps; includes ring buffer function
  4618. * PCM sound source on chip
  4619. * PCM data format: 8-, 16-bit linear/4-bit ADPCM (ADPCM is a proprietary format established by YAMAHA)
  4620. * A maximum of 64 voices
  4621. * Independent LFO (Low Frequency Oscillators) function and EG (Envelope Generator) function for all channels
  4622. * LPF with a cutoff frequency that can be varied over time for all channels
  4623. * Pitch change possible on all channels
  4624. * Forward loop function
  4625. * Supports one external digital audio input
  4626. * Provides an SDRAM interface as external memory, permits common access by the AICA's internal sound processor, the sound source, the DSP, and the system (SH4)
  4627. * Digital mixer on chip permits digital mixing of signals from the DSP, a PCM sound source and an external digital audio input
  4628. * Supports a Real Time Clock (RTC) by means of a secondary battery
  4629.  
  4630. A summary of the chip specifications and configuration is provided below.
  4631. The AICA is an audio chip with its own internal 64-channel PCM/ADPCM sound source, supports sound effects produced by its 128-step/sample (1 sample = 44.1KHz) DSP and dedicated sound processor, generates sound data, and processes waveform data from the host system. The sound data that is generated by the AICA can be mixed as digital audio output with one external digital audio input. At the output stage, the signal can be output as 64Fs digital audio to an audio DAC/AMP that is external to the chip. In the Dreamcast system, 48Fs digital audio from the GD-ROM is input to the AICA as external audio. The digital audio output (64Fs) that is generated by the AICA passes through the audio DAC and AMP, and is output as stereo sound through the RCA and expansion VGA connectors, along with the video signals from the graphics system.
  4632. The AICA chip configuration consists of 2MB of wave memory (SDRAM) for wave data from the internal sound source and the host system, etc.; an RTC (Real Time Clock), and a MIDI interface for development purposes. A 3V lithium battery and a 32.768KHz crystal are added externally for backup of the RTC. The AICA also provides access to the video mode settings (switches) for the DVE (video DAC/encoder).
  4633. Regarding the clock system, the interface block and the audio block use different clock frequencies. The audio block uses a 22.5792MHz clock that is generated by passing the 33.8688MHz clock signal that is supplied from the GD-ROM through a PLL in the audio block. The host system interface block uses a 25MHz clock that is supplied from the G2 Bus.
  4634.  
  4635.  
  4636. The chip configuration and connections with peripheral devices are illustrated below.
  4637.  
  4638.  
  4639.  
  4640. Fig. 4-1 Internal Block Diagram of the AICA
  4641.  
  4642. �4.2.2.1 Memory/Register Map
  4643. The following table describes the memory/register area for the AICA for physical memory accesses by the SH4 on the system side, and the area that is accessed by the ARM, which is the AICA's internal sound CPU.
  4644. A register map and an explanation regarding the channel, common and DSP data is provided in section 8.4.5.
  4645. Note that the allowed access size for accesses of the AICA area by the SH4 is 4 bytes only.
  4646.  
  4647. Area G2 (SH4) addresses AICA internal (ARM) addresses Channel data 0x0070 0000?0x0070 27FF 0x0080 0000?0x0080 27FF Common data 0x0070 2800?0x0070 2FFF 0x0080 2800?0x0080 2FFF DSP data 0x0070 3000?0x0070 7FFF 0x0080 3000?0x0080 7FFF RTCdata 0x0071 0000?0x0071 000B - Memory area (SDRAM) 0x0080 0000?0x00FF FFFF 0x0000 0000?0x007F FFFF Table 4-8 AICA Memory/Register Map
  4648.  
  4649. * The usable size of the memory area (SDRAM) that is shown in the table varies because the amount of memory that is installed depends on whether the system is to be used for development purposes or not.
  4650. (G2) 2MB: 0x0080 0000-0x009F FFFF;
  4651. Development version 8MB: 0x0080 0000-0x00FF FFFF
  4652. (AICA) 2MB: 0x0000 0000-0x001F FFFF;
  4653. Development version 8MB: 0x0000 0000-0x007F FFFF
  4654.  
  4655. * The G2 address information listed in the table indicates physical memory addresses. In the case of an access by the SH4, the actual access address depends on the area where the SH4 is conducting its cache access. (Refer to the cache access table in section 2.1.)
  4656.  
  4657. �4.2.2.2 Initial Settings
  4658. �4.2.2.3 Access Procedure
  4659. A restriction in the AICA specifications requires slots to be left open so that AICA accesses by the SH4 are completed within 16[micro]sec.
  4660. The following restrictions apply to AICA accesses by the SH4.
  4661. ? Reads of the AICA by the SH4 sometimes take 16[micro]sec., during which time the CPU bus, the internal bus (Root Bus) and the G2 bus come to a complete stop. Therefore, reducing AICA reads is a necessity for making the system faster.
  4662. ? Similarly, writes to the AICA are fast if the AICA buffer is empty, but sometimes more than 16[micro]sec. are required in order to send data in the buffer to wave memory so that the buffer is empty. In order to increase system speed, it is necessary to limit consecutive writes to the AICA to eight times; DMA can be used to reduce the number of writes.
  4663.  
  4664. Restrictions concerning DMA are provided below.
  4665. ? If the AICA is to be read by the SH4 while AICA-DMA, EXT-DMA0, or EXT-DMA1 is being executed, interrupt the AICA-DMA, EXT-DMA0, or EXT-DMA1 operation and confirm that the buffer is empty before reading the AICA. After the AICA read is completed, resume the DMA that was interrupted. Alternatively, wait until DMA is completed and then confirm that the buffer is empty before reading the AICA.
  4666. * From the time when the buffer has been confirmed as being empty until the AICA read is completed, it is possible to access system memory, the TA FIFO buffer and the interrupt control register, but other accesses from the SH4 are prohibited.
  4667.  
  4668.  
  4669. Fig. 4-2
  4670.  
  4671. ? To perform a write to the AICA by the SH4 while AICA-DMA is in progress, interrupt AICA-DMA and confirm that the buffer is empty before writing to the AICA. After the write to the AICA is completed, resume the AICA-DMA. Otherwise, wait for the AICA-DMA to end, confirm that the buffer is empty and then write to the AICA. In addition, writes to the AICA should be performed no more than eight consecutive times. If more than eight writes to the AICA are to be performed, confirm that the buffer is empty again after eight or fewer writes, and then perform eight or fewer writes to the AICA again.
  4672. * SH4 accesses other than those to the AICA are possible.
  4673.  
  4674.  
  4675. Fig. 4-3
  4676.  
  4677.  
  4678. �4.2.2.4
  4679. Wave Memory
  4680. The AICA has an interface for externally connected SDRAM that is shared and accessed by its internal sound processor, sound source, DSP, and the host system. Table 4-2 shows the specifications for the memory that is used. The following table shows the specifications and settings for the memory that is used.
  4681.  
  4682. Memory size 2MB (can be expanded up to 8MB) Technology 16Mbit SDRAM
  4683. (2banks� 512Kwords�16bits) Number of memory maps used 1 Chip bus width 16 bits Operating frequency 67.7376MHz Operation settings ? Burst Read and Single Write
  4684. ? Wrap Type = Sequential
  4685. ? CAS Latency = 2
  4686. ? Burst Length = Full Page Table 4-9 AICA's External Memory Specifications
  4687.  
  4688.  
  4689. �4.2.3
  4690. RTC(Real Time Clock)
  4691. The Real Time Clock (RTC), a timer that increments its count once per second, is built into the AICA audio chip, and is capable of operating off a backup battery at 2.0 to 3.5V even when the main power is off. A 3V lithium battery and a 32.768KHz crystal (as the clock source) are each connected externally to the AICA for the RTC.
  4692. Only the SH4 can access the RTC.
  4693.  
  4694. �4.2.3.1 Access Method
  4695. The RTC is accessed through the following three registers, starting from 0x00710000, described below.
  4696. As shown below, the RTC registers form a 32-bit counter RTC [31:0], which can count seconds for approximately 136 years, and a write enable bit (EN...0x00710008-bit 0, write only) for those registers. (Because these registers are accessed in the same manner as AICA, the access size is 4 bytes only, and only the lower 16 bits are valid.)
  4697. RTC[31:0] is normally write protected, but can be written when a "1" is written to the EN bit. Furthermore, when RTC[15:0] is written, the counter below one second is cleared. When RTC[31:16] is written, write protection is enabled again.
  4698. If the data is read while the count is being increased, the correct value might not be output. Therefore, it is necessary to confirm the value by reading several times, for example.
  4699.  
  4700. RTC Resister Address?0x0071 0000
  4701. bit15-0 RTC[31:16]
  4702. Address?0x0071 0004
  4703. bit15-0 RTC[15:0]
  4704. Address?0x0071 0008
  4705. bit15-1 0 Reserved EN
  4706.  
  4707. �4.2.4
  4708. MODEM
  4709. In order to add communications functions to the Dreamcast System, an external plug-in type modem is supported. The modem consists of a modem chip, telephone line interface, and an ASIC that includes ID circuitry.
  4710. The modem uses Rockwell's RCVDL56DPGL/SP chip set, and the operating frequency of the modem block is 56.448MHz. After a reset is released, the modem requires an interval of at least 400ms in order to initialize its registers.
  4711.  
  4712. The major functions and features of the modem are listed below:
  4713. * Full duplex V.34 (33.6Kbps) data modem
  4714. * Supports MNP2-5, V.42, and V.42bis for error correction and data compression (Error correction and data compression are performed by system software.)
  4715. * Passive modem; does not include a controlling microprocessor
  4716.  
  4717. �4.2.4.1 Address Map
  4718. The address map is shown below. (Refer to "RCVDL56DPFL/SP, RCV56DPFL/SP, RCV336DPFL/SP Modem Data Pump Designer's Guide" for details.)
  4719.  
  4720. ADDRESS CONTENTS ADDRESS CONTENTS 0x0060 0000 Modem ID0 0x0060 0440 Modem Register No.10 0x0060 0004 Modem ID1 0x0060 0444 11 : 0x0060 0448 12 0x0060 0400 Modem Register No.00 0x0060 044C 13 0x0060 0404 01 0x0060 0450 14 0x0060 0408 02 0x0060 0454 15 0x0060 040C 03 0x0060 0458 16 0x0060 0410 04 0x0060 045C 17 0x0060 0414 05 0x0060 0460 18 0x0060 0418 06 0x0060 0464 19 0x0060 041C 07 0x0060 0468 1A 0x0060 0420 08 0x0060 046C 1B 0x0060 0424 09 0x0060 0470 1C 0x0060 0428 0A 0x0060 0474 1D 0x0060 042C 0B 0x0060 0478 1E 0x0060 0430 0C 0x0060 047C 1F 0x0060 0434 0D 0x0060 048C HRES 0x0060 0438 0E 0x0060 043C 0F Table 4-10
  4721.  
  4722. �4.2.4.2 Access Method
  4723. The modem area is mapped in the area from 0x0060 0000 to 0x0060 07FF on the G2 bus (the effective addresses that are actually mapped are listed in the table above). Each register can be accessed only by means of one-byte reads and writes.
  4724.  
  4725. �4.2.4.2.1
  4726. ID
  4727. The ID register is used to get the ID of the device that is connected in the modem slot. As described earlier, the access size is 1 byte only, and this register is a read-only register.
  4728. The register contents are described below.
  4729.  
  4730. MODEM ID0 Address?0x0060 0000
  4731. bit 7-0 Country Code
  4732. Country Code (default = 0x00)
  4733. Value Country 0x00 Reserved 0x01 Japan 0x02 USA 0x02-0xFF Reserved
  4734.  
  4735. MODEM ID1 Address?0x0060 0004
  4736. bit 7-4 3-0 Maker Code Device Type
  4737. Maker Code (default = 0x1)
  4738. Value Maker 0x0 SEGA 0x1 Rockwell 0x2-0xF Reserved
  4739. Device Type (default = 0x0)
  4740. Value Device 0x0 33.6Kbps 0x1-0xF Reserved
  4741. �4.2.4.2.2 Reset
  4742. A hardware reset of the modem chip is performed through the HRES register (0x00600480). The modem set requires a minimum reset interval of 3[micro]sec, and a minimum of 400msec after releasing the reset.
  4743.  
  4744. HRES Address?0x0060 0480
  4745. bit 7-0 Reset
  4746. Reset (default=0x0)
  4747. Setting Status 0x0 Reset 0x1 Reset release
  4748. �4.2.5
  4749. Expansion Devices
  4750. Expansion devices are connected through the main unit's expansion connector (the G2 bus), and are accessed through the G2 interface.
  4751. Expansion devices respond on the G2 bus synchronous cycle. Because the modem uses an asynchronous cycle, the expansion device must not respond.
  4752. <<Area Assignments>>
  4753. Expansion devices are normally assigned to 1K areas (refer to the table below) in what is normally a 16K space that starts from the 16-bit address 0x0000. The address assignment is based on the state of the expansion device's SELx pins.
  4754.  
  4755. area address range SH4 address 0 0x0000 - 0x03FF 0x00620000 - 0x006203FF 1 0x0400 - 0x07FF 0x00620400 - 0x006207FF 2 0x0800 - 0x0BFF 0x00620800 - 0x00620BFF 3 0x0C00 - 0x0FFF 0x00620C00 - 0x00620FFF 4 0x1000 - 0x13FF 0x00621000 - 0x006213FF 5 0x1400 - 0x17FF 0x00621400 - 0x006217FF 6 0x1800 - 0x1BFF 0x00621800 - 0x00621BFF 7 0x1C00 - 0x1FFF 0x00621C00 - 0x00621FFF 8 0x2000 - 0x23FF 0x00622000 - 0x006223FF 9 0x2400 - 0x27FF 0x00622400 - 0x006227FF 10 0x2800 - 0x2BFF 0x00622800 - 0x00622BFF 11 0x2C00 - 0x2FFF 0x00622C00 - 0x00622FFF 12 0x3000 - 0x33FF 0x00623000 - 0x006233FF 13 0x3400 - 0x37FF 0x00623400 - 0x006237FF 14 0x3800 - 0x3BFF 0x00623800 - 0x00623BFF 15 0x3C00 - 0x3FFF 0x00623C00 - 0x00623FFF Table 4-11
  4756.  
  4757. Expansion devices can use the address spaces shown below.
  4758.  
  4759. ADDRESS SIZE AREA 0x00620000?0x0062FFFF 64KByte Synchronous cycle 16-bit address area 0x01000000?0x01FFFFFF 16MByte Synchronous cycle 32-bit address area 0x03000000?0x03FFFFFF 16MByte Synchronous cycle 32-bit address area 0x14000000?0x17FFFFFF 64MByte Synchronous cycle 32-bit address area *It is recommended that 0x03000000 through 0x03FFFFFF be the image for 0x01000000 to 0x01FFFFFF.
  4760. Table 4-12
  4761.  
  4762. The 1K spaces have a 32-byte basic register set that is common to the expansion devices, and which functions as configuration registers that are set when using expansion device interrupts or an area that exceeds 1K.
  4763. When requesting an area that is greater than 1K in size, the configuration register is used by the software for resource management in order to assign the area. In addition, because it is not possible to guarantee that an expansion device will occupy a fixed area (occupying specific addresses is prohibited), the software must by configured so that no problems arise no matter which area is allocated to an expansion device.
  4764. All expansion devices share one interrupt. In addition, the three G2-DMA transfer requests are used by all expansion devices on an exclusive basis.
  4765.  
  4766.  
  4767. <<Configuration Registers>>
  4768. The configuration registers occupy a 32-byte area at the beginning of the 1K area that is the basic space for expansion devices. The contents of these registers are described below. A reset resets each register to "0."
  4769.  
  4770. Offset
  4771. Address Access Contents 0x0000 R/- ID0: G2 identifier low 0x0002 R/- ID1: G2 identifier high 0x0004 R/- ID2: Individual identifier 0x0006 R/- ID3: Individual identifier 0x0008 R/- ID4: Individual identifier 0x000A R/- ID5 : Device Category 0x000C R/- ID6 : Serial Number 0x000E R/- ID7 : Comaptible Number 0x0010 R/W Reg0 : Address Space 0 0x0012 R/W Reg1 : Address Space 1 0x0014 R/W Reg2 : DMA Transfer Request Assign 0x0016 R/W Reg3 : Device Enable Register 0x0018 R/W Reg4 : Interrupt Mask Low 0x001A R/W Reg5 : Interrupt Mask High 0x001C R/W Reg6 : Interrupt Status Low 0x001E R/W Reg7 : Interrupt Status High *Access (read only) to 0x0004 through 0x000E differs for each device.
  4772. Tabke 4-13
  4773.  
  4774. ? 0x0000 to 0x0002: ID0-1 G2 identifier
  4775. This identifier is used to determine whether the rest of the registers that follow are the correct registers.
  4776. The sequence of bytes, starting from 0x0000, is "G", "A", "P", and "S". (temporary)
  4777. bit31-24 (0x0002_bit15-8) : 0x53
  4778. bit23-16 (0x0002_bit7-0) : 0x4D
  4779. bit15-8 (0x0000_bit15-8) : 0x41
  4780. bit7-0 (0x0000_bit7-0) : 0x47
  4781. ? 0x0004 to 0x0008: ID2 to 4 Individual identifier
  4782. This area can be used in any fashion desired.
  4783.  
  4784. ? 0x000A : ID5 Device Categoly
  4785. This indicates the general category of the device. Each bit indicates a function category. If the device has multiple functions, each of the corresponding bits is set to "1".
  4786. bit15 : G2 bus bridge/repeater
  4787. bit14 : -
  4788. bit13 : Extra Bus Bridge (PCMCIA, ISA, etc.)
  4789. bit12-7 : -
  4790. bit6 : Miscellaneous I/O (Keyboard, MOUSE, etc.)
  4791. bit5 : LAN/Ethernet
  4792. bit4 : SCSI
  4793. bit3 : ATA/IDE/compact-FLASH
  4794. bit2 : parallel (IEEE1284-1994)
  4795. bit1 : serial/Modem/ISDN (165x0)
  4796. bit0 : Memory (DRAM/DRAM)
  4797.  
  4798. ? 0x000C: ID6 Serial number
  4799. This is a product code that identifies the device.
  4800. This register consists of the manufacturer's code (8 bits) and a serial number (8 bits); the serial number is managed by the manufacturer. The manufacturer's code 0x00 and the serial number 0x00 can be used as a prototype code. The serial number correspondence is shown below.
  4801. � 0xXXYY �
  4802. bit15-8 : maker code ;XX
  4803. bit7-0 : serial number ;YY
  4804. XX-- = 0x00-- : Standard device (internal specifications are public)
  4805. XXYY = 0x0000 : Prototype
  4806. XXYY = 0x0001 : DRAM interface
  4807. XXYY = 0x0002 : Simple ISA interface
  4808. XXYY = 0x0003 : G2 bus buffer
  4809. XXYY = 0x0004 : Simple IDE interface
  4810. XX-- = 0x01-- : Sega
  4811. XXYY = 0x0100 : Sega prototype
  4812.  
  4813. ? 0x000E: ID7 Compatible Number
  4814. This register is specified when the device indicated by the serial number is the same, or is upward compatible, and the control software can be used as is. If there is no compatible device, this register is 0x0000.
  4815. bit15-8 : maker code
  4816. bit7-0 : serial number
  4817.  
  4818. ? 0x0010: Reg0 Address Space 0
  4819. Set this register when an area larger than the basic 1K space is required. Specify addresses in units of 64K x 2[n] bytes. When 0x0000 is specified, device allocation is prohibited.
  4820. If the address space is not required, this register can be treated as a read-only register that returns 0x0000.
  4821. bits 15-13 : N.A.
  4822. bits 12-0 : Correspond to A28 through 16 of a CPU address
  4823.  
  4824. ? 0x0012: Reg1 Address Space 1
  4825. Address 0x0012 has the same function as address 0x0010; 0x0010 and 0x0012 can be used to allocate two different address spaces. Specify addresses and areas in units of 64K x 2[n] bytes.
  4826. If the address space is not required, this register can be treated as a read-only register that returns 0x0000.
  4827. This register is used when an area larger than the standard 1K space is required.?
  4828. bits15-13 : N.A.
  4829. bits12-0 : Correspond to A28 through 16 of a CPU address
  4830.  
  4831.  
  4832. ? 0x0014: Reg2 DMA Transfer Request Assign
  4833. This register is used to select signal lines for outputting a transfer request to G2-DMA. When a bit is set to "1," the corresponding signal line is driven. If G2-DMA is not being used, this register can be treated as a read-only register that returns 0x0000.
  4834. bits15-4 : N.A.
  4835. bits3 : DMA Request Signal Select (G2RQDEVN)
  4836. 0- Signal High-Z
  4837. 1- Active
  4838. bits2 : DMA Request Signal Select (G2RQEX2N)
  4839. 0- Signal High-Z
  4840. 1- Active
  4841. bit1 : DMA Request Signal Select (G2RQEX1N)
  4842. 0- Signal High-Z
  4843. 1- Active
  4844. bit0 : N.A.
  4845.  
  4846. ? 0x0016: Reg3 Device Enable Reg
  4847. This register is used to enable a device and the area allocated by 0x0010 and 0x0012. Bit 1 permits "1" to be read from read/write registers.
  4848. The 1K area that is standard can always be enabled.
  4849. bits15-2 : N.A.
  4850. bit1 : Device Register Mask
  4851. 0- Mask Off
  4852. 1- Mask On
  4853. bit0 : Device Enable
  4854. 0- Dis
  4855. 1- Enable
  4856.  
  4857. ? 0x0018 - 0x001A: Reg4 - Reg5 Interrupt Mask
  4858. These mask registers control the output of interrupts when interrupts are generated. These registers can control up to 32 sources; when a bit is set to "1," the corresponding interrupt output is enabled. If interrupt are not being used, this register can be treated as a read-only register that returns 0x00000000.
  4859. These registers are packed, starting from the lowest bit.
  4860. bits 31-0 (0x001A_bit15-0, 0x0018_bit15-0)
  4861.  
  4862. ? 0x001C - 0x001E: Reg6 - Reg7 Interrupt Status
  4863. These registers reflect the status of interrupts that have been generated by the device. When a bit is "1," the corresponding interrupt is being generated. These registers are used in conjunction with the interrupt mask registers; when the bits that correspond to an interrupt output are both "1," that interrupt output is low. When there are multiple interrupt sources, one or more interrupts are generated, and the interrupt outputs go low if the corresponding mask bits are set to "1."
  4864. Depending on the device, it may also be possible to clear an interrupt by writing a "1" to the corresponding bit in this register. (In some cases, interrupts may be cleared by accessing a different register.)
  4865. bits 31-0 (0x001E_bit15-0, 0x001C_bit15-0)
  4866.  
  4867. The 32 bytes from 0x0000 to 0x001F described above comprise the configuration registers.
  4868.  
  4869. ? The area from 0x0020 to 0x3FF is used by each device.
  4870.  
  4871. <<Device Detection (Example)>>
  4872. When the device that exists in address 0x00620000 supports the bridge function, device detection is performed for the remaining areas as well. In this case, because expansion devices are not necessarily located in consecutive areas, detection must be performed for all areas.
  4873. If the device does not support the bridge function, only one device is connected, so device detection is not performed for any other area.
  4874.  
  4875. (a) The detection start address is set as 0x00620000.
  4876. (b) Read the address + 0x0000 and + 0x0002.
  4877. ? ?????????????????????????If the G2 identifier is found, a device is detected. ?(c)
  4878. ? If the values that were read differ, no device is detected. ?(z)
  4879. ? If a timeout occurs, no device is detected. ?(z) ???(h)
  4880. (c) Read the address + 0x00C.
  4881. ? If the value is 0x0000, handling is unknown (a prototype). ?(g) ???(h)
  4882. ? If the value is not 0x0000, search for the device driver. ?(d)
  4883. (d) Search for the device driver.
  4884. ? If the driver is found, initialize the device accordingly. ?(g) ???(h)
  4885. ? If the device driver is not found, read the address + 0x000E. ?(e)
  4886. (e) Read the address + 0x000E.
  4887. ? If the value is 0x0000, handling is unknown. ?(g) ???(h)
  4888. ? If the value is not 0x0000, search for the device driver. ?(f)
  4889. (f) Search for the device driver.
  4890. ? If the driver is found, initialize the device accordingly. ?(g) ???(h)
  4891. ? If the device driver is not found, handling is unknown. ?(g) ???(h)
  4892. (g) If the detected address is 0x00620000...
  4893. ? End if the device does not support the bus bridge function(when + 0x00A_bit15 is "0"). ?(z)
  4894. ? Search for the bridge destination if the device does support the bus bridge function. ?(h)
  4895. ? If the detected address is not 0x00620000... ?(h)
  4896. (h) Repeat steps (b) through (f) 15 times, once for each 1K, starting from 0x00620400.
  4897. (z) End
  4898.  
  4899.  
  4900. <<Device initialization processing (Example)>>
  4901. (a) Write 0x0002 in the address + 0x0016, so that "1" can be read from the bits corresponding to the registers that can be set.
  4902. (b) Read the address + 0x0010, + 0x0012, + 0x0014, + 0x0014, + 0x0018, and + 0x001A.
  4903. (c) Write 0x0000 in the address + 0x0016 to return to normal operation.
  4904. (d) Any value that was read in (b) that was not 0x0000 indicates a resource request that was being made, so allocate resources accordingly.
  4905. (e) Write to the address + 0x0010, + 0x0012, + 0x0014, + 0x0014, + 0x0018, and + 0x001A, as necessary.
  4906. (f) Write 0x0002 in the address + 0x0016, enabling the device.
  4907.  
  4908. <<G2 bus and expansion devices>>
  4909. The G2 bus is designed for about three devices to be connected, including a sound source IC and a modem, and the drive capabilities of the signal lines that are output from the main unit are limited. As a result, it is not possible to connect multiple external devices. If multiple external devices are connected, the signal lines must be buffered.
  4910. When connecting multiple devices by means of an expansion box, etc., connect them through a device that has a repeater or bridge function. The connection diagrams below illustrate the connection of one expansion device and the connection of an expansion box.
  4911.  
  4912. [Connection between main unit and one expansion device]
  4913.  
  4914. Fig. 4-4
  4915.  
  4916. [Connection between main unit and an expansion box]
  4917.  
  4918. Fig. 4-5
  4919.  
  4920.  
  4921.  
  4922. �5 User Interface
  4923. �5.1
  4924. Peripherals
  4925. The "Maple" peripheral interface is used for the Dreamcast control pads, etc. The "Maple" interface is described below.
  4926. �5.1.1 Overview
  4927. "Maple" is Sega's proprietary peripheral interface, and supports the connection of peripheral devices such as control pads and light guns through four ports. The Maple interface sends/receives serial data with the devices. The contents of the data are defined by the Maple Bus protocol. (The controller has no effect on the details of the protocol.) Protocol organization and analysis is handled by the SH4 CPU.
  4928. The hardware includes one port consisting of two lines, SDCKA and SDCKB, and data transfers are performed in synchronous serial mode. Data is transferred through half-duplex bi-directional transfer with a maximum data transfer rate of 2Mbps and a minimum data transfer rate of 250Kbps. The minimum data transfer unit is one frame, each of which begins with the START pattern that is indicated at the beginning of the data transfer, followed by a DATA pattern ranging in length from 4 to 1024 bytes, the parity bit, and then the END pattern. The eight parity bits are added automatically by the hardware when the data is sent, and are removed when the data is received.
  4929. The following register sets are provided for the Maple interface. (Details on each register are provided in the list of registers.)
  4930. * Maple-DMA Control Registers
  4931. * Maple I/F Block Control Registers
  4932. * Maple-DMA Secret Register
  4933. * Maple-DMA Debug Registers
  4934. * Maple I/F Block Hardware Control Register
  4935. * Maple I/F Block Hardware Test Registers
  4936. * Interrupt Control Registers ...interrupt related registers (SB_ISTNRM, etc.)
  4937.  
  4938. The basic operation of this interface is described below.
  4939. A command file is set up in system memory, containing the instructions (settings such as the communications port selection, the received data storage address, and the transfer data length) for the Maple controller and the transmission data. The command file consists of units formed by "instruction to the controller," "received data storage address," and "transmission data," in that order. Each of these units are located consecutively in system memory.
  4940. The controller can be started up by two methods: by software, or by hardware in synchronization with the V-BLANK signal. These methods are selected through the trigger selection register (SB_MDTSEL). When startup by the V-BLANK signal is selected, delayed startup can be selected through the system register (SB_MSYS) setting.
  4941. When the DMA enable register (SB_MDEN) and the DMA start register (SB_MDST) have been set by the SH4, the controller starts up and loads in the command file. The controller follows the instructions, sending the transmission data in system memory indicated by the DMA command table address register (SB_MDSTAR) in the specified length to the target port, and then waits to receive a response. When data is received, the controller writes that data in system memory, starting from the received data store address that was set in the instructions. After receiving data, the controller continues executing the instructions in sequence until it detects the end of the command file. (Accesses between the controller and system memory are all performed through DMA in ch0-DDT mode, and data is sent and received in units of 32 bytes.)
  4942.  
  4943. If, as a result of being disconnected or some other problem, the peripheral device does not respond (times out), then 0xFFFFFFFF is written to the first 32 bits of the received data storage address as "disconnected" processing. 0xFFFFFF00 is written if a parity error occurs during reception of serial data.
  4944. *
  4945. Instruction Format
  4946. bit 31 30-18 17-16 15-11 10-8 7-0 End Flag 000 0000 0000 00 Port Select 0000 0 Pattern Transfer Length Instructions to the Maple interface consist of 32 bits of data as shown above, and are set up in system memory.
  4947. An instruction consists of an End Flag bit, which indicates the end of the command file; the Port Select bits, which select the active port that is the target of the transmission/reception operation; the Pattern selection bits; and the Transfer Length bits.
  4948. When Maple detects a "1" in the End Flag bit, it terminates processing with this instruction. (The End Flag must be set to "1" in the last instruction in the transmission data.) When the pattern selection bits are set to "000," Maple outputs the data that is to be sent. If any other pattern is selected, the port outputs the information pattern only, and the transmission data length specification becomes invalid. "111" (NOP) is used to extend processing for a certain length of time. when the pattern "010" (Light-Gun mode) is selected, the End Flag bit of that instruction must be set to "1". All subsequent instructions are invalid until the pattern "100" (return from Light-Gun mode) is detected.
  4949. End Flag: Command file end bit
  4950. Setting Meaning 0 Not end of command file 1 End of command file (Execution ceases after this command.) Port Select: Port selection bits ... These bits select the port that is the target of the transmission/reception operation.
  4951. Setting Selected port 0 Port A 1 Port B 2 Port C 3 Port D Pattern: Pattern selection bits
  4952. Pattern Pattern bit2 bit1 bit0 0 0 0 Normal data of the length indicated by Transfer Length 0 1 0 Light-Gun mode (Seizes SDCKB.) 0 1 1 RESET 1 0 0 Return from Light-Gun mode (Releases SDCKB.) 1 1 1 NOP (Waits after data is received before sending the next data.) Transfer Length: Transfer data length selection bits
  4953. Setting Transfer data length 0 4 Byte 1 8 Byte ? ? 0xFE 1020 Byte 0xFF 1024 Byte
  4954. * Received data storage address
  4955. Data is received from peripheral devices in 4-byte units, and is first loaded in a 32-byte reception FIFO. As soon as the FIFO becomes full, the data is transferred to the received data storage address in system memory. However, as soon as reception ends, even if the FIFO buffer is not full, an remaining data is regarded as invalid data and is transferred as 32 bytes.
  4956. The received data storage address area is from 0x00C00000 to 0x00FFFFE0 in system memory. (Specify "0" for the lower five bits of the address that indicates the 32 bytes that are transferred.)
  4957. * Transmission data
  4958. Transmission data consists of 4-byte units of data that are actually sent to a peripheral device by the Maple protocol. The length of the data must be the transfer length (in 4-byte units) that is set by the instruction in the command file.
  4959.  
  4960. �5.1.2 Register Map
  4961. The registers that are used only by the Maple interface are in the area (from 0x005F 6C00 to 0x005F 6CFF) described in the system mapping table in section 2.1.
  4962. The mapping of the registers that are used by Maple is shown below. (Refer to section 8.4.1.2 for details on individual registers.)
  4963.  
  4964. Address Register Name Access Function Reset Initialize
  4965. Maple-DMA Control Registers (0x005F6C04, 0x005F6C1014~18) 0x005F 6C00 - - 0x005F 6C04 SB_MDSTAR R/W DMA Command Table Address not initialize 0x005F 6C08 - - 0x005F 6C0C - - 0x005F 6C10 SB_MDTSEL R/W DMA Trigger Selection 0 0x005F 6C10 SB_MDTSEL R/W DMA Trigger Selection 0 0x005F 6C14 SB_MDEN R/W DMA Enable 0 0x005F 6C18 SB_MDST R/W DMA Start / Status 0
  4966. Maple I/F Block Hardware Test Registers (0x005F6C70~7C, 0x005F6CE0~E4) 0x005F 6C70 SB_MCTM0 R/- DMA Counter Test Monitor0 0x00000000 0x005F 6C74 SB_MCTM1 R/- DMA Counter Test Monitor1 0x00000000 0x005F 6C78 SB_MCTM2 R/- DMA Counter Test Monitor2 0x00000000 0x005F 6C7C SB_MTTM R/- DMA Timer Test Monitor 0x00000000
  4967. Maple I/F Block Control Registers (0x005F6C80~8884) 0x005F 6C80 SB_MSYS R/W Maple System Control 0x3A980000 0x005F 6C84 SB_MST R/- Maple Status 0x005F 6C88 SB_MSHTCL /W Maple Status Hard Trigger Clear 0 0x005F 6C88 SB_MSHTCL -/W Maple Single Hard Trigger Clear 0
  4968. Maple-DMA Secret Register (0x005F6C8C) 0x005F 6C8C SB_MDAPRO -/W Maple Sys.Mem. Area Protection 0x00007F00 0x005F 6CE0 SB_MTM -/W Maple Test Mode 0 0x005F 6CE4 SB_MTMDS -/W Maple Test Mode Data Set 0
  4969. Maple I/F Block Hardware Control Register (0x005F6CE8) 0x005F 6CE8 SB_MMSEL R/W Maple MSB Selection 1
  4970. Maple-DMA Debug Registers (0x005F6CF4~FC) 0x005F 6CF4 SB_MTXDAD R/- Maple TXD Address Counter not initialize 0x005F 6CF8 SB_MRXDAD R/- Maple RXD Address Counter not initialize 0x005F 6CFC SB_MRXDBD R/- Maple RXD Base Address not initialize Table 5-1 Maple Register Map
  4971.  
  4972. * In the above table, in the "Reset Initialize" column, "Not Initialized" indicates that the register value is undefined after a system reset. In all other cases, the value shown indicates the value that is set in that register after a system reset.
  4973. �5.1.3
  4974. Operating Sequence
  4975. There are two interface operating sequences: the normal sequence, and the "SDCKB seizure-release" sequence. Each sequence is described below.
  4976.  
  4977. <Normal Sequence>
  4978. The following chart shows the flow of data between the CPU, the peripheral controller, and the peripheral device.
  4979.  
  4980.  
  4981. Fig. 5-1 Normal Sequence
  4982.  
  4983.  
  4984. <SDCKB Seizure-Release Sequence>
  4985. The SDCKB seizure-release sequence is used for latching the HV counter, primarily when using the Light Phaser Gun. The sequence is illustrated below.
  4986.  
  4987.  
  4988. Fig. 5-2 SDCKB Seizure-Release Procedure
  4989.  
  4990. �5.1.4
  4991. Access Procedure
  4992. There are two access procedures, as described below: software initiated and hardware initiated.
  4993. * It is necessary for the initial settings for SH4-DMAC (setting DMA ch0 to DDT mode) to already have been made before initiating Maple-DMA. (Refer to the DMAC item in section 2.2.3.)
  4994. <<Software initiation>>
  4995.  
  4996. ~ Initialization ~
  4997. (1) Work RAM area protection register setting
  4998. Address: 0x005F 6C8C Write data: 0xXXXX XXXX
  4999. (2) System control register setting
  5000. (3) DMA trigger selection register settings
  5001. Address: 0x005F 6C10 Write data: 0x00000000
  5002. Initiation trigger ? Software
  5003.  
  5004. ~ Effective procedure ~
  5005. (4) Data setting in system memory (DMA command table)
  5006. Address: System memory area (0xnnnn nnnn) Write data: 0x8000 0000
  5007. Send four bytes of data to port A and terminate
  5008.  
  5009. Address: 0xnnnn nnnn + 4h Write data: System memory address (0xmmmm mmmm)
  5010. Contents: Received data storage address (0xmmmm mmmm)
  5011.  
  5012. Address: 0xnnnn nnnn + 8h Write data: 0xXXXX XXXX
  5013. Contents: Data to be sent to port A 0xXXXX XXXX
  5014. (5) DMA command table address register setting
  5015. Address: 0x005F 6C04 Write data: 0xnnnn nnnn
  5016. Contents: Starting address where transmission data is to be stored in system memory (0xnnnn nnnn)
  5017. (6) DMA enable register setting
  5018. Address: 0x005F 6C14 Write data: 0x0000 0001
  5019. Contents: DMA enable
  5020. (7) DMA start/status register setting
  5021. Address: 0x005F 6C18 Write data: 0x0000 0001
  5022. Contents: DMA initiation, transmission/reception start
  5023.  
  5024. ~ Confirmation of end ~
  5025. (8) DMA start/status confirmation
  5026. Address: 0x005F 6C18 Read data: 0x0000 0000 (transmission/reception end)
  5027. Contents: Confirmation of transmission/reception end
  5028. (9) Loading received data into system memory
  5029. Address: 0xmmmm mmmm Read data: 0xXXXX XXXX
  5030. Load data that was received from port A
  5031.  
  5032. <<Hardware initiation (auto-initiation at each trigger)>>
  5033. ?Initialization?
  5034. 1. System memory area protection register setting
  5035. Address: 0x005F6C8C Write data:0xXXXXXXXX
  5036. 2. System control register setting
  5037. Address: 0x005F6C80 Write data:0x3A9800XX
  5038. [Timeout: 300[micro]s; initiation at each V-Blank Out; transfer rate: 2Mbps; initiation delay setting: XX]
  5039. 3. DMA trigger selection register setting
  5040. Address: 0x005F6C10 Write data:0x00000001
  5041. Initiation trigger ? Hardware trigger (V-Blank Out)
  5042. ?Execution Procedure?
  5043. 4. Setting of data in system memory (DMA command table)
  5044. Address: System memory area 0xnnnnnnnn Write data:0x80000000
  5045. Send four bytes of data to port A and terminate.
  5046. Address: 0xnnnnnnnn + 0x4: Write data system memory address (0xmmmmmmmm)
  5047. Received data store address (0xmmmmmmmmm)
  5048. Address: 0xnnnnnnnn + 0x8 Write data: 0xXXXXXXXX
  5049. Data to be sent to port A: 0xXXXXXXXX
  5050. 5. DMA command table address register setting
  5051. Address: 0x005F6C04 Write data: 0xnnnnnnnn
  5052. Starting address in system memory where the transmission data is stored
  5053. 6. DMA enable register setting
  5054. Address: 0x005F6C14 Write data: 0x00000001
  5055. DMA enabled
  5056. 7. DMA start/status register setting
  5057. Address: 0x005F6C18 Write data: 0x00000001
  5058. DMA initiation, transmission/reception start
  5059. ?Ending Confirmation?
  5060. 8. DMA start/status confirmation
  5061. Address: 0x005F6C18 Read data: Transmission/reception ends at 0x00000000
  5062. Transmission/reception end confirmation
  5063. 9. Loading received data into system memory
  5064. Address: 0xmmmmmmmm Read data: 0xXXXXXXXX
  5065. Loading of received data from port A
  5066. �5.1.5
  5067. Example of Transmission and Reception Data
  5068. Examples of a transmission data command file stored in system memory and the corresponding reception data are shown below.
  5069. (16 bytes of data are sent to portA, and the received data is stored in address 0x0C800000.)
  5070.  
  5071. Transmission data command file in system memory Address Data Contents +0x0 0x03 Maple-Host Logic
  5072. Command 32bit
  5073. ??PortA
  5074. ??Data 16Byte +0x1 0x00 +0x2 0x00 +0x3 0x80 +0x4 0x00 Recieve Data
  5075. Destination
  5076. Address 32bit +0x5 0x00 +0x6 0x80 +0x7 0x0C +0x8 COMMAND Protocol Data 8bit +0x9 Destination AP ? +0xA Source AP ? +0xB Data Size ? +0xC DATA0 ? +0xD DATA1 ? +0xE DATA2 ? +0xF DATA3 ? +0x10 DATA4 ? +0x11 DATA5 ? +0x12 DATA6 ? +0x13 DATA7 ? +0x14 Lower Byte0 ??????? 16bit +0x15 Upper Byte0 +0x16 Lower Byte1 ??????? 16bit +0x17 Upper Byte1 Table 5-3
  5077.  
  5078. Received data stored in system memory Address Data Contents 0x0C800000 COMMAND Protocol Data 8bit 0x0C800001 Destination AP ? 0x0C800002 Source AP ? 0x0C800003 Data Size ? 0x0C800004 DATA0 ? 0x0C800005 DATA1 ? 0x0C800006 DATA2 ? 0x0C800007 DATA3 ? 0x0C800008 DATA4 ? 0x0C800009 DATA5 ? 0x0C80000A DATA6 ? 0x0C80000B DATA7 ? 0x0C80000C Lower Byte0 ??????? 16bit 0x0C80000D Upper Byte0 0x0C80000E Lower Byte1 ??????? 16bit 0x0C80000F Upper Byte1 Table 5-3
  5079. �5.1.6
  5080. Notes Regarding Access
  5081. Notes that need to be observed in accesses concerning register settings and data transfers are described below.
  5082. <<Concerning Register Settings>>
  5083. (1) If the controller is waiting for a single hardware trigger to clear, and then the initiation trigger is set to the software trigger and then back to a hardware trigger again, the hardware trigger that was set last is valid. (If DMA was not disabled at the moment that the switch was made to the hardware trigger, the trigger is not overwritten, and the wait for the single hardware trigger to clear becomes invalid.)
  5084. (2) Regarding forced termination through the DMA enable register?SB_MDEN?, when sending or receiving data, termination does not occur until transmission/reception on that port is completed. Therefore, it is possible for several DMA transfers to still occur after DMA is disabled. In addition, because a DMA end interrupt is not generated, the end must be detected only by polling the status. However, in the case of a forced termination as a result of an illegal error (for example, if system memory area protection was violated), the DMA ends at that point (when the error interrupt is generated).
  5085. (3) The DMA trigger selection register (SB_MDTSEL) and the system control register (SB_MSYS) cannot be overwritten while DMA is enabled.
  5086. (4) An illegal address error interrupt is generated when a value other than that specified by the system memory area protection register (SB_MDAPRO) is written to the DMA command table address register (SB_MDSTAR), and when an attempt is made to initiate DMA while in that state. An illegal address error interrupt is not generated when setting the received data store address that is written to system memory as a command, or when fetching a peripheral controller. An overrun error interrupt is generated when system memory is accessed. (It is not generated in the DMA write cycle.) The system control register cannot be overwritten while DMA is enabled.
  5087. (5) The DMA start/status register (SB_MDST) indicates that V-Blank Out initiated the operation during delayed initiation by the hardware trigger. Bit 31 of the status register (SB_MST) indicates that operation is in progress based on the actual timing of transmission/reception after the delay. (This bit indicates that no operation is in progress from the time of V-Blank Out to the end of the delay.)
  5088. (6) The system control register initiation delay setting is valid only for the hardware trigger, and is invalid for the software trigger.
  5089.  
  5090. Concerning data transfer
  5091. (1) When more than one frame of data (1024 bytes) has been sent, forced termination results and processing continues as if a parity error had occurred.
  5092. (2) Repeated transmission/reception is possible by placing transmission commands consecutively in system memory. In addition, consecutive transmission/reception through the same port is possible by inserting several NOP instructions. (One instruction generates an interval of about 160[micro]s between accesses.)
  5093. (3) Received data must be written in units of 32 bytes. If, for example, 36 bytes of data are received, valid data will be written in the first 36 bytes following the "received data storage address," and invalid data will be written in the remaining 28 bytes. Transmission commands can be stored consecutively in units of 4 bytes.
  5094. (4) Regarding the reception buffer in system memory, the received data is asynchronous, and a maximum of 1024 bytes of data can be received. The length of the received data is normally controlled by the protocol, but it is possible that the actual length will exceed the intended length due to errors, etc. Therefore, important data should not be stored in the 1024 bytes after the final "received data storage address."
  5095. (5) Data transfers between the peripheral controller and peripheral devices are performed in units of 32 bits, but the transmission data in this case is sent starting from the MSB (bit 31). Therefore, in a system that uses the Little Endian configuration, the data is sent starting from the MSB (bit 7) of the uppermost byte in four bytes of data, working down towards the lower bytes. In the same manner, received data is stored in units of 4 bytes, from the upper bytes to the lower bytes, starting with the data that was received first.
  5096. (6) When a data transmission/reception spans a V-Blank, a V-Blank Over interrupt is generated, but the transmission/reception continues and the data is guaranteed.
  5097. �5.2
  5098. Control Pad
  5099. The standard controller device IDs and data format are shown below.
  5100. <Device ID>
  5101. The device ID starts from the first data as shown below.
  5102. 0x00-0x00-0x00-0x01-0x00-0x06-0x0F-0xFE-0x00-0x00-0x00-0x00-0x00-0x00-0x00-0x00
  5103. bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 1st Data 0 0 0 0 0 0 0 0 2nd Data 0 0 0 0 0 0 0 0 3rd Data 0 0 0 0 0 0 0 0 4th Data 0 0 0 0 0 0 0 1 5th Data 0 0 0 0 0 0 0 0 6th Data 0 0 0 0 1 1 1 1 7th Data 0 0 0 0 0 1 1 0 8th Data 1 1 1 1 1 1 1 0 9th Data 0 0 0 0 0 0 0 0 10th Data 0 0 0 0 0 0 0 0 11th Data 0 0 0 0 0 0 0 0 12th Data 0 0 0 0 0 0 0 0 13th Data 0 0 0 0 0 0 0 0 14th Data 0 0 0 0 0 0 0 0 15th Data 0 0 0 0 0 0 0 0 16th Data 0 0 0 0 0 0 0 0 Table 5-4
  5104. <Read Data Format>
  5105. The data format size is 8 bytes.
  5106. bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 1st Data Ra La Da Ua Start A B 1 2nd Data 1 1 1 1 1 X Y 1 3rd Data A17 A16 A15 A14 A13 A12 A11 A10 4th Data A27 A26 A25 A24 A23 A22 A21 A20 5th Data A37 A36 A35 A34 A33 A32 A31 A30 6th Data A47 A46 A45 A44 A43 A42 A41 A40 7th Data 1 0 0 0 0 0 0 0 8th Data 1 0 0 0 0 0 0 0 Table 5-5
  5107.  
  5108. In the table, "Ra" indicates "right," "La" indicates "left," "Da" indicates "Down," and "Ua" indicates "Up."
  5109. 1st: Digital button data (On = 0, Off = 1)
  5110. 2nd: Digital button data (On = 0, Off = 1)
  5111. 3rd: Analog axis 1 data (value of 0x00 ? 0xFF)
  5112. 4th: Analog axis 2 data (value of 0x00 ? 0xFF)
  5113. 5th: Analog axis 3 data (value of 0x00 ? 0x80 ? 0xFF)
  5114. 6th: Analog axis 4 data (value of 0x00 ? 0x80 ? 0xFF)
  5115. 7th: Analog axis 5 data (value of 0x00 ? 0x80 ? 0xFF)
  5116. 8th: Analog axis 6 data (value of 0x00 ? 0x80 ? 0xFF)
  5117.  
  5118. <Write data format>
  5119. Because the target is a controller, there is no write data format. Writing data to the controller generates no response.
  5120. �5.3 Light Phaser Gun
  5121. �5.4 Backup (Option)
  5122. �5.5 Sound Recognition (Option)
  5123.  
  5124.  
  5125.  
  5126. �6 Peripheral Devices
  5127. �6.1
  5128. DVE (Digital Video Encoder)
  5129. This system supports a variety of video modes: NTSC/PAL, VGA, etc.
  5130. The video mode is selected by plugging in the cable to the expansion A/V connector for the corresponding monitor type; the information is then reflected in the SH4's PIO port (the SH4_PDTR register, "PB"). In response to that information, the SH4 sets the video mode setting registers in the HOLLY graphic core and the AICA, which sets the DVE. HOLLY and AICA then output RGB signals and video mode setting signals that correspond to that mode to the Digital Video Encoder (DVE) that actually generates the video signals that are sent to the external monitor.
  5131.  
  5132. Fig. 6-1
  5133.  
  5134. * For a list of video display modes, refer to section 3.1.3. for details on drawing CORE register settings, refer to section 8.4.2. For details on register settings for the DVE, refer to the explanation of common data/VREG in section 8.4.5.
  5135.  
  5136. Operation when the cable corresponding to the video mode in question is connected is described below. (Only stereo AV cables are supported as standard; cables marked with an asterisk (*) are optional.)
  5137. Regarding the switching of modes, confirm the mode while the power is on; the system does not support changing cables while in operation. Therefore, if the cable connections are changed while the power is on, the screen will no longer be displayed normally.
  5138.  
  5139. <When a VGA cable* is connected>
  5140. 1. The SH4 obtains the cable information from the PIO port. (PB[9:8] = "00")
  5141. 2. Set the HOLLY synchronization register for VGA. (The SYNC output is H-Sync and V-Sync.)
  5142. 3. When VREG1 = 0 and VREG0 = 0 are written in the AICA register, VIDEO1 = 0 and VIDEO0 = 1 are output. VIDEO0 is connected to the DVE-DACH pin, and handles switching between RGB and NTSC/PAL.
  5143.  
  5144. <When an RGB(NTSC/PAL) cable* is connected>
  5145. 1. The SH4 obtains the cable information from the PIO port. (PB[9:8] = "10")
  5146. 2. Set the HOLLY synchronization register for NTSC/PAL. (The SYNC output is H-Sync and V-Sync.)
  5147. 3. When VREG1 = 0 and VREG0 = 0 are written in the AICA register, VIDEO1 = 1 and VIDEO0 = 0 are output. VIDEO0 is connected to the DVE-DACH pin, and handles switching between RGB and NTSC/PAL.
  5148.  
  5149.  
  5150. <When a stereo A/V cable, an S-jack cable* or an RF converter* is connected>
  5151. 1. The SH4 obtains the cable information from the PIO port. (PB[9:8] = "11")
  5152. 2. Set the HOLLY synchronization register for NTSC/PAL. (The SYNC output is H-Sync and V-Sync.)
  5153. 3. When VREG1 = 1 and VREG0 = 1 are written in the AICA register, VIDEO1 = 0 and VIDEO0 = 0 are output. VIDEO0 is connected to the DVE-DACH pin, and handles switching between RGB and NTSC/PAL.
  5154.  
  5155. Among the video modes, the screen modes NTSC/PAL/PALM/PALN that are used in different countries are set through the DVE's PAL, PALM-H and PALN-H pins on the board. These settings are reflected as is in the SH4's PIO port (PB[4:2]), and the SH4 selects the screen mode by setting that information in HOLLY.
  5156. The following table shows the settings for the target DVE pins for the video modes used in different regions.
  5157.  
  5158. DVE pins (SH4_PIO port) Region Video mode PALN-H
  5159. (PB4) PALM-H
  5160. (PB3) PAL
  5161. (PB2) Japan NTSC 0 0 0 ASIA NTSC North America South Korea Europe PAL(B,G,D,I) 0 0 1 Brazil PAL-M(525) 0 1 1 Argentina PAL-N 1 0 1 Forced NTSC interlacing 1 1 0 Forced PAL interlacing 1 1 1 Table 6-1
  5162.  
  5163. *1 Because forced interlacing is set for the DVE, misoperation may result under some HOLLY settings.
  5164. *2 Operation is not guaranteed for any combinations of pins settings that are not shown above.
  5165.  
  5166.  
  5167.  
  5168. For details concerning SECAM and other video modes, refer to the AV specifications.
  5169.  
  5170.  
  5171.  
  5172.  
  5173. �7 Debugger
  5174.  
  5175.  
  5176. Description pending
  5177.  
  5178.  
  5179.  
  5180. �8 Appendix
  5181. �8.1
  5182. Technical Explanations
  5183. A supplemental explanation of the technologies that are used in this system is provided in this section.
  5184. �8.1.1 Technical Explanation Concerning Audio
  5185. �8.1.1.1 Loop Control
  5186. The lop data and loop-related addresses are set as shown below.
  5187.  
  5188. Fig. 8-1 Data Waveform
  5189.  
  5190. The setting for LSA is "0x3" and the setting for LEA is "0xA."
  5191. If SA is "0x100," sound memory ("wave memory") is allocated as shown below.
  5192. (Little Endian)
  5193. When PCMS = 2 (ADPCM) When PCMS = 1 When PCMS = 0 15-12 11-8 7-4 3-0 15-8 7-0 15-0 0x100 D[3] D[2] D[1] D[0] 0x100 D[1] D[0] 0x100 D[0] 0x102 D[7] D[6] D[5] D[4] 0x102 D[3] D[2] 0x102 D[1] 0x104 -- D[A] D[9] D[8] ? ? 0x108 D[9] D[8] 0x112 D[9] 0x10A -- D[A] 0x114 D[A] Table 8-1 Sound Memory Allocation
  5194.  
  5195. Assuming that the sound data is read each time that it is sampled, the reading sequences in each loop mode are as shown below.
  5196. * Loop OFF
  5197. D[0]?D[1]?D[2]??????D[A]
  5198. * Loop ON
  5199. D[0]?D[1]?D[2]??????D[A]?D[5]?D[6]??????D[A]?D[5]????
  5200.  
  5201. <Notes on loop processing>
  5202. * In loop processing, the LSA and LEA data (in the case of ADPCM, the data after decoding) is processed based on the assumption that the values (in the case of ADPCM, the data after encoding) are the same. If necessary, set the data (before encoding) so that they will be the same value.
  5203. * If the pitch is increased for short loop data (waveform data in which there is only an extremely small amount of data corresponding to the loop from LSA to LEA), it is possible that the data corresponding to the loop portion will not be read even once. In this case, loop processing is not performed correctly. In order to permit the processing, and taking into consideration the effects of FNS, PLFO, etc., on pitch, it may be necessary to set the data so that LEA - LSA ? OCT (signed) + 2.
  5204.  
  5205. <Notes concerning ADPCM long stream processing>
  5206. ADPCM references the previous data when it creates the next data.
  5207. * Set the lower two bits of LSA and LEA to "00".
  5208. * Set PCMS to "0x3".
  5209. * Just as with loop processing, set LSA so that the LSA data that is next in the stream is identical to the LEA data that is current in the stream.
  5210.  
  5211. 0x0000 ... 0xFFF0 1st Stream 0x0000 ... 0xFFF0 2nd Stream 0x0000 ... 0xFFF0 3rd Stream 0x0000 ... 0xFFF0 ... 0x1FFE0 ... 0x2FFD0 Data Stream Table 8-2
  5212.  
  5213. �8.1.1.2
  5214. ADPCM
  5215. The audio IC that is used in the Dreamcast audio system is uses ADPCM (Adaptive Differential Pulse Code Modulation) for its audio data compression method. The ADPCM system is a data compression system that prevents a loss of audio quality by encoding the differential between the audio data and the expected data according to a quantization width that adapts flexibly to changes in the waveform.
  5216. Because the ADPCM method stores the difference between the current sample and the data from the previous sample as the data, playback must begin at "key on" (the data in the start address). In addition, it is not possible to change the playback method (PCM or noise) or change the data (except during long sequence) while in the middle of playback.
  5217. Encoding Method
  5218. In the Dreamcast audio system, 4-bit ADPCM data is expanded into 16-bit PCM data. The encoding system follows the procedure described below.
  5219. (1) Convert the data to be encoded into 16-bit PCM data for each sampling interval.
  5220.  
  5221. Fig. 8-2
  5222. (2) Compare the PCM data at point B and the expected value at point B (Xn), and determine the differential (dn). If the differential is positive, the MSB (L4) of the ADPCM data becomes "0," and if the differential is negative, the MSB becomes "1."
  5223.  
  5224. Fig. 8-3
  5225. (3) Next, compare the quantization with (?n) and the absolute value of the differential (absolute value |dn|), and determine the remaining three bits (L3, L2, and L1) of the ADPCM data at point B from the ADPCM data correspondence table (Table 8-3).
  5226. * Example 1
  5227. If the differential (absolute value |dn|) is equal to the quantization with (?n) ? 7/4 (as shown in Fig. a below), the remaining three bits of the ADPCM data are L3 = 1, L2 = 1, and L1 = 1.
  5228. * Example 2
  5229. If the differential absolute value |dn| is equal to the quantization with (?n) ? 5/4 (as shown in Fig. b below), the remaining three bits of the ADPCM data are L3 = 1, L2 = 0, and L1 = 1.
  5230.  
  5231. Fig. 8-4
  5232. (4) After obtaining the ADPCM data for point B, derive the expected value (Xn + 1) and the quantization width (?n + 1) for the next point (point C) in order to derive ADPCM data for point C.
  5233. * Point C expected value (Xn + 1) = (1 - 2 ? L4) ? (L3 + L2/2 + L1/4 + 1/8) x quantization width (?n) + point B expected value
  5234. * Quantization width (?n + 1) = f (L3, L2, L1) x quantization width (?n)
  5235. * "f(L1, L2, L3) is a quantization width change factor from Table 8-4 below. The initial value for the expected value is 0, the initial value for the quantization width is 127, the minimum value for the quantization width is 127, and the maximum value for the quantization width is 24,576.
  5236. (5) Derive the rest of the ADPCM encoded data by repeating the above procedure.
  5237.  
  5238. L4 L3 L2 L1 Conditions dn?0 dn?0 0 1 0 0 0 ?dn?? ?n /4 0 0 1 ?n /4 ??dn?? ?n /2 0 1 0 ?n /2 ??dn?? ?n ? 3/4 0 1 1 ?n ? 3/4 ??dn?? ?n 1 0 0 ?n??dn???n ? 5/4 1 0 1 ?n ? 5/4 ??dn?? ?n ? 3/2 1 1 0 ?n ? 3/2 ??dn?? ?n ? 7/4 1 1 1 ?n ? 7/4 ??dn? Table 8-3 ADPCM Data Correspondence Table
  5239.  
  5240. L3 L2 L1 f 0 0 0 0.8984375 0 0 1 0.8984375 0 1 0 0.8984375 0 1 1 0.8984375 1 0 0 1.19921875 1 0 1 1.59765625 1 1 0 2.0 1 1 1 2.3984375 Table 8-4 Quantization Width Change Factor
  5241.  
  5242.  
  5243. Decoding Method
  5244. * The decoding method derives the expected value and the quantization width through equations that are similar to those that are used during encoding. The procedure is described below.
  5245. (1) Derive the decoded value (Xn) for point B from the 4-bit ADPCM data, the quantization width (?n), and the decoded value for point A (Xn - 1).
  5246.  
  5247. ADPCM DATA
  5248. L4 L3 L2 L1
  5249. Point B decoded value (Xn) = (1 - 2 ? L4) ? (L3 + L2/2 + L1/4 + 1/8) ? quantization width (?n) + point A decoded value
  5250. (2) Update the quantization width (?n + 1) in order to derive the decoded value (Xn + 1) for the next point (point C).
  5251. Quantization width (?n + 1) = f(L3, L2, L1) ? quantization width (?n)
  5252. (3) Decode the rest of the data by repeating the above procedure.
  5253.  
  5254. �8.1.1.3
  5255. AEG
  5256. * Effective rate and AEG change time
  5257. The rate of change in AEG changes according to the key scale value. After determining the effective rate from the equation shown below, use the table to find the actual change time that corresponds to that effective rate value.
  5258. The change times that are shown in the table below for the attack rate are for a change from -96dB to 0dB, while the other table is for a change from 0dB to -96dB.
  5259. Effective rate = (KRS[3:0] + OCT[3:0]) ? 2 + FNS[bit 9] + Rate[register setting] ? 2
  5260. * The ranges for each register are listed below:
  5261. KRS[3:0]: 0 to 15; OCT[3:0]: -8 to +7; FNS[9]: 0, 1; Rate [register setting]: 0 to 31
  5262.  
  5263. Attack State Decay 1, Decay 2, Release State Effective rate Change time [ms] Effective rate Change time [ms] Effective rate Change time [ms] Effective rate Change time [ms] 0 ? 32 47. 0 ? 32 690. 1 ? 33 38. 1 ? 33 550. 2 8100. 34 31. 2 118200. 34 460. 3 6900. 35 27. 3 101300. 35 390. 4 6000. 36 24. 4 88600. 36 340. 5 4800. 37 19. 5 70900. 37 270. 6 4000. 38 15. 6 59100. 38 230. 7 3400. 39 13. 7 50700. 39 200. 8 3000. 40 12. 8 44300. 40 170. 9 2400. 41 9.4 9 35500. 41 140. 10 2000. 42 7.9 10 29600. 42 110. 11 1700. 43 6.8 11 25300. 43 98. 12 1500. 44 6.0 12 22200. 44 85. 13 1200. 45 4.7 13 17700. 45 68. 14 1000. 46 3.8 14 14800. 46 57. 15 860. 47 3.4 15 12700. 47 49. 16 760. 48 3.0 16 11100. 48 43. 17 600. 49 2.4 17 8900. 49 34. 18 500. 50 2.0 18 7400. 50 28. 19 430. 51 1.8 19 6300. 51 25. 20 380. 52 1.6 20 5500. 52 22. 21 300. 53 1.3 21 4400. 53 18. 22 250. 54 1.1 22 3700. 54 14. 23 220. 55 0.93 23 3200. 55 12. 24 190. 56 0.85 24 2800 56 11. 25 150. 57 0.65 25 2200. 57 8.5 26 130. 58 0.53 26 1800. 58 7.1 27 110. 59 0.44 27 1600. 59 6.1 28 95. 60 0.40 28 1400. 60 5.4 29 76. 61 0.35 29 1100. 61 4.3 30 63. 62 0.0 30 920. 62 3.6 31 55. 63 0.0 31 90. 63 3.1 Change time from -96dB to 0dB Change time from 0dB to -96dB
  5264. Table 8-5
  5265. �8.1.1.4
  5266. PG
  5267. * OCT[3:0] setting
  5268. Specify the octave in two's complement format. Values shown in parentheses are one octave higher in ADPCM.
  5269. OCT 8 9 0xA 0xB 0xC 0xD 0xE 0xF 0 1 2 3 4 5 6 7 Interval -8 -7 -6 -5 -4 -3 -2 -1 0 +1 (+2) (+3) (+4) (+5) (+6) (+7) Table 8-6
  5270. * FNS and OCT settings (example for the F number table setting when the C4 note is sampled at 44.1KHz)
  5271. FNS (dec) = 2^10 ? (2^(P/1200) - 1)
  5272.  
  5273. Note Note number Pitch
  5274. P[CENT] FNS[9:0]
  5275. (dec) FNS[9:0]
  5276. (hex) OCT[3:0]
  5277. (hex) B3 59 -100 909.1 0x38D 0xF C4 60 0 0.0 0 0 C4# 61 100 60.9 0x3D 0 D4 62 200 125.4 0x7D 0 D4# 63 300 193.7 0xC2 0 E4 64 400 266.2 0x10A 0 F4 65 500 342.9 0x157 0 F4# 66 600 424.2 0x1A8 0 G4 67 700 510.3 0x1FE 0 G4# 68 800 601.5 0x25A 0 A4 69 900 698.2 0x2BA 0 A4# 70 1000 800.6 0x321 0 B4 71 1100 909.1 0x38D 0 C5 72 0 0.0 0 1 Table 8-7
  5278.  
  5279. �8.1.1.5
  5280. LFO
  5281. * LFOF[4:0] oscillation frequencies
  5282. 0x00 ? 0.17 Hz 0x10 ? 2.87 Hz
  5283. 0x01 ? 0.19 Hz 0x11 ? 3.31 Hz
  5284. 0x02 ? 0.23 Hz 0x12 ? 3.92 Hz
  5285. 0x03 ? 0.27 Hz 0x13 ? 4.79 Hz
  5286. 0x04 ? 0.34 Hz 0x14 ? 6.15 Hz
  5287. 0x05 ? 0.39 Hz 0x15 ? 7.18 Hz
  5288. 0x06 ? 0.45 Hz 0x16 ? 8.6 Hz
  5289. 0x07 ? 0.55 Hz 0x17 ? 10.8 Hz
  5290. 0x08 ? 0.68 Hz 0x18 ? 14.4 Hz
  5291. 0x09 ? 0.78 Hz 0x19 ? 17.2 Hz
  5292. 0x0A ? 0.92 Hz 0x1A ? 21.5 Hz
  5293. 0x0B ? 1.10 Hz 0x1B ? 28.7 0x
  5294. 0x0C ? 1.39 Hz 0x1C ? 43.1 Hz
  5295. 0x0D ? 1.60 Hz 0x1D ? 57.4 Hz
  5296. 0x0E ? 1.87 Hz 0x1E ? 86.1 Hz
  5297. 0x0F ? 2.27 Hz 0x1F ? 172.3 Hz
  5298. * ALFO waveform according to ALFOWS[1:0]
  5299. * PLFO waveform according to PLFOWS[1:0]
  5300.  
  5301. ALFOWS AM modulation (ALFO) PLFOWS PM modulation (PLFO) Volume ALFO[7:0] Pitch PLFO[7:0] 0 - 0 dB
  5302. ??0
  5303.  
  5304. ??0xFF 0 +
  5305. 0
  5306. - ??0x7F
  5307. ??00
  5308. ??0x80 1 - 0 dB
  5309. ??0
  5310.  
  5311. ??0xFF 1 +
  5312. 0
  5313. - ??0x7F
  5314. ??00
  5315. ??0x80 2 - 0 dB
  5316. ??0
  5317.  
  5318. ??0xFF 2 +
  5319. 0
  5320. - ??0x7F
  5321. ??00
  5322. ??0x80 3 - 0 dB
  5323. ??0
  5324.  
  5325. ??0xFF ?????????
  5326. ???Noise???
  5327. ????????? 3 +
  5328. 0
  5329. - ??0x7F
  5330. ??00
  5331. ??0x80 ?????????
  5332. ???Noise???
  5333. ????????? Table 8-8
  5334. *
  5335. Degree of mixing according to ALFOS[2:0]
  5336. * Degree of effect on pitch of PLFOS[2:0]
  5337.  
  5338. ALFOS Mixing to EG PLFOS Effect on pitch 0
  5339. 1
  5340. 2
  5341. 3
  5342. 4
  5343. 5
  5344. 6
  5345. 7 No effect
  5346. ? 0.4dB displacement
  5347. ? 0.8dB displacement
  5348. ? 1.5dB displacement
  5349. ? 3dB displacement
  5350. ? 6dB displacement
  5351. ? 12dB displacement
  5352. ? 24dB displacement 0
  5353. 1
  5354. 2
  5355. 3
  5356. 4
  5357. 5
  5358. 6
  5359. 7 No effect
  5360. ? 3? + 2 CENT displacement
  5361. ? 7? + 5 CENT displacement
  5362. ? 14? + 12 CENT displacement
  5363. ? 27? + 25 CENT displacement
  5364. ? 55? + 52 CENT displacement
  5365. ? 112? + 103 CENT displacement
  5366. ? 231? + 202 CENT displacement Table 8-9
  5367. �8.1.1.6 Mixer
  5368. A block diagram of the mixer section is shown below.
  5369.  
  5370.  
  5371. Fig. 8-5
  5372.  
  5373.  
  5374. The correspondence between the register value and the volume is shown below.
  5375.  
  5376. TL[7:0]
  5377.  
  5378. bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 Volume -48dB -24dB -12dB -6dB -3dB -1.5dB -0.8dB -0.4dB Table 8-10
  5379.  
  5380. IMXL[3:0], DISDL[3:0], EFSDL[3:0], MVOL[3:0]
  5381. Register value Volume 0 -MAXdB 1 -42dB 2 -39dB ? ? 0xD -6dB 0xE -3dB 0xF 0dB Table 8-11
  5382.  
  5383. DIPAN[4:0], EFPAN[4:0]
  5384. Register value L R 0 0dB 0dB 1 -3dB 0dB 2 -6dB 0dB ? ? ? 0xD -39dB 0dB 0xE -42dB 0dB 0xF -MAXdB 0dB 0x10 0dB 0dB 0x11 0dB -3dB 0x12 0dB -6dB ? ? ? 0x1D 0dB -39dB 0x1E 0dB -42dB 0x1F 0dB -MAXdB Table 8-12
  5385.  
  5386. Correspondence between the slot that should be set in EFSDL and EFPAN and the effect source
  5387. Slot Output mixer source data 0?0xF EFREG[0]?EFREG[15] 0x10 EXTS[0]: Digital audio 1L 0x11 EXTS[0]: Digital audio 1R Table 8-13
  5388. �8.1.1.7
  5389. FEG
  5390. (Time variation filter)
  5391.  
  5392. Using the IIR filter, it is possible to direct sound on each channel through an LPF.
  5393. Using a dedicated EG, time variation for the LPF cutoff frequency becomes possible.
  5394. The LPF permits setting of a fixed (time does not vary) Q (resonance) for each channel.
  5395. For details on "Q," refer to section 8.4.5, "AICA Registers."
  5396. * Effective rate and FEG change time
  5397. Effective rate = (KRS[3:0] + OCT[3:0]) ? 2 + FNS[9] + (Rate[register setting]) ? 2
  5398. (KRS[3:0]: +0 to +0xF; OCT[3:0]: -8 to +7; FNS[9]: +0, +1; Rate [register setting]: +0 to +0x1F)
  5399.  
  5400. Effective rate Change time
  5401. [ms] Effective rate Change time
  5402. [ms]] 0 ? 32 2760. 1 ? 33 2200. 2 472800. 34 1840. 3 405200. 35 1560. 4 354400. 36 1360. 5 283600. 37 1080. 6 236400. 38 920. 7 202800. 39 800. 8 177200. 40 680. 9 142000. 41 560. 10 118400. 42 440. 11 101200. 43 392. 12 88800. 44 340. 13 70800. 45 272. 14 59200 46 228. 15 50800. 47 196. 16 44400. 48 172. 17 35600. 49 34. 18 29600. 50 136. 19 25200. 51 100. 20 22000. 52 88. 21 17600. 53 72. 22 14800. 54 56. 23 12800. 55 48. 24 11200. 56 44. 25 8800. 57 34. 26 7200. 58 28. 27 6400. 59 24. 28 5600. 60 22. 29 4400. 61 17. 30 3680. 62 14. 31 3160. 63 12. Change Time from 0x0008 to 0x1FF8
  5403. Table 8-14
  5404. �8.1.1.8
  5405. Audio DSP
  5406.  
  5407. Fig. 8-6 DSP Configuration
  5408. Based on the block diagram shown on the previous page, each block that comprises the DSP is described below.
  5409. RBL[1:0] (W): Specifies the length of the ring buffer.
  5410. 0?8K words
  5411. 1?16K words
  5412. 2?32K words
  5413. 3?64K words
  5414. RBP[22:11](W) : Specifies the starting address of the ring buffer (at a 4K word boundary).
  5415. (Generation of the modulation waveforms used in the DSP)
  5416. There are three means for generating the modulation wave signals that are used by the DSP:
  5417. 1? The CPU writes the modulation wave into the DSP's memory (COEF).
  5418. 2? Store the modulation wave data in wave memory ("sound memory," in the diagram), lower the pitch, and use the data buffered in MIXS as the modulation wave.
  5419. 3? The CPU writes the modulation wave into the DSP's internal buffer (MEMS).
  5420. ? Option 1 offers 13-bit precision and adds to the load on the CPU, but permits the creation of any waveform that is desired.
  5421. ? Option 2 offers 16-bit precision, and permits the amplitude and pitch to be changed through the EG and LFO. (However, if SDIR = 1, then EG = 0x000, ALFOS = 0x0, and TL = 0x00; however, the precision increases to the equivalent of 20-bit precision.)
  5422. ? Option 3 offers 24-bit precision and adds to the load on the CPU, but permits the creation of any waveform that is desired.
  5423. (DSP's internal RAM)
  5424. MIXS[19:0] (R/W): Sound data buffer from the input mixture (number of data items: 16)
  5425. (Note) Writing to MIXS[19:0] is used for LSI testing purposes.
  5426. Writes that are not performed in test mode are invalid for the following reasons:
  5427. ? Regardless of the register settings, only data written from the sound source is valid.
  5428. ? Second-generation data is retained for the purpose of integrating all of the slots, but it is not possible to specify the generation when accessing this buffer.
  5429. EXTS[15:0] (R): Digital audio input data buffer (number of data items: 2)
  5430. MEMS[23:0] (R/W) : Wave memory input data buffer (number of data items: 32)
  5431. (Actual writes to MEMS[7:0] are executed simultaneously with writes to MEMS[23:16].)
  5432. Only one of the above three buffers can be selected by the DSP program as the input data INPUTS. Differences in bit length are handled by shifting the data left.
  5433. All three of the above buffers permit access from the CPU; the access timing is described below. (Timing: T0 & T1, T2 & T3, ... are equivalent to one step for the DSP.)
  5434. T0 T1 T2 T3 T4 T5 T6 T7 MIXS DSPR **IMXRD** DSPR DMSP DSPR **IMXWT** DSPR DMSP EXTS DSPR DMSP DSPR DMSP DSPR DMSP DSPR DMSP MEMS DSPR DMSP DSPR DMSP/DSPW DSPR DMSP DSPR DMSP/DSPW DMSP: Read/Write by DMA, SH4: ARM DSPR: Read by DSP DSPW: Write by DSP
  5435. IMXRD: Read MIXS. IMXWT: Write to MIXS.
  5436. (Note) The access request to MIXS by the DMSP in T1 and T5 is delayed.
  5437. (Note) Because T2 & T3 and T6 & T7 represent the sound memory read timing for PCM sound data, DSP access is not possible. Therefore, wave memory access requests must be coded on odd-numbered steps (line 2, line 4, line 6, etc.).
  5438. Table 8-15
  5439.  
  5440. TEMP[23:0] (R/W) : DSP work buffer (number of data items: 128)
  5441. This has a ring buffer configuration; the pointer is decremented by "1" for each sample.
  5442. COEF[12:0] (R/W) : DSP coefficient buffer (number of data items: 128)
  5443. (Note) In order to maintain compatibility in the future if the data width is expanded to 16 bits, write zeroes to the lower three bits that are undefined in the register map.
  5444. MADRS[16:1](R/W) : DSP address buffer (number of data items: 64)
  5445. MPRO[63:0] (R/W) : DSP microprogram buffer (number of data items: 128)
  5446. EFREG[15:0] (R/W) : DSP output buffer (number of data items: 16)
  5447.  
  5448. All five of the above buffers permit access from the CPU; the access timing is described below. (Timing: T0 & T1, T2 & T3, ... are equivalent to one step for the DSP.)
  5449.  
  5450. T0 T1 T2 T3 T4 T5 T6 T7 TEMP DSPR DMSP/DSPW DSPR DMSP/DSPW DSPR DMSP/DSPW DSPR DMSP/DSPW COEF DSPR DMSP DSPR DMSP DSPR DMSP DSPR DMSP MADRS DSPR DMSP DSPR DMSP DSPR DMSP DSPR DMSP MPRO DSPR DMSP DSPR DMSP DSPR DMSP DSPR DMSP EFREG MIXR DMSP/DSPW ---- DMSP/DSPW ---- DMSP/DSPW ---- DMSP/DSPW MIXR: Read by Output MIXTER.
  5451. Table 8-16
  5452.  
  5453. An overview of the DSP program (total: 55 bits) is provided below.
  5454. MASA[5:0]? Specifies the MADRS read address.
  5455. IWA[4:0] : Specifies the write address for the input data (INPUTS).
  5456. IWT: DSP input data write request.
  5457. IRA[5:0] : Specifies the read address for the input data (INPUTS).
  5458.  
  5459. INPUTS Map (Addresses are DSP Program Addresses)
  5460. Address (hex) Contents of INPUTS 0x00~0x1F MEMS 0x20~0x2F MIXS 0x30 EXTS0(L) 0x31 EXTS0(R) 0x32~0x37 Future expansion
  5461. (cannot be set) 0x38~0x3F Undefined (cannot be set) Table 8-17
  5462.  
  5463. TWA[6:0] : Specifies the TEMP write address.
  5464. TWT: TEMP input data write request.
  5465. TRA[6:0] : Specifies the TEMP read address.
  5466. EWA[3:0] : Specifies the output EFREG address.
  5467. EWT: Request to write output data to EFREG.
  5468. BSEL : 0 = TEMP data select; 1 = accumulator select
  5469. ZERO : 1 = Assume the adder input as "0."
  5470. NEGB : 0 = addition; 1 = subtraction
  5471. YRL : Latches INPUTS[23:4].
  5472. (The latched data can be used starting in the next step.)
  5473. YSEL0 : Multiplier Y input select 0
  5474. YSEL1 : Multiplier Y input select 1
  5475.  
  5476. YSEL1 YSEL0 Selected input 0
  5477. 0
  5478. 1
  5479. 1 0
  5480. 1
  5481. 0
  5482. 1 FRC_REG
  5483. COEF
  5484. Y_REG[23:11]
  5485. "0" | Y_REG[15:4] (MSB is "0") Table 8-18
  5486. XSEL : Multiplier X input select
  5487. 0= TEMP data select
  5488. 1 = INPUTS data select
  5489. MRD : Wave memory read request (Request is allowed only in odd steps.)
  5490. MWT : Write request to wave memory (Request is allowed only in odd steps.)
  5491. (Note) Memory access-related flags (MRD, MWT, NOFL, TABLE, NXADR, ADREB, and MASA[4:0]) may only exist in odd steps (line 2, 4, 6, etc.) of the microprogram.
  5492. NOFL : 1 = Do not perform a floating conversion for wave memory access.
  5493. Set to "1" when storing linear format data in wave memory.
  5494. TABLE : 1 = Gate the output of the decrement counter (MDEC_CT), and make the output "0."
  5495. This can be used when the wave memory is being used for a purpose other than as a ring buffer (for example, a filter coefficient table, etc.). In this case, the ring buffer size restriction based on RBL does not apply.
  5496. MDEC_CT is decremented by one for each sample; when its value reaches "0," a value that corresponds with the loop length specified by RBL is loaded into MDEC_CT.
  5497. NXADR: Increments the memory address by one.
  5498. NXADR is used in primary interpolation mode in order to interpolate adjacent values.
  5499. ADREB: 0 = Gate the output of the address register (ADRS_REG), and make the output "0."
  5500. This is used when writing data to a ring buffer, etc.
  5501. SHFT0 : Shifter control 0
  5502. SHFT1: Shifter control 1
  5503.  
  5504. SHFT1 SHFT0 Shift amount In event of an overflow 0
  5505. 0
  5506. 1
  5507. 1 0
  5508. 1
  5509. 0
  5510. 1 �1
  5511. �2
  5512. �2
  5513. �1 Protected
  5514. Protected
  5515. Not protected
  5516. Not protected Table 8-19
  5517. FRCL: Memory address decimal latch (used in interpolation mode)
  5518. ADRL: Memory address integer latch
  5519. The data that is selected by F_SEL and A_SEL in interpolation mode (SHFT1 = SHFT0 = 1) and non-interpolation mode (SHFT1 ? 1 and SHFT0 ? 1), respectively, is shown below.
  5520. F_SEL A_SEL Register
  5521. output Non-interpolation mode Interpolation mode Register
  5522. output Non-interpolation mode Interpolation mode FRC_REG12 SFTREG23 �0� ADRS_REG11 INPUTS23 SFTREG23 FRC_REG11 SFTREG22 SFTREG11 ADRS_REG10 INPUTS23 SFTREG22 FRC_REG10 SFTREG21 SFTREG10 ADRS_REG9 INPUTS23 SFTREG21 FRC_REG9 SFTREG20 SFTREG9 ADRS_REG8 INPUTS23 SFTREG20 FRC_REG8 SFTREG19 SFTREG8 ADRS_REG7 INPUTS23 SFTREG19 FRC_REG7 SFTREG18 SFTREG7 ADRS_REG6 INPUTS22 SFTREG18 FRC_REG6 SFTREG17 SFTREG6 ADRS_REG5 INPUTS21 SFTREG17 FRC_REG5 SFTREG16 SFTREG5 ADRS_REG4 INPUTS20 SFTREG16 FRC_REG4 SFTREG15 SFTREG4 ADRS_REG3 INPUTS19 SFTREG15 FRC_REG3 SFTREG14 SFTREG3 ADRS_REG2 INPUTS18 SFTREG14 FRC_REG2 SFTREG13 SFTREG2 ADRS_REG1 INPUTS17 SFTREG13 FRC_REG1 SFTREG12 SFTREG1 ADRS_REG0 INPUTS16 SFTREG12 FRC_REG0 SFTREG11 SFTREG0 * Interpolation mode is used when high-precision processing is required, such as when changing the pitch.
  5523. Table 8-20
  5524.  
  5525. Example of how to implement a ring buffer and a filter table in a DSP
  5526.  
  5527. DSP access space (64K word maximum)
  5528. Size of ring buffer determined by RBL
  5529. Delay data 1 Delay data 2 Filter coefficient table area 0 ???????
  5530. WA1???RA1 ???????
  5531. WA2???RA2 MAX ?
  5532. RBP Fig. 8-7 DSP Access Space
  5533. * WA1 is the write address for delay data 1, when ADREB = 0.
  5534. * RA1 is the read address for delay data 1; when ADREB = 0, a delay of fixed duration is obtained, and when ADREB = 1, the data that accompanied the delay time change equivalent to the change in ADRS_REG is obtained.
  5535. * WA2 and RA2 apply to delay data 2, and must reside apart from delay data 1. Especially when conducting a memory read with ADREB = 1, both must be kept apart, giving due consideration to the amount of change in the address.
  5536. * The ring buffer area is accessed with TABLE = 0.
  5537. In this case, if the relative access address (MADRS[16:1] + ADRS_REG[16:1] (+1)) exceeds the size of the ring buffer, the relative address wraps around to "0." (However, given that the size of the ring buffer is subject to change, using the ring buffer without the wraparound feature is recommended.)
  5538. (Supplement) In this case, the actual access address is expressed below:
  5539. Access address: MADRS[16:1] + ADRS_REG[16:1] + MDEC_CT[16:1] (+1)
  5540. * The filter coefficient table area is accessed with TABLE = 1.
  5541. In this case, even if the relative access address (MADRS[16:1] + ADRS_REG[16:1] (+1)) exceeds the size of the ring buffer, the relative address does not wrap around. (However, the maximum size is 64K words.)
  5542.  
  5543. �8.1.2 Reset Sequence
  5544. The reset sequences for the Dreamcast System are illustrated in the following charts.
  5545.  
  5546.  
  5547. Fig. 8-8 Reset Sequence (Power On Reset)
  5548.  
  5549. * SYSRESN and GRESN in the above chart are both pins on the HOLLY IC, which is the graphics system core.
  5550.  
  5551.  
  5552. Fig. 8-9 Reset Sequence ?Software Reset?
  5553.  
  5554. The Dreamcast System has two reset sequences: power-on reset (Fig. 8-8) and software reset (Fig. 8-9). Each is explained below.
  5555. * Power-On-Reset
  5556. (1) Because each reset signal is cleared when the system power is turned on, each block and device remains in the reset state. While the SH4 is in the reset state, a 33MHz clock signal is input to the SH4 from an external PLL. In response to this signal, the SH4's internal PLL outputs a 100MHz clock signal to the HOLLY chip.
  5557. (2) Once an interval of about 300msec elapses after the power signal rises after power-on, the Reset IC releases the reset state for the Holly graphics/peripheral core. (Pin: SYSRESN "L" -? "H")
  5558. (3) Once the HOLLY's reset state is released in step 2, then after the stabilization time for the HOLLY's internal PLL elapses and the PLL generates 16 100MHz clock pulses, the reset state for the HOLLY's internal "system bus" is released (followed by the interfaces, including the SH4 interface, the PVR interface, the G1 interface, etc.).
  5559. (4) Approximately 100msec later, Reset Control in the System Bus Block releases the reset state for various system devices: the SH4, the SDRAM system memory, the GD-ROM, devices on the G2 Bus such as the AICA audio IC, and the Digital Video Encoder (video output). (Pin: GRESN "L" ? "H")
  5560. (5) Once the reset state for the SH4 (the CPU) is released, the SH4 releases the reset state for the TA (Tile Accelerator), the PVR core, and the SDRAM interface in the HOLLY chip by setting their respective reset bits.
  5561.  
  5562. * Software-Reset
  5563. (1) The SH4 (the CPU) can apply a reset to the entire system through software. The reset is initiated for HOLLY's internal "system bus" (followed by the interfaces, including the SH4 interface, the PVR interface, the G1 interface, etc.) by accessing HOLLY's SB_SFRES (0x005F6890).
  5564. (2) Once a reset has been applied to the System Bus and all devices in the system are in the reset state, then after the HOLLY's internal PLL generates 16 100MHz clock pulses, the reset state that was established in step 1 is released.
  5565. (3) After the System Bus reset state has been released, the reset state for various devices such as the SH4 and the GD-ROM is released during a period of approximately 100msec, as described in step 4 of the power-on reset sequence. Then, the software releases the reset state for the PVR core, the TA and the SDRAM interface in the HOLLY chip.
  5566. (4) The SH4 can also initiate and release the reset state for the PVR core, the TA and the SDRAM interface in the HOLLY chip individually by setting their respective Reset bits.
  5567.  
  5568. Fig. 8-10 is a relational diagram between the reset signals and the clock, and Fig. 8-11 shows the hardware reset system.
  5569.  
  5570.  
  5571.  
  5572. Fig. 8-10 Relational Diagram between the Reset Signals and the Clock
  5573.  
  5574.  
  5575. Fig. 8-11 Reset System Diagram
  5576. �1.1.1
  5577. �8.1.3 Clock
  5578. �8.1.3.1 PLL
  5579.  
  5580.  
  5581. �8.1.3.2 Clock Tree
  5582. Fig. 8-12 on the next page shows the clock tree for the Dreamcast System.
  5583.  
  5584.  
  5585.  
  5586. Fig. 8-12 System Clock Tree
  5587. �8.1.4 JTAG Interface
  5588. �8.1.4.1 SH4
  5589. �8.1.4.2 HOLLY
  5590. �8.1.4.3 AICA
  5591. �8.2 Individual Block Diagrams
  5592. �8.2.1 Detailed Block Diagram of Entire System
  5593. �8.2.2 CPU Subsystem (Including System Memory)
  5594. �8.2.3 HOLLY Subsystem
  5595. �8.2.4 GD-ROM Subsystem
  5596. �8.2.5 AICA Subsystem
  5597. �8.2.6 Digital Video Encoder Subsystem
  5598. �8.2.7 16Mbit SDRAM (16bit)
  5599. �8.2.8 64Mbit SGRAM (32bit)
  5600. �8.2.9 Power Supply
  5601. �8.3 Pin Assignments (with Descriptions of Pins) Pin Assignments for Each Chip
  5602. �8.3.1 CPU
  5603. �8.3.2 HOLLY
  5604. �8.3.3 GD-ROM
  5605. �8.3.4 AICA
  5606. �8.3.5 Digital Video Encoder
  5607. �8.3.6 16Mbit SDRAM (16bit)
  5608. �8.3.7 64Mbit SGRAM (32bit)
  5609. �8.4
  5610. List of Registers
  5611. A list of the registers in this system is shown below. "[R]" in the tables is an abbreviation for "Reserved." For unused bits in each register, specify "0" when writing to the register. When reading the register, an undefined value ("X") is returned.
  5612. Note that the register addresses that are given are the SH4's external (physical) memory addresses; in actual accesses, these addresses change according to the cache.
  5613. �8.4.1 System Bus Register
  5614. The System Bus-related registers are divided into groups as shown below.
  5615. Writing to registers not shown in this list is prohibited. If such a register is read, an undefined value "X" is returned.
  5616.  
  5617. (System Registers... DMA?DDT?Interrupts?System Controller)
  5618. * ch2-DMA control registers
  5619. * Sort-DMA control registers
  5620. * DDT I/F block control registers
  5621. * System control registers
  5622. * DDT I/F block hardware control/debug registers
  5623. * DDT I/F block test registers
  5624. * Interrupt control registers
  5625. * DMA hard trigger control registers
  5626.  
  5627. (Maple Peripheral Interface... GamePad etc?)
  5628. * Maple-DMA control registers
  5629. * Maple I/F Block Control Registers
  5630. * Maple-DMA secret/debug register
  5631. * Maple I/F Block hardware control/test registers
  5632.  
  5633. (G1 Interface... GD-ROM?System-ROM?Flash-ROM etc?)
  5634. * GD-DMA control registers
  5635. * GD-DMA secret/debug register
  5636. * G1 I/F block hardware control registers
  5637.  
  5638. (G2 Interface... AICA?External Devices?Development Tools etc.)
  5639. * G2-DMA control registers (Including AICA-DMA,Ext-DMA1,Ext-DMA2,Dev-DMA)
  5640. * G2-DMA secret register
  5641. * G2-DMA debug registers (Including AICA-DMA,Ext-DMA1,Ext-DMA2,Dev-DMA)
  5642. * G2 I/F block hardware control registers
  5643. * G2 I/F block hardware debug/test registers
  5644.  
  5645. (PowerVR Interface... PowerVR Core)
  5646. * PVR-DMA control registers
  5647. * PVR-DMA secret/debug register
  5648. * PVR I/F block hardware test register
  5649. * PVR-DMA counter registers : direct read area (secret registers)
  5650.  
  5651. �8.4.1.1
  5652. System Registers
  5653. (The ch2-DMA Control Registers are described below.)
  5654.  
  5655. SB_C2DSTAT Address?0x005F 6800
  5656. bit 31-26 25-5 4-0 000100 ch2-DMA Texture Memory start address Reserved This register specifies the ch2-DMA destination address for transfers to the TA FIFO buffer.
  5657. <Addresses that can be specified>
  5658. 0x10000000 ~ 0x107FFFE0 : TA FIFO - Polygon Path (8MB)
  5659. 0x10800000 ~ 0x10FFFFE0 : TA FIFO - YUV Converter Path (8MB)
  5660. 0x11000000 ~ 0x11FFFFE0 : TA FIFO - Direct Texture Path (16MB)
  5661. (When Direct Texture Path is specified, the value in this register is incremented automatically while DMA is being executed.)
  5662.  
  5663. The following are the mages for the above areas:
  5664. 0x12000000 ~ 0x127FFFE0 : TA FIFO - Polygon Path (8MB)
  5665. 0x12800000 ~ 0x12FFFFE0 : TA FIFO - YUV Converter Path (8MB)
  5666. 0x13000000 ~ 0x13FFFFE0 : TA FIFO - Direct Texture Path (16MB)
  5667. (When Direct Texture Path is specified, the value in this register is incremented automatically while DMA is being executed.)
  5668.  
  5669. Notes:
  5670. * This register is not initialized after a power-on reset or a software reset.
  5671. * If 0x0000 0000 is specified for an address, 0x1000 0000 is accessed.
  5672. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5673. * When Direct Texture Path is specified, the value in this register is incremented in accordance with DMA execution.
  5674. * When transferring data to the texture memory via the TA FIFO buffer and Direct Texture Path, either 64-bit access or 32-bit access can be specified by setting the SB_LMMODE0 and 1 registers.
  5675. * When using the Polygon Path and the YUV Converter path for the TA FIFO buffer, the value specified in this register is maintained.
  5676.  
  5677. SB_C2DLEN Address?0x005F 6804
  5678. bit 31-24 23-5 4-0 Reserved ch2-DMA transfer length Reserved
  5679. This register specifies the ch2-DMA length for transfers to TA FIFO.
  5680.  
  5681. Setting (32 bits) Length 0x0000 0020 32 bytes 0x0000 0040 64 bytes ��� ��� 0x00FF FFE0 16M bytes?32 bytes 0x0000 0000 16M bytes (default) Notes:
  5682. * This register is not initialized after a power-on reset or a software reset.
  5683. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5684. * The value in this register is decremented during DMA execution.
  5685. SB_C2DST Address?0x005F 6808
  5686. bit 31-1 0 Reserved start/status
  5687. This register initiates ch2-DMA. When read, this register returns the ch2-DMA transfer status.
  5688. ch2-DMA can be initiated by writing this register. The ch2-DMA status can be checked by reading this register. If DMA terminates, this bit is automatically cleared to "0".
  5689.  
  5690. When writing When reading Setting Meaning Setting Meaning 0 ch2-DMA stop (default) 0 ch2-DMA not in progress. (default) 1 ch2-DMA start 1 ch2-DMA in progress.
  5691.  
  5692. (The Sort-DMA Control Registers are described below.)
  5693.  
  5694. SB_SDSTAW Address?0x005F 6810
  5695. bit 31-27 26-5 4-0 00001 Sort-DMA Start Link Address Table Start Address Reserved This register specifies the start address of the Sort-DMA start link address table in system memory.
  5696. Notes:
  5697. * This register is not initialized after a power-on reset or a software reset.
  5698. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5699. * The value in this register is incremented automatically during DMA execution.
  5700. * Note that if 0x0000 0000 is specified in this register, it is handled as 0x0800 0000.
  5701.  
  5702. SB_SDBAAW Address?0x005F 6814
  5703. bit 31-27 26-5 4-0 00001 Sort-DMA Link Base Address Reserved This register specifies the Sort-DMA link base address in system memory.
  5704. Notes:
  5705. * This register is not initialized after a power-on reset or a software reset.
  5706. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5707. * The hardware does not change the data in this register.
  5708. * Note that if 0x0000 0000 is specified in this register, it is handled as 0x0800 0000.
  5709.  
  5710. SB_SDWLT Address?0x005F 6818
  5711. bit 31-1 0 Reserved number of bits This register specifies the bit width of the link address that is stored in the Sort-DMA start link address table. A setting of "0" indicates a width of 16 bits; a setting of "1" indicates a width of 32 bits.
  5712. Notes:
  5713. * This register is not initialized after a power-on reset or a software reset.
  5714. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5715. * The hardware does not change the data in this register.
  5716.  
  5717.  
  5718. SB_SDLAS Address?0x005F 681C
  5719. bit 31-1 0 Reserved shift control
  5720. This register controls shifting of the Sort-DMA link address. This register is not initialized after a reset.
  5721.  
  5722. Setting Meaning 0 Referenced address = SB_SDBAAW + Link address 1 Referenced address = SB_SDBAAW + Link address *32
  5723. (The CPU must specify a value that is the link address divided by 32.) Notes:
  5724. * This register is not initialized after a power-on reset or a software reset.
  5725. * Because the hardware uses this register directly, overwriting this register while DMA is being executed is prohibited. (The register may be read.)
  5726. * The hardware does not change the data in this register.
  5727.  
  5728.  
  5729. SB_SDST Address?0x005F 6820
  5730. bit 31-1 0 Reserved start /status
  5731. This register controls the start of Sort-DMA. When read, this register returns the DMA transfer status.
  5732.  
  5733. When writing When reading Setting Meaning Setting Meaning 0 Sort-DMA stop (default) 0 Sort-DMA not in progress. (default) 1 Sort-DMA start 1 Sort-DMA in progress.
  5734. Notes:
  5735. * If Sort-DMA is interrupted, it is not possible to resume from where the transfer was halted; instead, it is necessary to start over, beginning with the setting of the Sort-DMA registers.
  5736.  
  5737.  
  5738. (The DDT I/F Block Control & System Control Register is described below.)
  5739.  
  5740. SB_DBREQM Address?0x005F 6840
  5741. bit 31-1 0 Reserved mask control
  5742. This register controls the masking of the output of the DBREQ# signal to the SH4.
  5743.  
  5744. Setting Meaning 0 Not masked. (default) 1 Masked
  5745. * When the signal is masked, a fairly long wait occurs in DMA transfers that use ch0-DDT. This wait could trigger a Maple-DMA timeout error.
  5746.  
  5747.  
  5748. SB_BAVLWC Address?0x005F 6844
  5749. bit 31-5 4-0 Reserved BAVL# wait count value
  5750. This register specifies the ch0-DDT priority, and specifies the maximum wait for the BAVL# signal to be asserted by the SH4 in units of clock pulses. If the BAVL# signal is not asserted even though the specified number of clock pulses have elapsed, the DDT controller outputs the DBREQ# signal to request that the BAVL# signal be asserted.
  5751. Reducing this setting speeds up ch0-DDT, but has an adverse effect on the efficiency of ch2-DMA and SH4 external accesses.
  5752.  
  5753. Setting values Meaning 0x01 1 clock: ch0-DDT wait time is short. 0x02 2clock : ???: 0x1F 31clock 0x00 32 clocks: ch0-DDT wait time is long. (default)
  5754. Notes
  5755. * The above default value assigns the lowest priority to DDT. In other words, SH4 or polygon/texture data transfers have higher priority.
  5756. bit 31-1 4-0 Reserved BAVL# wait count value
  5757. ch0 DDT??????????
  5758.  
  5759. Count Value ?? 0x01 1clock...ch0 DDT???????????? 0x02 2lcock : ???: 0x1F 31clock 0x00 32clock...ch0 DDT??????????(Default)?
  5760. ????
  5761. * ???????????????????????????
  5762. * ???????????DDT??????????????SH4???????????????????????????
  5763.  
  5764. Hardware issue
  5765. * Root Bus(DDT i/f)???????DMA???ch0 DDT???????????BAVL# Wait Count?????????????????SH4???BAVL#???????????DBREQ#??????
  5766.  
  5767.  
  5768. SB_C2DPRYC Address?0x005F 6848
  5769. bit 31-4 3-0 Reserved DMA(TA/RootBus) priority count This specifies the number of times transfer requests from ch2-DMA or Sort-DMA to the Tile Accelerator should be accepted with priority ahead of transfer requests from the Root Bus (DDT interface).
  5770. Setting Meaning 0x1 TA: Root Bus = 1:1
  5771. ...Waiting time for ch2-DMA or Sort-DMA is long. 0x2 TA: RootBus=2:1 : : 0xF TA: RootBus=15:1 0x0 TA:RootBus=16:1
  5772. ...Waiting time for ch2-DMA or Sort-DMA is short. (default)
  5773. Notes:
  5774. * The above default value assigns the lowest priority to DDT from the Root Bus (except for Sort-DMA). In other words, SH4 or polygon/texture data transfers have higher priority.
  5775.  
  5776. SB_C2DMAXL Address?0x005F 684C
  5777. bit 31-2 1-0 Reserved ch2-DMA Maximum burst length This register specifies the maximum burst length for ch2-DMA. (The maximum burst length setting is needed in order to prevent ch2-DMA from continually occupying the bus, causing long waits for ch0-DDT and SH4 external accesses.)
  5778. Setting Meaning 1 128 bytes: CPU wait time is short. (default) 2 256Byte 3 (Setting prohibited) 0 1024 bytes: CPU wait time is long. Notes
  5779. * Never write to this register while ch2-DMA is in progress (when SB_C2DST is 0x00000001).
  5780. * Because the DDT controller always samples the free space in the TA FIFO while conducting a transfer, a burst can be ended because the FIFO is full, even if the set value has not been reached. The benefits of the setting manifest themselves the most in direct texture transfer.
  5781. * When there is free space in the TA FIFO, ch2-DMA is performed using this maximum value for its burst length. For example, if ch2-DMA is being used to transfer 1024 bytes of texture data into texture memory, and the length set by this register is "1," the data is transferred 128 bytes at a time.
  5782. * If there is no free space in the TA FIFO, the DMA waits until free space develops. (DMA is interrupted.)
  5783. * The default value indicated above gives the CPU the highest priority. If the setting is increased, ch2-DMA becomes faster, but ch0-DDT and SH4 external access become slower.
  5784. * The range of settings for this register is from 0x0 to 0x2; do not set 0x3.
  5785.  
  5786.  
  5787.  
  5788. SB_TFREM (Read Only) Address?0x005F 6880
  5789. bit 31-3 3-0 Reserved TA FIFO remain
  5790. This register returns the remaining free space in the Tile Accelerator's FIFO buffer, in units of 32 bytes.
  5791.  
  5792. Setting Remaining free space 0x0 0 byte 0x1 32 bytes �� ��� 0x7 224 bytes 0x8 256 bytes Note:
  5793. * This register is not initialized after a power-on reset or a software reset.
  5794.  
  5795.  
  5796. SB_LMMODE0 Address?0x005F 6884
  5797. bit 31-1 0 Reserved bus select-0
  5798. This register determines the data size when writing to the area from 0x1100 0000 to 0x11FF FFFF in texture memory via the TA FIFO buffer - Direct Texture Path.
  5799.  
  5800. Setting Meaning 0 64 bit (default) 1 32 bit
  5801.  
  5802. SB_LMMODE1 Address?0x005F 6888
  5803. bit 31-1 0 Reserved bus select-1
  5804. This register determines the data size when writing to the area from 0x1300 0000 to 0x13FF FFFF in texture memory via the TA FIFO buffer. The meanings of the settings are the same as for SB_LMMODE0. (The default is also the same.)
  5805.  
  5806. Note:
  5807. * The area from 0x1300 0000 to 0x13FF FFFF is the image area for 0x1100 0000 to 0x11FF FFFF in texture memory.
  5808.  
  5809.  
  5810. SB_FFST (Read Only) Address?0x005F 688C
  5811. bit 31-6 5-0 Reserved FIFO Status
  5812. This register indicates the FIFO status. If one of the bits shown below is read and returns a "0," the corresponding FIFO is empty; if the bit returns a "1," the corresponding FIFO is not empty.
  5813.  
  5814. bit 5 = SH4 i/f FIFO
  5815. bit 4 = G2 i/f FIFO?CPU write FIFO?
  5816. bit 3 = Ext dev. transfer request input
  5817. bit 2 = Ext2 transfer request input
  5818. bit 1 = Ext1 transfer request input
  5819. bit 0 = AICA transfer request input (connected to the AICA chip's FIFO empty pin)
  5820.  
  5821. Note
  5822. * This register is not initialized after a power-on reset or a software reset.
  5823.  
  5824.  
  5825. SB_SFRES (Write Only) Address?0x005F 6890
  5826. bit 31-16 15-0 Reserved Software Reset (Code : 0x7611)
  5827. This register is used to reset the entire system. A system software reset is initiated by writing "0x00007611" to this register.
  5828.  
  5829. Notes:
  5830. * If a value other than 0x0000 7611 is written to this register, it is ignored.
  5831. * Because this register resets the entire system, including external devices, it should be used with caution.
  5832.  
  5833.  
  5834. SB_SBREV (Read Only) Address?0x005F 689C
  5835. bit 31-8 7-0 Reserved SB Revision Number
  5836. This register indicates the revision number of the system bus block. For details on the register value, refer to section 1.4.
  5837.  
  5838.  
  5839. SB_RBSPLT Address?0x005F 68A0
  5840. bit 31 30-0 SH4 RootBus Split enable Reserved
  5841. SH4 Root Bus Split enable
  5842. �0� : Single Write Burst (Default)
  5843. �1� : Single Write Split
  5844.  
  5845.  
  5846. (The Interrupt Control Registers are described below.)
  5847.  
  5848. SB_ISTNRM Address?0x005F 6900
  5849. bit 31 30 29-22 21-0 Error
  5850. status G1,G2,Ext
  5851. status Reserved Normal interrupt clear/status
  5852. This register returns the interrupt status of the CORE, the System Bus, G1, G2 devices, etc. If a "1" is read in any bit, that indicates that the corresponding interrupt is being generated. In addition, an interrupt can be cleared by writing "1" to the corresponding bit, from bit 21 to bit 0. Bits 31 and 30 are read-only bits; those interrupts cannot be cleared by writing a "1" to those bits. This depends on the HOLLY version; in HOLLY2, bit 21 is added.
  5853.  
  5854. bit 31 = Error interrupt �OR� status
  5855. This bit is set to "1" when any of the following error interrupts are being generated (default = 0): RENDER ISP out of cache, RENDER Rendering aborted by FRAME change, etc. (default = 0; refer to the SB_ISTEXT register)
  5856.  
  5857. bit 30 = G1,G2,External interrupt �OR� status
  5858. This bit is set to "1" when any external interrupt (for the CD-ROM, AICA, modem, or external device) is being generated. (default = 0)
  5859. - Error interrupt: (Bit0)ISP out of Cache, (bit1) Hazard Processing of Strip Buffer (refer to the SB_ISTERR register)
  5860.  
  5861. Normal interrupt clear/status
  5862. If a "1" is read in any of the following bits, that indicates that the corresponding normal interrupt is being generated. (default = 0x000000) In addition, these interrupts can be cleared by writing "1" to the corresponding bit.
  5863. bit 21 = End of Transferring interrupt : Punch Through List (*only for HOLLY2)
  5864. bit 20 = End of DMA interrupt : Sort-DMA (Transferring for alpha sorting)
  5865. bit 19 = End of DMA interrupt : ch2-DMA
  5866. bit 18 = End of DMA interrupt : Dev-DMA(Development tool DMA)
  5867. bit 17 = End of DMA interrupt : Ext-DMA2(External 2)
  5868. bit 16 = End of DMA interrupt : Ext-DMA1(External 1)
  5869. bit 15 = End of DMA interrupt : AICA-DMA
  5870. bit 14 = End of DMA interrupt : GD-DMA
  5871. bit 13 = Maple V blank over interrupt
  5872. bit 12 = End of DMA interrupt : Maple-DMA
  5873. bit 11 = End of DMA interrupt : PVR-DMA
  5874. bit 10 = End of Transferring interrupt : Translucent Modifier Volume List
  5875. bit 9 = End of Transferring interrupt : Translucent List
  5876. bit 8 = End of Transferring interrupt : Opaque Modifier Volume List
  5877. bit 7 = End of Transferring interrupt : Opaque List Transferring
  5878. bit 6 = End of Transferring interrupt : YUV
  5879. bit 5 = H Blank-in interrupt
  5880. bit 4 = V Blank-out interrupt
  5881. bit 3 = V Blank-in interrupt
  5882. bit 2 = End of Render interrupt : TSP
  5883. bit 1 = End of Render interrupt : ISP
  5884. bit 0 = End of Render interrupt : Video
  5885. (For details on each interrupt, refer to section 8.5, "List of Interrupts.")
  5886.  
  5887.  
  5888. SB_ISTEXT (Read Only) Address?0x005F 6904
  5889. bit 31-4 3-0 Reserved Ext. interrupt clear/status This register returns the status of the external interrupts. If a "1" is read in any of the following bits, that indicates that the corresponding interrupt is being generated. The bit status after a reset is determined by signals from external devices.
  5890. bit 3 = External Device interrupt
  5891. bit 2 = Modem interrupt
  5892. bit 1 = AICA interrupt
  5893. bit 0 = GD-ROM interrupt
  5894. (For details on each interrupt, refer to section 8.5, "List of Interrupts.")
  5895. Note:
  5896. * This register is a read-only register; these interrupts cannot be cleared by writing this register. In order to clear any of these bits, it is necessary to directly clear the interrupt in the device that is the source of the interrupt.
  5897.  
  5898. SB_ISTERR Address?0x005F 6908
  5899. bit 31-0 Error Interrupt clear/status This register returns the interrupt status of the CORE, the System Bus, G1, G2 devices, etc. If a "1" is read in any bit, that indicates that the corresponding interrupt is being generated. In addition, an interrupt can be cleared by writing "1" to the corresponding bit. (default = 0x00000000).
  5900. bit 31 = SH4 i/f : accessing to Inhibited area
  5901. bit 30 = Reserved...(SH4 Time out)
  5902. bit 29 = Reserved ...(Root Bus Time out)
  5903. bit 28 = DDT i/f : Sort-DMA
  5904. Command Error
  5905. bit 27 = G2 : Time out in CPU accessing
  5906. bit 26 = G2 : Dev-DMA Time out
  5907. bit 25 = G2 : Ext-DMA2 Time out
  5908. bit 24 = G2 : Ext-DMA1 Time out
  5909. bit 23 = G2 : AICA-DMA Time out
  5910. bit 22 = G2 : Dev-DMA over run
  5911. bit 21 = G2 : Ext-DMA2 over run
  5912. bit 20 = G2 : Ext-DMA1 over run
  5913. bit 19 = G2 : AICA-DMA over run
  5914. bit 18 = G2 : Dev-DMA Illegal Address set
  5915. bit 17 = G2 : Ext-DMA2 Illegal Address set
  5916. bit 16 = G2 : Ext-DMA1 Illegal Address set
  5917. bit 15 = G2 : AICA-DMA Illegal Address set
  5918. bit 14 = G1 : ROM/FLASH access at GD-DMA
  5919. bit 13 = G1 : GD-DMA over run
  5920. bit 12 = G1 : Illegal Address set
  5921. bit 11 = MAPLE : Illegal command
  5922. bit 10 = MAPLE : Write FIFO over flow
  5923. bit 9 = MAPLE : DMA over run
  5924. bit 8 = MAPLE : Illegal Address set
  5925. bit 7 = PVRIF : DMA over run
  5926. bit 6 = PVRIF : Illegal Address set
  5927. bit 5 = TA : FIFO Overflow
  5928. bit 4 = TA : Illegal Parameter
  5929. bit 3 = TA : Object List Pointer Overflow
  5930. bit 2 = TA : ISP/TSP Parameter Overflow
  5931. bit 1 = RENDER : Hazard Processing of Strip Buffer
  5932. bit 0 = RENDER : ISP out of Cache(Buffer over flow)
  5933. (For details on each interrupt, refer to section 8.5, "List of Interrupts.")
  5934. SB_IML2NRM Address?0x005F 6910
  5935. SB_IML4NRM Address?0x005F 6920
  5936. SB_IML6NRM Address?0x005F 6930
  5937. bit31-22 21-0 Reserved Level (2/4/6) normal interrupt mask control These are the mask control registers for normal interrupts. Each interrupt can be masked in each priority level (2/4, or 6). In addition, in all three priority levels, the arrangement of the bits in the register is the same as that of bits 21 through 0 in the SB_ISTNRM register. (default = 0x000000) When a bit is set to "0," the corresponding interrupt is masked. When a bit is set to "1," that interrupt is enabled. This depends on the HOLLY version; in HOLLY2, bit 21 is added.
  5938. bit 21 = End of Transferring interrupt : Punch Through List (*only for HOLLY2)
  5939. bit 20 = End of DMA interrupt : Sort-DMA (Transferring for alpha sorting)
  5940. bit 19 = End of DMA interrupt : ch2-DMA
  5941. bit 18 = End of DMA interrupt : Dev-DMA
  5942. bit 17 = End of DMA interrupt : Ext-DMA2
  5943. bit 16 = End of DMA interrupt : Ext-DMA1
  5944. bit 15 = End of DMA interrupt : AICA-DMA
  5945. bit 14 = End of DMA interrupt : GD-DMA
  5946. bit 13 = Maple V blank over interrupt
  5947. bit 12 = End of DMA interrupt : Maple-DMA
  5948. bit 11 = End of DMA interrupt : PVR-DMA
  5949. bit 10 = End of Transferring interrupt : Translucent Modifier Volume List
  5950. bit 9 = End of Transferring interrupt : Translucent List
  5951. bit 8 = End of Transferring interrupt : Opaque Modifier Volume List
  5952. bit 7 = End of Transferring interrupt : Opaque List Transferring
  5953. bit 6 = End of Transferring interrupt : YUV
  5954. bit 5 = H-Blank in interrupt
  5955. bit 4 = V-Blank out interrupt
  5956. bit 3 = V-Blank in interrupt
  5957. bit 2 = End of Render interrupt : TSP
  5958. bit 1 = End of Render interrupt : ISP
  5959. bit 0 = End of Render interrupt : Video
  5960.  
  5961. Note:
  5962. * After a power-on reset or a software reset, all interrupts are disabled.
  5963.  
  5964. SB_IML2EXT Address?0x005F 6914
  5965. SB_IML4EXT Address?0x005F 6924
  5966. SB_IML6EXT Address?0x005F 6934
  5967. bit 31-4 3-0 Reserved level (2/4/6) Ext.
  5968. interrupt mask control These registers control masking of the external interrupts at each priority level. When a bit is set to "0," the corresponding interrupt is masked. When a bit is set to "1," that interrupt is enabled. (default = 0x0) The arrangement of the bits in the register is the same as that in SB_ISTEXT.
  5969. bit 3 = External Device interrupt
  5970. bit 2 = Modem interrupt
  5971. bit 1 = AICA interrupt
  5972. bit 0 = GD-ROM interrupt
  5973.  
  5974. Note:
  5975. * After a power-on reset or a software reset, all interrupts are disabled.
  5976. SB_IML2ERR Address?0x005F 6918
  5977. SB_IML4ERR Address?0x005F 6928
  5978. SB_IML6ERR Address?0x005F 6938
  5979. bit 31-0 Level (2/4/6) Error interrupt mask control
  5980. These registers control masking of the error interrupts at each priority level. When a bit is set to "0," the corresponding interrupt is masked. When a bit is set to "1," that interrupt is enabled. (default = 0x0) The arrangement of the bits in the register is the same as that of bits 31 through 0 in SB_ISTERR.
  5981.  
  5982. bit 31 = SH4 i/f : accessing to Inhibited area
  5983. bit 30 = Reserved ...(SH4 Time out)
  5984. bit 29 = Reserved ...(Root Bus Time out)
  5985. bit 28 = DDT i/f : Sort-DMA
  5986. Command Error
  5987. bit 27 = G2 : Time out in CPU accessing
  5988. bit 26 = G2 : Dev-DMA Time out
  5989. bit 25 = G2 : Ext-DMA2 Time out
  5990. bit 24 = G2 : Ext-DMA1 Time out
  5991. bit 23 = G2 : AICA-DMA Time out
  5992. bit 22 = G2 : Dev-DMA over run
  5993. bit 21 = G2 : Ext-DMA2 over run
  5994. bit 20 = G2 : Ext-DMA1 over run
  5995. bit 19 = G2 : AICA-DMA over run
  5996. bit 18 = G2 : Dev-DMA Illegal Address set
  5997. bit 17 = G2 : Ext-DMA2 Illegal Address set
  5998. bit 16 = G2 : Ext-DMA1 Illegal Address set
  5999. bit 15 = G2 : AICA-DMA Illegal Address set
  6000. bit 14 = G1 : ROM/FLASH access at GD-DMA
  6001. bit 13 = G1 : GD-DMA over run
  6002. bit 12 = G1 : Illegal Address set
  6003. bit 11 = MAPLE : Illegal command
  6004. bit 10 = MAPLE : Write FIFO over flow
  6005. bit 9 = MAPLE : DMA over run
  6006. bit 8 = MAPLE : Illegal Address set
  6007. bit 7 = PVRIF : DMA over run
  6008. bit 6 = PVRIF : Illegal Address set
  6009. bit 5 = TA : FIFO Overflow
  6010. bit 4 = TA : Illegal Parameter
  6011. bit 3 = TA : Object List Pointer Overflow
  6012. bit 2 = TA : ISP/TSP Parameter Overflow
  6013. bit 1 = RENDER : Hazard Processing of Strip Buffer
  6014. bit 0 = RENDER : ISP out of Cache(Buffer over flow)
  6015. (For details on each interrupt, refer to section 8.5, "List of Interrupts.")
  6016.  
  6017. Note:
  6018. * After a power-on reset or a software reset, all interrupts are disabled.
  6019.  
  6020.  
  6021. (The DMA Hard Trigger Control Registers are described below.)
  6022. SB_PDTNRM Address?0x005F 6940
  6023. bit31-22 21-0 Reserved PVR-DMA Trigger mask � Normal interrupt
  6024. This register indicates the PVR DMA trigger mask for normal interrupts. (default = 0x000000) For details on the bit arrangement, refer to the description of the SB_IML2(/4/6)NRM register.
  6025. *In HOLLY2, bit 21 is added.
  6026.  
  6027. Setting Meaning 0 interrupt mask 1 interrupt enable
  6028. SB_PDTEXT Address?0x005F 6944
  6029. bit 31-4 3-0 Reserved PVR-DMA Trigger mask
  6030. - External interrupt
  6031. This register indicates the PVR DMA trigger mask for external interrupts. (default = 0x0) For details on the bit arrangement, refer to the description of the SB_IML2(/4/6)EXT register.
  6032.  
  6033. Setting Meaning 0 interrupt mask 1 interrupt enable
  6034. SB_G2DTNRM Address?0x005F 6950
  6035. bit31-22 21-0 Reserved G2-DMA Trigger mask � Normal interrupt
  6036. This register indicates the G2-DMA trigger mask for normal interrupts. (default = 0x000000) For details on the bit arrangement, refer to the description of the SB_IML2(/4/6)NRM register.
  6037. *In HOLLY2, bit 21 is added.
  6038.  
  6039. Setting Meaning 0 interrupt mask 1 interrupt enable
  6040. SB_G2DTEXT Address?0x005F 6954
  6041. bit 31-4 3-0 Reserved G2-DMA Trigger mask
  6042. - External interrupt
  6043. This register indicates the G2-DMA trigger mask for external interrupts. (default = 0x0) For details on the bit arrangement, refer to the description of the SB_IML2(/4/6)EXT register.
  6044.  
  6045. Setting Meaning 0 interrupt mask 1 interrupt enable �8.4.1.2 Maple Peripheral Interface
  6046. (The Maple-DMA Control Registers are described below.)
  6047.  
  6048. SB_MDSTAR Address?0x005F 6C04
  6049. bit 31-29 28-5 4-0 000 Maple-DMA command table address Reserved
  6050. This register specifies the address of the peripheral controller command table in system memory.
  6051.  
  6052. Notes
  6053. * This register is not initialized after a power-on reset or a software reset.
  6054. * The hardware does not change the data in this register.
  6055.  
  6056. SB_MDTSEL Address?0x005F 6C10
  6057. bit 31-1 0 Reserved Maple-DMA
  6058. Trigger select
  6059. Selects the initiation source (software, V-Blank) for Maple-DMA (transmission/reception with a peripheral).
  6060.  
  6061. Setting Intiation trigger Meaning 0 Software initiation (default) Maple-DMA is initiated by an access from the SH4. Initiation is possible by writing a "1" to the SB_MDST register. 1 V-Blank initiation Maple-DMA is initiated automatically one line before the start of the screen display (V-Blank Out).
  6062.  
  6063. SB_MDEN Address?0x005F 6C14
  6064. bit 31-1 0 Reserved Maple-DMA
  6065. enable
  6066. This is the Maple-DMA (transmission/reception with peripherals) enable register. (default = 0) When this bit is set to "1", DMA can be initiated by setting bit 0 (DMA start bit) of the SB_MDST register to "1".
  6067.  
  6068. When writing When reading Setting Meaning Setting Meaning 0 Abort Maple DMA 0 Disable 1 Enable 1 Enable
  6069. Notes:
  6070. * Transmission/reception is not performed if this bit is not set to "1".
  6071. * DMA is forcibly terminated if a "0" is written to this bit while a Maple-DMA transfer is in progress.
  6072. * The hardware does not change the data in this register.
  6073.  
  6074.  
  6075.  
  6076. SB_MDST Address?0x005F 6C18
  6077. bit 31-1 0 Reserved Maple-DMA
  6078. start/status
  6079. This register starts the transmission/reception software. (default = 0)
  6080. When read, this register shows a status bit indicating the transmission/reception status.
  6081.  
  6082. When writing When reading Setting Meaning Setting Meaning 0 ignored 0 Maple-DMA not in progress. 1 Maple DMA start 1 Maple-DMA in progress.
  6083. Notes:
  6084. * Writing to this register is valid only when the Maple-DMA initiation setting in the SB_MDTSEL register is for software initiation.
  6085.  
  6086. SB_MCTM0 Address?0x005F 6C70
  6087. * A "1" must not be written to this register while Maple-DMA is prohibited in the SB_MDEN register (bit 31 = 0).
  6088.  
  6089. SB_MCTM0 Address?0x005F 6C70
  6090. bit 31-16 15-0 Time Out Counter of Line00 Time Out Counter of Line11
  6091. Maple i/f???????????????default=0x00000000?????????????????
  6092. Time Out Counter of Line00
  6093. default=0x0000
  6094. Time Out Counter of Line11
  6095. default=0x0000
  6096.  
  6097.  
  6098. SB_MCTM1 Address?0x005F 6C74
  6099. bit 31-16 15-0 Time Out Counter of Line01 Time Out Counter of Line10
  6100. Maple i/f???????????????default=0x00000000?????????????????
  6101. Time Out Counter of Line01
  6102. default=0x0000
  6103. Time Out Counter of Line10
  6104. default=0x0000
  6105.  
  6106.  
  6107. SB_MCTM2 Address?0x005F 6C78
  6108. bit 31-27 26-16 15-0 Reserved Write Pulse Limit Time Out Counter of Start
  6109. Maple i/f???????????????default=0x00000000?????????????????
  6110. Write Pulse Limit
  6111. default=0x0000
  6112. Time Out Counter of Start
  6113. default=0x0000
  6114.  
  6115. SB_MTTM Address?0x005F 6C7C
  6116. bit 31-20 19-0 Reserved V Blank Out Timer
  6117. Maple i/f???????????????default=0x00000000?????????????????
  6118. V Blank Out Timer
  6119. default=0x0000
  6120.  
  6121.  
  6122. (The Maple Interface Block Control Registers are described below.)
  6123.  
  6124. SB_MSYS Address?0x005F 6C80
  6125. bit 31-16 15-13 12 11-10 9-8 7-4 3-0 Time Out Counter R Single Hard Trigger R Sending Rate R Delay Time
  6126. Time Out Counter
  6127. This field sets the timeout duration from the start of data output to a peripheral device. (default = 0x3A98) A value of "1" is equivalent to 20nsec.
  6128. Example
  6129. 20nsec ? 0x3A98 = 300 / 1000000 sec (1 screen is 16.7msec.)
  6130. 20nsec�0xC350 = 1msec
  6131.  
  6132. Single Hard Trigger
  6133. This bit is set by selecting either to re-initiate automatically in response to V-Blank when Maple-DMA has been initiated by V-Blank, or to stop V-Blank initiation (manual) until the SB_MSHTCL register has been cleared.
  6134. Setting Description 0 Automatic (default) 1 Manual
  6135. Sending Rate (between HOLLY and Peripherals)
  6136. This field sets the data transfer rate for transfers between the system and peripherals.
  6137. Setting Meaning 00 2M bps (default) 01 1M bps
  6138. Delay Time
  6139. These bits set the interval (delay time) until Maple-DMA is initiated after V-Blank Out when V-Blank has been selected as the initiation trigger. (default = 0x0)
  6140. "1" sets an interval of 1.3msec.
  6141. Example
  6142. 1.3msec x 4 = 5.2msec (One screen requires 16.7msec.)
  6143.  
  6144. Note:
  6145. * The Single Hard Trigger and Delay Time settings are valid only when V-Blank initiation is set for Maple-DMA in the SB_MDTSEL register.
  6146. * Setting a value of 11 or higher for the Delay Time setting is prohibited.
  6147. * The hardware does not change the data in this register.
  6148.  
  6149.  
  6150. SB_MST (Read Only) Address?0x005F 6C84
  6151. bit 31 30-27 26-24 23-22 21-16 15-8 7-0 Move Status R Internal Frame Monitor R Internal State Monitor Reserved Line Monitor This register indicates the Maple interface status.
  6152. Move Status
  6153. This bit indicates the operating status (sending/receiving) of the peripheral controller. (default = 0x0)
  6154. Setting Meaning 0 Controller is not in operation. (Received data was finalized.) 1 Controller is in operation. (Received data is not yet finalized. Transmission data may not be overwritten.)
  6155. Internal Frame Monitor
  6156. This is the internal block frame counter monitor. (default = 0x0)
  6157.  
  6158. Internal State Monitor
  6159. This is the internal block state counter monitor. (default = 0x0)
  6160.  
  6161. Line Monitor
  6162. This is the input/output line monitor for each port. (default = 0xFF)
  6163. The correspondence with each bit is shown below.
  6164. Bit Line that is monitored bit7 Port D SDCKA bit6 Port D SDCKB bit5 Port C SDCKA bit4 Port C SDCKB bit3 Port B SDCKA bit2 Port B SDCKB bit1 Port A SDCKA bit0 Port A SDCKB
  6165.  
  6166. SB_MSHTCL (Write Only) Address?0x005F 6C88
  6167. bit 31-1 0 Reserved Maple-DMA
  6168. Hard Trigger Clear Re-initiation is enabled when V-Blank initiation is selected for Maple-DMA.
  6169. Setting Description 0 ignored 1 Hardware trigger clear (V-Blank re-initiation)
  6170. Notes:
  6171. * Writing to this register is valid only when V-Blank initiation is set for Maple-DMA in the SB_MDTSEL register and V-Blank re-initiation is set to "manual" in the SB_MSYS register.
  6172. * Writing a "0" to this register is invalid.
  6173.  
  6174.  
  6175.  
  6176. SB_MST Address?0x005F 6C84
  6177. bit 31 30-27 26-24 23-16 15-7 6-0 Transferring Status Reserved Internal Frame Monitor Line Monitor Reserved State Counter Monitor
  6178. Maple i/f?????????????????????????
  6179. Transferring Status
  6180. ?????????????????????????(default=0x0)?
  6181. �0� ???????????????????????????????????
  6182. �1� ? ? ???????????????????????????????
  6183. Internal Frame Monitor
  6184. ???????????????????(default=0x0)
  6185. Line Monitor
  6186. ?????????????????(default=0xFF)
  6187. �7� ???? SDCKA
  6188. �6� ???? SDCKB
  6189. �5� ???? SDCKA
  6190. �4� ???? SDCKB
  6191. �3� ???? SDCKA
  6192. �2� ???? SDCKB
  6193. �1� ???? SDCKA
  6194. �0� ???? SDCKB
  6195. State Counter Monitor
  6196. ?????????????????????(default=0x00)
  6197.  
  6198.  
  6199. (The Maple-DMA Secret Register is described below.)
  6200.  
  6201. SB_MDAPRO (Write Only) Address?0x005F 6C8C
  6202. bit 31-16 15 14-8 7 6-0 Security code : 0x6155 R Top address R Bottom address
  6203. This register specifies the address range for Maple-DMA involving the system (work) memory.
  6204.  
  6205. Security code : 0x6155
  6206. When updating bits 14 through 8 and bits 6 through 0, it is necessary to add "0x6155." (default = 0x0000) If this value is not added, bits 14 through 8 and bits 6 through 0 will not be updated.
  6207.  
  6208. Top address
  6209. This field specifies the starting address of the address range where received data will be stored in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x7F)
  6210.  
  6211. Bottom address
  6212. This field specifies the ending address of the address range where received data will be stored in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x00)
  6213.  
  6214. Examples of settings for the top address and the bottom address are shown below. (These examples also apply to the **APRO register.)
  6215.  
  6216. ? 00-00 ? 0x08000000-0x080FFFFF
  6217. ? 00-7F ? 0x08000000-0x0FFFFFFF
  6218. ? 40-7F ? 0x0C000000-0x0FFFFFFF
  6219. ? 7F-7F ? 0x0FF00000-0x0FFFFFFF
  6220. ? 7F-00 ? Specification prohibited
  6221.  
  6222. Notes:
  6223. * Maple-DMA involving system memory will be performed only within the above address range.
  6224. * If a DMA transfer is generated outside of this range, an overrun error results and the
  6225. Maple-DMA overrun error interrupt is generated. (Refer to bit 9 of the SB_ISTERR register.)
  6226.  
  6227.  
  6228. SB_MTM Address?0x005F 6CE0
  6229. bit31-1 0 Reserved Maple Test Mode
  6230. Maple i/f?????????????????????????
  6231. Maple Test Mode (Default=0x0)
  6232. �0� ?????
  6233. �1� ???????HOLLY TESTN???�Low�???????
  6234.  
  6235.  
  6236. (The Maple Interface Block Hardware Control Register is described below.)
  6237.  
  6238. SB_MMSEL Address?0x005F 6CE8
  6239. bit31-1 0 Reserved Maple MSB Selection This register specifies the MSB of data that is sent/received by Maple.
  6240. Maple MSB Selection(Default=1)
  6241. �0� MSB bit7
  6242. �1� MSB bit31
  6243.  
  6244.  
  6245.  
  6246. (The Maple-DMA Debug Registers are described below.)
  6247.  
  6248. SB_MTXDAD (Read Only)
  6249. Address?0x005F 6CF4
  6250. bit31-29 28-5 4-0 Reserved Maple TxD Address Counter Reserved Maple TxD Address Counter
  6251. This is the address of the data that is to be loaded into the Maple controller through Maple-DMA.
  6252.  
  6253. Note:
  6254. * This register is not initialized after a power-on reset or a software reset.
  6255.  
  6256.  
  6257. SB_MRXDAD (Read Only) Address?0x005F 6CF8
  6258. bit31-29 28-5 4-0 Reserved Maple RxD Address Counter Reserved Maple RxD Address Counter
  6259. This is the address of the data that is to be written by the Maple controller through Maple-DMA.
  6260.  
  6261. Note:
  6262. * This register is not initialized after a power-on reset or a software reset.
  6263.  
  6264.  
  6265. SB_MRXDBD (Read Only) Address?0x005F 6CFC
  6266. bit31-29 28-5 4-0 Reserved Maple RxD Base Address Reserved Maple RxD Base Address
  6267.  
  6268. Note:
  6269. * This register is not initialized after a power-on reset or a software reset.
  6270.  
  6271. SB_MTMDS Address?0x005F 6CE4
  6272. bit31-1 0 Reserved Maple Test Mode Data Set
  6273. ??????????????????????
  6274. Maple Test Mode Data Set(Default=0x0)
  6275. �0� Data Set
  6276. �1� Data Increment
  6277.  
  6278.  
  6279. (???Maple-DMA Counter Registers:Direct Read Area???)
  6280.  
  6281. SB_MTXDAD Address?0x005F 6CF4
  6282. bit31-29 28-5 4-0 Reserved Maple TxD Address Counter Reserved
  6283. ?????????????????????????
  6284. Maple TxD Address Counter(Default=0xXXX XXXX)
  6285. ?????????????????????????????????
  6286. ?????????????????????????????????
  6287.  
  6288.  
  6289. SB_MRXDAD Address?0x005F 6CF8
  6290. bit31-29 28-5 4-0 Reserved Maple RxD Address Counter Reserved
  6291. ?????????????????????????
  6292. Maple RxD Address Counter(Default=0xXXX XXXX)
  6293. ?????????????????????????????????
  6294. ?????????????????????????????????
  6295.  
  6296.  
  6297. SB_MRXBD Address?0x005F 6CFC
  6298. bit31-29 28-5 4-0 Reserved Maple RxD Base Address Reserved
  6299. ?????????????????????????
  6300. Maple RxD Base Address(Default=0xXXX XXXX)
  6301. �8.4.1.3
  6302. G1 Interface
  6303. (The GD-DMA Control Registers are described below.)
  6304.  
  6305. SB_GDSTAR Address?0x005F 7404
  6306. bit 31-29 28-5 4-0 000 GD-DMA start address Reserved
  6307. Data transfers between the GD-ROM and the following areas are possible using ch0-DMA. This register specifies the starting address in 32-byte units. (default = 0xXXXXXX)
  6308.  
  6309. 0x00700000~0x00707FE0 :32KByte : G2 AICA -Register
  6310. 0x00800000~0x009FFFE0 :2MByte : G2 AICA -Wave Memory
  6311. 0x01000000~0x01FFFFE0 :16Mbyte : G2 External Devices #1
  6312. 0x02700000~0x02FFFFE0 :9MByte : G2 AICA (Image area)
  6313. 0x03000000~0x03FFFFE0 :16Mbyte : G2 External Devices #2
  6314. 0x04000000~0x047FFFE0 :8MByte : PowerVR Texture Memory 64bit access area
  6315. 0x05000000~0x057FFFE0 :8MByte : PowerVR Texture Memory 32bit access area
  6316. 0x06000000~0x067FFFE0 :8MByte : PowerVR Tex. Mem. 64bit access area (Image area)
  6317. 0x07000000~0x077FFFE0 :8MByte : PowerVR Tex. Mem. 32bit access area (Image area)
  6318. 0x0C000000~0x0CFFFFE0 :16Mbyte : System Memory
  6319. 0x0D000000~0x0DFFFFE0 :16MByte : System Memory (Not supported)
  6320. 0x0E000000~0x0EFFFFE0 :16Mbyte : System Memory (Image area)
  6321. 0x0F000000~0x0FFFFFE0 :16MByte : System Memory (Not supported)
  6322. 0x14000000~0x17FFFFE0 :64Mbyte : G2 External Devices #3
  6323.  
  6324. Notes:
  6325. * This register is not initialized after a power-on reset or a software reset.
  6326. * The hardware does not change the data in this register.
  6327. * For details on address mapping, refer to section 2.1, "System Mapping."
  6328.  
  6329.  
  6330. SB_GDLEN Address?0x005F 7408
  6331. bit 31-25 24-0 Reserved GD-DMA Transfer Length
  6332. This register specifies the length for ch0-DMA to the GD-ROM.
  6333. In a DMA transfer involving the GD-ROM, a transfer of a length indicated below is made from the GD-ROM to the starting address specified by the SB_GDSTAR register. However, the basic unit for data transfer is 32 bytes.
  6334.  
  6335. Setting (32 bits) Length 0x00000001 1 Byte 0x00000020 32 Byte ��� ��� 0x01FFFFF 32M Byte � 1 Byte 0x00000000 32M Byte
  6336. Notes:
  6337. * This register is not initialized after a power-on reset or a software reset.
  6338. * The hardware does not change the data in this register.
  6339.  
  6340. SB_GDDIR Address?0x005F 740C
  6341. bit 31-1 0 Reserved GD-DMA
  6342. direction
  6343. This register specifies the direction of the ch0-DMA transfer involving the GD-ROM. In either case, the opposite side of the DMA transfer is the area specified by the SB_GDSTAR register.
  6344. Setting Meaning 0 DMA transfer to GD-ROM (default) 1 DMA transfer from GD-ROM
  6345. Except in special cases, this is the mode that is normally used.
  6346. Note:
  6347. * The hardware does not change the data in this register.
  6348.  
  6349. SB_GDEN Address?0x005F 7414
  6350. bit 31-1 0 Reserved GD-DMA
  6351. Enable
  6352. This register enables ch0-DMA transfer involving the GD-ROM. This register can also be used to forcibly terminate such a DMA transfer that is in progress, by writing a "0" to this register.
  6353.  
  6354. When writing When reading Setting Meaning Setting Meaning 0 Abort GD-DMA (default) 0 Disable (default) 1 Enable 1 Enable
  6355. Notes:
  6356. * This bit must be set to "1" in order to initiate a ch0-DMA transfer involving the GD-ROM.
  6357. * If this bit is enabled and a DMA start request is made in the SB_GDST register, the DMA transfer starts as soon as the data has been loaded into the GD-ROM buffer.
  6358. * A DMA transfer can be forcibly terminated by setting this register to "Disable" from the "Enable" state.
  6359. * The hardware does not change the data in this register.
  6360.  
  6361. SB_GDST Address?0x005F 7418
  6362. bit 31-1 0 Reserved GD-DMA
  6363. Start/Status
  6364. This register requests the start of a ch0-DMA transfer involving the GD-ROM. The status of the DMA transfer can be determined by reading this register. If a "0" is written to this register, it is ignored. If GD-DMA is set to "Disable" in the SB_GDEN register, writing a "1" to this register is illegal.
  6365.  
  6366. When writing When reading Setting Meaning Setting Meaning 0 ignored (default) 0 GD-DMA not in progress. (default) 1 Start DMA 1 GD-DMA in progress. (The G1 Interface Block Hardware Control Registers are described below.)
  6367.  
  6368. SB_G1RRC (Write Only) Address?0x005F 7480
  6369. bit 31-13 12 11-8 7-4 3 2-0 Reserved OE Pulse delay CS Pulse width Address setup R Address hold
  6370. This register controls the timing for read accesses to system ROM.
  6371.  
  6372. OE Pulse dela?
  6373. This field sets the OE signal delay versus the rising edge of the ROM CS signal. (default = 1 = 2 cycles)
  6374. The OE signal becomes active after (pulse delay + 1) ? 1 cycles.
  6375.  
  6376. CS Pulse width
  6377. This field specifies the pulse width of the ROM CS signal. (default = 0xF = 18 cycles)
  6378. The CS signal is active for (pulse width + 3) ? 1 cycles.
  6379.  
  6380. Address setup
  6381. This field specifies the address setup time versus the falling edge of the ROM CS signal. (default = 0xF = 16 cycles)
  6382. The read address becomes valid within (address setup + 1) ? 1 cycles after the falling edge of the CS signal.
  6383.  
  6384. Address hold
  6385. This field specifies the address hold time versus the falling edge of the ROM CS signal. (default = 0x7 = 8 cycles)
  6386. The read address is valid for (address hold + 1) ? 1 cycles after the falling edge of the CS signal.
  6387.  
  6388. Notes:
  6389. * 1 cycle = 20nsec.
  6390. * Based on the above settings, the timing for read accesses to ROM is as shown below.
  6391.  
  6392.  
  6393. The length of time needed for accesses to ROM is equal to B + C + D. Under the default settings, reading one byte of data requires 42 cycles (= 840nsec).
  6394.  
  6395. * The hardware does not change the data in this register.
  6396.  
  6397.  
  6398. SB_G1RWC (Write Only) Address?0x005F 7484
  6399. bit 31-13 12 11-8 7-4 3 2-0 Reserved WR Pulse delay CS Pulse width Address setup R Address hold
  6400. This register controls the timing for write accesses to system ROM.
  6401.  
  6402. WR Pulse dela?
  6403. This field sets the WR signal delay versus the rising edge of the ROM CS signal.
  6404. (default = 1 = 2 cycles)
  6405. The WR signal becomes active after (pulse delay + 1) ? 1 cycles.
  6406.  
  6407. CS Pulse width
  6408. This field specifies the pulse width of the ROM CS signal. (default = 0xF = 18 cycles)
  6409. The CS signal is active for (pulse width + 3) ? 1 cycles.
  6410.  
  6411. Address setup
  6412. This field specifies the address setup time versus the falling edge of the ROM CS signal. (default = 0xF = 16 cycles)
  6413. The write address becomes valid within (address setup + 1) ? 1 cycles after the falling edge of the CS signal.
  6414.  
  6415. Address hold
  6416. This field specifies the address hold time versus the falling edge of the ROM CS signal. (default = 0x7 = 8 cycles)
  6417. The write address is valid for (address hold + 1) ? 1 cycles after the falling edge of the CS signal.
  6418.  
  6419. Notes:
  6420. * 1 cycle = 20nsec.
  6421. * Based on the above settings, the timing for write accesses to ROM is as shown below.
  6422.  
  6423.  
  6424. The length of time needed for accesses to ROM is equal to B + C + D. Under the default settings, writing one byte of data requires 42 cycles (= 840nsec).
  6425. * The hardware does not change the data in this register.
  6426. * It is not possible to write to system ROM except in special cases, such as during Boot-ROM development work.
  6427.  
  6428.  
  6429. SB_G1FRC (Write Only) Address?0x005F 7488
  6430. bit 31-13 12 11-8 7-4 3 2-0 Reserved OE Pulse
  6431. delay CS Pulse
  6432. width Address
  6433. setup R Address
  6434. hold
  6435. This register adjusts the timing for read accesses to flash memory.
  6436.  
  6437. OE Pulse dela?
  6438. default=1=2cyc
  6439. CS Pulse width
  6440. default=0xF=18cyc
  6441. Address setup
  6442. default=0xF=16cyc
  6443. Address hold
  6444. default=0x7=8cyc
  6445.  
  6446. For details on the function of each bit, refer to the description of the SB_G1RRC register.
  6447.  
  6448.  
  6449. SB_G1FWC (Write Only) Address?0x005F 748C
  6450. bit 31-13 12 11-8 7-4 3 2-0 Reserved WR Pulse
  6451. delay CS Pulse
  6452. width Address
  6453. setup R Address
  6454. hold
  6455. This register adjusts the timing for write accesses to flash memory.
  6456.  
  6457. WR Pulse dela?
  6458. default=1=2cyc
  6459. CS Pulse width
  6460. default=0xF=18cyc
  6461. Address setup
  6462. default=0xF=16cyc
  6463. Address hold
  6464. default=0x7=8cyc
  6465.  
  6466. For details on the function of each bit, refer to the description of the SB_G1RWC register.
  6467.  
  6468.  
  6469. SB_G1CRC (Write Only) Address?0x005F 7490
  6470. bit 31-13 11-8 7-4 3 2-0 Reserved G1DIOR# Pulse width Address setup R Address hold
  6471. This register adjusts the timing for GD PIO read accesses.
  6472.  
  6473. G1DIOR# Pulse width
  6474. This field specifies the pulse width of the GD PIO read signal (G1DIOR#).
  6475. (default = 0xF = 18cycles)
  6476. The signal is active for (pulse width + 3) ? 1 cycles.
  6477.  
  6478. Address setup
  6479. This field specifies the address setup time and the chip select time versus the falling edge of the G1DIOR# signal. (default = 0xF = 16 cycles)
  6480. The G1DIOR# signal falls (address setup + 1) ? 1 cycles after the address is output.
  6481.  
  6482. Address hold
  6483. This field specifies the address hold time and the chip select time versus the falling edge of the G1DIOR# signal. (default = 0x7 = 8 cycles)
  6484. The read address is output until (address hold + 1) ? 1 cycles after the falling edge of the G1DIOR# signal.
  6485.  
  6486. Notes:
  6487. * Based on the above settings, the timing for GD PIO read accesses is as shown below.
  6488.  
  6489. * The length of time needed for accesses to GD PIO is equal to B + C + D. Under the default settings, reading one word of data requires 42 cycles (= 840nsec).
  6490. * The hardware does not change the data in this register.
  6491.  
  6492.  
  6493. SB_G1CWC (Write Only) Address?0x005F 7494
  6494. bit 31-13 11-8 7-4 3 2-0 Reserved G1DIOW# Pulse width Address setup R Address hold
  6495. This register adjusts the timing for GD PIO write accesses.
  6496.  
  6497. GIDIOR# Pulse width
  6498. This field specifies the pulse width of the GD PIO write signal (G1DIOW#). (default = 0xF = 18cycles)
  6499. The signal is active for (pulse width + 3) ? 1 cycles.
  6500.  
  6501. Address setup
  6502. This field specifies the address setup time and the chip select time versus the falling edge of the G1DIOW# signal. (default = 0xF = 16 cycles)
  6503. The G1DIOW# signal falls (address setup + 1) ? 1 cycles after the address is output.
  6504.  
  6505. Address hold
  6506. This field specifies the address hold time and the chip select time versus the falling edge of the G1DIOW# signal. (default = 0x7 = 8 cycles)
  6507. The write address is output until (address hold + 1) ? 1 cycles after the falling edge of the G1DIOW# signal.
  6508.  
  6509. Notes:
  6510. * Based on the above settings, the timing for GD PIO write accesses is as shown below.
  6511.  
  6512.  
  6513. The length of time needed for accesses to GD PIO is equal to B + C + D. Under the default settings, writing one word of data requires 42 cycles (= 840nsec).
  6514. * The hardware does not change the data in this register.
  6515.  
  6516.  
  6517. SB_G1GDRC (Write Only) Address?0x005F 74A0
  6518. bit 31-16 15-12 11-8 7-4 3-0 Reserved G1DIOR#
  6519. Negate time width Acknowledge delay time G1DIOR# Pulse delay G1DIOR# Pulse width
  6520. This register adjusts the timing for GD-DMA read accesses.
  6521.  
  6522. GIDIOR# Negate time width
  6523. This field specifies the negate time for the GD read signal (G1DIOR#). (default = 0xF = 18 cycles)
  6524. The G1DIOR# signal becomes active after (negate time width + 3) ? 1 cycles.
  6525.  
  6526. Acknowledge delay time
  6527. This field specifies the negate delay for the GD acknowledge signal (G1DACK#) versus the falling edge of the G1DIOR# signal. (default = 0xF = 18 cycles)
  6528. G1DACK# is negated in (acknowledge delay time + 3) ? 1 cycles.
  6529.  
  6530. GIDIOR# pulse delay
  6531. This field specifies the G1DIOR# falling edge delay time versus the falling edge of the G1DACK# signal. (default = 0xF = 18 cycles) G1DIOR# is asserted (G1DIOR# pulse delay + 1) ? 1 cycles after the falling edge of G1DACK#.
  6532.  
  6533. GIDIOR# pulse width
  6534. This field specifies the pulse width of the G1DIOR# signal. (default = 0xF = 18 cycles)
  6535. G1DIOR# is asserted for (G1DIOR# pulse width + 1) ? 1 cycles.
  6536.  
  6537. Note:
  6538. * Based on the above settings, the timing for GD-DMA read accesses is as shown below.
  6539.  
  6540. The length of time needed for GD-DMA read accesses is equal to (B + C) + (A + D) ? (number of words) - A. Under the default settings, reading one word of data requires 50 cycles (= 1000nsec).
  6541. * The hardware does not change the data in this register.
  6542.  
  6543.  
  6544. SB_G1GDWC (Write Only) Address?0x005F 74A4
  6545. bit 31-16 15-12 11-8 7-4 3-0 Reserved G1DIOW#
  6546. Negate time width Acknowledge delay time G1DIOW# Pulse delay G1DIOW# Pulse width
  6547. This register adjusts the timing for GD-DMA write accesses.
  6548. GIDIOW# Negate time width
  6549. This field specifies the negate time for the GD write signal (G1DIOW#). (default = 0xF = 18 cycles)
  6550. The G1DIOW# signal becomes active after (negate time width + 3) ? 1 cycles.
  6551. Acknowledge delay time
  6552. This field specifies the negate delay for the GD acknowledge signal (G1DACK#) versus the falling edge of the G1DIOW# signal. (default = 0xF = 18 cycles)
  6553. G1DACK# is negated in (acknowledge delay time + 3) ? 1 cycles.
  6554. GIDIOW# pulse delay
  6555. This field specifies the G1DIOW# falling edge delay time versus the falling edge of the G1DACK# signal. (default = 0xF = 18 cycles) G1DIOW# is asserted (G1DIOW# pulse delay + 1) ? 1 cycles after the falling edge of G1DACK#.
  6556. GIDIOW# pulse width
  6557. This field specifies the pulse width of the G1DIOW# signal. (default = 0xF = 18 cycles)
  6558. G1DIOW# is asserted for (G1DIOR# pulse width + 1) ? 1 cycles.
  6559. Note:
  6560. * Based on the above settings, the timing for GD-DMA write accesses is as shown below.
  6561.  
  6562. The length of time needed for GD-DMA read accesses is equal to (B + C) + (A + D) ? (number of words) - A. Under the default settings, reading one word of data requires 50 cycles (= 1000nsec).
  6563. * The hardware does not change the data in this register.
  6564.  
  6565. SB_G1SYSM (Read Only) Address?0x005F 74B0
  6566. bit 31-8 7-0 Reserved System Mode
  6567. This register returns the system mode/configuration (by reading the contents of the address/mode pins (G1MRA[18:11] when HOLLY is reset). Refer to section 4.1.4, "System Modes," for the system mode correspondence table.
  6568.  
  6569. SB_G1CRDYC (Write Only) Address?0x005F 74B4
  6570. bit 31-1 0 Reserved GD PIO
  6571. RDY control
  6572. This register enables/disables the G1IORDY signal for GD PIO reads and writes.
  6573.  
  6574. Setting Meaning 0 Disable 1 Enable (default) (The GD-DMA Secret Register is described below.)
  6575.  
  6576. SB_GDAPRO (Write Only) Address?0x005F 74B8
  6577. bit 31-16 15 14-8 7 6-0 Security code : 0x8843 R Top address R Bottom address
  6578. This register specifies the address range for GD-DMA involving system (work) memory.
  6579.  
  6580. Security code : 0x8843
  6581. When updating bits 14 through 8 and bits 6 through 0, it is necessary to add "0x8843." (default = 0x0000) If this value is not added, bits 14 through 8 and bits 6 through 0 will not be updated.
  6582.  
  6583. Top address
  6584. This field specifies the starting address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x7F)
  6585.  
  6586. Bottom address
  6587. This field specifies the ending address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x00)
  6588.  
  6589. Note:
  6590. * GD-DMA involving system memory will be performed only within the above address range.
  6591. * If a DMA transfer is generated outside of this range, an overrun error results and the GD-DMA overrun error interrupt is generated. (Refer to bit 13 of the SB_ISTERR register.)
  6592.  
  6593.  
  6594. (The GD-DMA Debug Registers are described below.)
  6595.  
  6596. SB_GDSTARD (Read Only) Address?0x005F 74F4
  6597. bit 31-29 28-5 4-0 000 GD-DMA address count value Reserved
  6598. This returns the current GD-DMA address, allowing you to determine the extent to which the GD-DMA address on the other size of a GD-DMA transfer has advanced.
  6599. This register counts up from the value that was set in the SB_GDSTAR register, and stops at the last address of the DMA after the GD-DMA transfer is completed.
  6600.  
  6601. 0x00700000~0x00707FE0 :32KByte : G2 AICA -Register
  6602. 0x00800000~0x009FFFE0 :2MByte : G2 AICA -Wave Memory
  6603. 0x01000000~0x01FFFFE0 :16Mbyte G2 External Devices #1
  6604. 0x02700000~0x02FFFFE0 :9MByte : G2 AICA (Image area)
  6605. 0x03000000~0x03FFFFE0 :16Mbyte G2 External Devices #2
  6606. 0x04000000~0x047FFFE0 :8MByte : PowerVR Texture Memory 64bit access area
  6607. 0x05000000~0x057FFFE0 :8MByte : PowerVR Texture Memory 32bit access area
  6608. 0x06000000~0x067FFFE0 :8MByte : PowerVR Tex.Mem. 64bit access area(Image area)
  6609. 0x07000000~0x077FFFE0 :8MByte : PowerVR Tex.Mem. 32bit access area(Image area)
  6610. 0x0C000000~0x0CFFFFE0 :16Mbyte System Memory
  6611. 0x0D000000~0x0DFFFFE0 :16Mbyte System Memory(Not supported)
  6612. 0x0E000000~0x0EFFFFE0 :16Mbyte System Memory (Image area)
  6613. 0x0F000000~0x0FFFFFE0 :16Mbyte System Memory(Not supported)
  6614. 0x14000000~0x17FFFFE0 :64Mbyte G2 External Devices #3
  6615.  
  6616. Note
  6617. * This register is not initialized after a power-on reset or a software reset.
  6618.  
  6619.  
  6620. SB_GDLEND (Read Only) Address?0x005F 74F8
  6621. bit 31-25 24-5 4-0 Reserved GD-DMA remainder Reserved
  6622. This register returns the size of the GD-DMA transfer in bytes. (Note that this register counts up.)
  6623.  
  6624. GD-DMA Remainder
  6625. 0x00000020 : 32 Byte
  6626. 0x00000040 : 64 Byte
  6627. :
  6628. 0x01FFFFE0 : 32M Byte?32 Byte
  6629. 0x00000000 : 32M Byte
  6630.  
  6631. Note
  6632. * This register is not initialized after a power-on reset or a software reset.
  6633.  
  6634. �8.4.1.4
  6635. G2 Interface
  6636. The modem unit connects to the same G2 Bus as the AICA, etc., but because it only exchanges data with the SH4 via single reads and writes, it does not have any DMA control registers. For details on accessing the modem, refer to section 4.2, "Modem," or the modem unit specifications.
  6637. There are four channels of DMA engines for the G2 interface, but they all use the same types of units. Only the DMA hardware triggers are different.
  6638.  
  6639. AICA-DMA (ch0), Ext1-DMA (ch1), Ext2-DMA (ch2), Dev-DMA (ch3)
  6640.  
  6641. Note that these are functionally the same, so the explanations for the numerous G2-DMA registers have been grouped together, and the explanations that apply to each channel are summarized in the description of AICA-DMA.
  6642.  
  6643. G2-DMA Engine --> AICA
  6644. (ch0) External 1
  6645. (ch1) External 2
  6646. (ch2) DevTools
  6647. (ch3) G2-DMA start address ADSTAG E1STAG E2STAG DDSTAG G2-DMA Sys.Mem. or Tex.Mem. address ADSTAR E1STAR E2STAR DDSTAR G2-DMA Length ADLEN E1LEN E2LEN DDLEN G2-DMA Direction ADDIR E1DIR E2DIR DDDIR G2-DMA Trigger selection ADTSEL E1TSEL E2TSEL DDTSEL G2-DMA Enable ADEN E1EN E2EN DDEN G2-DMA Start and Status ADST E1ST E2ST DDST G2-DMA Suspend Request and Status ADSUSP E1SUSP E2SUSP DDSUSP Hardware trigger signal of G2 G2RQAIC# G2RQEX0# G2RQEX1# G2RQDEV#
  6648. (The G2 DMA Control Registers are described below.)
  6649.  
  6650. SB_ADSTAG Address?0x005F 7800
  6651. SB_E1STAG Address?0x005F 7820
  6652. SB_E2STAG Address?0x005F 7840
  6653. SB_DDSTAG Address?0x005F 7860
  6654. bit 31-29 28-5 4-0 000 G2-DMA G2 start address Reserved
  6655. These registers specify starting address for G2-DMA transfers involving External-1, External-2, External-3, wave memory, and the AICA register. The G2-DMA transfer is performed between areas specified by these registers and the SB_ADSTAR, SB_E1STAR, SB_E2STAR, and SB_DDSTAR registers.
  6656.  
  6657. 0x00700000~0x00707FE0 :32KByte : G2 AICA Registers
  6658. 0x00800000~0x009FFFE0 :2MByte : G2 Wave Memory
  6659. 0x02700000~0x02FFFFE0 :9MByte : G2 AICA (Image area)
  6660. * The 3 areas listed above are addresses that can be specified for channel 0 (AICA-DMA).
  6661. 0x01000000~0x01FFFFE0 :16MByte : G2 External Devices #1
  6662. 0x03000000~0x03FFFFE0 :16MByte : G2 External Devices #2
  6663. 0x14000000~0x17FFFFE0 :64MByte : G2 External Devices #3
  6664. * The 3 areas listed above are addresses can be specified for channels 1 through 3.
  6665.  
  6666. Note:
  6667. * This register is not initialized after a power-on reset or a software reset.
  6668. * The address value must be specified in 32-byte units.
  6669. * When the DMA enable register (SB_ADEN, etc.) is "0", the G2-DMA block's internal values are updated.
  6670. * If a value that is not included above is set, an invalid setting interrupt is generated.
  6671. SB_ADSTAR Address?0x005F 7804
  6672. SB_E1STAR Address?0x005F 7824
  6673. SB_E2STAR Address?0x005F 7844
  6674. SB_DDSTAR Address?0x005F 7864
  6675. bit 31-29 28-5 4-0 000 G2-DMA System Mem. or Texture Mem. start address Reserved
  6676. This register specifies the starting address for G2 DMA transfers involving system memory or texture memory. The G2 DMA transfer is performed between areas specified by these registers and the SB_ADSTAG, SB_E1STAG, SB_E2STAG,and SB_DDSTAG registers. When the DMA enable register (SB_ADEN, etc.) is "0", the value in the G2-DMA block is updated.
  6677.  
  6678. 0x0C000000~0x0CFFFFE0 :16Mbyte : System Memory
  6679. 0x04000000~0x047FFFE0 :8Mbyte : Texture Mem. 64bit access area
  6680. 0x04800000~0x04FFFFE0 :8Mbyte : Texture Mem. 64bit access area (the latter half)
  6681. 0x05000000~0x057FFFE0 :8Mbyte : Texture Mem. 32bit access area
  6682. 0x05800000~0x05FFFFE0 :8Mbyte : Texture Mem. 32bit access area (the latter half)
  6683.  
  6684. Note:
  6685. * This register is not initialized after a power-on reset or a software reset.
  6686. * The address value must be specified in 32-byte units.
  6687. * When the DMA enable register (SB_ADEN, etc.) is "0", the G2-DMA block's internal values are updated.
  6688. * If a value that is not included above is set, an invalid setting interrupt is generated.
  6689.  
  6690. SB_ADLEN Address?0x005F 7808
  6691. SB_E1LEN Address?0x005F 7828
  6692. SB_E2LEN Address?0x005F 7848
  6693. SB_DDLEN Address?0x005F 7868
  6694. bit 31 30-25 24-5 4-0 DMA Transfer End/Restart Reserved G2-DMA Transfer Length Reserved
  6695. DMA Transfer End//Restart
  6696. This field sets the DMA transfer operation.
  6697. Setting Meaning 0 DMA restart (Restart after a DMA transfer ended)
  6698. * When a transfer ends, the DMA enable register remains set to "1". 1 DMA end
  6699. * When a transfer ends, the DMA enable register is set to "0".
  6700. Transfer Length
  6701. This field specifies the G2-DMA data transfer length in 32-byte units.
  6702. Setting?32bit? Transmission Length 0x00000020 32Byte 0x00000040 64Byte ��� ��� 0x01FFFE0 32MByte?32Byte 0x00000000 32MByte Note:
  6703. * This register is not initialized after a power-on reset or a software reset.
  6704. * When the DMA enable register (SB_ADEN, etc.) is "0", the value in the G2-DMA block is updated.
  6705.  
  6706. SB_ADDIR Address?0x005F 780C
  6707. SB_E1DIR Address?0x005F 782C
  6708. SB_E2DIR Address?0x005F 784C
  6709. SB_DDDIR Address?0x005F 786C
  6710. bit 31-1 0 Reserved G2-DMA
  6711. transfer direction
  6712. This register specifies the direction of DMA transfers between the Root Bus and G2 devices. The G2 device indicated here is the device that corresponds to the area specified by the SB_ADSTAR, SB_E1STAR, SB_E2STAR, or SB_DDSTAR register.
  6713. Setting Meaning 0 DMA transfer from the Root Bus to a G2 device 1 DMA transfer from a G2 device to the Root Bus Note:
  6714. * This register is not initialized after a power-on reset or a software reset.
  6715. * When the DMA enable register (SB_ADEN, etc.) is "0", the value in the G2-DMA block is updated.
  6716.  
  6717.  
  6718. SB_ADTSEL Address?0x005F 7810
  6719. SB_E1TSEL Address?0x005F 7830
  6720. SB_E2TSEL Address?0x005F 7850
  6721. SB_DDTSEL Address?0x005F 7870
  6722. bit 31-3 2-0 Reserved Trigger selection
  6723. This register specifies the G2-DMA transfer trigger.
  6724. bit2 : Trigger Selection2
  6725. 0: Disables the DMA suspend function
  6726. 1: Enables the DMA suspend function (In the case of AICA-DMA, the SB_ADSUSP register is enabled.)
  6727. bit1 : Trigger Selection1
  6728. 0: CPU initiation (DMA transfer is initiated by writing to the SB_**ST register in the SH4.)
  6729. 1: Hardware trigger (DMA transfer is initiated according to the interrupt setting)
  6730. bit0 : Trigger Selection0
  6731. 0: Disables control of transfer through an external pin (transfer request input) (? continuous transfer)
  6732. 1: Enables control of transfer through an external pin
  6733.  
  6734.  
  6735. The DMA mode combinations are listed below. (The register names shown are for AICA-DMA.)
  6736.  
  6737. SB_ADLEN SB_ADTSEL Meaning bit31 bit2 bit1 bit0 0 0 0 0 CPU initiation 0 0 1 Prohibited 0 1 0 Interrupt initiation 0 1 1 Prohibited 1 0 0 0 When DMA ends, SB_ADEN = 0 + CPU initiation 0 0 1 When DMA ends, SB_ADEN = 0 + CPU initiation + external pin control 0 1 0 When DMA ends, SB_ADEN = 0 + CPU initiation + interrupt initiation 0 1 1 Prohibited 0 1 0 0 Suspend enabled + CPU initiation 1 0 1 Suspend enabled + CPU initiation + external pin control 1 1 0 Suspend enabled + interrupt initiation 1 1 1 Suspend enabled + interrupt initiation + external pin control 1 1 0 0 Suspend enabled + When DMA ends, SB_ADEN = 0 + CPU initiation 1 0 1 Suspend enabled + When DMA ends, SB_ADEN = 0 + CPU initiation + external pin control 1 1 0 Suspend enabled + When DMA ends, SB_ADEN = 0 + interrupt initiation 1 1 1 Suspend enabled + When DMA ends, SB_ADEN = 0 + interrupt initiation + external pin control
  6738. Here, "CPU initiation" means that G2-DMA is initiated through software by the SH4; each type can be initiated by writing "1" to either the SB_ADST, SB_E1ST, SB_E2ST, or SB_E3ST register.
  6739. External pin control permits initiation upon reception of a trigger from a device that is connected on the HOLLY's G2 bus. (The transfer request input signal G2RQAIC# is input to the G2-AICA-DMA engine as an external trigger. In addition, the signals G2RQEX0#, G2RQEX1#, and G2RQDEV# are each input as external triggers to the G2-External1, External2, and Dev.Tools DMA engines, respectively. For details on how to drive these signals, refer to the AICA specifications.)
  6740. "Interrupt initiation" refers to the automatic initiation of G2-DMA in response to the interrupt designated by the SB_G2DTNRM register and the SB_G2DTEXT register. When the interrupts designated by both registers are generated, G2-DMA is initiated by the interrupt that was generated first.
  6741. Bit 2 of this register indicates whether the G2 suspend function is enabled or not. For details on the suspend function, refer to the description of the SB_ADSUSP register (for AICA-DMA).
  6742.  
  6743. Notes:
  6744. * This register is not initialized after a power-on reset or a software reset.
  6745. * When the DMA enable register (SB_ADEN, etc.) is "0", the value in the G2-DMA block is updated.
  6746.  
  6747.  
  6748.  
  6749. SB_ADEN Address?0x005F 7814
  6750. SB_E1EN Address?0x005F 7834
  6751. SB_E2EN Address?0x005F 7854
  6752. SB_DDEN Address?0x005F 7874
  6753. bit 31-1 0 Reserved G2-DMA
  6754. enable
  6755. This register enables G2-DMA.
  6756. G2-DMA is forcibly terminated by writing a "0" to this register while G2-DMA is in progress.
  6757.  
  6758. When writing When reading Setting Meaning Setting Meaning 0 Disables G2-DMA. (default) 0 G2-DMA is disabled. (default) 1 Enables G2-DMA. 1 G2-DMA is enabled
  6759.  
  6760. SB_ADST Address?0x005F 7818
  6761. SB_E1ST Address?0x005F 7838
  6762. SB_E2ST Address?0x005F 7858
  6763. SB_DDST Address?0x005F 7878
  6764. bit 31-1 0 Reserved G2-DMA
  6765. start/status
  6766. This register initiates G2-DMA when the transfer initiation registers (SB_ADTSEL, etc.) are set to permit initiation by the SH4.
  6767. The DMA status can be determined by reading this register. When G2-DMA is disabled through the SB_ADEN (in the case of AICA-DMA) register, writing a "1" to this register is not allowed.
  6768.  
  6769. When writing When reading Setting Meaning Setting Meaning 0 Prohibited 0 DMA not in progress 1 Initiates DMA. 1 DMA in progress
  6770. Note:
  6771. * If an invalid value is set in the SB_ADSTAG or SB_ADSTAR register (when both are set for ch0-AICA), and then G2-DMA is enabled, an invalid setting interrupt is generated.
  6772.  
  6773.  
  6774. SB_ADSUSP Address?0x005F 781C
  6775. SB_E1SUSP Address?0x005F 783C
  6776. SB_E2SUSP Address?0x005F 785C
  6777. SB_DDSUSP Address?0x005F 787C
  6778. bit 31-6 5-0 Reserved DMA Suspend Request/Status
  6779. This register temporarily stops G2-DMA. This register is valid when bit 2 in the SB_ADTSEL (in the case of AICA-DMA) register is "1" (invalid when "0"). The value of these bits after a reset is determined by signals from external devices.
  6780. bit5 : DMA Request Input State (Read Only)
  6781. 0: The DMA transfer request is high (transfer not possible), or bit 2 of the SB_ADTSEL register is "0"
  6782. 1: The DMA transfer request is low (transfer possible)
  6783. bit4 : DMA Suspend or DMA Stop (Read Only)
  6784. 0: DMA transfer is in progress, or bit 2 of the SB_ADTSEL register is "0"
  6785. 1: DMA transfer has ended, or is stopped due to a suspend
  6786. * When bit 2 of the SB_ADTSEL register is "1" and bit 0 of the SB_ADSUSP register is "1", and data is not being transferred due to being in the suspended state, this bit becomes "1" when G2-DMA ends.
  6787. bit3-1 : Reserved (Specify "0".)
  6788. bit1 : G2_devempty_n Status Select (Write Only)
  6789. �0� : Request Input Signal=�Low�?Buffer Empty?
  6790. �1� : Request Input Signal=�Low� and DMA Suspend
  6791. bit0 : DMA Suspend Request (Write Only)
  6792. 0: Continues DMA transfer without going to the suspended state. Or, bit 2 of the SB_ADTSEL register is "0"
  6793. 1: Suspends and terminates DMA transfer
  6794.  
  6795. (The G2 I/F Block Hardware Control Registers are described below.)
  6796.  
  6797. SB_G2ID (Read Only) Address?0x005F 7880
  6798. bit 31-8 7-4 3-0 all�0� HOLLY Version G2 Version This register returns the G2 bus version. The current versions are as follows (refer to section 1.4):
  6799. 0x00000000 : Prototype
  6800. 0x00000012 : Holly ver. 1.0 (CLX1) and later
  6801.  
  6802.  
  6803.  
  6804. ?????????????????G2 i/f????????????????????????????
  6805. bit 31-28 G2 BUS TEST - CHIP TESTER only (default - 0x0)
  6806. 0x0 : normal 0x4 : load DS 0x8 : shift DS 0xC : dec DS
  6807. 0x1 : thru 0x5 : load TR 0x9 : shift TR 0xD : dec TR
  6808. 0x2 : thru 0x6 : load a-sync 0xA : shift a-sync 0xE : dec a-sync
  6809. 0x3 : thru 0x7 : load wait 0xB : shift wait 0xF : dec wait
  6810. bit 27-14 Reserved (�X�)
  6811. bit 13 modem G2_st_n signal (default - �0�)
  6812. �0� : disable
  6813. �1� : enable
  6814. bit 14 modem wait sampling
  6815. �0� : 2 clock sampling
  6816. �1� : 1 clock sampling
  6817. bit 11 DMA G2_rqdev_n signal
  6818. bit 10 DMA G2_rqex1_n signal
  6819. bit 9 DMA G2_rqex0_n signal
  6820. bit 8 DMA G2_rqaic_n signal
  6821. �0� : not request
  6822. �1� : request
  6823. bit 7 INT G2_irext_n signal
  6824. bit 6 INT G2_irmdm_n signal
  6825. bit 5 INT G2_iraic_n signal
  6826. �0� : not request
  6827. �1� : request
  6828. bit 4 sync cycle G2_st_n signal disable
  6829. �0� : enable
  6830. �1� : disable
  6831. bit 3 INT G2_irxxx_n signal disable
  6832. �0� : enable
  6833. �1� : disable input signal and enable function bit[7:5]
  6834. bit 2 DMA G2_rqxxx_n signal disable
  6835. �0� : enable
  6836. �1� : disable input signal and enable function bit[11:8]
  6837. bit 1-0 Reserved (�X�)
  6838.  
  6839.  
  6840. SB_G2DSTO Address?0x005F 7890
  6841. bit 31-12 11-0 Reserved G2 DS time out This is a special register that is used for debugging. This register sets the DS# signal timeout time for G2 devices.
  6842. G2 DS TIMEOUT (default - 0x3FF)
  6843. When there is no response from the DS# signal for a certain period of time, a timeout error interrupt is generated.
  6844. 0x000: Shortest wait time (after 0 clocks)
  6845. :
  6846. 0xFFF: Longest wait time (after 4095 clocks)
  6847. The respective G2-DMA timeout error interrupts for AICA, External 1/2, and Dev tool are the same as in the case of the SB_G2TRTO register. Refer to bits 26 through 23 in the SB_ISTERR register.
  6848. Notes:
  6849. * The setting in this register affects all G2 timeout error interrupts (bits 27 through 23 in the SB_ISTERR register).
  6850. * If either the DS# signal or the TR# signal times out, it is then necessary to check that the target device is actually connected on the G2 bus, and that the device has not failed.
  6851.  
  6852.  
  6853.  
  6854. SB_G2TRTO Address?0x005F 7894
  6855. bit 31-12 11-0 Reserved G2 TR time out This is a special register that is used for debugging. This register sets the TR# signal timeout time for G2 devices.
  6856. G2 TR TIMEOUT (default - 0x3FF)
  6857. When there is no response from the TR# signal for a certain period of time, a timeout error interrupt is generated.
  6858. 0x000: Shortest wait time (after 0 clocks)
  6859. :
  6860. 0xFFF: Longest wait time (after 4095 clocks)
  6861. The respective G2-DMA timeout error interrupts for AICA, External 1/2, and Dev tool are the same as in the case of the SB_G2DSTO register. Refer to bits 26 through 23 in the SB_ISTERR register.
  6862. Notes:
  6863. * The setting in this register affects all G2 timeout error interrupts (bits 27 through 23 in the SB_ISTERR register).
  6864. * If either the DS# signal or the TR# signal times out, it is then necessary to check that the target device is actually connected on the G2 bus, and that the device has not failed.
  6865.  
  6866.  
  6867. SB_G2MDMTO Address?0x005F 7898
  6868. bit 31-8 7-0 Reserved G2 Modem Timeout
  6869. This register sets wait insertion for asynchronous cycles (modem).
  6870.  
  6871. Setting Meaning 0x00 External wait input disabled (default) 0x01 Setting prohibited ? : 0xFE Setting prohibited 0xFF External wait input disabled
  6872. Notes:
  6873. * Setting a value from 0x01 to 0xFE in bits 7 through 0 is prohibited.
  6874. * If a modem will not be used, setting 0x00 in bits 7 through 0 is recommended; if a modem will be used, setting 0xFF in bits 7 through 0 is recommended.
  6875. * If the wait lasts 10.2?s or more, the operation times out and access is terminated. For details on timeout errors, refer to bit 27 of the SB_ITSERR register.
  6876.  
  6877.  
  6878.  
  6879. SB_G2MDMW Address?0x005F 789C
  6880. bit 31-8 7-0 Reserved G2 Modem Wait
  6881. This register sets the wait time for asynchronous cycles (modem).
  6882.  
  6883. Setting Meaning 0x00 80 nsec (default) 0x01 120 nsec 0x02 160 nsec ��� Each increase of 0x01 in the setting extends the wait time by 40ns.
  6884. Notes:
  6885. * Setting a value that results in a wait longer than 1?sec (0x17) is prohibited.
  6886. * In the case of a device that requires an access time in excess of 1?s, initiate the access after the write FIFO has become empty. In this case, confirm that bit 4 of the SB_FFST (0x005F688C) register is "0". If an access is made without confirming this setting, an unnecessary wait will be generated for the SH4.
  6887. * In interrupt processing, when the G2 bus is accessed, the first process must be to confirm that the write FIFO is empty. (As in the previous item, check bit 4 of the SB_FFST register.)
  6888. * This register requires that the modem wait insertion setting be made in the SB_G2MDMTO register.
  6889.  
  6890. (The G2-DMA Secret Registers is described below.)
  6891.  
  6892. SB_G2APRO (Write Only) Address?0x005F 78BC
  6893. bit 31-16 15 14-8 7 6-0 Security code 0x4659 R Top address R Bottom address
  6894. This register specifies the address range for G2-DMA involving the system memory.
  6895. This setting is common to channels 0 through 3.
  6896.  
  6897. Security code 0x4659
  6898. When updating bits 14 through 8 and bits 6 through 0, it is necessary to add "0x4659." (default = 0x0000) If this value is not added, bits 14 through 8 and bits 6 through 0 will not be updated.
  6899.  
  6900. Top address
  6901. This field specifies the starting address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x7F)
  6902.  
  6903. Bottom address
  6904. This field specifies the ending address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x00)
  6905.  
  6906. Notes:
  6907. * If a DMA transfer is generated outside of this range, an overrun error results and the G2-DMA overrun error interrupt is generated. (Refer to bits 22 through 19 of the SB_ISTERR register.)
  6908.  
  6909.  
  6910. (The G2-DMA Debug Registers are described below.)
  6911.  
  6912. The following registers are special registers that are used for debugging purposes.
  6913.  
  6914. SB_ADSTAGD (Read Only) Address?0x005F 78C0
  6915. SB_E1STAGD (Read Only) Address?0x005F 78D0
  6916. SB_E2STAGD (Read Only) Address?0x005F 78E0
  6917. SB_DDSTAGD (Read Only) Address?0x005F 78F0
  6918. bit 31-29 28-5 4-0 Reserved G2-DMA address Counter Reserved
  6919. This register can be used to check the current G2 device address in a G2-DMA transfer. For details concerning areas, refer to the SB_ADSTAG, SB_E1STAG, SB_E2STAG, and SB_DDSTAG registers.
  6920. Note:
  6921. * This register is not initialized after a power-on reset or a software reset.
  6922.  
  6923. SB_ADSTARD (Read Only) Address?0x005F 78C4
  6924. SB_E1STARD (Read Only) Address?0x005F 78D4
  6925. SB_E2STARD (Read Only) Address?0x005F 78E4
  6926. SB_DDSTARD (Read Only) Address?0x005F 78F4
  6927. bit 31-29 28-5 4-0 Reserved G2-DMA System Mem. or Texture Mem. address Counter Reserved
  6928. This register can be used to check the current system memory or texture memory address in a G2-DMA transfer. For details concerning areas, refer to the SB_ADSTAG, SB_E1STAG, SB_E2STAG, and SB_DDSTAG registers.
  6929.  
  6930. Note:
  6931. * This register is not initialized after a power-on reset or a software reset.
  6932.  
  6933. SB_ADLEND (Read Only) Address?0x005F 78C8
  6934. SB_E1LEND (Read Only) Address?0x005F 78D8
  6935. SB_E2LEND (Read Only) Address?0x005F 78E8
  6936. SB_DDLEND (Read Only) Address?0x005F 78F8
  6937. bit 31-25 24-5 4-0 Reserved G2-DMA length remain Counter Reserved
  6938. This register is used to check the current amount of data remaining in a G2-DMA transfer. Note that this value returns to its original setting immediately after DMA terminates.
  6939.  
  6940. Length remainder
  6941. 0x00000020 : 32 Byte
  6942. 0x00000040 : 64 Byte
  6943. :
  6944. 0x01FFFFE0 : 32M Byte minus 32 Byte
  6945. 0x00000000 : 32M Byte
  6946. Note:
  6947. * This register is not initialized after a power-on reset or a software reset.
  6948. �8.4.1.5
  6949. PowerVR Interface
  6950. (The PVR-DMA Control Registers are described below.)
  6951.  
  6952. SB_PDSTAP Address?0x005F 7C00
  6953. bit 31-29 27-5 4-0 000 PVR-DMA start address on PVR Reserved
  6954. This register specifies the starting address on the PVR side for ch0-DMA involving PVR. Data transfers between the system memory and the following PVR areas are possible using ch0-DMA.
  6955.  
  6956. 0x005F8000~0x005F9FE0 :8KByte : PowerVR registers
  6957. 0x025F8000~0x025F9FE0 :8KByte : PowerVR registers (Image area)
  6958. 0x04000000~0x047FFFE0 :8MByte : PowerVR Tex.Mem. 64bit access area
  6959. 0x05000000~0x057FFFE0 :8MByte : PowerVR Tex.Mem. 32bit access area
  6960. 0x06000000~0x067FFFE0 :8MByte : PowerVR Tex.Mem. 64bit access area (Image area)
  6961. 0x07000000~0x077FFFE0 :8MByte : PowerVR Tex.Mem. 32bit access area (Image area)
  6962.  
  6963. Note:
  6964. * This register is not initialized after a power-on reset or a software reset.
  6965. * The start address must be specified in 32-byte units.
  6966. If the specified value is outside of the specifiable area, the "PVR i/f: Illegal Address set" error interrupt is generated, and the DMA transfer is not performed. (Refer to bit 6 of the SB_ISTERR register.)
  6967. * The hardware does not change the data in this register.
  6968. * Even while a DMA operation is in progress, the next address can be set without affecting the current DMA operation.
  6969.  
  6970.  
  6971. SB_PDSTAR Address?0x005F 7C04
  6972. bit 31-28 27-5 4-0 000 PVR-DMA start address on System Memory Reserved
  6973. This register specifies the starting address on the system memory side for ch0-DMA involving PVR.
  6974.  
  6975. Note:
  6976. * This register is not initialized after a power-on reset or a software reset.
  6977. * The start address must be specified in 32-byte units.
  6978. If the specified value is outside of the specifiable area, the "PVR i/f: Illegal Address set" error interrupt is generated, and the DMA transfer is not performed. (Refer to bit 6 of the SB_ISTERR register.)
  6979. * The hardware does not change the data in this register.
  6980. * Even while a DMA operation is in progress, the next address can be set without affecting the current DMA operation.
  6981.  
  6982.  
  6983. SB_PDLEN Address?0x005F 7C08
  6984. bit 31-24 23-5 4-0 Reserved PVR-DMA Length Reserved This register specifies the leugth of ch0 DMA between PVR and system memory in 32-byte units.
  6985. Setting?32bit? Length 0x00000020 32 byte 0x00000040 64 byte ��� ��� 0x00FFFE0 16M byte?32 byte 0x00000000 16M byte
  6986. Notes:
  6987. * This register is not initialized after a power-on reset or a software reset.
  6988. * The length must be specified in 32-byte units.
  6989. * If the PVR-DMA length is too large and the transfer exceeds the work area in system memory that was specified by the SB_PDAPRO register, an error results, the "PVR i/f: DMA overrun" error interrupt is generated, and the DMA transfer is not performed. (Refer to bit 7 of the SB_ISTERR register.)
  6990. * The hardware does not change the data in this register.
  6991. * Even while a DMA operation is in progress, the next address can be set without affecting the current DMA operation.
  6992.  
  6993. SB_PDDIR Address?0x005F 7C0C
  6994. bit 31-1 0 Reserved PVR-DMA
  6995. direction This register specifies the direction of a PVR-DMA (ch0-DMA) transfer to the area set in the SB_PDSTAP register.
  6996.  
  6997. Setting Meaning 0 From system memory to PVR area (default) 1 From PVR area to system memory
  6998.  
  6999. SB_PDTSEL Address?0x005F 7C10
  7000. bit 31-1 0 Reserved PVR-DMA
  7001. trigger selection This register selects the PVR-DMA trigger.
  7002.  
  7003. Setting Meaning 0 Software trigger (default)
  7004. The SH4 triggers PVR-DMA manually. PVR-DMA can be triggered by writing to the SB_PDST register. 1 Hardware trigger... PVR-DMA is automatically initiated by the interrupts set in the SB_PDTNRM and SB_PDTEXT registers. If the interrupts set in both registers are both generated, initiation is triggered by the interrupt that was generated first.
  7005. Note:
  7006. * The hardware does not change the data in this register.
  7007. * Even while a DMA operation is in progress, the next address can be set without affecting the current DMA operation.
  7008.  
  7009. SB_PDEN Address?0x005F 7C14
  7010. bit 31-1 0 Reserved PVR-DMA
  7011. enable
  7012. This register enables PVR-DMA. Initiation sources are not accepted until a "1" is written to this bit.
  7013. PVR-DMA is forcibly terminated by writing a "0" to this register while PVR-DMA is in progress.
  7014.  
  7015. When writing When reading Setting Meaning Setting Meaning 0 Abort PVR-DMA (default) 0 Disable (default) 1 Enable 1 Enable
  7016. Note:
  7017. * When "software trigger" is selected, DMA is triggered by writing a "1" to the SB_PDST register.
  7018. When "hardware trigger" is selected, DMA is triggered by the interrupts that are set in the SB_PDTNRM and SB_PDTEXT registers.
  7019. * The hardware does not change the data in this register.
  7020.  
  7021.  
  7022. SB_PDST Address?0x005F 7C18
  7023. bit 31-1 0 Reserved PVR-DMA
  7024. start/status
  7025. This register requests the start of PVR-DMA. The status of the DMA transfer can be checked by reading this register.
  7026. DMA is initiated by setting the SB_PDEN register to "Enable" (1) and then writing a "1" to this bit. If the SB_PDEN register is set to "Disable," then writing a "1" to this bit has no effect.
  7027.  
  7028. When writing When reading Setting Meaning Setting Meaning 0 ignored (default) 0 PVR-DMA not in progress. (default) 1 Start DMA 1 PVR-DMA in progress.
  7029.  
  7030.  
  7031. (The PVR-DMA Secret Registers are described below.)
  7032.  
  7033. SB_PDAPRO (Write Only) Address?0x005F 7C80
  7034. bit 31-16 15 14-8 7 6-0 security code 0x6702 R Top address R Bottom address
  7035. This register specifies the address range for PVR-DMA involving system memory.
  7036.  
  7037. Security code 0x6702
  7038. When updating bits 14 through 8 and bits 6 through 0, it is necessary to add "0x6702." If this value is not added, bits 14 through 8 and bits 6 through 0 will not be updated. (default = 0x0000)
  7039.  
  7040. Top address
  7041. This field specifies the starting address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0x7F)
  7042.  
  7043. Bottom address
  7044. This field specifies the ending address of the address range in system memory. (This field corresponds to A26 to A20; A28 and A27 are treated as "0x01".) Specify the address in units of 1MB. (default = 0)
  7045.  
  7046. Note:
  7047. * PVR-DMA involving system memory will be performed only within the above address range.
  7048. If a DMA transfer is generated outside of this range, an overrun error results and the PVR-DMA overrun error interrupt is generated. (Refer to bit 7 of the SB_ISTERR register.)
  7049.  
  7050.  
  7051. DDT I/F block control registers (SYSTEM Registers)
  7052.  
  7053. ????????????????
  7054. BAVLWC R / W ADDRESS 0x005F6844 group : CLX1 / SB / SYSTEM Registers / DDT I/F block control register
  7055. BAVL# wait count value
  7056. ch0 DDT??????????
  7057. bit 4-0 BAVL# wait count value (default - 0x00)
  7058. Count value
  7059. 0x01 : 1clock ...ch0 DDT????????????
  7060. 0x02 : 2clock
  7061. :
  7062. 0x1F : 31clock
  7063. 0x00 : 32clock ...ch0 DDT??????????? <-- default
  7064. Note
  7065. ???????????????????????????????
  7066. ???????????DDT??????????????SH4???????????????????????????
  7067. Hardware issue
  7068. SI_bavlcnt[4:0]
  7069. Root Bus(DDT I/F)?????DMA???Ch0 DDT???????????BAVL# Wait Count????????????????SH4???BAVL#???????????DBREQ#??????
  7070.  
  7071. ????????????????
  7072. C2DPRYC R / W ADDRESS 0x005F6848 group : CLX1 / SB / SYSTEM Registers / DDT I/F block control register
  7073. DMA(TA/RootBus) priority count value
  7074. Root Bus(DDT I/F)???????????ch2 DMA??????DMA???Tile Accelerator?????????????????????
  7075. bit 3-0 DMA(TA/RootBus) priority count value (default - 0)
  7076. Count value
  7077. 0x1 : once /17 ...ch2 DMA??????DMA???????????
  7078. 0x2 : twice/17
  7079. :
  7080. 0xF : 15 times/17
  7081. 0x0 : 16 times /17 ...ch2 DMA???????????? <-- default
  7082. Note
  7083. ???????????????????????????????
  7084. ???????????RootBus???DDT?????????(???DMA???)?????SH4???????????????????????????
  7085. Hardware issue
  7086. SI_dmacnt[3:0]
  7087.  
  7088. ????????????????
  7089. C2DMAXL R / W ADDRESS 0x005F684C group : CLX1 / SB / SYSTEM Registers / DDT I/F block control register
  7090. ch2-DMA maximum burst length
  7091. ch2 DMA??????????????
  7092. bit 2-0 ch2-DMA maximum burst length (default - 0x1)
  7093. Length
  7094. 1 : 128 Byte ...CPU???????????? <-- default
  7095. 2 : 256 Byte
  7096. :
  7097. 7 : 896 Byte
  7098. 0 : 1024 Byte ...CPU???????????
  7099. Note
  7100. ch2 DMA???????????????????????
  7101. Tile Accelerator FIFO(TA FIFO)????????????????????????ch2 DMA??????
  7102. ????1024Byte??????????ch2 DMA?????Texture Memory???????????????Length=1??????????128Byte??????????
  7103. TA FIFO?????????DMA???????????????(DMA???????)
  7104. ???????????????????????????????
  7105. ???????????CPU??????????????
  7106. Hardware issue
  7107. SI_d_blen_max[2:0]
  7108.  
  7109. ??????????????
  7110. SDDIV (only for h/w test) R / - ADDRESS 0x005F6860 group : CLX1 / SB / SYSTEM Registers / DDT I/F block control register
  7111. Sort-DMA division number for debugging
  7112. ???DMA????????????Start Link Address Table?Start Link Address????????????
  7113. bit 13-0 Sort-DMA division number for debugging (default - 0xXXXX)
  7114.  
  7115.  
  7116. RootBus control registers (SYSTEM Registers)
  7117. The following RB registers are only for hardware test registers.
  7118.  
  7119. ??????????????
  7120. RFERRC (only for h/w test) R / W ADDRESS 0x005F68A0 group : CLX1 / SB / SYSTEM Registers / RootBus control register (secret register, for chip debugging)
  7121. SH4 refresh error count
  7122. SH4??????????
  7123. SH4?????????????????????????????????????????????????
  7124. bit 31 timeout reset (default - 0)
  7125. ????????????????????????????
  7126. �0� : disabled
  7127. �1� : enabled
  7128. bit 10-8 timeout counter value (default - 0x0)
  7129. ?????????????????
  7130. 0 : timeout counter stops ?????????????????????????????
  7131. 1 : 100MHz?0x1FF clock
  7132. 2 : 100MHz?0x2FF clock
  7133. :
  7134. 7 : 100MHz?0x7FF clock
  7135.  
  7136. ??????????????
  7137. RBERRC (only for h/w test) R / W ADDRESS 0x005F68A4 group : CLX1 / SB / SYSTEM Registers / RootBus control register (secret register, for chip debugging)
  7138. bit 31 timeout reset enable (default - 0)
  7139. �0� : disabled
  7140. �1� : enabled
  7141. bit 19-16 timeout counter value (default - 0x0)
  7142. Root Bus????????????????????????????????????????????????
  7143. 0 : timeout counter stops?????????????????????????????
  7144. 1 : 50MHz?0x1FFFF clock (about 2.6msec)
  7145. 2 : 50MHz?0x2FFFF clock (about 4msec)
  7146. :
  7147. 7 : 50MHz?0x7FFFF clock (about 10msec)
  7148.  
  7149. ??????????????
  7150. RBADRS (only for h/w test) R / - ADDRESS 0x005F68A8 group : CLX1 / SB / SYSTEM Registers / RootBus control register (secret register, for chip debugging)
  7151. bit 31-29 Master Device Code
  7152. bit 28-1 Valid address
  7153. bit 0 DMA End Code
  7154.  
  7155. ??????????????
  7156. TATEST (only for h/w test) - / W ADDRESS 0x005F68B0 group : CLX1 / SB / SYSTEM Registers / RootBus control register (secret register, for chip debugging)
  7157. bit 12-0 TA test (default - ??????????)
  7158.  
  7159. ??????????????
  7160. RBTEST (only for h/w test) - / W ADDRESS 0x005F68B4 group : CLX1 / SB / SYSTEM Registers / RootBus control register (secret register, for chip debugging)
  7161. bit 0 PowerVR CORE arbiter block test (default - ???)
  7162.  
  7163. CD-DMA counter registers : direct read area (G1 I/F)
  7164. They are secret registers.
  7165.  
  7166. CDSTARD (only for s/w & h/w test) R / - ADDRESS 0x005F74F4 group : CLX1 / SB / G1IF / CD-DMA counter register
  7167. CD-DMA address counter value
  7168. ???CD-DMA?????????CD-DMA??????????????????????????????
  7169. bit 31-29 �000�
  7170. bit 28-5 CD-DMA address counter value (default - 0xXXXXXXXX)
  7171. 0x00800000~0x009FFFE0 : 2MByte : G2 AICA Memory
  7172. 0x01000000~0x01FFFFE0 : 16MByte : G2 External Devices #1
  7173. 0x02800000~0x02FFFFE0 : 8MByte : G2 AICA Memory (Image area)
  7174. 0x03000000~0x03FFFFE0 : 16MByte : G2 External Devices #2
  7175. 0x04000000~0x047FFFE0 : 8MByte : PowerVR Texture Mem. 64bit access area
  7176. 0x05000000~0x057FFFE0 : 8MByte : PowerVR Texture Mem. 32bit access area
  7177. 0x06000000~0x067FFFE0 : 8MByte : PowerVR Texture Mem. 64bit access area (Image area)
  7178. 0x07000000~0x077FFFE0 : 8MByte : PowerVR Texture Mem. 32bit access area (Image area)
  7179. 0x08000000~0x0BFFFFE0 : 64MByte : Work RAM(Slow speed area)
  7180. 0x0C000000~0x0CFFFFE0 : 16MByte : Work RAM
  7181. 0x0D000000~0x0DFFFFE0 : 16MByte : Work RAM(Not supported)
  7182. 0x0E000000~0x0EFFFFE0 : 16MByte : Work RAM (Image area)
  7183. 0x0F000000~0x0FFFFFE0 : 16MByte : Work RAM(Not supported)
  7184. 0x14000000~0x17FFFFE0 : 64MByte : G2 External Devices #3
  7185. Note
  7186. CDSTAR??????????????????????CD-DMA????DMA???????????????CDSTAR????????????
  7187.  
  7188. CDLEND (only for s/w & h/w test) R / - ADDRESS 0x005F74F8 group : CLX1 / SB / G1IF / CD-DMA counter register
  7189. CD-DMA Remainder
  7190. CD-DMA?????????????????UP????????
  7191. bit 24-5 CD-DMA Remainder(Byte) (default - 0xXXXXXXXX)
  7192. Remainder
  7193. 0x00000020 : 32 Byte
  7194. 0x00000040 : 64 Byte
  7195. :
  7196. 0x01FFFFE0 : 32M Byte minus 32 Byte
  7197. 0x00000000 : 32M Byte
  7198.  
  7199.  
  7200.  
  7201. ??????????????
  7202. G2ST (only for h/w test) R / W ADDRESS 0x005F7888 group : CLX1 / SB / G2IF / G2 IF block control register
  7203. bit 31-0 G2 I/F STATUS (default - 0xXXXXXXXX)
  7204. ????
  7205.  
  7206. ??????????????
  7207. G2MD (only for h/w test) R / W ADDRESS 0x005F788C group : CLX1 / SB / G2IF / G2 IF block control register
  7208. G2 I/F MODE (TEST USE ONLY)
  7209. bit 31-28 G2 BUS TEST (CHIP TESTER only) (default - 0x0)
  7210. test function
  7211. 0 : normal 4 : load ds 8 : shift ds c : dec ds
  7212. 1 : thru 5 : load tr 9 : shift tr d : dec tr
  7213. 2 : thru 6 : load a-sync a : shift a-sync e : dec a-sync
  7214. 3 : thru 7 : load wait b : shift wait f : dec wait
  7215. bit 27-14 �X�
  7216. bit 13 modem G2_st_n signal (default - �0�)
  7217. �0� : disable
  7218. �1� : enable
  7219. bit 14 modem wait sampling
  7220. �0� : 2 clock sampling
  7221. �1� : 1 clock sampling
  7222. bit 11 DMA G2_rqdev_n signal
  7223. bit 10 DMA G2_rqex1_n signal
  7224. bit 9 DMA G2_rqex0_n signal
  7225. bit 8 DMA G2_rqaic_n signal
  7226. �0� : not request
  7227. �1� : request
  7228. bit 7 INT G2_irext_n signal
  7229. bit 6 INT G2_irmdm_n signal
  7230. bit 5 INT G2_iraic_n signal
  7231. �0� : not request
  7232. �1� : request
  7233. bit 4 sync cycle G2_st_n signal disable
  7234. �0� : enable
  7235. �1� : disable
  7236. bit 3 INT G2_irxxx_n signal disable
  7237. �0� : enable
  7238. �1� : disable input signal and enable function bit[7:5]
  7239. bit 2 DMA G2_rqxxx_n signal disable
  7240. �0� : enable
  7241. �1� : disable input signal and enable function bit[11:8]
  7242. bit 1-0 �X�
  7243.  
  7244. ????????????????
  7245. G2DSTO Only for h/w & s/w debug R / W ADDRESS 0x005F7890 group : CLX1 / SB / G2IF / G2 I/ block control register
  7246. G2 DS# Signal Time Out
  7247. G2?????AICA, External, DevTools?????DS#??????????????
  7248. bit 7-0 G2 DS TIMEOUT (default - 0xFF)
  7249. 0x00 : ??????
  7250. 0xFF : ??????
  7251. DS#????????????????????????????????????
  7252. G2 : DMA(AICA) Time out
  7253. G2 : DMA(EX0) Time out
  7254. G2 : DMA(EX1) Time out
  7255. G2 : DMA(Dev tool) Time out Error
  7256. ???????????????G2TSTO??????????????
  7257. ISTERR?????bit26-23????????
  7258. Note
  7259. ?????????????ITSERR?????bit27-23?G2??????????????????????????
  7260. DS#???TS#????????????????G2???????????????????????????????????????????
  7261.  
  7262. ????????????????
  7263. G2TRTO Only for h/w & s/w debug R / W ADDRESS 0x005F7894 group : CLX1 / SB / G2IF / G2 IF block control register
  7264. G2 TR# Signal Time Out
  7265. G2?????AICA, External, DevTools?????TR#??????????????
  7266. bit 7-0 G2 TS TIMEOUT (default - 0xFF)
  7267. 0x00 : ??????
  7268. 0xFF : ??????
  7269. TR#????????????????????????????????????
  7270. G2 : DMA(AICA) Time out
  7271. G2 : DMA(EX0) Time out
  7272. G2 : DMA(EX1) Time out
  7273. G2 : DMA(Dev tool) Time out Error
  7274. ???????????????G2DSTO??????????????
  7275. ISTERR?????bit26-23????????
  7276. Note
  7277. ?????????????ITSERR?????bit27-23?G2??????????????????????????
  7278. DS#???TS#????????????????G2???????????????????????????????????????????
  7279.  
  7280.  
  7281. AICA-DMA counter registers : direct read area (G2 I/F)
  7282. They are secret registers.
  7283.  
  7284. ADSTAGD
  7285. E1STAGD
  7286. E2STAGD
  7287. DDSTAGD R / -
  7288. R / -
  7289. R / -
  7290. R / - ADDRESS 0x005F78C0
  7291. 0x005F78D0
  7292. 0x005F78E0
  7293. 0x005F78F0 group : CLX1 / SB / G2IF / G2-DMA counter register
  7294. G2-DMA address counter
  7295. ???G2-DMA?G2??????????????????
  7296. bit 28-5 G2-DMA address counter (default - 0xXXXXXXXX)
  7297. ?????????ADSTAG , E1STAG , E2STAG , DDSTAG????????????
  7298.  
  7299. ADSTARD
  7300. E1STARD
  7301. E2STARD
  7302. DDSTARD R / -
  7303. R / -
  7304. R / -
  7305. R / - ADDRESS 0x005F78C4
  7306. 0x005F78D4
  7307. 0x005F78E4
  7308. 0x005F78F4 group : CLX1 / SB / G2IF / G2-DMA counter register
  7309. G2-DMA Work RAM or Texture Mem. address counter
  7310. ???G2-DMA??Work RAM???Texture Mem.??????????????
  7311. bit 28-5 G2-DMA address counter (default - 0xXXXXXXXX)
  7312. ?????????ADSTAR , E1STAR , E2STAR , DDSTAR????????????
  7313.  
  7314. ADLEND
  7315. E1LEND
  7316. E2LEND
  7317. DDLEND R / -
  7318. R / -
  7319. R / -
  7320. R / - ADDRESS 0x005F78C8
  7321. 0x005F78D8
  7322. 0x005F78E8
  7323. 0x005F78F8 group : CLX1 / SB / G2IF / G2-DMA counter register
  7324. G2-DMA Length remain counter
  7325. ???G2-DMA??????????????DMA????????????????????????
  7326. bit 24-5 G2-DMA Length remain counter (default - 0xXXXXXXXX)
  7327. Length remainder
  7328. 0x00000020 : 32 Byte
  7329. 0x00000040 : 64 Byte
  7330. :
  7331. 0x01FFFFE0 : 32M Byte minus 32 Byte
  7332. 0x00000000 : 32M Byte
  7333.  
  7334.  
  7335. PVR-DMA counter registers : direct read area
  7336. They are secret registers.
  7337.  
  7338. PDSTAPD R / - ADDRESS 0x005F7CF0 group : CLX1 / SB / PVR IF / PVR-DMA counter register
  7339. PVR-DMA address counter
  7340. ???PVR-DMA?PVR????????????????
  7341. bit 27-5 PVR-DMA address counter (default - 0xXXXXXXXX)
  7342. ????????????PDSTAP????????????
  7343.  
  7344. PDSTARD R / - ADDRESS 0x005F7CF4 group : CLX1 / SB / PVR IF / PVR-DMA counter register
  7345. PVR-DMA Work RAM address counter
  7346. ???PVR-DMA??Work RAM??????????????
  7347. bit 27-5 PVR-DMA Work RAM address counter (default - 0xXXXXXXXX)
  7348. ????????????PDSTAR????????????
  7349.  
  7350. PDLEND R / - ADDRESS 0x005F7CF8 group : CLX1 / SB / PVR IF / PVR-DMA counter register
  7351. PVR-DMA Length remain counter
  7352. ???PVR-DMA?????????????????????????0???????
  7353. bit 23-5 PVR-DMA Length remain counter (default - 0xXXXXXXXX)
  7354. Length remainder
  7355. 0x00000020 : 32 Byte
  7356. 0x00000040 : 64 Byte
  7357. :
  7358. 0x00FFFFE0 : 16M Byte minus 32 Byte
  7359. 0x00000000 : 16M Byte
  7360.  
  7361. ??????????????
  7362. PTEST (only for h/w test) - / W ADDRESS 0x005F7CFC group : CLX1 / SB / PVR IF / PVR-DMA counter register
  7363. PVR test register
  7364. IC?????????????????
  7365. bit 31-0 PVR test register
  7366. �0� : Normal mode
  7367. �1� : Test mode (TESTN???�Low�???????)
  7368.  
  7369. Reserved address of System Bus
  7370. ????????????????????
  7371. ???????????????????????????????????????
  7372. 005F680C 005F6824 005F6828 005F682C 005F6850 005F6854 005F 6858 005F 685C
  7373. 005F6860 005F 6864 005F6868 005F686C 005F6894 005F6898 005F 689C 005F68A0
  7374. 005F68A4 005F68A8 005F68AC 005F68B0 005F68B4 005F68B8 005F68BC 005F690C
  7375. 005F691C 005F692C 005F693C 005F6948 005F 694C 005F6958 005F695C 005F 6C00
  7376. 005F6C08 005F6C0C 005F6C1C 005F6CE8 005F6CEC 005F6CF0 005F7400 005F7410 005F741C 005F7498 005F749C 005F 74A8 005F74AC 005F74BC
  7377. 005F74F0 005F74FC 005F781C 005F783C 005F785C 005F 787C 005F7884 005F 78AC
  7378. 005F78B0 005F78B4 005F78B8 005F78CC 005F78DC 005F78EC 005F78FC 005F7C1C
  7379. 005F7C84 005F7C88 005F7C8C
  7380.  
  7381. �8.4.2
  7382. CORE Registers
  7383.  
  7384. ID (Read Only) Address?0x005F 8000
  7385. bit 31-16 15-0 Device ID (0x17FD) Vender ID (0x11DB)
  7386. This register returns the device ID and the vendor ID.
  7387.  
  7388.  
  7389. REVISION (Read Only) Address?0x005F 8004
  7390. bit 31-16 15-0 Reserved Chip Revision
  7391. This register indicates the chip revision number. (0x01 in the case of an ES.) For details on the CORE revision, refer to section 1.4.
  7392.  
  7393.  
  7394. SOFT RESET Address?0x005F 8008
  7395. bit 31-3 2 1 0 Reserved sdram I/F
  7396. soft reset Pipeline
  7397. soft reset TA
  7398. soft reset
  7399. This register specifies a soft reset. After power is supplied to the system, the system enters this reset state.
  7400.  
  7401. Setting Meaning 0 Not reset 1 Reset (default)
  7402. sdram interface soft reset
  7403. This field resets the texture memory interface.
  7404.  
  7405. Pipeline soft reset
  7406. This field resets the CORE pipeline.
  7407.  
  7408. TA soft reset
  7409. This field resets the Tile Accelerator.
  7410.  
  7411.  
  7412. STARTRENDER Address?0x005F 8014
  7413. bit 31-0 Start Render
  7414. Writing to this register initiates rendering. If rendering is to be started again before the rendering end interrupt (End of TSP) is output, a CORE reset must be executed through the SOFTRESET register. The CORE reset time in this case is at least 32 clocks.
  7415.  
  7416.  
  7417. TEST_SELECT Address?0x005F 8018
  7418. bit 31-9 9-5 4-0 Reserved diagdb_data diagda_data
  7419. This is a test register. Writing to this register is prohibited.
  7420.  
  7421.  
  7422. PARAM_BASE Address?0x005F 8020
  7423. bit 31-24 23-20 19-0 Reserved Base Address 0000 0000 0000 0000 000
  7424. This register specifies, in 1MB units, the base address for the ISP/TSP Parameters that the CORE loads in for drawing (default = 0x0). The absolute address of the ISP/TSp parameter that is read is the sum of the object start address in the Object List data and this base address.
  7425.  
  7426.  
  7427. REGION_BASE Address?0x005F 802C
  7428. bit 31-24 23-2 1-0 Reserved Base Address 00
  7429. This register specifies, in 32-bit units, the base address for the Region Array that the CORE loads in for drawing. (default = 0x000000)
  7430.  
  7431.  
  7432. SPAN_SORT_CFG Address?0x005F 8030
  7433. bit 31-17 16 15-9 8 7-1 0 Reserved Cache
  7434. Bypass Reserved Offset Sort
  7435. enable Reserved Span Sort
  7436. enable
  7437. Cache Bypass
  7438. This field specifies whether or not to use the TSP cache bypass function.
  7439.  
  7440. Setting Meaning 0 Use cache (default) 1 Bypass Cache
  7441. Offset Sort enable
  7442. Span Sort enable
  7443. This field specifies whether or not to use the Span Sort function.
  7444.  
  7445. Offset Span Meaning 0 0 Do not use the Span Sort function. (default) 0 1 Group those items that have the same offset value. 1 0 Setting prohibited. 1 1 First group by tag values, and then group by offset values. This setting is normally recommended. Span sort minimizes TS preprocessing, and offset sort optimizes TSP parameter fetching and reduces the bus bandwidth.
  7446.  
  7447. VO_BORDER_COL Address?0x005F 8040
  7448. bit 31-25 24 23-16 15-8 7-0 Reserved Chroma Red Green Blue
  7449. This register specifies the color that is displayed in the border area. (default = 0x000 0000)
  7450.  
  7451.  
  7452. FB_R_CTRL Address?005F 8044h
  7453. bit 31-24 23 22 21-16 15-8 7 6-4 3-2 1 0 Reserved vclk_
  7454. div fb_
  7455. strip_
  7456. buf_en fb_
  7457. stripsize fb_
  7458. chroma_
  7459. threshold R fb_
  7460. concat fb_
  7461. depth fb_
  7462. line_
  7463. double fb_
  7464. enable
  7465. This register makes settings for frame buffer reads.
  7466.  
  7467. vclk_div
  7468. This field specifies the clock that is output on the PCLK pin.
  7469. Setting Meaning Supplement 0 PCLK = VLCK/2 (default) For NTSC/PAL 1 PCLK = VLCK For VGA
  7470. fb_strip_buf_en
  7471. Set this bit to "1" when using a strip buffer. (default = 0)
  7472. fb_stripsize
  7473. This field specifies the size of the strip buffer in units of 32 lines (default = 0x00). "0" must be specified for the LSB (bit 16). For example, specify 0x02 for 32 lines, and 0x04 for 64 lines. Furthermore, the strip buffer size must yield an even number when the number of lines on the display screen is divided by the strip buffer size.
  7474. fb_chroma_threshold
  7475. When the frame buffer data format is ARGB8888, this field sets the comparison value that is used in order to determine the CHROMA pin output value. (default = 0x00)
  7476. When pixel alpha < fb_chroma_threshold, a "0" is output on the CHROMA pin.
  7477. fb_concat
  7478. This field specifies the value that is added to the lower end of 5-bit or 6-bit frame buffer color data in order to output 8 bits. (default = 0x0)
  7479. fb_depth
  7480. This field specifies the bit configuration of the pixel data that is read from the frame buffer.
  7481. Setting Meaning Supplement 0x0 0555 RGB 16 bit (default) The lower 3 bits are the value in fb_concat. 0x1 565 RGB 16 bit The lower 3 bits of R and G are the value in fb_concat; the lower 2 bits in G are the value in fb_concat[1:0]. 0x2 888 RGB 24 bit packed 0x3 0888 RGB 32 bit
  7482. fb_line_double
  7483. This field specifies the read operation for each line of frame buffer data.
  7484. Setting Meaning 0 Reads each line once. (default) 1 Reads each line twice.
  7485. fb_enable
  7486. This field enables or disables frame buffer data reads.
  7487. Setting Meaning 0 disable (default) 1 enable
  7488. FB_W_CTRL Address?0x005F 8048
  7489. bit 31-24 23-16 15-8 7-4 3 2-0 Reserved fb_alpha_threshold fb_kval Reserved fb_
  7490. dither fb_
  7491. packmode
  7492. This register contains settings concerning frame buffer writes.
  7493.  
  7494. fb_alpha_threshold
  7495. This field sets the comparison value that is used to determine the alpha value when the data that is written to the frame buffer is ARGB1555 format data. (default = 0x00)
  7496. When pixel alpha ? fb_alpha_threshold, a "1" is written in the alpha value.
  7497.  
  7498. fb_kval
  7499. This field sets the K value for writing to the frame buffer. (default = 0x00)
  7500.  
  7501. fb_dither
  7502. This field specifies whether dithering is applied upon writing frame buffer data that consists of 16 bits /pixel.
  7503.  
  7504. Setting Meaning 0 Discard the lower bits. (default) 1 Perform dithering
  7505. fb_packmode
  7506. This field specifies the bit configuration of the pixel data that is written to the frame buffer.
  7507.  
  7508. Setting Meaning Supplement 0x0 0555 KRGB 16 bit (default) Bit 15 is the value of fb_kval[7]. 0x1 565 RGB 16 bit 0x2 4444 ARGB 16 bit 0x3 1555 ARGB 16 bit The alpha value is determined by comparison with the value of fb_alpha_threshold. 0x4 888 RGB 24 bit packed 0x5 0888 KRGB 32 bit K is the value of fk_kval. 0x6 8888 ARGB 32 bit 0x7 Reserved Setting prohibited.
  7509.  
  7510. FB_W_LINESTRIDE Address?0x005F 804C
  7511. bit 31-9 8-0 Reserved FB line stride
  7512. This register specifies the line width, in 64-bit units, when writing to the frame buffer. (default = 0x000)
  7513.  
  7514.  
  7515. FB_R_SOF1 Address?0x005F 8050
  7516. bit 31-24 23-2 1-0 Reserved Frame Buffer Read Address Frame 1 00
  7517. This register specifies the starting address, in 32-bit units, for reads from the field-1 frame buffer. (default = 0x000000) The setting becomes valid starting from the next field.
  7518.  
  7519.  
  7520. FB_R_SOF2 Address?0x005F 8054
  7521. bit 31-24 23-2 1-0 Reserved Frame Buffer Read Address Frame 1 00
  7522. If interlace mode is specified, this register specifies the starting address, in 32-bit units, for reads from the field-2 frame buffer. (default = 0x000000)
  7523.  
  7524.  
  7525. FB_R_SIZE Address?0x005F 805C
  7526. bit 31-30 29-20 19-10 9-0 Reserved FB modulus FB y size FB x size
  7527. This register specifies the frame buffer size when reading from the frame buffer.
  7528.  
  7529. FB modulus
  7530. This field specifies the amount of data between the last pixel on a line and the first pixel on the next line, in 32-bit units (default = 0x000). Set this value to 0x001 in order to link the last pixel data on a line with the first pixel data on a line.
  7531.  
  7532. FB y size
  7533. This field specifies the number of display lines - 1. (default = 0x000)
  7534.  
  7535. FB x size
  7536. This field specifies the number of display pixels on each line - 1, in 32-bit units. (default = 0x000)
  7537.  
  7538.  
  7539. FB_W_SOF1 Address?0x005F 8060
  7540. bit 31-25 24-2 1-0 Reserved Frame Buffer Write start of Frame Address field1/strip1 00
  7541. This register specifies, in 32-bit units, the starting address for writes to the field-1 or strip-1 frame buffer. (default = 0x000000)
  7542. In the texture map, 0x00000000 to 0x0FFFFFFC is a 32-bit access area and 0x10000000 to 0x1FFFFFFC is a 64-bit access area.
  7543.  
  7544.  
  7545. FB_W_SOF2 Address?0x005F 8064
  7546. bit 31-25 24-2 1-0 Reserved Frame Buffer Write start of Frame Address field2/strip2 00
  7547. This register specifies, in 32-bit units, the starting address for writes to the field-1 or strip-2 frame buffer. (default = 0x000000)
  7548. In the texture map, 0x00000000 to 0x0FFFFFFC is a 32-bit access area (frame/strip buffer) and 0x10000000 to 0x1FFFFFFC is a 64-bit access area.
  7549.  
  7550.  
  7551. FB_X_CLIP Address?0x005F 8068
  7552. bit 31-27 26-16 15-11 10-0 Reserved FB x clipping max Reserved FB x clipping min
  7553. This register specifies the clipping values for the X direction when writing to the frame buffer. When using a strip buffer, this register must be specified in accordance with the display screen size. For example, if the size of the display screen in the horizontal direction is 640 pixels, then specify Max. = 639 and Min. = 0.
  7554.  
  7555. FB x clipping max
  7556. Pixels with an X coordinate that is greater than the value specified in this field are not written to the frame buffer. (default = 0x000)
  7557.  
  7558. FB x clipping min
  7559. Pixels with an X coordinate that is smaller than the value specified in this field are not written to the frame buffer. (default = 0x000)
  7560.  
  7561.  
  7562. FB_Y_CLIP Address?0x005F 806C
  7563. bit 31-26 25-16 15-10 9-0 Reserved FB y clipping max Reserved FB y clipping min
  7564. This register specifies the clipping values for the Y direction when writing to the frame buffer.
  7565.  
  7566. FB y clipping max
  7567. Pixels with a Y coordinate that is greater than the value specified in this field are not written to the frame buffer. (default = 0x000)
  7568.  
  7569. FB y clipping min
  7570. Pixels with a Y coordinate that is smaller than the value specified in this field are not written to the frame buffer. (default = 0x000)
  7571.  
  7572.  
  7573. FPU_SHAD_SCALE Address?0x05F 8074
  7574. bit 31-9 8 7-0 Reserved Intensity Shadow
  7575. Enable Scale factor
  7576. for shadows
  7577. This register sets the inclusion/exclusion volume mode.
  7578.  
  7579. Simple Shadow Enable
  7580. This field specifies the volume mode.
  7581.  
  7582. Setting Meaning 0 Parameter Selection Volume Mode (default) 1 Intensity Volume Mode
  7583. Scale factor for shadows
  7584. When using Intensity Shadow Mode, this field specifies the intensity value that is multiplied with the Shading Color data (Base Color, Offset Color). (default = 0x00) The Base Color and Offset Color are both multiplied by the same value; that value is [Scale Factor]/256.
  7585.  
  7586.  
  7587.  
  7588. FPU_CULL_VAL Address?0x005F 8078
  7589. bit 31 30-0 Reserved IEEE floating point value for culling compare
  7590. This register specifies the comparison value for the culling operation. (default = 0x0000 0000)
  7591.  
  7592.  
  7593. FPU_PARAM_CFG Address?0x005F 807C
  7594. bit 31-22* 21 20 19-14 13-8 7-4 3-0 Reserved Region
  7595. Header
  7596. Type R TSP parameter
  7597. burst trigger
  7598. threshold ISP parameter
  7599. burst trigger
  7600. threshold pointer
  7601. burst size pointer first
  7602. burst size
  7603. This register makes settings for parameter reads.
  7604. * This depends on the HOLLY version; in HOLLY2, bit 21 is added; in HOLLY1, this bit is reserved (0x0).
  7605.  
  7606. Region Header Type
  7607. This bit specifies the Region Array data type.
  7608.  
  7609. Setting Meaning 0 5 ? 32bit/Tile?Type 1 (default)
  7610. The Translucent polygon sort mode is specified by the ISP_FEED_CFG register. 1 56 ? 32bit/Tile?Type 2
  7611. The Translucent polygon sort mode is specified by the pre-sort bit within the Region Array data.
  7612. TSP parameter burst trigger threshold
  7613. When the free space in the parameter FIFO is greater than or equal to this value, a parameter read request is generated. (default = 0x1F) Setting a large value increases the burst length, but also causes numerous page breaks and forces other data read requests to wait. Never set a value that is smaller than 0x4.
  7614.  
  7615. ISP parameter burst trigger threshold
  7616. This is similar to the above TSP parameter. (default = 0x1F) Never set a value that is smaller than 0x4.
  7617.  
  7618. pointer burst size
  7619. The pointer (Object List data) is requested to be read with a burst length of this value. (default = 0x7) Specify a value that is smaller than or equal to the Object Pointer Block size that was specified by the TA_ALLOC_CTRL register. Specifying a large value causes numerous page breaks.
  7620.  
  7621. pointer first burst size
  7622. Specify half the value that was set in Pointer Burst Size. (default = 0x7)
  7623.  
  7624.  
  7625. HALF_OFFSET Address?0x005F 8080
  7626. bit 31-3 2 1 0 Reserved TSP texel
  7627. sampling
  7628. position TSP pixel
  7629. sampling
  7630. position FPU pixel
  7631. sampling
  7632. position This register specifies the sampling position in the ISP and the TSP. Normally, set identically to TSP Texel Sampling Position and TSP Pixel Sampling Position.
  7633.  
  7634. TSP texel sampling position
  7635.  
  7636. Setting Meaning 0 (0,0) 1 (0.5,0.5) (default)
  7637. TSP pixel sampling position
  7638.  
  7639. Setting Meaning 0 (0,0) 1 (0.5,0.5) (default)
  7640. FPU pixel sampling position
  7641.  
  7642. Setting Meaning 0 (0,0) 1 (0.5,0.5) (default)
  7643.  
  7644. FPU_PERP_VAL Address?0x005F 8084
  7645. bit 31 30-0 Reserved IEEE floating point value for perpendicular triangle compare This register specifies the comparison value for perpendicular polygons. (default = 0x0000 0000)
  7646.  
  7647.  
  7648. ISP_BACKGND_D Address?0x005F 8088
  7649. bit 31-4 3-0 Background Plane depth parameter Reserved This register specifies the depth value for the background plane. (default = 0x0000 0000) Set an IEEE 32-bit floating point value with the lower four bits truncated.
  7650.  
  7651. ISP_BACKGND_T Address?0x005F 808C
  7652. bit 31-29 28 27 26-24 23-3 2-0 Reserved cache bypass shadow skip tag address tag offset This register specifies the tag parameters for the background plane. This register must set correctly before the start of drawing.
  7653. cache bypass
  7654. This field specifies whether or not to use the TSP parameter cache. When "0" is set (the default setting), the cache is used; when "1" is set, the cache is not used.
  7655. shadow
  7656. This field specifies whether or not to enable a Modifier Volume for the background plane.
  7657. Setting Meaning 0 Disable volume. (default) 1 Enable volume. skip
  7658. This field specifies the data size (* 32 bits) for one vertex in the ISP/TSP Parameters. Normally, the actual data size is "skip + 3," but if Parameter Selection Volume Mode is in effect and the above shadow bit is "1," then he actual data size is "Skip * 2 + 3." (default = 0x0)
  7659. ISP/TSP Instruction WordSetting skipSetting Texture Offset 16bit UV 0 Disabled Disabled 001 1 0 0 011 1 0 1 010 1 1 0 100 1 1 1 011 tag address
  7660. This field specifies, in 32-bit units, the starting address of the ISP/TSP Parameters for the background plane (default = 0x000000). The absolute address of the ISP/TSP Parameter that is read is the sum of this value and the base address that is specified in the PARAM_BASE register.
  7661. tag offset
  7662. This field specifies the strip number (the position within a strip of triangles) of the background plane. (default = 0x0)
  7663.  
  7664.  
  7665. ISP_FEED_CFG Address?0x005F 8098
  7666. bit 31-24 23-14 13-4 3 2-1 0 Reserved Cache Size for
  7667. translucency Punch Through
  7668. chunk size Discard
  7669. Mode R pre-sort
  7670. mode
  7671. This register is set when sorting polygons through the hardware. Bits 31 to 1 (those marked with an asterisk)have a different configuration in HOLLY2; in HOLLY1, they are reserved bits (0x0).
  7672.  
  7673. Cache Size for translucency
  7674. This field specifies the ISP cache size for a Translucent polygon list in terms of the number of vertices stored. (default = 0x100) In the case of Triangle polygons, the number of polygons stored is this setting divided by 3; in the case of Quad polygons, the number of polygons stored is this setting divided by 4. For example, in order to store 30 triangles, 30 ? 3 = 90 (0x05A) must be specified in this field.
  7675. Normally, 0x200 is specified in order to achieve maximum performance, but 0x100 may be specified in order to set up the same state as CLX1.. However, the value must be specified so that the relationship (Cache size for translucency) ? (Punch Through chunk size) is true. In addition, the value that is specified must be in the range from 0x020 to 0x200 (32 to 512). Do not specify a value outside the range of 0x020 to 0x200 (32 to 512).
  7676. Punch Through chunk size
  7677. This field specifies the ISP cache size for a Punch Through polygon list in terms of the number of vertices stored. (default = 0x200) In the case of Triangle polygons, the number of polygons stored is this setting divided by 3; in the case of Quad polygons, the number of polygons stored is this setting divided by 4. For example, in order to store 30 quads, 30 ? 4 = 120 (0x078) must be specified in this field.
  7678. The value that is set in order to achieve maximum performance differs according to the state of the screen, but normally a value from 0x040 to 0x080 may be specified. (The recommended value is 0x040.) However, the value must be specified so that the relationship (Punch Through chunk size) ? (Cache size for translucency) is true. In addition, the value that is specified must be in the range from 0x020 to 0x200 (32 to 512). Do not specify a value outside the range of 0x020 to 0x200 (32 to 512).
  7679. Discard Mode
  7680. This field specifies whether to perform discard processing or not when processing Punch Through polygons and Translucent polygons.
  7681.  
  7682. Setting Meaning 0 Do not perform discard processing (default)
  7683. This results in operation that is similar to HOLLY1. 1 Perform discard processing
  7684. This improves drawing processing performance.
  7685. pre-sort mode
  7686. This field specifies the Translucent polygon sort mode.
  7687. In HOLLY2, this field is valid only when the region header type bit (bit 21) in the FPU_PARAM_CFG register is "0".
  7688.  
  7689. Setting Meaning 0 Auto sort mode (default) 1 Pre-sort mode
  7690.  
  7691. SDRAM_REFRESH Address?0x005F 80A0
  7692. bit 31-8 7-0 Reserved Refresh counter value This field specifies the texture memory refresh counter value. (default = 0x20) Specify the number of clock cycles as the refresh time divided by 48. (The requested refresh time is 15.625?s.) For example, for 100MHz operation, the value is 15,625nsec/10nsec/48 = 32.6, so the setting in this register for the refresh counter value should be 0x20.
  7693. Set this register before releasing the reset condition through the SOFTRESET register.
  7694.  
  7695. SDRAM_ARB_CFG Address?0x005F 80A4
  7696. bit 31-22 21-18 17-16 15-8 7-0 Reserved Override
  7697. value Arbiter priority
  7698. control Arbiter crt page break
  7699. latency count value Arbiter page beak
  7700. latency count value This register contains the settings for the texture memory Arbiter. Normally, the priority ranking of each request is as follows:
  7701. (1) CRT Controller
  7702. (2) ISP parameters
  7703. (3) ISP pointer data
  7704. (4) ISP region data
  7705. (5) TSP parameters
  7706. (6) SH4 ports
  7707. (7) Tile Accelerator pointers
  7708. (8) Tile Accelerator ISP/TSP data
  7709. (9) Texture normal data & VQ codebook
  7710. (10) Texture VQ index
  7711. (11) Render ports
  7712. Override value
  7713. When override mode is specified for the Arbiter, this field specifies the device that is given the highest priority.
  7714. Setting Meaning 0x0 priority only (default) 0x1 Rendered data 0x2 Texture VQ index 0x3 Texture normal data & VQ codebook 0x4 Tile accelerator ISP/TSP data 0x5 Tile accelerator pointers 0x6 SH4 0x7 TSP parameters 0x8 TSP region data 0x9 ISP pointer data 0xA ISP parameters 0xB CRT controller 0xC-0xF priority only
  7715.  
  7716. Arbiter priority control
  7717. This field sets the Arbiter.
  7718. Setting Meaning 0x0 Priority arbitration only (default) 0x1 The device specified in the "override value" field is given the highest priority. 0x2-0x3 When there is a device request with the same number as the round robin counter, that device is given the highest priority. If there is no such request, normal priority arbitration occurs. Arbiter crt page break latency count value
  7719. Setting this field forces a page break if there is a request from the CRT Controller immediately after the specified counter. (default = 0x00)
  7720. Arbiter page break latency count value
  7721. Setting this field forces a page break if there is a request immediately after the specified counter. (default = 0x1F) Forcing a page break causes the Arbiter to function again, so that one type of access does not occupy memory.
  7722.  
  7723.  
  7724. SDRAM_CFG Address?0x005F 80A8
  7725. bit 31-29 28-0 Reserved SDRAM Configuration
  7726. This register contains the settings for texture memory. (The default value in HOLLY1 is 0x0DF28997, and in HOLLY2 is 0x15F28997.) Do not change these settings to other than the specified values.
  7727. Set this register before releasing the reset condition through the SOFTRESET register. Note that the value that is set depends on the HOLLY version.
  7728. bit [28:26] = Read command to returned data delay
  7729. Specify the number of clock cycles - 1. (The default value in HOLLY1 is 0x3, and in HOLLY2 is 0x5.)
  7730. bit [25:23] = CAS Latency value for mode register in SDRAM
  7731. Specify the number of clock cycles. (default = 0x3) This value is fixed at 0x3 for 100MHz operation.
  7732. bit [22:21] = Activate to Activate period
  7733. Specify the number of clock cycles - 1. (default = 0x3)
  7734. bit [20:18] = Read to Write period
  7735. Specify the number of clock cycles - 1. (default = 0x4)
  7736. Normally, the number of clock cycles from read to write is the CAS latency + 2.
  7737. bit [17:14] = Refresh to Activate period
  7738. Specify the number of clock cycles - 2. (default = 0xA)
  7739. bit [13:12] = Reserved
  7740. "0" (zero) must be set.
  7741. bit [11:10] = Pre-charge to Activate period
  7742. Specify the number of clock cycles - 1. (default = 0x2)
  7743. bit [9:6] = Activate to Pre-charge period
  7744. Specify the number of clock cycles - 1. (default = 0x6)
  7745. bit [5:4] = Activate to Read/Write command period
  7746. Specify the number of clock cycles - 2. (default = 0x1) The minimum value is 0x1.
  7747.  
  7748. bit [3:2] = Write to Pre-charge period
  7749. Specify the number of clock cycles - 1. (default = 0x1)
  7750. bit [1:0] = Read to Pre-charge period
  7751. Specify the number of clock cycles - 1. (default = 0x3)
  7752.  
  7753. The following table shows the settings for HOLLY1.
  7754.  
  7755. Bit No Contents of setting Setting by SDRAM (NEC) uPD4516161-10 uPD4516161A-10 28:26 Read command to returned data delay 0x3 0x3 25:23 CAS Latency value mode register in SDRAM 0x3 0x3 22:21 Activate to Activate period 0x3 0x2 20:18 Read to Write period 0x4 0x4 17:14 Refresh to Activate period 0x8 0x6 11:10 Pre-charge to Activate period 0x2 0x2 9:6 Activate to Pre-charge period 0x6 0x5 5:4 Activate to Read/Write command period 0x1 0x1 3:2 Write to Pre-charge period 0x1 0x1 1:0 Read to Pre-charge period 0x3 0x3 31:0 SDRAM_CFG Register setting 0x0DF20997 0x0DD18957
  7756. The following table shows the settings for HOLLY2.
  7757.  
  7758. Bit Contents of setting Setting by SDRAM No NEC
  7759. uPD4516161A-10
  7760. or
  7761. NEC
  7762. uPD4516161A-10B
  7763. Rev.B,P NEC
  7764. uPD4516161-10 Samsung
  7765. KM416S1020CT-L
  7766. or
  7767. NEC
  7768. uPD4516161-A10
  7769. Rev.B,P 28:26 Read command to returned data delay 0x5 0x5 0x5 25:23 CAS Latency value mode register in SDRAM 0x3 0x3 0x3 22:21 Activate to Activate period 0x2 0x3 0x2 20:18 Read to Write period 0x4 0x4 0x4 17:14 Refresh to Activate period 0x7 0x8 0x5 13:12 Reserved 0x0 0x0 0x0 11:10 Pre-charge to Activate period 0x2 0x2 0x1 9:6 Activate to Pre-charge period 0x5 0x6 0x4 5:4 Activate to Read/Write command period 0x1 0x1 0x1 3:2 Write to Pre-charge period 0x0 0x0 0x0 1:0 Read to Pre-charge period 0x1 0x1 0x1 31:0 SDRAM_CFG Register setting value 0x15D1C951 0x15F20991 0x15D14511
  7770.  
  7771. FOG_COL_RAM Address?0x005F 80B0
  7772. bit 31-24 23-16 15-8 7-0 Reserved Red Green Blue
  7773. This register specifies the Fog Color for Look-up Table mode. (default = 0x000000)
  7774.  
  7775.  
  7776. FOG_COL_VERT Address?0x005F 80B4
  7777. bit 31-24 23-16 15-8 7-0 Reserved Red Green Blue
  7778. This register specifies the Fog Color for Per Vertex mode. (default = 0x000000)
  7779.  
  7780.  
  7781. FOG_DENSITY Address?0x005F 80B8
  7782. bit 31-16 15-8 7-0 Reserved Fog scale mantissa Fog scale exponent
  7783. This register specifies the Fog scale value for Look-up Table mode.
  7784.  
  7785. Fog scale mantissa
  7786. This field specifies the mantissa where bit 15 is the 1.0 bit. (default = 0x00) For example, to specify 255.0 as the Fog scale value, specify 0xFF.
  7787.  
  7788. Fog scale exponent
  7789. This field specifies the exponent in two's complement format. (default = 0x00) For example, to specify 255.0 as the Fog scale value, specify 0x07.
  7790.  
  7791.  
  7792. FOG_CLAMP_MAX Address?0x005F 80BC
  7793. bit 31-24 23-16 15-8 7-0 Alpha Red Green Blue
  7794. This register specifies the maximum value for color clamping. (default = 0x0000 0000)
  7795.  
  7796.  
  7797. FOG_CLAMP_MIN Address?0x005F 80C0
  7798. bit 31-24 23-16 15-8 7-0 Alpha Red Green Blue
  7799. This register specifies the minimum value for color clamping. (default = 0x0000 0000)
  7800.  
  7801.  
  7802. SPG_TRIGGER_POS (Read Only) Address?0x005F 80C4
  7803. bit 31-26 25-16 15-10 9-0 Reserved trigger v count Reserved trigger h count
  7804. This register indicates the HV counter value that was latched at the falling edge of the external trigger signal.
  7805. For details on the external trigger signal and the HV counter value, refer to section 5, "Peripheral Interface."
  7806.  
  7807.  
  7808. SPG_HBLANK_INT Address?0x005F 80C8
  7809. bit 31-26 25-16 15-14 13-12 11-10 9-0 Reserved hblank_
  7810. in_interrupt Reserved hblank_
  7811. int_mode Reserved line_comp_val
  7812. hblank_in_interrupt
  7813. This field specifies the horizontal position at which the H Blank interrupt is output. (default = 0x31D)
  7814.  
  7815. hblank_int_mode
  7816. This field specifies the H Blank interrupt mode.
  7817.  
  7818. Setting Meaning 0x0 Output when the display line is the value indicated by line_comp_val. (default) 0x1 Output every line_comp_val lines. 0x2 Output every line. 0x3 Reserved
  7819. line_comp_val
  7820. This field specifies the value that is compared to the display line. (default = 0x000)
  7821.  
  7822.  
  7823. SPG_VBLANK_INT Address?0x005F 80CC
  7824. bit 31-26 25-16 15-10 9-0 Reserved vblank out interrupt
  7825. line number Reserved vblank in interrupt
  7826. line number
  7827. vblank out interrupt line number
  7828. This field specifies the position at which the V Blank Out interrupt is output. (default = 0x150)
  7829. The recommended value is 0x015.
  7830.  
  7831. vblank in interrupt line number
  7832. This field specifies the position at which the V Blank In interrupt is output. (default = 0x104)
  7833.  
  7834.  
  7835.  
  7836. SPG_CONTROL Address?0x005F 80D0
  7837. bit 31-10 9 8 7 6 5 4 3 2 1 0 Reserved csync_
  7838. on_h sync_
  7839. direction PAL NTSC force_
  7840. field2 interlace spg_
  7841. lock mcsync
  7842. _pol mvsync
  7843. _pol mhsync
  7844. _pol
  7845. csync_on_h
  7846. This field specifies the sync signal that is output on the HSYNC pin.
  7847. Setting Meaning 0 HSYNC (default) 1 CSYNC
  7848. sync_direction
  7849. This field specifies the sync signal pin as either an input or an output.
  7850. Setting Meaning 0 Input: Use an external sync signal. (default) 1 Output: Use the internal sync signal.
  7851. PAL
  7852. Specify "1" for PAL mode (default = 0). Specify "0" in VGA mode.
  7853.  
  7854. NTSC
  7855. Specify "1" for NTSC mode (default = 1). Specify "0" in VGA mode.
  7856.  
  7857. force_field2
  7858. This field specifies whether or not to force display in field 2.
  7859. Setting Meaning 0 Do not display in field 2. (default) 1 Display in field 2.
  7860. interlace
  7861. This field specifies whether to use interlacing or not.
  7862. Setting Meaning 0 Non-interlace (default) 1 Interlace
  7863. spg_lock
  7864. This field specifies whether to synchronize the internal circuitry with VSYNC input from an external source.
  7865. Setting Meaning 0 During normal operation (default) 1 Set to '1' for only one frame upon extend synchronization.
  7866. mcsync_pol
  7867. mvsync_pol
  7868. mhsync_pol
  7869. This field specifies the polarity of CSYNC, VSYNC, and HSYNC.
  7870. Setting Meaning 0 active low (default) 1 active high
  7871. SPG_HBLANK Address?0x005F 80D4
  7872. bit 31-26 25-16 15-10 9-0 Reserved hbend Reserved hbstart
  7873. hbend
  7874. Specify the H Blank ending position. (default = 0x07E)
  7875.  
  7876. hbstart
  7877. Specify the H Blank starting position. (default = 0x345)
  7878.  
  7879.  
  7880. SPG_LOAD Address?0x005F 80D8
  7881. bit 31-26 25-16 15-10 9-0 Reserved vcount Reserved hcount
  7882. vcount
  7883. Specify "number of lines per field - 1" for the CRT; in interlace mode, specify "number of lines per field/2 - 1." (default = 0x106)
  7884.  
  7885. hcount
  7886. Specify "number of video clock cycles per line - 1" for the CRT. (default = 0x359)
  7887.  
  7888.  
  7889. SPG_VBLANK Address?0x005F 80DC
  7890. bit 31-26 25-16 15-10 9-0 Reserved vbend Reserved vbstart
  7891. vbend
  7892. Specify the V Blank ending position. (default = 0x150) The recommended value is 0x015.
  7893.  
  7894. vbstart
  7895. Specify the V Blank starting position. (default = 0x104)
  7896.  
  7897.  
  7898. SPG_WIDTH Address?0x005F 80E0
  7899. 31-22 21-12 11-8 7 6-0 eqwidth bpwidth vswidth R hswidth
  7900. eqwidth
  7901. Specify the equivalent pulse width as "number of video clock cycles - 1". (default = 0x01F)
  7902.  
  7903. bpwidth
  7904. Specify the broad pulse width as "number of video clock cycles - 1". (default = 0x319)
  7905.  
  7906. vswidth
  7907. Specify the VSYNC width in terms of the number of lines. (default = 0x3)
  7908.  
  7909. hswidth
  7910. Specify the HSYNC width as "number of video clock cycles - 1". (default = 0x3F)
  7911.  
  7912.  
  7913. TEXT_CONTROL Address?0x005F 80E4
  7914. 31-18 17 16 15-13 12-8 7-5 4-0 Reserved Code book
  7915. endian_reg Index
  7916. endian_reg Reserved bank bit Reserved stride
  7917. Code book endian_reg
  7918. Index endian_reg
  7919. This field makes the Endian specification for the code book and index.
  7920. Setting Meaning 0 Little Endian (default) 1 Big Endian
  7921. bank bit
  7922. This field specifies the position of the bank bit when accessing texture memory
  7923. (default = 0x00). Normally, set 0x00.
  7924.  
  7925. stride
  7926. This field specifies the U size of the stride texture. The U size is the stride value ? 32.
  7927.  
  7928. Setting Meaning 0x00 invalid (default) 0x01 32 0x02 64 0x03 96 0x04 128 ?????? ?????? 0x1C 896 0x1D 928 0x1E 960 0x1F 992
  7929.  
  7930.  
  7931. VO_CONTROL Address?0x005F 80E8
  7932. bit 31-22 21-16 15-9 8 7-4 3 2 1 0 Reserved pclk_delay Reserved pixel_double Field_mode blank
  7933. _video blank
  7934. _pol vsync
  7935. _pol hsync
  7936. _pol
  7937. This register contains the video output settings. (default = 0x00 0108)
  7938.  
  7939. pclk_delay
  7940. This field specifies the delay for the PCLK signal to the DAC.
  7941. bit21 : Reset delay value
  7942. bit20?16 : Controls delay value
  7943.  
  7944. pixel_double
  7945. This field specifies whether to output the same pixel or not for two pixels in the horizontal direction.
  7946. Setting Meaning 0 not pixel double 1 pixel double (default)
  7947. field_mode
  7948. This field specifies the video field control method.
  7949. Setting Meaning 0x0 Use field flag from SPG. (default) 0x1 Use inverse of field flag from SPG. 0x2 Field 1 fixed. 0x3 Field 2 fixed. 0x4 Field 1 when the active edges of HSYNC and VSYNC match. 0x5 Field 2 when the active edges of HSYNC and VSYNC match. 0x6 Field 1 when HSYNC becomes active in the middle of the VSYNC active edge. 0x7 Field 2 when HSYNC becomes active in the middle of the VSYNC active edge. 0x8 Inverted at the active edge of VSYNC. 0x9-0xF Reserved
  7950. blank_video
  7951. This field specifies whether to display the screen or not.
  7952. Setting Meaning 0 Display the screen. 1 Do not display the screen. (Display the border color.) (default)
  7953. blank_pol
  7954. vsync_pol
  7955. hsync_pol
  7956. This field specifies the polarity of BLANK, VSYNC, and HSYNC.
  7957. Setting Meaning 0 active low (default) 1 active high
  7958.  
  7959.  
  7960. VO_STARTX Address?0x005F 80EC
  7961. bit 31-10 9-0 Reserved Horizontal start position This register specifies the display starting position in the horizontal direction for HSYNC. (default = 0x09D)
  7962.  
  7963.  
  7964. VO_STARTY Address?0x005F 80F0
  7965. bit 31-26 25-16 15-10 9-0 Reserved Vertical start position
  7966. on field 2 Reserved Vertical start position
  7967. on field 1
  7968. This register specifies the display start position in the vertical direction for field-1/field-2 versus VSYNC. (The default for both is 0x015.)
  7969.  
  7970.  
  7971. SCALER_CTL Address?0x005F 80F4
  7972. bit 31-19 18 17 16 15-0 Reserved Field
  7973. Select Interlace Horizontal
  7974. scaling enable Vertical scale factor
  7975. Field Select
  7976. This register specifies the field that is to be stored in the frame buffer in flicker-free interlace mode type B.
  7977. Setting Meaning 0 field 1 (default) 1 field 2
  7978. Interlace
  7979. This register specifies whether or not to use flicker-free interlace mode type B.
  7980. Setting Meaning 0 off (default) 1 on
  7981. Horizontal scaling enable
  7982. This field specifies whether or not to use the horizontal direction 1/2 scaler.
  7983. Setting Meaning 0 disable (default) 1 enable
  7984. Vertical scale factor
  7985. This field specifies the scale factor in the vertical direction. (default = 0x0400)
  7986. This value consists of a 6-bit integer portion and a 10-bit decimal portion, and expands or reduces the screen in the vertical direction by "1/scale factor." When using flicker-free interlace mode type B, specify 0x0800.
  7987.  
  7988. <Example of setting>
  7989. ? 2: 0x0200
  7990. ? 1: 0x0400
  7991. ? 0.5: 0x0800
  7992.  
  7993.  
  7994. PAL_RAM_CTRL Address?0x005F 8108
  7995. bit 31-2 1-0 Reserved pixel format This register specifies the palette color format. This register must be set before storing any data in pallete RAM.
  7996. Setting Meaning 0x0 ARGB1555 (default) 0x1 RGB565 0x2 ARGB4444 0x3 ARGB8888
  7997.  
  7998. SPG_STATUS (Read Only) Address?0x005F 810C
  7999. bit 31-14 13 12 11 10 9-0 Reserved vsync hsync blank fieldnum scanline
  8000. This register indicates the current status of the internal sync circuit (SPG). (Value after reset = 0x0000)
  8001.  
  8002. vsync
  8003. This field indicates the status of the VSYNC signal.
  8004.  
  8005. hsync
  8006. This field indicates the status of the HSYNC signal.
  8007.  
  8008. blank
  8009. This field indicates the status of the BLANK signal.
  8010.  
  8011. fieldnum
  8012. This field indicates the field number.
  8013. Setting Meaning 0 field 1 1 field 2
  8014. scanline
  8015. This field indicates the display line number.
  8016.  
  8017.  
  8018. FB_BURSTCTRL Address?0x005F 8110
  8019. bit 31-20 19-16 14-8 7-6 5-0 Reserved wr_burst vid_lat Reserved vid_burst
  8020. wr_burst
  8021. Specify the frame buffer burst write size - 1. (default = 0x09)
  8022.  
  8023. vid_lat
  8024. This field specifies the amount of data remaining in the read data FIFO when making a frame buffer read request. (default = 0x06) Set a value such that (vid_lat) < 0x80 - (vid_burst). The recommended value is 0x3F.
  8025.  
  8026. vid_burst
  8027. This field specifies the burst read size from the frame buffer. (default = 0x39)
  8028.  
  8029.  
  8030. FB_C_SOF (Read Only) Address?0x005F 8114
  8031. bit 31-24 23-2 1-0 Reserved Frame Buffer Current Read Address Reserved
  8032. Specify the starting address, in 32-bit units, for the frame that is currently being sent to the DAC. (default = 0x000000)
  8033.  
  8034.  
  8035. Y_COEFF Address?0x005F 8118
  8036. bit 31-16 15-8 7-0 Reserved Coefficient 1 Coefficient 0/2
  8037. Scaling in the vertical direction is filtered with a three-line buffer. This register specifies an unsigned 8-bit value as the filtering co-efficient for each line when scaling down.
  8038.  
  8039. Coefficient 0/2: Coefficient for line 0/2 (default = 0x00)
  8040. Coefficient 1: Coefficient for line 1 (center) (default = 0x00)
  8041.  
  8042. <Normal setting example>
  8043. Coefficient 0/2 = 0x40 (Coefficient: ? 0.25)
  8044. Coefficient 1 = 0x80 (Coefficient: ? 0.5)
  8045.  
  8046.  
  8047. PT_ALPHA_REF Address?0x005F 811C
  8048. bit 31-8 7-0 Reserved Alpha reference
  8049. for punch through
  8050. <Additional register in HOLLY2>
  8051. This register specifies the alpha value that is used for comparison when drawing Punch Through polygons. (default = 0xFF) Only those pixels for which [(pixel ? value) ? (register setting)] is true are drawn.
  8052.  
  8053.  
  8054. FOG_TABLE Address?0x005F 8200?0x005F 83FD
  8055. bit 31-16 15-0 Reserved Fog table data
  8056. This register specifies the Fog data (128 tables) for Look-up Table mode.
  8057.  
  8058.  
  8059. PALETTE_RAM Address?0x005F 9000?0x005F 9FFF
  8060. bit 31-0 Palette data
  8061. This register specifies the color data (1024 colors) for the palette texture. The color format is specified by the PAL_RAM_CTRL register. In the case of the 16-bit color format, only the lower 16 bits (bits 15 through 0) are valid. The PAL_RAM_CTRL register must be set before any color data is set.
  8062.  
  8063. �8.4.3
  8064. Tile Accelerator Registers
  8065.  
  8066. TA_OL_BASE Address?0x005F 8124
  8067. bit 31-24 23-5 4-0 Reserved Base Address 0 0000
  8068. This register specifies (in 8 ? 32-bit units) the starting address for storing Object Lists as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x0 0000)
  8069.  
  8070.  
  8071. TA_ISP_BASE Address?0x005F 8128
  8072. bit 31-24 23-2 1-0 Reserved Base Address 00
  8073. This register specifies (in 32-bit units) the starting address for storing the ISP/TSP Parameters as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x00 0000)
  8074.  
  8075.  
  8076. TA_OL_LIMIT Address?0x005F 812C
  8077. bit 31-24 23-5 4-0 Reserved Limit Address 0 0000
  8078. This register specifies (in 8 ? 32-bit units) the limit address for storing Object Lists as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x0 0000) Because the TA may automatically store data in the address that is specified by this register, it must not be used for other data. For example, the address specified here must not be the same as the address in the TA_ISP_BASE register.
  8079. If the Object List storage address exceeds this address, the data is not stored and an interrupt is generated. Because the Object List will not be stored as a data structure correctly when this interrupt is generated, the Object List can be used for drawing, but will not produce the expected image.
  8080.  
  8081.  
  8082. TA_ISP_LIMIT Address?0x005F 8130
  8083. bit 31-24 23-2 1-0 Reserved Limit Address 00
  8084. This register specifies (in 32-bit units) the limit address for storing ISP/TSP Parameters as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x0 0000) If the ISP/TSP Parameter storage address exceeds this address, an interrupt is generated and the Object List is not stored. Because the ISP/TSP Parameters are not stored correctly when this interrupt is generated, the parameters cannot be used for drawing.
  8085.  
  8086.  
  8087. TA_NEXT_OPB (Read Only) Address?0x005F 8134
  8088. bit 31-24 23-5 4-0 Reserved Address 0 0000
  8089. This register indicates (in 8 ? 32-bit units) the starting address for the Object Pointer Block that the TA will use next as a relative address, assuming the start of texture memory (32-bit area) as "0." This address is not finalized until it is initialized by the TA_LIST_INIT register.
  8090. In HOLLY1, when this register is initialized by the TA_LIST_INIT register, the following start address is set.
  8091. OPB_Mode=0 (TA_ALLOC_CTRL)
  8092. Start address = TA_OL_BASE
  8093. ? ?( ?[OPB ( = Object Pointer Block ) size of Opaque]
  8094. ?+[OPB size of Opaque Modifier Volume]
  8095. ? ?+[OPB size of Translucent]
  8096. ?+[OPB size of Translucent Modifier Volume] )
  8097. *( [Tile_X_Num of TA_GLOB_TILE_CLIP] +1)
  8098. *( [Tile_Y_Num of TA_GLOB_TILE_CLIP] +1)
  8099. *4
  8100.  
  8101. OPB_Mode=1 (TA_ALLOC_CTRL)
  8102. Start address = TA_OL_BASE
  8103.  
  8104. In HOLLY2, When this register is initialized by the TA_LIST_INIT register, the value in the TA_NEXT_OPB_INIT register is loaded into this register. This register is not initialized by the TA_LIST_CONT register.
  8105.  
  8106. TA_ITP_CURRENT (Read Only) Address?0x005F 8138
  8107. bit 31-24 23-2 1-0 Reserved Address 00
  8108. This register specifies (in 32-bit units) the starting address where the next ISP/TSP Parameters are stored as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x00 0000)?
  8109. In HOLLY2, when this register is initialized by the TA_LIST_INIT register, the value in the TA_ISP_BASE register is loaded into this register. This register is not initialized by the TA_LIST_CONT register.
  8110.  
  8111.  
  8112. TA_GLOB_TILE_CLIP Address?0x005F 813C
  8113. bit 31-20 19-16 15-6 5-0 Reserved Tile_Y_Num Reserved Tile_X_Num
  8114. This register specifies the Global Tile Clip values. Only those objects that correspond to Tiles in the Global Tile Clipping area are stored in texture memory. This register must be set before the list is initialized by the TA_LIST_INIT register.
  8115.  
  8116. Tile_Y_Num
  8117. This field specifies the Tile number in the Y direction (0 to 14) for the lower right corner of the Global Tile Clip. (default = 0x0) Set [the number of Tiles in the Y direction in the valid area] - 1. "15" (0xF) must not be specified.
  8118.  
  8119. Tile_X_Num
  8120. This field specifies the Tile number in the X direction (0 to 39) for the lower right corner of the Global Tile Clip. (default = 0x00) Set [the number of Tiles in the X direction in the valid area] - 1. "40" (0x28) through "63" (0x3F) must not be specified.
  8121. TA_ALLOC_CTRL Address?0x005F 8140
  8122. bit 31-17 20 19-18 17-16 15-14 13-12 11-10 9-8 7-6 5-4 3-2 1-0 R OPB_Mode R PT_OPB R TM_OPB R T_OPB R OM_OPB R O_OPB
  8123. OPB_Mode
  8124. This field specifies the address direction when storing the next Object Pointer Block (OPB) in texture memory, in the event that the specified Object Pointer Block size has been exceeded.
  8125. *The position differs according to the HOLLY version; bit 16 in HOLLY1 and bit 20 in HOLLY2.
  8126. Setting OPB storage method 0 Store in the direction of increasing addresses (default) 1 Store in the direction of decreasing addresses
  8127. PT_OPB
  8128. This field specifies the unit size for the Object Pointer Block of the Punch Through list in HOLLY2.
  8129.  
  8130. TM_OPB
  8131. This field specifies the unit size of an Object Pointer Block for a Translucent Modifier Volume list.
  8132.  
  8133. T_OPB
  8134. This field specifies the unit size of an Object Pointer Block for a Translucent list.
  8135.  
  8136. OM_OPB
  8137. This field specifies the unit size of an Object Pointer Block for an Opaque Modifier Volume list.
  8138.  
  8139. O_OPB
  8140. This field specifies the unit size of an Object Pointer Block for an Opaque list.
  8141.  
  8142. These fields specify the Object Pointer Block unit size for each type of list (Opaque, etc.) Specify "No List" for a list that is not used in the screen. For the Pointer Burst Size value in the FPU_PARAM_CFG register, set a value that is less than or equal to the Object Pointer Block size specified here.
  8143. This register must be set before the lists are initialized through the TA_LIST_INIT register.
  8144. Setting Unit size 0 No List (Not used in screen) 1 8�32bit 2 16�32bit 3 32�32bit
  8145. TA_LIST_INIT Address? 0x005F 8144
  8146. bit 31 30-0 List_Init Reserved
  8147. Setting the List_Init bit to "1" initializes the lists. This bit must be set before the lists are created by the TA. This bit always returns a "0" when read.
  8148. Before initializing the lists through this register, the TA_GLOB_TILE_CLIP register, the TA_ALLOC_CTRL register ,and, in HOLLY2, the TA_NEXT_OPB_INIT register must be set.
  8149. TA_YUV_TEX_BASE Address?0x005F 8148
  8150. bit 31-24 23-3 2-0 Reserved Base Address 000 This register specifies (in 64-bit units) the starting address for storing YUV422-Texture data as a relative address, assuming the start of texture memory (64-bit area) as "0." (default = 0x00 0000) When this register is written, the YUV-data Converter in the TA is initialized, and then begins operation using the next data that is input as U-data.
  8151.  
  8152.  
  8153. TA_YUV_TEX_CTRL Address?0x005F 814C
  8154. bit 31-25 24 23-17 16 15-14 13-8 7-6 5-0 Reserved YUV_Form R YUV_Tex R YUV_V_Size R YUV_U_Size YUV_Form
  8155. This field specifies the format of the YUV data that is input to the TA.
  8156. Setting YUV data format 0 YUV420 format (default) 1 YUV422 format YUV_Tex
  8157. This field selects the type of YUV422-Texture that is stored in texture memory.
  8158. Setting Texture type 0 One texture of [(YUV_U_Size + 1) * 16] pixels (H) ? [(YUV_V_Size + 1) * 16] pixels (V) 1 [(YUV_U_Size + 1) * (YUV_V_Size + 1)] textures of 16 texels (H) ? 16 texels (V) YUV_V_Size
  8159. This field specifies the vertical size of the YUV422-Textures that are stored in texture memory. (default = 0x00) Specify "the number of pixels in the vertical direction/16 - 1."
  8160. ?Non-Twiddled texture?
  8161. Texture V size 16 32 64 128 256 512 1024 YUV_V_Size setting 0x00 0x01 0x03 0x07 0x0F 0x1F 0x3F
  8162. YUV_U_Size
  8163. This field specifies the horizontal size of the YUV422 textures that are stored in texture memory. (default = 0x00) Specify "the number of pixels in the horizontal direction/16 - 1." Based on the texture sizes that the CORE Block supports, the following values can be specified:
  8164. <Non-Twiddled texture>
  8165. Texture U size 16 32 64 128 256 512 1024 YUV_U_Size setting 0x00 0x01 0x03 0x07 0x0F 0x1F 0x3F <Non-Twiddled Stride texture>
  8166. Texture U size 32 64 96?960
  8167. (a multiple of 32) 992 1024 YUV_U_Size setting 0x01 0x03 0x05?0x3B
  8168. (an odd number) 0x3D 0x3F
  8169.  
  8170.  
  8171. TA_YUV_TEX_CNT (Read Only) Address?0x005F 8150
  8172. bit 31-13 12-0 Reserved YUV_Num
  8173. This register indicates the number of macroblocks (16 pixels ? 16 pixels) that are currently stored in texture memory. (default = 0x0000) If the TA_YUV_TEX_BASE register is written, this register is initialized to "0."
  8174.  
  8175.  
  8176. TA_LIST_CONT Address: 0x005F 8160
  8177. bit 31 30-0 List_Cont Reserved <Additional register in HOLLY2>
  8178. If the List_Cont bit is set to "1", list continuation processing is performed. Although the TA is initialized, just as with the TA_LIST_INIT register, the values in the TA_NEXT_OPB register and in the TA_ITP_CURRENT register are not initialized. As a result, when the second and subsequent lists are input on a continued basis, the Object List and ISP/TSP Parameters are stored after the previous parameters. If this bit is read, it returns a "0".
  8179. The value of the TA_OL_BASE register must be changed before performing list continuation processing.
  8180.  
  8181. TA_NEXT_OPB_INIT Address?0x005F 8164
  8182. bit 31-24 23-5 4-0 Reserved Address 0 0000 <Additional register in HOLLY2>
  8183. This register indicates (in 32-bit units) the address for storing additional OPBs during list initialization as a relative address, assuming the start of texture memory (32-bit area) as "0." (default = 0x0 0000) When setting this register, it is necessary to consider the total number of OPBs for which area will need to be allocated in texture memory for the entire list that is being input (in several pieces) to the TA.
  8184. This register must be set before initializing lists through the TA_LIST_INIT register.
  8185. TA_OL_POINTERS (Read Only) Address?0x005F 8600?0x005F 8F5C
  8186. bit 31 30 29 28-25 24 23-2 1-0 Entry Sprite
  8187. flag Triangle
  8188. flag Number of
  8189. Triangles/Quads Shadow Pointer Address Skip[1:0] There are enough of these registers for 600 Tiles: 40 Tiles in the X direction ? 15 Tiles in the Y direction. These registers cannot be accessed while the TA is in operation.
  8190. Entry
  8191. This field indicates whether the current object type has been registered at least once in the Tile in question. If the lists are initialized through the TA_LIST_INIT register or the End Of List Control Parameter is input, this field is cleared to "0."
  8192. Sprite flag
  8193. This field indicates that the previous polygon that was registered in the Tile in question was a Quad polygon.
  8194. Triangle flag
  8195. This field indicates that the previous polygon that was registered in the Tile in question was a Triangle polygon.
  8196. Number of Triangle/Quad
  8197. This field indicates the number of consecutive previous polygons that were registered in the Tile in question.
  8198.  
  8199. Shadow
  8200. This field indicates the shadow value for the previous polygon that was registered in the Tile in question.
  8201. Pointer Address
  8202. This field indicates the storage address of the next Object List for the Tile in question. The address that is indicated is a 32-bit aligned relative address, assuming the start of texture memory (32-bit area) as "0."
  8203. Skip[1:0]
  8204. This field indicates the lower 2 bits of the skip value for the previous polygon that was registered in the Tile in question.
  8205.  
  8206.  
  8207. �8.4.4 GD-ROM Registers
  8208. The GD-ROM device is positioned as an ATA device, and the registers are designed accordingly. Note that in some cases, different registers are indicated for reading as opposed to writing.
  8209.  
  8210. (The Control Block Registers are described below.)
  8211.  
  8212. Alternate Status(Read) / Device Control(Write) Address?0x005F 7018
  8213. bit 31-8 7-0 Reserved Alternate Status
  8214. / Device Control * Alternate Status (Read)
  8215. The contents of this register are identical to those of the 0x005F 709C status register; refer to that description for details on the function of each bit. Note also that interrupt and DMA status information is not cleared even if this register is read.
  8216.  
  8217. 7 6 5 4 3 2 1 0 BSY DRDY DF DSC DRQ CORR Reserved CHECK
  8218. * Device Control (Write)
  8219. 7 6 5 4 3 2 1 0 Reserved 1 SRST nIEN 0
  8220. SRST
  8221. This is the bit that the SH4 (i.e., the "system" or the "host") sets in order to initiate a software reset. This protocol is not used, however. To initiate a software reset, use the software reset defined by ATAPI.
  8222.  
  8223. nIEN
  8224. This bit sets interrupts to the host. When "0," the interrupt is enabled; when "1," the interrupt is disabled.
  8225.  
  8226.  
  8227. (The Command Block Registers are described below.)
  8228.  
  8229. Data (Read/Write) Address?0x005F 7080
  8230. bit 31-16 15-0 Reserved Data / Data * Data (Read/Write)
  8231. This register is used for data transfers with the host, and can switch between 8 bits and 16 bits.
  8232.  
  8233. Error(Read) / Features(Write) Address?0x005F 7084
  8234. bit 31-8 7-0 Reserved Error / Features * Error (Read)
  8235. This register can be used to read the end status of the command that was executed last. This register is also set when device diagnostics are terminated. If bit 0 of the status register is "1," it indicates that an error occurred. In that event, the details of the error are reflected in this register.
  8236. 7 6 5 4 3 2 1 0 Sense Key MCR ABRT EOMF ILI
  8237. Sense Key
  8238. The contents of this field are explained below.
  8239. Code Meaning 0 NO SENSE. This sense key code indicates that there is no specific sense key information that should be reported. This sense key code is also used when the command was executed successfully. 1 RECOVERED ERROR. This sense key code indicates that the last command was executed successfully after some error recovery processing by the device. Further details can be found by checking the supplemental sense byte and information field. If multiple error recoveries occurred during the execution of one command, this device reports the error that was recovered from last. 2 NOT READY. This sense key code indicates that this device cannot be accessed. 3 MEDIUM ERROR. This sense key code indicates that the command terminated with a nonrecoverable error due to a defect on the recording medium or an error that occurred during recording or reading. This sense key code is also returned when this device cannot determine whether the problem was a medium defect or a hardware error (sense key code 4). 4 HARDWARE ERROR. This sense key code indicates that a nonrecoverable hardware error (for example, a controller failure, a device failure, a parity error, etc.) occurred while this device was executing a command or running self-diagnostics. 5 ILLEGAL REQUEST. This sense key code indicates either that there was an illegal parameter in a command packet, or that there was an illegal parameter in additional parameters that were added as data for a command. When this device detects an illegal parameter in a command packet, it terminates the command without making any changes to the medium. When this device detects an illegal parameter in additional parameters that were added as data for a command, it is possible that the device has already made changes to the medium.
  8240. When this sense key code is reported, the command has not yet been executed. 6 UNIT ATTENTION. This sense key code indicates either that a removable media has been switched, or that this device was reset. 7 DATA PROTECT. This sense key code indicates that an attempt was made to write to a block that is write-protected. 8-0xA Reserved 0xB ABORTED COMMAND. This sense key code indicates that the device aborted the command. Recovery may be possible by re-executing the command from the host system. 0xC-0xF Reserved
  8241. MCR
  8242. This field indicates that there was a media change request and the media was ejected (ATA level).
  8243.  
  8244. ABRT
  8245. This field indicates that the command was invalidated because the drive is not ready (ATA level).
  8246.  
  8247. EOMF
  8248. This field indicates that the end of the media was detected (option).
  8249.  
  8250. ILI
  8251. This field indicates that the command has an illegal length (option).
  8252.  
  8253. * Features (Write)
  8254. This register is normally used to specify the data transfer method, but is also used to specify the Set Features parameters among the SATA commands (commands that correspond to the ATA command within the protocol).
  8255.  
  8256. When using this register to specify the data transfer method
  8257. 7 6 5 4 3 2 1 0 Reserved DMA
  8258. DMA
  8259. This field indicates that the transfer of the data to a command is to be performed in DMA mode.
  8260.  
  8261. When using this register to the parameter of Set Features command.
  8262.  
  8263. 7 6 5 4 3 2 1 0 Set(1)/ Clear(0)Feature Feature Number(= "3")
  8264. Feature Number
  8265. This field is the transfer mode setting. The transfer mode that was set in the Sector Count register can be set by writing a "3" in Feature Number and then receiving the Set Feature command.
  8266. The actual transfer mode is specified by using the Sector Count register.
  8267.  
  8268.  
  8269.  
  8270. Interrupt reason(Read) / Sector Count(Write) Address?0x005F 7088
  8271. bit 31-8 7-0 Reserved Interrupt reason / Sector Count * Interrupt reason (Read)
  8272. 7 6 5 4 3 2 1 0 Reserved IO CoD
  8273. IO
  8274. When "0," this field indicates the direction of transfer is from the host to the device; when "1," this field indicates the direction of transfer is from the device to the host.
  8275.  
  8276. CoD
  8277. When "0," this field indicates data; when "1," this field indicates a command.
  8278.  
  8279. IO DRQ CoD Meaning 0 1 1 Ready to receive command packet. 1 1 1 Ready to send message from device to host. 1 1 0 Ready to send data to the host. 0 1 0 Ready to receive data from the host. 1 0 1 The "completed" status is in the status register. * Sector Count (Write)
  8280. 7 6 5 4 3 2 1 0 Transfer Mode Mode value
  8281. Transfer mode according to the sector count register value
  8282. Register value Transfer mode 00000 00x PIO Default Transfer Mode 00001 xxx PIO Flow Control Transfer Mode x 00010 xxx Single Word DMA Mode x 00100 xxx Multi-Word DMA 00011 xxx Reserved(for Pseudo DMA Mode)
  8283. This register is used in combination with the Set Features command, a SATA command.
  8284.  
  8285.  
  8286. Sector Number (Read/Write) Address?0x005F 708C
  8287. bit 31-8 7-0 Reserved Sector Number / Sector Number * Sector Number (Read/Write)
  8288. The information that is obtained in this register is identical to the value of the REQ_STAT command. For details, refer to the explanation of REQ_STAT. The operation of this register does not conform with the ATA standard.
  8289.  
  8290. 7 6 5 4 3 2 1 0 Disc Format Status
  8291.  
  8292. Byte Count Low (Read/Write) Address?0x005F 7090
  8293. bit 31-8 7-0 Reserved Byte Count LSB / Byte Count LSB
  8294. Byte Count High (Read/Write) Address?0x005F 7094
  8295. bit 31-8 7-0 Reserved Byte Count MSB / Byte Count MSB
  8296. These two registers (Byte Count Low and Byte Count High) are used to control the number of bytes that the host sends in response to each DRQ.
  8297. These register show the LSB (Byte Count Low) and the MSB (Byte Count High), respectively, for the byte count.
  8298. These registers are used in PIO transfer mode only. In DMA mode, this byte count is ignored. This count is set before the packet command is issued. This count stipulates the total transfer length for commands that transfer data groups (MODE SELECT/SENSE, INQUIRY, etc.).
  8299. For commands that request multiple DRQ interrupts, such as read and write instructions, the expected transfer length is set in this count.
  8300. Whenever data is transferred, this device sets the number of data bytes that the host transfers in this byte count, and then generates a DRQ interrupt. The contents of this register do not change while DRQ is "1."
  8301.  
  8302.  
  8303. Drive Select (Read/Write) Address?0x005F 7098
  8304. bit 31-8 7-0 Reserved Drive Select /
  8305. Drive Select * Drive Sector (Read/Write)
  8306. 7 6 5 4 3 2 1 0 1 Reserved 1 0 LUN
  8307. LUN
  8308. This field specifies the logical unit that executes the command.
  8309. This parameter is optional, and is reserved for future use.
  8310.  
  8311.  
  8312.  
  8313. Status(Read) / Command (Write) Address?0x005F 709C
  8314. bit 31-8 7-0 Reserved Drive Select /
  8315. Drive Select * Status (Read)
  8316. This register indicates the drive status. If this register is read, the interrupt signal that was pending is cleared.
  8317. When bit 7 (BSY) is "0," the other bits are also valid, and access to the command block is possible. When bit 7 (BSY) is "1," the other bits are invalid, and access to the command block is not possible.
  8318. Bit 7 (BSY) becomes valid 400nsec after the command is accepted.
  8319.  
  8320. 7 6 5 4 3 2 1 0 BSY DRDY DF DSC DRQ CORR Reserved CHECK
  8321. BSY
  8322. This field is set to "1" when a command is accepted.
  8323.  
  8324. DRDY
  8325. This field is set to "1" when response to an ATA command is possible.
  8326.  
  8327. DF
  8328. This field returns the Drive Fault information.
  8329.  
  8330. DSC
  8331. This field indicates that seek processing is complete.
  8332.  
  8333. DRQ
  8334. This field is set to "1" when data transfer with the host is possible.
  8335.  
  8336. CORR
  8337. This field indicates that a correctable error occurred.
  8338.  
  8339. CHECK
  8340. If an error occurs, this bit is set to "1."
  8341.  
  8342. * Command (Write)
  8343. The host sets commands in this register. The command is loaded into the appropriate register in the command block along with the necessary parameters, and becomes valid when the command code is written to the Command register (0x005F 70C9).
  8344. When the GD-ROM device receives a command, it sets BSY within 400nsec.
  8345. The following commands that are part of the ATA standard specifications are supported by this system.
  8346.  
  8347. Command Code NOP 0x00 Soft Reset 0x08 Execute Device Diagnostic 0x90 Packet Command 0xA0 Identify Device 0xA1 Set Features 0xEF
  8348. The contents of the commands are described below.
  8349.  
  8350. NOP (0x00)
  8351. This command enables access to the device status for hosts for which only 16-bit register access is valid. The device executes this command as a response to commands that are not recognized by doing the following:
  8352. ? Setting "abort" in the error register
  8353. ? Setting "error" in the status register
  8354. ? Clearing BUSY in the status register
  8355. ? Asserting the INTRQ signal
  8356. Soft Reset (0x08)
  8357. This command executes a software reset.
  8358. If the GD-ROM device receives a "Soft Reset" command, it initializes the hardware and sets the default parameters. When the device is stopped, the disc motor begins to rotate and the device becomes ready to operate.
  8359. Execute Drive Diagnostic (0x90)
  8360. This command executes the device's internal diagnostics.
  8361. ?a? The device reports the results of its own diagnostics.
  8362. ?b? The device clears the BSY bit and initiates an interrupt.
  8363. The diagnostics codes that are written to the error register are 8-bit codes such as those shown in the table below.
  8364. Error Code Meaning 0x00 Normal 0x03 Data buffer error 0x04 ODC error 0x05 CPU error 0x06 DSC error 0x07 Other error Packet Command (0xA0)
  8365. For details, refer to the GD-ROM Protocol SPI (Sega Packet Interface) Specifications.???ATAPI Packet Command??????
  8366.  
  8367. Identify Device (0xA1)
  8368. This command requests information on the drive (device) that is connected.
  8369. The host can get information from the device by using the ATAPI IDENTIFY DEVICE command.
  8370. Byte Meaning 0x00 Manufacturer's ID 0x01 Model ID 0x02 Version ID 0x03?0x0F Reserved 0x10?0x1F Manufacturer's name (16 ASCII characters) 0x20?0x2F Model name (16 ASCII characters) 0x30?0x3F Firmware version (16 ASCII characters) 0x40?0x4F Reserved Set Features (0xEF)
  8371. This command makes settings concerning the timing and protocol for the interface with the device. A device can only make settings that concern the transfer mode.
  8372. 1. Set "3" in the Feature register Set bit and the Feature Number.
  8373. 2. Specify the transfer method in the upper five bits of the Sector Count register, and the mode number in the lower three bits.
  8374. 3. Issue the Set Features command.
  8375. These settings can be made independently for DMA mode and PIO mode.
  8376.  
  8377. �8.4.5 AICA Register
  8378. The contents and function of each register for the AICA audio chip are explained below.
  8379. The addresses (in the "ADDRESS" column in the table that follows and in the descriptions) are the same for accesses that are internal and external to the AICA. In addition, register accesses by the SH4 are 4-byte accesses only, and only the lower 16 bits are valid.
  8380. * Channel Data
  8381. AICA ADDR. G2 ADDR. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 0x00800000 0x00700000 KX KB -- SS LP PCMS SA[22:16] KX:KYONEX 0x00800004 0x00700004 SA[15:0] LP:LPCTL 0x00800008 0x00700008 LSA[15:0] KB:KYONB 0x0080000C 0x0070000C LEA[15:0] SS:SSCTL 0x00800010 0x00700010 D2R[4:0] D1R[4:0] -- AR[4:0] 0x00800014 0x00700014 -- LS KRS[3:0] DL[4:0] RR[4:0] LS:LPSLNK 0x00800018 0x00700018 -- OCT[3:0] -- FNS[9:0] 0x0080001C 0x0070001C RE LFOF[4:0] PLFOWS PLFOS[2:0] ALFOWS ALFOS[2:0] RE:LFORE 0x00800020 0x00700020 -- IMXL[3:0] ISEL[3:0] 0x00800024 0x00700024 -- DISDL[3:0] -- DIPAN[4:0] 0x00800028 0x00700028 TL[7:0] -- Q[4:0] 0x0080002C 0x0070002C -- FLV0[12:0] 0x00800030 0x00700030 -- FLV1[12:0] 0x00800034 0x00700034 -- FLV2[12:0] 0x00800038 0x00700038 -- FLV3[12:0] 0x0080003C 0x0070003C -- FLV4[12:0] 0x00800040 0x00700040 -- FAR[4:0] -- FD1R[4:0] 0x00800044 0x00700044 -- FD2R[4:0] -- FRR[4:0] 0x00800080
  8382. |
  8383. 0x008000C4 0x00700080
  8384. |
  8385. 0x007000C4 SLOT 1 CONTROL REGISTER : : ? 0x00801F80
  8386. |
  8387. 0x00801FC4 0x00701F80
  8388. |
  8389. 0x00701FC4 SLOT 63 CONTROL REGISTER 0x00802000 0x00702000 -- EFSDL[3:0] -- EFPAN[4:0] DSP_OUT_1 : : ? 0x00802044 0x00702044 -- EFSDL[3:0] -- EFPAN[4:0] DSP_OUT_18 Table 8-21 Channel Data
  8390.  
  8391. Register Descriptions (Channel Data)
  8392. The various registers that comprise the channel data are described below. (All registers are read/write registers, unless indicated otherwise.)
  8393. KYONEX(-/w)
  8394. Writing "1" to this register executes KEY_ON, OFF for all slots. Writing "0" is invalid.
  8395. KYONB
  8396. This register registers KEY_ON, OFF.
  8397. (If KEY_ON is to be registered simultaneously, set this bit to "1" for all slots to be turned ON, and then write a "1" to KEYONEX for one of the slots.)
  8398. SSCTL
  8399. 0: Use the data in external memory (SDRAM) as sound input data.
  8400. 1: Use noise as sound input data.
  8401. LPCTL
  8402. 0: Loop OFF (The LSA and LEA settings are required; once LEA is reached, processing ends.)
  8403. 1: Forward loop.
  8404. PCMS[1:0]
  8405. (Cannot be changed during ADPCM playback.)
  8406. 0: 16-bit PCM (two's complement format)
  8407. 1: 8-bit PCM (two's complement format)
  8408. 2: 4-bit ADPCM (Yamaha format)
  8409. 3: 4-bit ADPCM long stream
  8410. SA[22:0]
  8411. This register specifies the starting address for the sound data in terms of the byte address. However,
  8412. when PCMS = 0, the LSB of SA must be "0."
  8413. PCMS ="2" or "3", LSB two bits of SA must be "00".
  8414. LSA[15:0]
  8415. This register specifies the loop starting address for the sound data in terms of the number of samples from SA.
  8416. The number of samples indicates the number of bytes in 8-bit PCM, the number of pairs of bytes (16 bits) in the case of 16-bit PCM, and the number of half-bytes in the case of ADPCM. The minimum values that can be set are limited by the pitch and the loop mode. Because the actual value is not approximated at values near SA due to the specifications for ADPCM, as large a value as possible must be used for LSA (LSA > 0x8). (When in a loop) When using long stream, the lowest two bits of LSA must be "00".
  8417. LEA[15:0]
  8418. This register specifies the loop ending address for the sound data in terms of the number of samples from SA.
  8419. The minimum value that can be set is limited by the pitch and the loop mode.
  8420. Specify so that SA?LSA?LEA. When using long stream, the lowest two bits of LEA must be "00".
  8421. Refer to section 8.1.1.1, "Loop Control."
  8422. AR[4:0]
  8423. This register specifies the rate of change in the EG in the attack state. (The volume increases.)
  8424. D1R[4:0]
  8425. This register specifies the rate of change in the EG in the decay 1 state. (The volume decreases.)
  8426. D2R[4:0]
  8427. This register specifies the rate of change in the EG in the decay 2 state. (The volume decreases.)
  8428. RR[4:0]
  8429. This register specifies the rate of change in the EG in the release state. (The volume decreases.)
  8430. DL[4:0]
  8431. This register specifies the EG level at which the transition is made from decay 1 to decay 2, making the specification through the upper 5 bits of the EG code.
  8432. KRS[3:0]
  8433. This register specifies the EG key rate scaling rate (as a positive number).
  8434. 0x0: Minimum scaling
  8435. :
  8436. 0xE: Maximum scaling
  8437. 0xF: Scaling off
  8438. LPSLNK
  8439. Loop start link function: when the sound slot input data address that is read exceeds the loop start address, the EG makes the transition to decay 1.
  8440. (When EG = 000, the transition is not made.) In this case, the transition to decay 2 may not be made, depending on the DL setting.
  8441. (Refer to section 8.1.1.3, "AEG.")
  8442. OCT[3:0]
  8443. This register specifies the octave in two's complement format. The values that appear in parentheses in the table below could generate noise in the ADPCM, so they should be used with caution. (A maximum of "2" (when FNS = 0) is valid.)
  8444.  
  8445. OCT 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 Interval -8 -7 -6 -5 -4 -3 -2 -1 0 +1 (+2) (+3) (+4) (+5) (+6) (+7) Table 8-22 Octave Specification
  8446. FNS[9:0]
  8447. The pitch is set along with OCT by setting the F number.
  8448. Pitch: P[CENT] = 1200 ? log2((2^10 + FNS)/2^10)
  8449. When FNS = 0 (and OCT = 0), the interval matches the sampling source. The pitch error (pitch precision) that is equivalent to the LSB of the FNS is 1.69.
  8450. (Refer to section 8.1.1.4 �PG.")
  8451. LFORE
  8452. This register specifies whether or not to put the LFO into the initial state. (If noise was selected, the setting is invalid.)
  8453. 0: Do not put the LFO in the reset state.
  8454. 1: Put the LFO in the reset state.
  8455. LFOF[4:0]
  8456. This register specifies the LFO oscillating frequency. (If noise was selected, the setting is invalid.)
  8457. ALFOWS[1:0]
  8458. This register specifies the shape of the ALFO waveform.
  8459. PLFOWS[1:0]
  8460. This register specifies the shape of the PLFO waveform.
  8461. ALFOS[2:0]
  8462. This register specifies the degree of mixing of the LFO to the EG.
  8463. PLFOS[2:0]
  8464. This register specifies the degree of the LFO on the pitch.
  8465. (Refer to section 8.1.1.5, "LFO.")
  8466. ISEL[3:0]
  8467. This register specifies the MIXS register address for each slot when inputting sound slot output data to the DSP's MIXS register.
  8468. (Supplement) MIXS determines the sum of the inputs for all slots and handles the result as the DSP input. MIXS has an area for adding the input on each slot, and an area for storing the interval and value of one sample. These areas are allocated in alternation. As a result, reads on the DSP side are possible at any step.
  8469. (Caution) Make the settings so that the sum of the inputs to the MIXS does not exceed 0dB. (There is no overflow protect function.)
  8470. TL[7:0]
  8471. Total level: This register specifies the actual attenuation, which is derived by multiplying the EG value by this value which indicates the attenuation.
  8472. DIPAN[4:0]
  8473. This register specifies the orientation for each slot when sending direct data.
  8474. EFPAN[4:0]
  8475. This register specifies the orientation for each slot of effect data and external input data.
  8476. IMXL[3:0]
  8477. This register specifies the level for each slot when inputting sound slot output data to the DSP MIXS register. (Refer to Table 8-23 below.)
  8478. DISDL[3:0]
  8479. This register specifies the send level for each slot when outputting direct data to the DAC. (Refer to the table below.)
  8480. EFSDL[3:0]
  8481. This register specifies the send level for each slot when outputting of effect data and external input data to the DAC.
  8482. Register value Volume 0 -MAXdB 1 -42dB 2 -39dB ? ? 0xD -6dB 0xE -3dB 0xF 0dB Table 8-23 Send Level
  8483. (Refer to section 8.1.1.6, "MIXER.")
  8484. Q[4:0]
  8485. This register contains resonance data, and sets the Q value for the FEG filter. A gain range from -3.00 to 20.25dB can be specified. The relationship between the bit settings and the gain is illustrated in the following table. (Q[dB] = 0.75 ? register value - 3)
  8486. DATA GAIN[dB] DATA GAIN[dB] 11111 20.25 00110 1.50 11100 18.00 00100 0.00 11000 15.00 00011 -0.75 10000 9.00 00010 -1.50 01100 6.00 00001 -2.25 01000 3.00 00000 -3.00 Table 8-24 Resonance Data Setting Values
  8487. The definition of Q is illustrated in the following graph.
  8488.  
  8489.  
  8490. Fig. 8-13 Definition of Q
  8491. FLV0[12:0]
  8492. This is the cutoff frequency at attack start.
  8493. FLV1[12:0]
  8494. This is the cutoff frequency at attack end (decay start).
  8495. FLV2[12:0]
  8496. This is the cutoff frequency at decay end (sustain start).
  8497. FLV3[12:0]
  8498. This is the cutoff frequency at KOFF.
  8499. FLV4[12:0]
  8500. This is the cutoff frequency after release.
  8501. FAR[4:0]
  8502. However, only values ranging from 0x0008 to 0x1FF8 can be used for FLV0 through 4. Playback may not be possible if any other values are used.
  8503.  
  8504. The following graph summarizes the function of each register.
  8505.  
  8506.  
  8507. Fig. 8-14 Function of Each Register
  8508.  
  8509.  
  8510. The following graph roughly shows the correspondence between the filter cutoff frequency and the registers.
  8511.  
  8512. Fig. 8-15 Filter Cutoff Frequency
  8513. * To set the filter to pass signals through, set Q to 4h and FLV to 0x1FF8.
  8514. FAR[4:0]
  8515. This register specifies the rate of change in the FEG in the attack state.
  8516. FD1R[4:0]
  8517. This register specifies the rate of change in the FEG in the decay 1 state.
  8518. FD2R[4:0]
  8519. This register specifies the rate of change in the FEG in the decay 2 state.
  8520. FRR[4:0]
  8521. This register specifies the rate of change in the FEG in the release state.
  8522.  
  8523.  
  8524. * Common Data (Data that Does Not Depend on the Channel)
  8525. AICA ADDR. G2 ADDR. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 0x00802800 0x00702800 MN -- M8 D8 VER[3:0] MVOL[3:0] MN:Mono D8:DAC18B
  8526. M8:MEM8MB 0x00802804 0x00702804 $T RBL -- RBP[22:11] $T:TESTB0(IC TEST) 0x00802808 0x00702808 -- OF OE IO IF IE MIBUF[7:0] IF:MIFUL IO:MIOVF OE:MOEMP OF:MOFUL IE:MIEMP 0x0080280C 0x0070280C -- AF MSLC[5:0] MOBUF[7:0] AF:AFSET 0x00802810 0x00702810 LP SGC EG[12:0] 0x00802814 0x00702814 CA[15:0] 0x00802880 0x00702880 DMEA[22:16] -- $TSCD[2:0] $T MRWINH[3:0] $*** (IC TEST) 0x00802884 0x00702884 DMEA[15:2] -- 0x00802888 0x00702888 GA DRGA[14:2] -- GA:DGATE 0x0080288C 0x0070288C DI DLG[14:2] -- EX DI:DDIR?EX:DEXE 0x00802890 0x00702890 -- TACTL[2:0] TIMA[7:0] 0x00802894 0x00702894 -- TBCTL[2:0] TIMB[7:0] 0x00802898 0x00702898 -- TCCTL[2:0] TIMC[7:0] 0x0080289C 0x0070289C -- SCIEB[10:0] 0x008028A0 0x007028A0 -- SCIPD[10:0] 0x008028A4 0x007028A4 -- SCIRE[10:0] 0x008028A8 0x007028A8 -- SCILV0[7:0] 0x008028AC 0x007028AC -- SCILV1[7:0] 0x008028B0 0x007028B0 -- SCILV2[7:0] 0x008028B4 0x007028B4 -- MCIEB[10:0] 0x008028B8 0x007028B8 -- MCIPD[10:0] 0x008028BC 0x007028BC -- MCIRE[10:0] -- 0x00702C00 -- *VREG -- AR AR:ARMRST 0x00802D00 -- -- L7 L6 L5 L4 L3 L2 L1 L0 For interruption 0x00802D04 -- -- RP M7 M6 M5 M4 M3 M2 M1 M0 For interruption RP:ReadProtection -- 0x00710000 *RTC[31:16] -- 0x00710004 *RTC[15:0] -- 0x00710008 -- *EN EN:RTC Write Enable
  8527. Table 8-25 Common Data
  8528.  
  8529. Register Descriptions (Common Data)
  8530. The various registers that comprise the common data are described below.
  8531.  
  8532. MONO (-/w)
  8533. 0: Enables the panpot information.
  8534. 1: Disables the panpot information.
  8535. (Note) If the panpot information has been disabled, a sound that is on only one channel doubles in volume, so it is necessary to lower MVOL.
  8536. MVOL[3:0] (-/w)
  8537. This is the master volume for the digital output to the DAC.
  8538. (Refer to section 8.1.1.6, "MIXER.")
  8539. DAC18B (-/w)
  8540. 0: Makes the digital output a 16-bit DAC interface.
  8541. 1: Makes the digital output an 18-bit DAC interface.
  8542. MEM8MB (-/w)
  8543. This register specifies the size of the memory that is used for wave memory.
  8544. 0?16Mbit_SDRAM
  8545. 1?64Mbit_SDRAM
  8546.  
  8547. The following table indicates the relationship between memory size and the memory space that is used.
  8548.  
  8549. ADDRESS 16Mbit
  8550. SDRAM 64Mbit
  8551. SDRAM 0x00FF FFFF
  8552. |
  8553. 0x00E0 0000 Not
  8554. Available Available 0x00DF FFFF
  8555. |
  8556. 0x00C0 0000 0x00BF FFFF
  8557. |
  8558. 0x00A0 0000 0x009F FFFF
  8559. |
  8560. 0x0080 0000 Available Table 8-26 Relationship between Memory Space and the Memory That Is Used
  8561. VER[3:0] (r/-)
  8562. This register is used to read the version information for the AICA chip based on these specifications.
  8563. RBL[1:0] (-/w)
  8564. This specifies the length of the ring buffer.
  8565. 0?8K words
  8566. 1?16K words
  8567. 2?32K words
  8568. 3?64K words
  8569. RBP[22:11] (-/w)
  8570. This register specifies the starting address of the ring buffer. (1K word boundary)
  8571. MIBUF[7:0] (r/-)
  8572. This register is the MIDI input data buffer. (4-byte FIFO buffer)
  8573. MIOVF (r/-)
  8574. This register indicates that the input FIFO buffer has overflowed.
  8575. MIEMP (r/-)
  8576. Indicates that the input FIFO is empty.
  8577. MIFUL (r/-)
  8578. This register indicates that the input FIFO buffer is full (i.e., has no free space).
  8579.  
  8580. (The three flags MIOVF, MIEMP and MIFUL indicate the status before reading MIBUF[7:0].)
  8581.  
  8582. MOFUL (r/-)
  8583. This register indicates that the output FIFO buffer is full.
  8584. MOEMP (r/-)
  8585. This register indicates that the output FIFO buffer is empty.
  8586. MOBUF[7:0] (-/w)
  8587. This register is the MIDI output data buffer.
  8588. AFSEL (-/w)
  8589. This register determines whether to use the AEG or the FEG to monitor the EG.
  8590. 0: AEG monitor
  8591. 1: FEG monitor
  8592. MSLC[5:0] (-/w)
  8593. This register specifies the slot number for which to monitor SGC, CA, EG, and LP below.
  8594. SGC[1:0] (r/-)
  8595. This register monitors the current EG status.
  8596. 0: Attack
  8597. 1: Decay 1
  8598. 2: Decay 2
  8599. 3: Release
  8600. CA[15:10] (r/-)
  8601. This register indicates the position of the sample that is currently being read from the sound source, in terms of the upper 16 bits of the relative sample number from the SA. The LSB is equivalent to one sample.
  8602. EG[12:0] (r/-)
  8603. These bits monitor the upper 13 bits of the current EG value. Only the lower 10 bits are valid for AEG. When the channel is selected by MSLC[5:0], these flags can be used to check for the loop end. Performing a read while a flag is "1" clears that flag to "0."
  8604. LP (r/-)
  8605. This bit is set when the sample position that is read by the sound source loops. However, this bit is undefined when monitoring FEG. When a slot for which this bit has been set is set in MSLC[5:0], the flag is cleared to "0" by reading LP.
  8606. MRWINH[3:0] (-/w)
  8607. By writing a "1" to each of the bits shown below, the corresponding type of wave memory access can be prohibited. (Register access cannot be prohibited.)
  8608. bit 0: Access by DSP
  8609. bit 1: Read by sound source
  8610. bit 2: Access by AICA's built-in sound processor (ARM, hereafter) (This bit cannot be written by the ARM.)
  8611. bit 3: Access by system (SH4)
  8612. DGATE (r/w)
  8613. This register specifies zero clear of the destination area by DMA transfer.
  8614. 0: Zero clear is not executed.
  8615. 1: Zero clear is executed.
  8616. DDIR (r/w)
  8617. This register specifies the DMA transfer direction.
  8618. 0: Transfer to AICA register from wave memory.
  8619. 1: Transfer to wave memory from AICA register.
  8620. DEXE (r/w)
  8621. This register specifies DMA start. (The value goes to "0" at DMA end.)
  8622. Writing a "1" to this register starts DMA. (Writing "0" is invalid.)
  8623. DMEA[22:2] (-/w)
  8624. This register specifies, as a word address, the wave memory address where DMA is to start.
  8625. DRGA[14:2] (-/w)
  8626. This register specifies, as a word address, the internal register address where DMA is to start.
  8627. DLG[14:2] (-/w)
  8628. This register specifies the number of words to be transferred by DMA.
  8629. (Note) The source and destination areas must not exceed the memory area and the internal register area. DMA-related registers must not be changed while DMA transfer is in progress.
  8630. (Supplement) Registers are allocated to the memory space [AICA:0x00800000-0x008045C7],[G2:0x00700000-0x007045C7]. The transfer address always changes in the increasing direction. DMA to an RTC register is not possible. The offset address from the start of each area is input in the DMEA and DRGA registers.
  8631. TACTL[2:0] (-/w)
  8632. This register specifies the cycle for incrementing timer A.
  8633. 0: Increment once every sample
  8634. 1: Increment once every 2 samples
  8635. 2: Increment once every 4 samples
  8636. 3: Increment once every 8 samples
  8637. 4: Increment once every 16 samples
  8638. 5: Increment once every 32 samples
  8639. 6: Increment once every 64 samples
  8640. 7: Increment once every 128 samples
  8641. TIMA[7:0] (-/w)
  8642. Timer A (An interrupt request is generated each time that the UP counter changes from All �1� to All �0�.)
  8643. TBCTL[2:0] (-/w)
  8644. This register specifies the increment cycle for timer B. (The codes are the same as for timer A.)
  8645. TIMB[7:0] (-/w)
  8646. Timer B (Interrupt generation is the same as for timer A.)
  8647. TCCTL[2:0] (-/w)
  8648. This register specifies the increment cycle for timer C. (The codes are the same as for timer A.)
  8649. TIMC[7:0] (-/w)
  8650. Timer C (Interrupt generation is the same as for timer A.)
  8651. SCIPD[10:0]
  8652. This register stores interrupt requests to the ARM. (The bit correspondence is as shown below.)
  8653. bit 0(r): Interrupt request to external interrupt input pin INTN (SCSI)
  8654. bit 1(r): Reserved
  8655. bit 2(r): Reserved
  8656. bit 3(r): This is the MIDI input interrupt request; an interrupt request is generated when valid data is loaded into the input FIFO buffer. Therefore, when reading the FIFO buffer, it is necessary to read out the entire buffer in one operation, so that the FIFO buffer is then empty. This interrupt request is automatically cleared when the FIFO buffer is emptied.
  8657. bit 4(r): DMA end interrupt request
  8658. bit 5(r/w): This interrupt request to the ARM is written by the CPU; only a "1" can be written to this bit. (If a "0" is written, it is invalid.) This flag can be set by the system (SH4) or by the ARM.
  8659. bit 6(r): Timer A interrupt request
  8660. bit 7(r): Timer B interrupt request
  8661. bit 8(r): Timer C interrupt request
  8662. bit 9(r): This is the MIDI output interrupt request. This interrupt request is generated when the output FIFO buffer becomes empty. This interrupt request is automatically cleared when a write to the output FIFO buffer causes it to no longer be empty.
  8663. bit 10(r): Sample interval interrupt request
  8664. SCIEB[10:0] (r/w)
  8665. This register enables interrupts to the ARM. If a bit is set to "1," the interrupt that corresponds to that bit is enabled.
  8666. SCIRE[10:0] (-/w)
  8667. Writing a "1" to a bit in this register resets the interrupt request that corresponds to that bit.
  8668. SCILV0[7:0] (-/w)
  8669. This register specifies bit 0 of the level codes for the interrupts to the ARM that are defined by the corresponding bits.
  8670. SCILV1[7:0] (-/w)
  8671. This register specifies bit 1 of the level codes for the interrupts to the ARM that are defined by the corresponding bits.
  8672. SCILV2[7:0] (-/w)
  8673. This register specifies bit 2 of the level codes for the interrupts to the ARM that are defined by the corresponding bits. (For details on the bits, refer to the description of SCIPD.)
  8674. (Supplement) The level of bits 7, 8, 9, and 10 of an interrupt request can be specified as a group through bit 7.
  8675.  
  8676. MCIPD[10:0]
  8677. This register stores interrupt requests to the system (SH4).
  8678. bit 0(r): Interrupt request to external interrupt input pin INTN (SCSI)
  8679. bit 1(r): Reserved
  8680. bit 2(r): Reserved
  8681. bit 3(r): This is the MIDI input interrupt request; an interrupt request is generated when valid data is loaded into the input FIFO buffer. Therefore, when reading the FIFO buffer, it is necessary to read out the entire buffer in one operation, so that the FIFO buffer is then empty. This interrupt request is automatically cleared when the FIFO buffer is emptied.
  8682. bit 4(r): DMA end interrupt request
  8683. bit 5(r/w): This interrupt request to the system (SH4) is written by the CPU; only a "1" can be written to this bit. (If a "0" is written, it is invalid.) This flag can be set by the system (SH4) or by the ARM.
  8684. bit 6(r): Timer A interrupt request
  8685. bit 7(r): Timer B interrupt request
  8686. bit 8(r): Timer C interrupt request
  8687. bit 9(r): This is the MIDI output interrupt request. This interrupt request is generated when the output FIFO buffer becomes empty. This interrupt request is automatically cleared when a write to the output FIFO buffer causes it to no longer be empty.
  8688. bit 10(r): Sample interval interrupt request
  8689. MCIEB[10:0] (r/w)
  8690. This register enables interrupts to the system (SH4). If a bit is set to "1," the interrupt that corresponds to that bit is enabled.
  8691. MCIRE[10:0] (-/w)
  8692. Writing a "1" to a bit in this register resets the interrupt request that corresponds to that bit.
  8693. (Supplement) The MCINTN interrupt signal to the system (SH4) is regarded to indicate the start of the above interrupt request, and generates a negative pulse that corresponds to one clock cycle on �MCCK�. Interrupt levels cannot be specified for interrupts to the system (SH4).
  8694. ARMRST (r/w)
  8695. This register resets the ARM.
  8696. 0: Reset clear
  8697. 1: Reset
  8698. (Note) This register can only be controlled by the system (SH4).
  8699. RP (-/w)
  8700. This register sets control of the SDRAM (wave memory) from the system side (SH4) to the "write only" state.
  8701. 0: The system (SH4) can read/write SDRAM.
  8702. 1: The system (SH4) can only write SDRAM.
  8703. (Note) This register can only be controlled by the ARM.
  8704. L[7:0] (r/-)
  8705. This register indicates the number of the interrupt input to the ARM. Note that using L[7:3] is prohibited.
  8706. (Note) This register can only be controlled by the ARM.
  8707. M[7:0] (-/w)
  8708. When the ARM has completed interrupt processing, it indicates the end of interrupt processing by setting this bit to "1". Note that using M[7:1] is prohibited.
  8709. (Note) This register can only be controlled by the ARM.
  8710.  
  8711.  
  8712. The following registers are inside the AICA, but are not related to the sound system. These registers can only be controlled from the SH4 side.
  8713.  
  8714. * VREG[1:0] (r/w)
  8715. This register sets the operation and output mode of the DVE (Digital Video Encoder). (Refer to section 6.1, "DVE.") The relationship between the setting in this register and the output mode is shown in the table below.
  8716.  
  8717. VREG1 VREG0 DVE output mode 0 0 VGA ( RGB ) 0 1 VGA ( RGB ) 1 0 NTSC/PAL ( RGB ) 1 1 NTSC/PAL ( VBS / Y+S / C ) Table 8-27 Video Mode Setting
  8718.  
  8719. * RTC[31:0] (r/w)
  8720. This is the setting register for the AICA's internal real time clock. This register indicates the status of the counter that is incremented by one each second. This register permits both read and write access. This register can count for up to 136 years. For details on usage, refer to section 4.2.3, "RTC."
  8721. * EN (-/w)
  8722. Setting this bit to "1" enables writes to the RTC. For details, refer to section 4.2.3, "RTC."
  8723.  
  8724. * DSP Data
  8725. The register configuration of the DSP section in the chip is shown below.
  8726.  
  8727. AICA ADDR. G2 ADDR. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 0x00803000
  8728. |
  8729. 0x008031FF 0x00703000
  8730. |
  8731. 0x007031FF COEF REG
  8732. "COEF[12:0]" 0 0 0 00?127 0x00803200
  8733. |
  8734. 0x008032FF 0x00703200
  8735. |
  8736. 0x007032FF MEMORY ADDRESS REG
  8737. "MADRS[16:1]"
  8738. 00?63 0x00803400 0x00703400 DSP MICRO PROGRAM
  8739. "MPRO[63:48]" STEP_0 0x00803404 0x00703404 DSP MICROPROGRAM
  8740. "MPRO[47:32]" 0x00803408 0x00703408 DSP MICROPROGRAM
  8741. "MPRO[31:16]" 0x0080340C 0x0070340C DSP MICROPROGRAM
  8742. "MPRO[15:0]" 0x00803410
  8743. |
  8744. 0x00803BEC 0x00703410
  8745. |
  8746. 0x00703BEC ? STEP_1?
  8747. STEP_126 0x00803BF0 0x00703BF0 DSP MICRO PROGRAM
  8748. "MPRO[63:48]" STEP_127 0x00803BF4 0x00703BF4 DSP MICROPROGRAM
  8749. "MPRO[47:32]" 0x00803BF8 0x00703BF8 DSP MICROPROGRAM
  8750. "MPRO[31:16]" 0x00803BFC 0x00703BFC DSP MICROPROGRAM
  8751. "MPRO[15:0]" 0x00804000
  8752. |
  8753. 0x008043FF 0x00704000
  8754. |
  8755. 0x007043FF -- LOW "TEMP[7:0]" 00?127 TEMPBUFFER HIGH
  8756. "TEMP[23:8]" 0x00804400
  8757. |
  8758. 0x008044FF 0x00704400
  8759. |
  8760. 0x007044FF -- LOW "MEMS[7:0]" 00?31 SOUND MEMORY DATA HIGH
  8761. "MEMS[23:8]" 0x00804500
  8762. |
  8763. 0x0080457F 0x00704500
  8764. |
  8765. 0x0070457F -- "MIXS[3:0]" 00?15 MIXSOUND SLOT DATA STACK
  8766. "MIXS[19:4]" 0x00804580
  8767. |
  8768. 0x008045BF 0x00704580
  8769. |
  8770. 0x007045BF EFCTED DATA OUTPUT
  8771. "EFREG[15:0]" 00?15 0x008045C0
  8772. |
  8773. 0x008045C7 0x007045C0
  8774. |
  8775. 0x007045C7 EXTERNAL INPUT DATA STACK
  8776. "EXTS" 00?01
  8777. Table 8-28 DSP Data
  8778.  
  8779. Register Descriptions
  8780. The various registers that comprise the DSP data are described below. (EXTS is read-only; all of the other registers are read/write.)
  8781.  
  8782. COEF[12:0]
  8783. This is the DSP coefficient buffer. (Number of data items: 128)
  8784. (Note) In order to maintain compatibility in the event of a future expansion of the data width to 16 bits, a "0" should be written to the lower three bits that are undefined in the register map.
  8785. MADRS[16:1]
  8786. This is the DSP address buffer. (Number of data items: 64)
  8787. MPRO[63:0]
  8788. This is the DSP microprogram buffer. (Number of data items: 128)
  8789. TEMP[23:0]
  8790. This is the DSP work buffer. (Number of data items: 128)
  8791. This buffer has a ring buffer configuration, but the pointer is decremented by "1" for each sample.
  8792. MEMS[23:0]
  8793. This is the buffer for input data from wave memory. (Number of data items: 32)
  8794. Actual writes to MEMS[7:0] are executed at the same time as writes to MEMS[23:16].
  8795. MIXS[19:0]
  8796. This is the buffer for the sound data from the input mixture. (Number of data items: 16)
  8797. (Note) Writes to MIXS[19:0] are used for LSI testing.
  8798. Writes that are not made in test mode are invalid for the following reasons:
  8799. - Regardless of the register settings, data from the sound source is always being written to this register.
  8800. - Second-generation data is retained in order to integrate all slots, but it is not possible to specify a generation when accessing the register.
  8801. EFREG?15:0]
  8802. This is the DSP output buffer. (Number of data items: 16)
  8803. EXTS[15:0]
  8804. This is the digital audio input data buffer. (Number of data items: 2)
  8805.  
  8806. �8.5
  8807. List of Interrupts
  8808. �8.5.1 Interrupt Tree
  8809. Diagram only
  8810. �8.5.2
  8811. List of Interrupt Sources
  8812. (System Bus-related Interrupts)
  8813. i/f Block Internal Name (Source) Type Description PVR i/f PIDEINT
  8814. (End of DMA) Notification When a PVR-DMA transfer has been completed normally, this interrupt is generated when completion of the write in the destination has been confirmed for a "PVR CORE ? Root Bus (the HOLLY's internal bus)" transfer, and when the write is completed on the PVR side for a "Root Bus ? PVR" transfer. PIIAINT
  8815. (Illegal Address Set) Error This interrupt is generated when an address outside of the range indicated in Note 1 1 has been set in SB_PDSTAP(0x005F7C00), SB_PDSTR(0x005F7C04) both when the address is written to the register and when an attempt is made to initiate DMA with that address in effect. PIORINT
  8816. (DMA Over Run) Error This interrupt is generated when a PVR-DMA transfer that is in progress attempts to access an address outside of the range specified by Note 1. Maple i/f MDEINT
  8817. (End of DMA) Notification This interrupt is generated when a Maple-DMA transfer (transmission/reception) has ended normally, when the transfer is completed at the instruction level. MVOINT
  8818. (V-Blank Over) Notification This interrupt is generated when a Maple interface transmission/reception operation spans V-Blank_In. MIAINT
  8819. (Illegal Address Set) Error This interrupt is generated when an address outside of the range indicated in Note 22 has been set in SB_MDSTAR(0x005F 6C04) both when the address is written to the register and when an attempt is made to initiate DMA with that address in effect. MORINT
  8820. (DMA Over Run) Error This interrupt is generated when a Maple-DMA transfer that is in progress attempts to access an address outside of the range specified by Note 2. MFOFINT
  8821. (Write FIFO Over Flow) Error This interrupt is generated when an attempt was made to write data from a peripheral to the FIFO buffer, and the FIFO buffer was already full. The interrupt is generated at the time of the write to the FIFO buffer. MICINT
  8822. (Illegal Command) Error This interrupt is generated when the Maple interface loaded in an illegal instruction through a transmission/reception operation. The interrupt is generated at the time of the instruction fetch. G1bus i/f G1DEINT
  8823. (End of DMA) Notification When a G1-DMA transfer has been completed normally, this interrupt is generated when completion of the write in the destination has been confirmed for a "G1 Bus ? Root Bus" transfer and when the write is completed on the G1 side for a "Root Bus ? G1 Bus" transfer. G1IAINT
  8824. (Illegal Address Set) Error This interrupt is generated when an address outside of the range indicated in Note 33 has been set in SB_GDSTAR(0x005F 7404) both when the address is written to the register and when an attempt is made to initiate DMA with that address in effect.
  8825. G1bus i/f G1ORINT
  8826. (DMA Over Run) Error This interrupt is generated when a G1-DMA transfer that is in progress attempts to access an address outside of the range specified by Note 3. G1ATINT
  8827. (G1 Access At DMA) Error This interrupt is generated when an attempt is made during a G1-DMA transfer to access ROM or the GD-ROM device on the G1 Bus from the Root bus. G1GDINT
  8828. (From GD-ROM Drive) Status This interrupt is generated by the GD-ROM device. (This is an asynchronous level interrupt.) G2bus i/f G2DEAINT(End of AICA-DMA) Notification When a G2-DMA transfer has been completed normally, these four interrupts are generated when completion of the write in the destination has been confirmed for a "G2 Bus ? Root Bus" transfer, and when the write is completed on the G2 side for a "Root Bus ? G2 Bus" transfer. G2DE1INT(End of Ext-DMA1) G2DE2INT(End of Ext-DMA2) G2DEDINT(End of Dev-DMA) G2IAAINT
  8829. (AICA-DMA Illegal Address Set) Error These four interrupts are generated when an address outside of the range indicated in Note 44 has been set in the corresponding "DMA Start Address," both when the address is written to the register and when an attempt is made to initiate DMA with that address in effect. G2IA1INT
  8830. (Ex1-DMA Illegal Address Set) G2IA2INT
  8831. (Ex2-DMA Illegal Address Set) G2IADINT
  8832. (Dev-DMA Illegal Address Set) G2ORAINT
  8833. (AICA-DMA Over Run) Error These four interrupts are generated if, during an attempt at access by a G2-DMA transfer, the target device does not respond within the specified period of time. G2OR1INT
  8834. (Ex1-DMA Over Run) G2OR2INT
  8835. (Ex1-DMA Over Run) G2ORDINT
  8836. (Dev-DMA Over Run) G2TOAINT
  8837. (AICA-DMA Time Out) Error These four interrupts are generated if, during an attempt at access by a G2-DMA transfer, the target device does not respond within the specified period of time. G2TO1INT
  8838. (EX1-DMA Time Out) G2TO2INT
  8839. (EX2-DMA Time Out) G2TODINT
  8840. (Dev-DMA Time Out) G2TOCINT
  8841. (Time Out in CPU Accessing) Error this interrupt is generated during an access from the CPU if the target device on the G2 Bus does not respond within the specified period of time. G2AICINT (from AICA) Status These three interrupts are interrupt signals from their respective devices; the timing with which these interrupts are generated depends on the device. (These are asynchronous level interrupts.) G2MDMINT (from Modem) G2EXTINT (from Ext. DEV) DDT i/f DTDE2INT (End of ch2-DMA) Notification This interrupt is generated at the end of a DMA transfer. DTDESINT (End of Sort-DMA) Notification This interrupt is generated at the end of a DMA transfer. DTCESINT
  8842. (Sort-DMA Command Error) Error When a format that Sort-DMA cannot handle is encountered in the polygon parameters, this interrupt is generated while loading the Global Parameters. SH4 i/f CIHINT
  8843. (Accessing to Inhibited Area) Error This interrupt is generated when the area indicated in Note 5 5 is accessed.
  8844. Table 8-29
  8845. (Drawing Core-related Interrupts)
  8846. PCEOVINT
  8847. (End Of Render Video) Notification This interrupt is generated when the last data in a frame is transferred to the frame buffer. PCEOIINT
  8848. (End Of Render ISP) Notification This interrupt is generated when rendering of the final Tile to the ISP has been completed. PCEOTINT
  8849. (End Of Render TSP) Notification This interrupt is generated when rendering of the final Tile to the TSP has been completed. PCVIINT
  8850. (V-Blank In) Notification Indicates the start of the V-Blank interval. (This interrupt is generated when the raster reaches the value specified by the SPG_VBLANK_INT register.) PCVOINT
  8851. (V-Blank Out) Notification Indicates the end of the V-Blank interval. (This interrupt is generated when the raster reaches the value specified by the SPG_VBLANK_INT register.) PCHIINT
  8852. (H-Blank In) Notification Indicates the start of the H-Blank interval. This interrupt can be generated either at a specified line, after every specified number of lines, or every line; this selection is made through the SPG_HBLANK_INT register. PCIOCINT
  8853. (ISP Out of Cache) Error ISP parameter cache overflow. PCHZDINT
  8854. (Hazard Processing of Strip Buffer) Error This interrupt is generated when rendering is forcibly terminated due to strip buffer switching.
  8855. Table 8-30
  8856.  
  8857. (Tile Accelerator-related Interrupts)
  8858. TAYUVINT
  8859. (End Of YUV Data Strage) Notification This interrupt is generated when the number of macroblocks of YUV data set in the TA_YUV_TEX_CTRL register have been stored in texture memory. TAEOINT
  8860. (End Of Opaque List Strage) Notification This interrupt is generated when, according to the End Of List (Control Parameter), all of the data in the Opaque List has been transferred to texture memory. TAEOMINT
  8861. (End Of Opaque
  8862. Modifier Volume List Strage) Notification This interrupt is generated when, according to the End Of List (Control Parameter), all of the data in the Opaque Modifier Volume List has been transferred to texture memory. TAETINT
  8863. (End Of Translucent List Strage) Notification This interrupt is generated when, according to the End Of List (Control Parameter), all of the data in the Translucent List has been transferred to texture memory. TAETMINT
  8864. (End Of Translusent
  8865. Modifier Volume List Strage) Notification This interrupt is generated when, according to the End Of List, all of the data in the Translucent Modifier Volume List has been transferred to texture memory. TAEPTIN* . From HOLLY2 specifications
  8866. (End Of Punch Through List Strage) Notification This interrupt is generated when the transfer of Punch Through List data to texture memory is complete, as indicated by End Of List. TAPOFINT
  8867. (ISP/TSP Parameter Limit Address) Error This interrupt is generated when the ISP/TSP Parameter storage address has exceeded the value set in the TA_ISP_LIMIT register.
  8868. Because the integrity of the display list cannot be guaranteed if this interrupt has been generated, it is necessary to start over from list initialization. TALOFINT
  8869. (Object List Limit Address) Error This interrupt is generated when the Object List storage address has exceeded the value set in the Object List Limit register.
  8870. Because the integrity of the display list cannot be guaranteed if this interrupt has been generated, it is necessary to start over from list initialization. TAIPINT
  8871. (Illegal Parameter Input) Error This interrupt is generated if a parameter that is not a Vertex Parameter has been input, even though the Vertex Parameter that specifies "End Of Strip" (in the Parameter Control Word) has not been input. TAFOFINT
  8872. (TA FIFO Overflow) Error This interrupt is generated when an Overflow has occurred in the input data FIFO buffer. Because the input data is invalid and the operation of the TA after this interrupt has been generated cannot be guaranteed, it is necessary to execute a software reset, etc.
  8873. Table 8-31
  8874. �8.6
  8875. List of Input Parameters
  8876.  
  8877. <Triangle Polygon Input Parameters>
  8878. The parameters that are input to the TA for a Triangle polygon are determined by the polygon data settings. The configuration of the input parameter data can be determined by checking the table below and the parameter tables on the following pages.
  8879.  
  8880. Switching of parameters inside/outside of a volume Shading data type Use of texture Use of Offset Color Number of UV bits Input parameter number Does not switch Packed Color Non-Textured Not used Not applicable (1) Textured Not used 32bit (2) 16bit (3) Used 32bit (2) 16bit (3) Floating Color Non-Textured Not used Not applicable (4) Textured Not used 32bit (5) 16bit (6) Used 32bit (5) 16bit (6) Intensity A Non-Textured Not used Not applicable (7) Textured Not used 32bit (8) 16bit (9) Used 32bit (10) 16bit (11) Intensity B Non-Textured Not used Not applicable (12) Textured Not used 32bit (13) 16bit (14) Used 32bit (13) 16bit (14) Switches Packed Color Non-Textured Not used Not applicable (15) Textured Not used 32bit (16) 16bit (17) Used 32bit (16) 16bit (17) Floating Color Non-Textured Not used Not applicable Not supported Textured Not used 32bit Not supported 16bit Not supported Used 32bit Not supported 16bit Not supported Intensity A Non-Textured Not used Not applicable (18) Textured Not used 32bit (19) 16bit (20) Used 32bit (19) 16bit (20) Intensity B Non-Textured Not used Not applicable (21) Textured Not used 32bit (22) 16bit (23) Used 32bit (22) 16bit (23) Table 8-32
  8881.  
  8882. <Note>
  8883. "Intensity A" specifies the Face Color through the immediately preceding Global Parameter, while "Intensity B" uses the Face Color that was used for the previous object.
  8884.  
  8885.  
  8886. (1) Packed Color
  8887. Non-Textured (2) Packed Color
  8888. Textured
  8889. 32bit UV Global Parameter
  8890. Polygon Type 0 Vertex Parameter
  8891. Polygon Type 0 Global Parameter
  8892. Polygon Type 0 Vertex Parameter
  8893. Polygon Type 3 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y (ignored) Z Texture Control Word Z (ignored) Base Color (ignored) U (ignored) (ignored) (ignored) V Data Size for Sort DMA (ignored) Data Size for Sort DMA Base Color Next Address for Sort DMA (ignored) Next Address for Sort DMA Offset Color
  8894.  
  8895. (3) Packed Color
  8896. Textured
  8897. 16bit UV (4) Floating Color
  8898. Non-Textured Global Parameter
  8899. Polygon Type 0 Vertex Parameter
  8900. Polygon Type 4 Global Parameter
  8901. Polygon Type 0 Vertex Parameter
  8902. Polygon Type 1 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y Texture Control Word Z (ignored) Z (ignored) U / V (ignored) Base Color Alpha (ignored) (ignored) (ignored) Base Color R Data Size for Sort DMA Base Color Data Size for Sort DMA Base Color G Next Address for Sort DMA Offset Color Next Address for Sort DMA Base Color B
  8903.  
  8904. (5) Floating Color
  8905. Textured
  8906. 32bit UV (6) Floating Color
  8907. Textured
  8908. 16bit UV Global Parameter
  8909. Polygon Type 0 Vertex Parameter
  8910. Polygon Type 5 Global Parameter
  8911. Polygon Type 0 Vertex Parameter
  8912. Polygon Type 6 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y Texture Control Word Z Texture Control Word Z (ignored) U (ignored) U / V (ignored) V (ignored) (ignored) Data Size for Sort DMA (ignored) Data Size for Sort DMA (ignored) Next Address for Sort DMA (ignored) Next Address for Sort DMA (ignored) Base Color Alpha Base Color Alpha Base Color R Base Color R Base Color G Base Color G Base Color B Base Color B Offset Color Alpha Offset Color Alpha Offset Color R Offset Color R Offset Color G Offset Color G Offset Color B Offset Color B
  8913.  
  8914.  
  8915.  
  8916. (7) Intensity A
  8917. Non-Textured (8) Intensity A
  8918. Textured
  8919. no Offset Color
  8920. 32bit UV Global Parameter
  8921. Polygon Type 1 Vertex Parameter
  8922. Polygon Type 2 Global Parameter
  8923. Polygon Type 1 Vertex Parameter
  8924. Polygon Type 7 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y (ignored) Z Texture Control Word Z Face Color Alpha Base Intensity Face Color Alpha U Face Color R (ignored) Face Color R V Face Color G (ignored) Face Color G Base Intensity Face Color B (ignored) Face Color B (ignored)
  8925.  
  8926. (9) Intensity A
  8927. Textured
  8928. no Offset Color
  8929. 16bit UV (10) Intensity A
  8930. Textured
  8931. use Offset Color
  8932. 32bit UV Global Parameter
  8933. Polygon Type 1 Vertex Parameter
  8934. Polygon Type 8 Global Parameter
  8935. Polygon Type 2 Vertex Parameter
  8936. Polygon Type 7 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y Texture Control Word Z Texture Control Word Z Face Color Alpha U / V (ignored) U Face Color R (ignored) (ignored) V Face Color G Base Intensity Data Size for Sort DMA Base Intensity Face Color B (ignored) Next Address for Sort DMA Offset Intensity Face Color Alpha Face Color R Face Color G Face Color B Face Offset Color Alpha Face Offset Color R Face Offset Color G Face Offset Color B
  8937.  
  8938. (11) Intensity A
  8939. Textured
  8940. use Offset Color
  8941. 16bit UV (12) Intensity B
  8942. Non-Textured Global Parameter
  8943. Polygon Type 2 Vertex Parameter
  8944. Polygon Type 8 Global Parameter
  8945. Polygon Type 0 Vertex Parameter
  8946. Polygon Type 2 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y Texture Control Word Z (ignored) Z (ignored) U / V (ignored) Base Intensity (ignored) (ignored) (ignored) (ignored) Data Size for Sort DMA Base Intensity Data Size for Sort DMA (ignored) Next Address for Sort DMA Offset Intensity Next Address for Sort DMA (ignored) Face Color Alpha Face Color R Face Color G Face Color B Face Offset Color Alpha Face Offset Color R Face Offset Color G Face Offset Color B
  8947.  
  8948. (13) Intensity B
  8949. Textured
  8950. 32bit UV (14) Intensity B
  8951. Textured
  8952. 16bit UV Global Parameter
  8953. Polygon Type 0 Vertex Parameter
  8954. Polygon Type 7 Global Parameter
  8955. Polygon Type 0 Vertex Parameter
  8956. Polygon Type 8 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word Y TSP Instruction Word Y Texture Control Word Z Texture Control Word Z (ignored) U (ignored) U / V (ignored) V (ignored) (ignored) Data Size for Sort DMA Base Intensity Data Size for Sort DMA Base Intensity Next Address for Sort DMA Offset Intensity Next Address for Sort DMA Offset Intensity
  8957.  
  8958. (15) Packed Color
  8959. Non-Textured
  8960. Two Volumes (16) Packed Color
  8961. Textured
  8962. 32bit UV
  8963. Two Volumes Global Parameter
  8964. Polygon Type 3 Vertex Parameter
  8965. Polygon Type 9 Global Parameter
  8966. Polygon Type 3 Vertex Parameter
  8967. Polygon Type 11 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word 0 Y TSP Instruction Word 0 Y (ignored) Z Texture Control Word 0 Z TSP Instruction Word 1 Base Color 0 TSP Instruction Word 1 U0 (ignored) Base Color 1 Texture Control Word 1 V0 Data Size for Sort DMA (ignored) Data Size for Sort DMA Base Color 0 Next Address for Sort DMA (ignored) Next Address for Sort DMA Offset Color 0 U1 V1 Base Color 1 Offset Color 1 (ignored) (ignored) (ignored) (ignored)
  8968.  
  8969. (17) Packed Color
  8970. Textured
  8971. 16bit UV
  8972. Two Volumes (18) Intensity A
  8973. Non-Textured
  8974. Two Volumes Global Parameter
  8975. Polygon Type 3 Vertex Parameter
  8976. Polygon Type 12 Global Parameter
  8977. Polygon Type 4 Vertex Parameter
  8978. Polygon Type 10 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word 0 Y TSP Instruction Word 0 Y Texture Control Word 0 Z (ignored) Z TSP Instruction Word 1 U0 / V0 TSP Instruction Word 1 Base Intensity 0 Texture Control Word 1 (ignored) (ignored) Base Intensity 1 Data Size for Sort DMA Base Color 0 Data Size for Sort DMA (ignored) Next Address for Sort DMA Offset Color 0 Next Address for Sort DMA (ignored) U1 / V1 Face Color Alpha 0 (ignored) Face Color R 0 Base Color 1 Face Color G 0 Offset Color 1 Face Color B 0 (ignored) Face Color Alpha 1 (ignored) Face Color R 1 (ignored) Face Color G 1 (ignored) Face Color B 1
  8979.  
  8980. (19) Intensity A
  8981. Textured
  8982. 32bit UV
  8983. Two Volumes (20) Intensity A
  8984. Textured
  8985. 16bit UV
  8986. Two Volumes Global Parameter
  8987. Polygon Type 4 Vertex Parameter
  8988. Polygon Type 13 Global Parameter
  8989. Polygon Type 4 Vertex Parameter
  8990. Polygon Type 14 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word 0 Y TSP Instruction Word 0 Y Texture Control Word 0 Z Texture Control Word 0 Z TSP Instruction Word 1 U0 TSP Instruction Word 1 U0 / V0 Texture Control Word 1 V0 Texture Control Word 1 (ignored) Data Size for Sort DMA Base Intensity 0 Data Size for Sort DMA Base Intensity 0 Next Address for Sort DMA Offset Intensity 0 Next Address for Sort DMA Offset Intensity 0 Face Color Alpha 0 U1 Face Color Alpha 0 U1 / V1 Face Color R 0 V1 Face Color R 0 (ignored) Face Color G 0 Base Intensity 1 Face Color G 0 Base Intensity 1 Face Color B 0 Offset Intensity 1 Face Color B 0 Offset Intensity 1 Face Color Alpha 1 (ignored) Face Color Alpha 1 (ignored) Face Color R 1 (ignored) Face Color R 1 (ignored) Face Color G 1 (ignored) Face Color G 1 (ignored) Face Color B 1 (ignored) Face Color B 1 (ignored)
  8991.  
  8992. (21) Intensity B
  8993. Non-Textured
  8994. Two Volumes (22) Intensity B
  8995. Textured
  8996. 32bit UV
  8997. Two Volumes Global Parameter
  8998. Polygon Type 3 Vertex Parameter
  8999. Polygon Type 10 Global Parameter
  9000. Polygon Type 3 Vertex Parameter
  9001. Polygon Type 13 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X ISP/TSP Instruction Word X TSP Instruction Word 0 Y TSP Instruction Word 0 Y (ignored) Z Texture Control Word 0 Z TSP Instruction Word 1 Base Intensity 0 TSP Instruction Word 1 U0 (ignored) Base Intensity 1 Texture Control Word 1 V0 Data Size for Sort DMA (ignored) Data Size for Sort DMA Base Intensity 0 Next Address for Sort DMA (ignored) Next Address for Sort DMA Offset Intensity 0 U1 V1 Base Intensity 1 Offset Intensity 1 (ignored) (ignored) (ignored) (ignored)
  9002.  
  9003.  
  9004. (23) Intensity B
  9005. Textured
  9006. 16bit UV
  9007. Two Volumes Global Parameter
  9008. Polygon Type 3 Vertex Parameter
  9009. Polygon Type 14 Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X TSP Instruction Word 0 Y Texture Control Word 0 Z TSP Instruction Word 1 U0 / V0 Texture Control Word 1 (ignored) Data Size for Sort DMA Base Intensity 0 Next Address for Sort DMA Offset Intensity 0 U1 / V1 (ignored) Base Intensity 1 Offset Intensity 1 (ignored) (ignored) (ignored) (ignored)
  9010.  
  9011. <Quad Polygon Input Parameters>
  9012. There are two types of parameters that are input to the TA for a Quad polygon, depending on whether textures are used or not. The configuration of the input parameter data can be determined by checking the table below. Setting s that are not found in the table below are not supported.
  9013.  
  9014. Switching of parameters inside/outside of a volume Shading data type Use of texture Use of Offset Color Number of UV bits Input parameter number Does not switch Packed Color Non-Textured Not used Not applicable (1) Textured Not used 32bit Not supported 16bit (2) Used 32bit Not supported 16bit (2)
  9015.  
  9016. (1) Non-Textured (2) Textured
  9017. 16bit UV Global Parameter
  9018. Sprite Vertex Parameter
  9019. Sprite Type 0 Global Parameter
  9020. Sprite Vertex Parameter
  9021. Sprite Type 1 Parameter Control Word Parameter Control Word Parameter Control Word Parameter Control Word ISP/TSP Instruction Word AX ISP/TSP Instruction Word AX TSP Instruction Word AY TSP Instruction Word AY (ignored) AZ Texture Control Word AZ Base Color BX Base Color BX (ignored) BY Offset Color BY Data Size for Sort DMA BZ Data Size for Sort DMA BZ Next Address for Sort DMA CX Next Address for Sort DMA CX CY CY CZ CZ DX DX DY DY (ignored) (ignored) (ignored) AU / AV (ignored) BU / BV (ignored) CU / CV <Shadow Volume Input Parameters>
  9022. There is only one type of parameter (shown in the table below) that is input to the TA for a shadow volume.
  9023.  
  9024. Global Parameter
  9025. Shadow Volume Vertex Parameter
  9026. Shadow Volume Parameter Control Word Parameter Control Word ISP/TSP Instruction Word AX (ignored) AY (ignored) AZ (ignored) BX (ignored) BY (ignored) BZ (ignored) CX CY CZ (ignored) (ignored) (ignored) (ignored) (ignored) (ignored)
  9027.  
  9028. ?Control Parameter?
  9029. There are three types of Control Parameters (shown in the table below) that are input to the TA.
  9030.  
  9031. Control Parameter
  9032. End Of List Control Parameter
  9033. User Tile Clip Control Parameter
  9034. Object List Set 0x0000 0000 0x2000 0000 0x4000 0000 (ignored) (ignored) Object Pointer (ignored) (ignored) (ignored) (ignored) (ignored) (ignored) (ignored) User Clip X Min Bounding Box X Min (ignored) User Clip Y Min Bounding Box Y Min (ignored) User Clip X Max Bounding Box X Max (ignored) User Clip Y Max Bounding Box Y Max
  9035.  
  9036. * The parameters shown below are changed in HOLLY2 versus HOLLY1.
  9037.  
  9038. (1) Packed Color
  9039. Non-Textured Global Parameter
  9040. Polygon Type 0 Vertex Parameter
  9041. Polygon Type 0 Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X TSP Instruction Word Y (ignored) Z (ignored) Base Color (ignored) (ignored) Data Size for Sort DMA (ignored) Next Address for Sort DMA (ignored)
  9042.  
  9043.  
  9044. (7) Intensity Mode 1
  9045. Non-Textured Global Parameter
  9046. Polygon Type 1 Vertex Parameter
  9047. Polygon Type 2 Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X TSP Instruction Word Y (ignored) Z Face Color Alpha (ignored) Face Color R (ignored) Face Color G Base Intensity Face Color B (ignored)
  9048.  
  9049. (11) Intensity Mode 1
  9050. Textured
  9051. use Offset Color
  9052. 16bit UV Global Parameter
  9053. Polygon Type 2 Vertex Parameter
  9054. Polygon Type 8 Parameter Control Word Parameter Control Word ISP/TSP Instruction Word X TSP Instruction Word Y Texture Control Word Z (ignored) U / V (ignored) (ignored) Data Size for Sort DMA Base Intensity Next Address for Sort DMA Offset Intensity Face Color Alpha Face Color R Face Color G Face Color B Face Offset Color Alpha Face Offset Color R Face Offset Color G Face Offset Color B
  9055.  
  9056. �9
  9057. Bug List
  9058.  
  9059. A list of the bugs in each Holly revision that affect software development is provided in this section.
  9060. The Holly chip revision number can be determined through the registers indicated in Table 9-1.
  9061. The subsequent bug list must be referenced according to the revision number of the chip as determined by the values of the registers listed below.
  9062. * Regarding Holly 2.4, the bug list includes the contents of version 2.41.
  9063.  
  9064. No. Register Adress Holly1.5 Holly 2.2 Holly 2.3 Holly 2.4* Holly 2.42 1 REVISION 0x005F8004 0x01 0x11 0x11 0x11 0x11 2 SB_REVISION 0x005F689C 0x02 0x08 0x09 0x0A 0x0B Table 9-1
  9065.  
  9066.  
  9067. <<Register-related bugs>>
  9068. A list of register-related bugs is shown below.
  9069.  
  9070. No. Problem Restriction/remedy Holly 1.5 Holly 2.2 Holly 2.3 Holly 2.4* Holly 2.42 1 Not possible to read registers, palette RAM, or fog table RAM correctly. There software work-around. � ? ? ? ? 2 Incorrect description of the SOFTRESET register (0x005F8008) in the documentation <Wrong>: bit 0 ? TA soft reset,
  9071. bit 1 = Pipeline soft reset
  9072. <Right>: bit 1 = Pipeline soft reset,
  9073. bit 0 ? TA soft reset Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 3 Incorrect description of the ISP_FEED_CFG register in the documentation <Wrong>: Adress = 0x005F8090
  9074. <Right>: Adress = 0x005F8098 Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 4 Incorrect description of the SPG_VBLANK_INT register (0x005F80CC) in the documentation <Wrong>: bit 25-16 default = 0x015
  9075. <Right>: bit 25-16 default = 0x150, recommended value = 0x015 Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 5 Incorrect description of the SPG_VBLANK register (0x005F80DC) in the documentation <Wrong>: bit 25-16 default = 0x015
  9076. <Right>: bit 25-16 default = 0x150,
  9077. recommended value = 0x015 Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 6 Incorrect description of the FPU_PARAM_CFG register (0x005F807C) in the documentation <Wrong>: bit 7-4 default=0xF
  9078. <Right>: bit 7-4 default=0x7,
  9079. recommended value = 0x015 Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 7 Incorrect description of the FB_R_CTRL register (0x005F8044) in the documentation <Wrong>: bit 20-16 = fb_stripsize
  9080. size of strip buffer in multiples of 32 lines.
  9081. <Right>: bit 21-16 = fb_stripsize
  9082. size of strip buffer in multiples of 32 lines. (bit 16 = 0) Corrected documentation Corrected documentation Corrected documentation Corrected documentation Corrected documentation 8 Does not operate correctly even when a "1" is written to the lowest bit of fb_stripsize in the FB_R_CTRL register (0x005F8044). The strip buffer size is restricted to 32-line units only.
  9083. ? Will become part of the specifications. � � � � � 9 The wrong value is read from the SPAN_SRT_CFG register (0x005F8030). The value of bit 8 is read for both bit 8 and bit 16. � ? ? ? ? Table 9-2
  9084.  
  9085.  
  9086. <<SB-related bugs>>
  9087. A list of SB (System Bus) block-related bugs is shown below.
  9088.  
  9089. No. Problem Restriction/remedy Holly 1.5 Holly 2.2 Holly 2.3 Holly 2.4* Holly 2.42 1 Addition of a TA processing end interrupt signal for Punch Through lists Internal signal name:
  9090. TA_ptendint_n � ? ? ? ? 2 <G1 i/f>
  9091. In the case of DMA with a transfer size of "32 bytes ???, 32 bytes or more, or where bit 5 is 0", DMA does not end. Do not perform DMA transfers of these sizes. To transfer data in these sizes, use PIO access. � ? ? ? ? 3 <G1 i/f>
  9092. If a DMA-Read and a PIO-Read overlap, control of the DMA transfer may be lost. Wait until the DMA-Read ends, or interrupt it, before conducting the PIO access. � ? ? ? ? 4 <G1 i/f>
  9093. If a PIO access overlaps with the end of a DMA-Read, the G1 block may hang. Wait until the DMA-Read ends, or interrupt it, before conducting the PIO access. � ? ? ? ? 5 <Maple i/f>
  9094. Correct DMA initiation by V-Blank is not possible. Using DMA initiation by V-Blank is prohibited. � ? ? ? ? 6 <Maple i/f>
  9095. If there is a Maple command set in system memory, and it is part of a special pattern that includes single instructions to the Maple-Host (output reset, switch gun mode, illegal command), the Maple block may hang. Send single instructions (output reset, switch gun mode, illegal command) in a special format that does not cause the Maple block to hang. (The current Systems Laboratories driver does not support single instructions.)
  9096. - Will become part of the specifications.
  9097. ? Will become part of the specifications. � � � � � 7 <DDT i/f>
  9098. The C2DMAXL (ch2-DMA maximum burst length) register does not function as it should. The settings are restricted to 0, 1, or 2.
  9099. ? Will become part of the specifications. � � � � � Table 9-3
  9100.  
  9101.  
  9102. <<CORE & TA-related bugs>>
  9103. A list of CORE and TA block-related bugs is shown below.
  9104.  
  9105. No. Problem Restriction/remedy Holly 1.5 Holly 2.2 Holly 2.3 Holly 2.4* Holly 2.42 1 A red ghost pixel appears on the left side a white pixel, etc. This is a problem with the internal circuitry that manifests itself with certain pixel data patterns. There is no software work-around. ? ? ? ? ? 2 If FB is specified in the first 4MB, vertical or diagonal lines appear. FB must not be specified in the first 4MB (32-bit area). Specify FB in the second 4MB. ? ? ? ? ? 3 During drawing, vertex data is sometimes not drawn properly. There is no software work-around. ? ? ? ? ? 4 The PAL non-interlaced VSYNC width is 3H. The DVE compensates to 2.5H, so this is not a problem.
  9106. ?Will become part of the specifications. � � � � � 5 Modifier Volumes do not work for sprites (quad polygons). There is no software work-around. Modifier Volumes cannot be applied to sprites. � ? ? ? ? 6 Lines are shifted to the right on the screen display. The following software work-arounds are available:
  9107. 1) Do not store FB and texture data in the same bank in SDRAM.
  9108. 2) Set texture filtering to "point sampling." � ? ? ? ? 7 Using the Vertex Parameter type 11, 12, 13, or 14 for TA, the block hangs. When using type 11, 12, 13, or 14, set the partition strip length as either 1 strip or 2 strips. 4 strips or 6 strips cannot be specified. � ? ? ? ? 8 The TSP cache circuit does not operate properly, causing tiles to be missing or copied, or for polygons to be distorted. Do not set bit 16 of the SPAN_SORT_CFG register (0x005F8030) to "1" and then use the TSP cache. ? ? ? ? ? 9 Control on the TSP side of the FIFO between the Span Sorter and TSP does not operate correctly. The rendering operation hangs. There is no software work-around. Setting "0x0001000" in the SPAN_SORT_CFG register can lessen this problem. ? ? ? ? ? 10 pixel write operation to the FB is not performed, and the previous pixels remain as is. This problem occurs more when the X-Scaler is used. There is no software work-around. Using the X-Scaler makes the problem worse. ? ? ? ? ? 11 The "End_Of_Render" interrupt is not output. Because this has the same cause as No. 10, there is no software work-around. ? ? ? ? ? 12 In Strip Buffer mode, the Hazard interrupt is output even though drawing has not been completed. Ignore the first Hazard interrupt that is output.
  9109. The Hazard interrupt will be output correctly after drawing is started a second and subsequent times.
  9110. ? Will become part of the specifications. � � � � � 13 In Strip Buffer mode, if the Strip Buffer size is set to a number of lines that divides the display screen by an odd number, incorrect pixels will be drawn in the upper left corner of the screen. The Strip Buffer size must be set to a number of lines that divides the screen by an even number.
  9111. ? Will become part of the specifications. � � � � � 14 If X clipping is used in Strip Buffer mode, incorrect pixels are drawn at the right edge of the screen. The X clipping function must not be used in Strip Buffer mode.
  9112. The FB_X_CLIP register value specifies the horizontal direction size of the display screen.
  9113. ? Will become part of the specifications. � � � � � 15 Pixels are sometimes not drawn. (Apart from bug Nos. 10 and 11.)
  9114. When this happens, the "End_Of_Render" interrupt is also not output. There is no software work-around. � ? ? ? ? 16 The TSP cache circuit does not operate properly. (Apart from bug No. 8.)
  9115. The rendering operation hangs. Do not set bit 16 of the SPAN_SORT_CFG register (0x005F8030) to "1" and then use the TSP cache. � ? ? ? ? 17 If a user tile clip that is the same size as the screen or smaller is used, the TA sometimes hangs. The following software work-arounds are available:
  9116. 1) Set the strip length to "1".
  9117. 2) Do not use user tile clips. Replace them with global tile clips. � ? ? ? ? 18 The timing of switching of user tile clips (the area according to the control parameters, or the usage method according to the global parameters) is one polygon (= one strip) too early. The following software work-arounds are available:
  9118. 1) Add a dummy polygon before switching the clip.
  9119. 2) Do not use user tile clips. Replace them with global tile clips.
  9120. ? Will become part of the specifications. � � � � � 19 The "ispdone" flag in the ISP2 block is not cleared, making drawing impossible. Perform a CORE reset each time before drawing. ? � ? ? ? 20 The "End_Of_Video" interrupt is sometimes not output. (Apart from bug Nos. 11 and 15.) Replace with "End_Of_TSP".
  9121. ? Will become part of the specifications. ? � � � � 21 Misshapen tiles or missing tiles occur. Use multi-path processing to add a dummy region array. (4 data elements/tile)
  9122. 1) Region Array for Opaque, Opaque MV, or Punch Through
  9123. 2) Region Array for full-screen dummy translucent polygon (Autosort)
  9124. 3) Region Array for Translucent or Translucent MV
  9125. 4) Region Array for Accumulation Buffer Flush ? � � ? ? 22 If the translucent polygon sort mode is switched for each tile, the drawing operation may hang. The following software work-arounds are available:
  9126. 1) Do not switch the sort mode for each tile.
  9127. 2) Register a full-screen opaque polygon for the background.
  9128. ? Will become part of the specifications. ? � � � � 23 At a boundary edge where a non-twiddle texture is switched with a palette texture, the colors of two pixels on the non-twiddled texture side are incorrect. Do not use non-twiddled texture polygons and palette texture polygons at the same time. ? � � ? ? 24 If the Y Scaler is enlarged beyond 0x400 and filtering is applied, the pixel color at the left end of the last line of FB output for the final tile will be affected as a result of filtering (32 pixels). The following software work-arounds are available:
  9129. 1) Reduce the number of display lines by one.
  9130. 2) Add dummy final region array data in the upper right corner outside of the screen (Y = 0).
  9131. ? Will become part of the specifications. ? � � � � 25 If the polygon edge is located on the negative side (near "0") of the pixel center position, the gap will be written twice. There is no software work-around.
  9132. Making a running change is not expected to cause a problem.
  9133. ? Will become part of the specifications. ? � � � � 26 Operation hangs if a non-twiddled format bump texture is used. Use only twiddled format for bump textures.
  9134. ? Will become part of the specifications. ? � � � � 27 The Group_En bit (bit 23) in the global parameters is not valid for the User_Clip bits (bits 167 and 16). Specify the User-Clip bits correctly for each global parameter.
  9135. ? Will become part of the specifications. � � � � � 28 The texture data flickers (VQ is obvious). The data in the texture memory may even be damaged. There is no software fix for this problem.
  9136. In Holly 2.41, this problem can sometimes be resolved by clamping.
  9137. ? Will be incorporated into specifications. ? � � �/? ? Table 9-4
  9138.  
  9139.  
  9140. 1 Note 1: Range on the Power VR side (texture memory area) from 0x0400 0000 to 0x05FF FFE0, on the Root Bus side (system memory area) from 0x0C00 0000 to 0x0FFF FFE0, or the range specified by the register at 0x005F 7C80 (PVR-DMA System Memory Area Protection).
  9141. 2 Note 2: Range from 0x0C00 0000 to 0x0FFF FFE0 (system memory area), or the range specified by the register at 0x005F 6C8C (Maple System Memory Area Protection).
  9142. 3 Note 3: Range from 0x0080 0000 to 0x00FF FFE0 (wave memory), from 0x0400 0000 to 0x05FF FFE0 (texture memory), from 0x0C00 0000 to 0x0FFF FFE0 (system memory area), from 0x0300 0000 to 0x0300 000 to 0x03FF FFE0, from 0x1400 0000 to 0x17FF FFE0 (G2-external device), or the range specified by the register at 0x005F 74B8 (GD-DMA System Memory Area Protection).
  9143. 4 Note 4: Range on the G2 side from 0x0080 0000 to 0x00FF (wave memory), on the Root Bus side from 0x0400 0000 to 0x05FF FFE0 (texture memory), from 0x0C00 0000 to 0x0FFF FFE0 (system memory), or the range specified by the register at 0x005F 78BC (G2-DMA System Memory Area Protection).
  9144. 5 Note 5: An unused area of Area 0: 0x00400000?0x005F5FFF
  9145. ---------------
  9146.  
  9147. ------------------------------------------------------------
  9148.  
  9149. ---------------
  9150.  
  9151. ------------------------------------------------------------
  9152.  
  9153. Dreamcast/Dev.Box System Architecture
  9154. Last Update : 99/09/03
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161. - 2 -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement