CubeQuestNotes

From DaphneWiki

(Difference between revisions)
Jump to: navigation, search
m (Format of data sent from Rotate CPU to line CPU)
(adding info on instruction 7)
Line 9: Line 9:
===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 (AND with 0xF000 to isolate) can be used to determine the type of the word:
+
The high nibble of each word (AND with 0xF000 to isolate) is used to determine which address to jump to in the line CPU's program.
 +
The address that does the jump is at 0x10.  So if the high nibble is 0x07, then the instruction at 0x10 will jump to 0x07.
{| border="1" cellpadding="2" cellspacing="0"
{| border="1" cellpadding="2" cellspacing="0"
|'''High Nibble'''
|'''High Nibble'''
Line 36: Line 37:
|-
|-
|7
|7
-
|Boundary. These appear at the beginning and end of the dataNot sure exactly what it means.
+
|Reset. I think this says to jump to the value you get by AND'ing with 0x0FFF.  Therefore, seeing a 0x7000 means to jump back to the beginning of the programIt's entire operation can be found in instructions 0x7, 0x11, and 0x12.
|-
|-
|8
|8

Revision as of 17:31, 15 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) is used to determine which address to jump to in the line CPU's program. The address that does the jump is at 0x10. So if the high nibble is 0x07, then the instruction at 0x10 will jump to 0x07.

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 Memory offset to a Line or Polygon. (AND with 0x0FFF)

At the memory offset will be (N*2)+1 16-bit words, where N is the number of vertices. If N is 2, then this object will be a line. If N > 2 then this object will be a polygon. The first word will be an X coordinate OR'd with 0x8000. The second word will be a Y coordinate. This pattern continues (X word, followed by Y word) until the object has been fully described. The object is terminated by a 0x9xxx value which may describe the Z coordinate of the object.

7 Reset. I think this says to jump to the value you get by AND'ing with 0x0FFF. Therefore, seeing a 0x7000 means to jump back to the beginning of the program. It's entire operation can be found in instructions 0x7, 0x11, and 0x12.
8 Horizontal coordinate (AND with 0x0FFF to get pixel offset)
9 Possibly terminates list of vertices.
A Sometimes vertical coordinates have an 'A' in front of them, I don't know why yet.
Personal tools