Previous 15994 Revisions Next

r5717 Sunday 13th September, 2009 at 15:45:40 UTC by Angelo Salese
[X1]: Cleaned up gfx decoding functions
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5716r5717
896896
897897         pcg_offset &= 0x7ff;
898898
899          gfx_element_mark_dirty(space->machine->gfx[4], pcg_offset >> 3);
900          gfx_element_mark_dirty(space->machine->gfx[5], pcg_offset >> 3);
901          gfx_element_mark_dirty(space->machine->gfx[6], pcg_offset >> 3);
902          gfx_element_mark_dirty(space->machine->gfx[7], pcg_offset >> 3);
903
899          gfx_element_mark_dirty(space->machine->gfx[1], pcg_offset >> 3);
904900      }
905901      else
906902      {
r5716r5717
912908
913909         pcg_offset &= 0x7ff;
914910
915          gfx_element_mark_dirty(space->machine->gfx[4], pcg_offset >> 3);
916          gfx_element_mark_dirty(space->machine->gfx[5], pcg_offset >> 3);
917          gfx_element_mark_dirty(space->machine->gfx[6], pcg_offset >> 3);
918          gfx_element_mark_dirty(space->machine->gfx[7], pcg_offset >> 3);
911          gfx_element_mark_dirty(space->machine->gfx[1], pcg_offset >> 3);
919912
920913           pcg_index[addr-1]++;
921914           pcg_index[addr-1]&=7;
r5716r5717
16401633   8*8
16411634};
16421635
1643static const gfx_layout x1_chars_8wx8 =
1636static const gfx_layout x1_chars_8x16 =
16441637{
1645   16,8,
1646   RGN_FRAC(1,1),
1647   1,
1648   { 0 },
1649   { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 },
1650   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1651   8*8
1652};
1653
1654static const gfx_layout x1_chars_8x8w =
1655{
16561638   8,16,
16571639   RGN_FRAC(1,1),
16581640   1,
16591641   { 0 },
16601642   { 0, 1, 2, 3, 4, 5, 6, 7 },
1661   { 0*8, 0*8, 1*8, 1*8, 2*8, 2*8, 3*8, 3*8, 4*8, 4*8, 5*8, 5*8, 6*8, 6*8, 7*8, 7*8 },
1662   8*8
1643   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
1644   8*16
16631645};
16641646
1665static const gfx_layout x1_chars_8wx8w =
1666{
1667   16,16,
1668   RGN_FRAC(1,1),
1669   1,
1670   { 0 },
1671   { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 },
1672   { 0*8, 0*8, 1*8, 1*8, 2*8, 2*8, 3*8, 3*8, 4*8, 4*8, 5*8, 5*8, 6*8, 6*8, 7*8, 7*8 },
1673   8*8
1674};
1675
16761647static const gfx_layout x1_pcg_8x8 =
16771648{
16781649   8,8,
r5716r5717
16841655   8*8
16851656};
16861657
1687static const gfx_layout x1_pcg_8wx8 =
1688{
1689   16,8,
1690   RGN_FRAC(1,3),
1691   3,
1692   { RGN_FRAC(2,3),RGN_FRAC(1,3),RGN_FRAC(0,3) },
1693   { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 },
1694   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1695   8*8
1696};
1697
1698static const gfx_layout x1_pcg_8x8w =
1699{
1700   8,16,
1701   RGN_FRAC(1,3),
1702   3,
1703   { RGN_FRAC(2,3),RGN_FRAC(1,3),RGN_FRAC(0,3) },
1704   { 0, 1, 2, 3, 4, 5, 6, 7 },
1705   { 0*8, 0*8, 1*8, 1*8, 2*8, 2*8, 3*8, 3*8, 4*8, 4*8, 5*8, 5*8, 6*8, 6*8, 7*8, 7*8 },
1706   8*8
1707};
1708
1709static const gfx_layout x1_pcg_8wx8w =
1710{
1711   16,16,
1712   RGN_FRAC(1,3),
1713   3,
1714   { RGN_FRAC(2,3),RGN_FRAC(1,3),RGN_FRAC(0,3) },
1715   { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 },
1716   { 0*8, 0*8, 1*8, 1*8, 2*8, 2*8, 3*8, 3*8, 4*8, 4*8, 5*8, 5*8, 6*8, 6*8, 7*8, 7*8 },
1717   8*8
1718};
1719
17201658static const gfx_layout x1_chars_16x16 =
17211659{
17221660   16,16,
r5716r5717
17301668
17311669/* decoded for debugging purpose, this will be nuked in the end... */
17321670static GFXDECODE_START( x1 )
1733   GFXDECODE_ENTRY( "cgrom", 0x00000, x1_chars_8x8,    0x200, 0x20 )
1734   GFXDECODE_ENTRY( "cgrom", 0x00000, x1_chars_8wx8,   0x200, 0x20 )
1735   GFXDECODE_ENTRY( "cgrom", 0x00000, x1_chars_8x8w,   0x200, 0x20 )
1736   GFXDECODE_ENTRY( "cgrom", 0x00000, x1_chars_8wx8w,  0x200, 0x20 )
1737   GFXDECODE_ENTRY( "pcg",   0x00000, x1_pcg_8x8,      0x000, 1 )
1738   GFXDECODE_ENTRY( "pcg",   0x00000, x1_pcg_8wx8,     0x000, 1 )
1739   GFXDECODE_ENTRY( "pcg",   0x00000, x1_pcg_8x8w,     0x000, 1 )
1740   GFXDECODE_ENTRY( "pcg",   0x00000, x1_pcg_8wx8w,    0x000, 1 )
1741   GFXDECODE_ENTRY( "cgrom", 0x01800, x1_chars_16x16,  0, 0x20 ) //only x1turboz uses this so far
1742   GFXDECODE_ENTRY( "kanji", 0x27000, x1_chars_16x16,  0, 0x20 ) //needs to be checked when the ROM will be redumped
1671   GFXDECODE_ENTRY( "cgrom",   0x00000, x1_chars_8x8,    0x200, 0x20 )
1672   GFXDECODE_ENTRY( "pcg",     0x00000, x1_pcg_8x8,      0x000, 1 )
1673   GFXDECODE_ENTRY( "cgrom",   0x01800, x1_chars_8x16,   0x200, 0x20 )
1674   GFXDECODE_ENTRY( "kanji",   0x27000, x1_chars_16x16,  0, 0x20 ) //needs to be checked when the ROM will be redumped
17431675GFXDECODE_END
17441676
17451677/*************************************
r5716r5717
18661798
18671799   for(i=0;i<0x0400;i++)
18681800   {
1869      gfx_element_mark_dirty(machine->gfx[4], i);
1870         gfx_element_mark_dirty(machine->gfx[5], i);
1871         gfx_element_mark_dirty(machine->gfx[6], i);
1872      gfx_element_mark_dirty(machine->gfx[7], i);
1801      gfx_element_mark_dirty(machine->gfx[1], i);
18731802   }
18741803
18751804   /* X1 Turbo specific */
r5716r5717
20321961   ROM_LOAD("fnt0808.x1", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
20331962   ROM_RELOAD(            0x00800, 0x00800)
20341963   ROM_RELOAD(            0x01000, 0x00800)
1964   ROM_LOAD("fnt0816.x1", 0x01800, 0x1000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf) )
20351965
20361966   ROM_REGION(0x4ac00, "kanji", ROMREGION_ERASEFF)
20371967ROM_END
r5716r5717
20481978
20491979   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
20501980
2051   ROM_REGION(0x1800, "cgrom", 0)
1981   ROM_REGION(0x2800, "cgrom", 0)
20521982   ROM_LOAD("fnt0808.x1", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
20531983   ROM_RELOAD(            0x00800, 0x00800)
20541984   ROM_RELOAD(            0x01000, 0x00800)
1985   ROM_LOAD("fnt0816.x1", 0x01800, 0x01000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf) )
20551986
20561987   ROM_REGION(0x4ac00, "kanji", 0)
20571988   /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */
r5716r5717
20671998
20681999   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
20692000
2070   ROM_REGION(0x1800, "cgrom", 0)
2001   ROM_REGION(0x2800, "cgrom", 0)
20712002   /* This should be larger... hence, we are missing something (maybe part of the other fnt roms?) */
20722003   ROM_LOAD("fnt0808_turbo.x1", 0x00000, 0x00800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) )
20732004   ROM_RELOAD(            0x00800, 0x00800)
20742005   ROM_RELOAD(            0x01000, 0x00800)
2006   ROM_LOAD("fnt0816.x1", 0x01800, 0x01000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf) )
20752007
20762008   ROM_REGION(0x4ac00, "kanji", 0)
20772009   /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */
r5716r5717
20952027   ROM_RELOAD(            0x00800, 0x00800)
20962028   ROM_RELOAD(            0x01000, 0x00800)
20972029   ROM_SYSTEM_BIOS( 0, "font1", "Font set 1" )
2098   ROMX_LOAD("fnt0816.x1", 0x1800, 0x1000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf), ROM_BIOS(1) )
2030   ROMX_LOAD("fnt0816.x1", 0x1800, 0x1000, CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf), ROM_BIOS(1) )
20992031   /* I strongly suspect this is not genuine */
21002032   ROMX_LOAD("fnt1616.x1", 0x02800, 0x4ac00, BAD_DUMP CRC(46826745) SHA1(b9e6c320611f0842df6f45673c47c3e23bc14272), ROM_BIOS(1) )
21012033   ROM_SYSTEM_BIOS( 1, "font2", "Font set 2" )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team