Difference between revisions of "Fix graphics format"

From NeoGeo Development Wiki
Jump to: navigation, search
m (Size)
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The [[fix layer]] uses 8x8 pixels tiles. They're coded in a 4 bits per pixel, linear format with oddly mixed columns. Pixels are coded by pairs as bytes, in columns from top to bottom.
 +
 +
Note that the pixel positions are swapped in each byte (the left pixel goes in bits 0~3, the right pixel goes in bits 4~7), and that the first stored column is column A.
 +
 
[[File:fixgfx.png|center]]
 
[[File:fixgfx.png|center]]
  
The [[fix layer]] uses 8x8 pixels tiles, coded in a 4BPP linear format with mixed columns. Color indexes are coded by pairs and by columns from top to bottom. Note that the pixel positions are swapped in each byte (L/U) and that the first column is column A.
+
=Size=
 
 
==Size==
 
  
One tile is 8 * 8 pixels * 0.5 byte per pixel = '''32 bytes'''.
+
One tile is 8 * 8 pixels * 4 bits per pixel = 256 bits = '''32 bytes'''.
  
==Addressing==
+
=ROM addressing=
  
 
<pre>
 
<pre>
n...nHCLLL
+
Bit # ...543210
 +
      ...nHCLLL
  
n: Tile number
+
n: Tile number (multiple bits)
H: Half, 0 = first (right), 1 = second (left)
+
H: Half, 0 = right, 1 = left
 
C: Column in half, 0 = left, 1 = right
 
C: Column in half, 0 = left, 1 = right
L: Line
+
L: Line number (0~7)
 
</pre>
 
</pre>
  

Latest revision as of 09:51, 26 June 2017

The fix layer uses 8x8 pixels tiles. They're coded in a 4 bits per pixel, linear format with oddly mixed columns. Pixels are coded by pairs as bytes, in columns from top to bottom.

Note that the pixel positions are swapped in each byte (the left pixel goes in bits 0~3, the right pixel goes in bits 4~7), and that the first stored column is column A.

Fixgfx.png

Size

One tile is 8 * 8 pixels * 4 bits per pixel = 256 bits = 32 bytes.

ROM addressing

Bit # ...543210
      ...nHCLLL

n: Tile number (multiple bits)
H: Half, 0 = right, 1 = left
C: Column in half, 0 = left, 1 = right
L: Line number (0~7)

2H1 is "C".