CubeQuestNotes

From DaphneWiki

Revision as of 23:10, 9 September 2008 by Matt (Talk | contribs)
Jump to: navigation, search

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, 0x1033 stored at 0x2, 0x106D stored at 0x33
2 ? - 0x2000 gets stored at offset 1, 0x2040 stored at 0x32, 0x2040 stored at 0x6C
3 ? - 0x303f stored at 3, 0x3030 stored at 0x34
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