CubeQuestNotes

From DaphneWiki

(Difference between revisions)
Jump to: navigation, search
(Cube Quest)
m (Format of data sent from Rotate CPU to line CPU)
Line 24: Line 24:
|-
|-
|3
|3
-
|? - 0x303f stored at 3, 0x3030 stored at 0x34
+
|Change Color Index.  AND with 0xFF to get index value.
|-
|-
|5
|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.
+
|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 is an unknown value, 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
|7
Line 36: Line 36:
|-
|-
|9
|9
-
|Color index (AND with 0x0FFF to get value)
+
|Unknown, part of line data.
|}
|}

Revision as of 05:29, 11 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 Offset of the where the trailing 0x7000 can be found (parse everything up to that point?). AND with 0x0FFF to get offset.
2 ? - 0x2000 gets stored at offset 1, 0x2040 stored at 0x32, 0x2040 stored at 0x6C
3 Change Color Index. AND with 0xFF to get index value.
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 is an unknown value, 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)
9 Unknown, part of line data.
Personal tools