CubeQuestNotes

From DaphneWiki

(Difference between revisions)
Jump to: navigation, search
(documented 2 and 3)
(added 1 explanation)
Line 19: Line 19:
|-
|-
|1
|1
-
|Offset of the where the trailing 0x7000 can be found (parse everything up to that point?)AND with 0x0FFF to get offset.
+
|This means to increment the data index by 1, and ANDing with 0x0fff may give you the index of the end of the data to be parsedFor parsing purposes, this value may be able to be considered a NOP.
|-
|-
|2
|2

Revision as of 18:11, 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 This means to increment the data index by 1, and ANDing with 0x0fff may give you the index of the end of the data to be parsed. For parsing purposes, this value may be able to be considered a NOP.
2 Set Z-order value. See instruction at 2.
3 Set Color Index value. See instruction at 3.
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