CubeQuestNotes

From DaphneWiki

(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
===Format of data sent from Rotate CPU to line CPU===
===Format of data sent from Rotate CPU to line CPU===
Data is split into 16-bit words.
Data is split into 16-bit words.
-
The high nibble of each word can be used to determine the type of the word:
+
The high nibble of each word (AND with 0xF000 to isolate) can be used to determine the type of the word:
-
0 - ...
+
{| border="1" cellpadding="2" cellspacing="0"
 +
|'''High Nibble'''
 +
|'''Description'''
 +
|-
 +
|0
 +
|Vertical coordinate
 +
|-
 +
|1
 +
|? - 0x1002 gets stored at offset 0 temporarily
 +
|-
 +
|2
 +
|? - 0x2000 gets stored at offset 1, 0x2040 stored at 0x32, 0x2040 stored at 0x6C
 +
|-
 +
|3
 +
|?
 +
|-
 +
|5
 +
|Line. The rest of the word points to a memory offset (AND with 0x0FFF). At the memory offset will be five 16-bit words. The first word will be the starting X coordinate OR'd with 0x8000.  The second word will be the starting Y coordinate.  The third word will be the ending X coordinate.  The fourth word will be the ending Y coordinate.  The fifth and final word will be the color index, OR'd with 0x9000.  So for example, if you have a 0x5505, it means that at offset 0x0505 there will be five 16-bit words describing a line.
 +
|-
 +
|7
 +
|Boundary. These appear at the beginning and end of the data.  Not sure exactly what it means.
 +
|-
 +
|8
 +
|Horizontal coordinate (AND with 0x0FFF to get pixel offset)
 +
|}

Revision as of 23:08, 9 September 2008

Cube Quest

CPU: Motorola 68000 Rotate, Line, and Sound CPU's also

68k feeds data to the Rotate CPU which converts 3D coordinates (I assume) to 2D lines. Line CPU takes 2D line coordinates and converts to horizontal line segments which are passed to the fill hardware.

Format of data sent from Rotate CPU to line CPU

Data is split into 16-bit words. The high nibble of each word (AND with 0xF000 to isolate) can be used to determine the type of the word:

High Nibble Description
0 Vertical coordinate
1 ? - 0x1002 gets stored at offset 0 temporarily
2 ? - 0x2000 gets stored at offset 1, 0x2040 stored at 0x32, 0x2040 stored at 0x6C
3 ?
5 Line. The rest of the word points to a memory offset (AND with 0x0FFF). At the memory offset will be five 16-bit words. The first word will be the starting X coordinate OR'd with 0x8000. The second word will be the starting Y coordinate. The third word will be the ending X coordinate. The fourth word will be the ending Y coordinate. The fifth and final word will be the color index, OR'd with 0x9000. So for example, if you have a 0x5505, it means that at offset 0x0505 there will be five 16-bit words describing a line.
7 Boundary. These appear at the beginning and end of the data. Not sure exactly what it means.
8 Horizontal coordinate (AND with 0x0FFF to get pixel offset)
Personal tools