Spent a bit of time this morning trying top decode the tile rom (pacman.5e), used info on the net which was wrong. Now got it sussed so in the viewer program I wrote I decided to (for once) do a full bit of commenting.
so here it is for anyone else looking to write some new tiles into this rom (which is what I will now be able to do)
[font="Courier New, Courier, mono"] /// <remarks>[/font]
[font="Courier New, Courier, mono"] /// THIS ASSUMES WE ARE LOOKING AT VISUALISATION ON VERTICAL MONITOR[/font]
[font="Courier New, Courier, mono"] /// tile format as follows 16 bytes per tile[/font]
[font="Courier New, Courier, mono"] /// 8 x 8 pixels[/font]
[font="Courier New, Courier, mono"] /// first 8 bytes are for the lower half of the tile rows 4 to 7[/font]
[font="Courier New, Courier, mono"] /// second 8 bytes are for the upper half of tile rows 0 to 3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// each byte specifies colour of 4 pixels for a particular column[/font]
[font="Courier New, Courier, mono"] /// upper nibble holds bit plane 1[/font]
[font="Courier New, Courier, mono"] /// lower nibble holds bit plane 0[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// combine bit 4 and bit 0 to get a 2 bit value representing colour 0-3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// the first byte specifies the right hand column of pixels (column 7)[/font]
[font="Courier New, Courier, mono"] /// second byte specifies column 6 and so on[/font]
[font="Courier New, Courier, mono"] /// the eigth byte specifies column 0[/font]
[font="Courier New, Courier, mono"] /// so they are read right to left[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// in each nibble[/font]
[font="Courier New, Courier, mono"] /// the msb (bit 3) specifies the top row of the column - row 0[/font]
[font="Courier New, Courier, mono"] /// the lsb (bit 0) specifies the final row of the column - row 3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// Here is the data for tile 3F (tile 63) a simple L shape in colour 3[/font]
[font="Courier New, Courier, mono"] /// held at address 3F0 in pacman.5e[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// 11, 11, 11, 11, 11, 11, 11, FF bottom half of tile[/font]
[font="Courier New, Courier, mono"] /// 00, 00, 00, 00, 00, 00, 00, FF top half of tile[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// x represents colour 3[/font]
[font="Courier New, Courier, mono"] /// . represents colour 0[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// X...... - FF show colour 3 for all 4 pixels in column[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// XXXXXXX - 11 represent colour 3 for final pixel of column[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// full rep with bits and bytes in correct positions[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 7,3 - 3}{3FE BIT 7,3 - 0}{3FD BIT 7,3 - 0}{3FC BIT 7,3 - 0}{3FB BIT 7,3 - 0}{3FA BIT 7,3 - 0}{3F9 BIT 7,3 - 0}{3F8 BIT 7,3 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 6,2 - 3}{3FE BIT 6,2 - 0}{3FD BIT 6,2 - 0}{3FC BIT 6,2 - 0}{3FB BIT 6,2 - 0}{3FA BIT 6,2 - 0}{3F9 BIT 6,2 - 0}{3F8 BIT 6,2 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 5,1 - 3}{3FE BIT 5,1 - 0}{3FD BIT 5,1 - 0}{3FC BIT 5,1 - 0}{3FB BIT 5,1 - 0}{3FA BIT 5,1 - 0}{3F9 BIT 5,1 - 0}{3F8 BIT 5,1 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 4,0 - 3}{3FE BIT 4,0 - 0}{3FD BIT 4,0 - 0}{3FC BIT 4,0 - 0}{3FB BIT 4,0 - 0}{3FA BIT 4,0 - 0}{3F9 BIT 4,0 - 0}{3F8 BIT 4,0 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 7,3 - 3}{3F6 BIT 7,3 - 0}{3F5 BIT 7,3 - 0}{3F4 BIT 7,3 - 0}{3F3 BIT 7,3 - 0}{3F2 BIT 7,3 - 0}{3F1 BIT 7,3 - 0}{3F0 BIT 7,3 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 6,2 - 3}{3F6 BIT 6,2 - 0}{3F5 BIT 6,2 - 0}{3F4 BIT 6,2 - 0}{3F3 BIT 6,2 - 0}{3F2 BIT 6,2 - 0}{3F1 BIT 6,2 - 0}{3F0 BIT 6,2 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 5,1 - 3}{3F6 BIT 5,1 - 0}{3F5 BIT 5,1 - 0}{3F4 BIT 4,1 - 0}{3F3 BIT 5,1 - 0}{3F2 BIT 5,1 - 0}{3F1 BIT 5,1 - 0}{3F0 BIT 5,1 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 4,0 - 3}{3F6 BIT 4,0 - 3}{3F5 BIT 4,0 - 3}{3F4 BIT 4,0 - 3}{3F3 BIT 4,0 - 3}{3F2 BIT 4,0 - 3}{3F1 BIT 4,0 - 3}{3F0 BIT 4,0 - 3}[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// </remarks>[/font]
Hope this is of some use to some of you.
Any questions ask.
I now need to look at the sprite format in pacman.5f next
Hurray Banana2015-02-19 14:12:41
so here it is for anyone else looking to write some new tiles into this rom (which is what I will now be able to do)
[font="Courier New, Courier, mono"] /// <remarks>[/font]
[font="Courier New, Courier, mono"] /// THIS ASSUMES WE ARE LOOKING AT VISUALISATION ON VERTICAL MONITOR[/font]
[font="Courier New, Courier, mono"] /// tile format as follows 16 bytes per tile[/font]
[font="Courier New, Courier, mono"] /// 8 x 8 pixels[/font]
[font="Courier New, Courier, mono"] /// first 8 bytes are for the lower half of the tile rows 4 to 7[/font]
[font="Courier New, Courier, mono"] /// second 8 bytes are for the upper half of tile rows 0 to 3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// each byte specifies colour of 4 pixels for a particular column[/font]
[font="Courier New, Courier, mono"] /// upper nibble holds bit plane 1[/font]
[font="Courier New, Courier, mono"] /// lower nibble holds bit plane 0[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// combine bit 4 and bit 0 to get a 2 bit value representing colour 0-3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// the first byte specifies the right hand column of pixels (column 7)[/font]
[font="Courier New, Courier, mono"] /// second byte specifies column 6 and so on[/font]
[font="Courier New, Courier, mono"] /// the eigth byte specifies column 0[/font]
[font="Courier New, Courier, mono"] /// so they are read right to left[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// in each nibble[/font]
[font="Courier New, Courier, mono"] /// the msb (bit 3) specifies the top row of the column - row 0[/font]
[font="Courier New, Courier, mono"] /// the lsb (bit 0) specifies the final row of the column - row 3[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// Here is the data for tile 3F (tile 63) a simple L shape in colour 3[/font]
[font="Courier New, Courier, mono"] /// held at address 3F0 in pacman.5e[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// 11, 11, 11, 11, 11, 11, 11, FF bottom half of tile[/font]
[font="Courier New, Courier, mono"] /// 00, 00, 00, 00, 00, 00, 00, FF top half of tile[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// x represents colour 3[/font]
[font="Courier New, Courier, mono"] /// . represents colour 0[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// X...... - FF show colour 3 for all 4 pixels in column[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// X......[/font]
[font="Courier New, Courier, mono"] /// XXXXXXX - 11 represent colour 3 for final pixel of column[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// full rep with bits and bytes in correct positions[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 7,3 - 3}{3FE BIT 7,3 - 0}{3FD BIT 7,3 - 0}{3FC BIT 7,3 - 0}{3FB BIT 7,3 - 0}{3FA BIT 7,3 - 0}{3F9 BIT 7,3 - 0}{3F8 BIT 7,3 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 6,2 - 3}{3FE BIT 6,2 - 0}{3FD BIT 6,2 - 0}{3FC BIT 6,2 - 0}{3FB BIT 6,2 - 0}{3FA BIT 6,2 - 0}{3F9 BIT 6,2 - 0}{3F8 BIT 6,2 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 5,1 - 3}{3FE BIT 5,1 - 0}{3FD BIT 5,1 - 0}{3FC BIT 5,1 - 0}{3FB BIT 5,1 - 0}{3FA BIT 5,1 - 0}{3F9 BIT 5,1 - 0}{3F8 BIT 5,1 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3FF BIT 4,0 - 3}{3FE BIT 4,0 - 0}{3FD BIT 4,0 - 0}{3FC BIT 4,0 - 0}{3FB BIT 4,0 - 0}{3FA BIT 4,0 - 0}{3F9 BIT 4,0 - 0}{3F8 BIT 4,0 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 7,3 - 3}{3F6 BIT 7,3 - 0}{3F5 BIT 7,3 - 0}{3F4 BIT 7,3 - 0}{3F3 BIT 7,3 - 0}{3F2 BIT 7,3 - 0}{3F1 BIT 7,3 - 0}{3F0 BIT 7,3 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 6,2 - 3}{3F6 BIT 6,2 - 0}{3F5 BIT 6,2 - 0}{3F4 BIT 6,2 - 0}{3F3 BIT 6,2 - 0}{3F2 BIT 6,2 - 0}{3F1 BIT 6,2 - 0}{3F0 BIT 6,2 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 5,1 - 3}{3F6 BIT 5,1 - 0}{3F5 BIT 5,1 - 0}{3F4 BIT 4,1 - 0}{3F3 BIT 5,1 - 0}{3F2 BIT 5,1 - 0}{3F1 BIT 5,1 - 0}{3F0 BIT 5,1 - 0}[/font]
[font="Courier New, Courier, mono"] /// {3F7 BIT 4,0 - 3}{3F6 BIT 4,0 - 3}{3F5 BIT 4,0 - 3}{3F4 BIT 4,0 - 3}{3F3 BIT 4,0 - 3}{3F2 BIT 4,0 - 3}{3F1 BIT 4,0 - 3}{3F0 BIT 4,0 - 3}[/font]
[font="Courier New, Courier, mono"] /// [/font]
[font="Courier New, Courier, mono"] /// </remarks>[/font]
Hope this is of some use to some of you.
Any questions ask.
I now need to look at the sprite format in pacman.5f next
Hurray Banana2015-02-19 14:12:41