Previous 199869 Revisions Next

r33214 Wednesday 5th November, 2014 at 08:44:34 UTC by Alex W. Jackson
MT 03590 [Alex Jackson]
[src/mame/drivers]rockrage.c
[src/mame/video]rockrage.c

trunk/src/mame/drivers/rockrage.c
r241725r241726
210210};
211211
212212static GFXDECODE_START( rockrage )
213   GFXDECODE_ENTRY( "gfx1", 0, charlayout,   64, 32 )  /* colors 00..31, but using 2 lookup tables */
214   GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 32,  1 )  /* colors 32..63 */
213   GFXDECODE_ENTRY( "gfx1", 0, charlayout,     0, 32 )  /* colors 00..31, using 2 lookup tables */
214   GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 512, 16 )  /* colors 32..47, using lookup table */
215215GFXDECODE_END
216216
217217/***************************************************************************
r241725r241726
227227   m_rombank->configure_entries(0, 8, &ROM[0x10000], 0x2000);
228228
229229   save_item(NAME(m_vreg));
230   save_item(NAME(m_layer_colorbase));
231230}
232231
233232void rockrage_state::machine_reset()
r241725r241726
268267   MCFG_K007420_PALETTE("palette")
269268
270269   MCFG_GFXDECODE_ADD("gfxdecode", "palette", rockrage)
271   MCFG_PALETTE_ADD("palette", 64 + 2*16*16)
270   MCFG_PALETTE_ADD("palette", 16*16*3)
272271   MCFG_PALETTE_INDIRECT_ENTRIES(64)
273272   MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
274273   MCFG_PALETTE_ENDIANNESS(ENDIANNESS_LITTLE)
r241725r241726
310309   ROM_LOAD( "620l10.8g",  0x020000, 0x20000, CRC(06d108e0) SHA1(cae8c5f2fc4e84bc7adbf27f71a18a74968c4296) ) /* One "K" & one "L" code version??? */
311310
312311   ROM_REGION( 0x0300, "proms", 0 )
313   ROM_LOAD( "620k09.11g", 0x00000, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* layer 0 lookup table */
312   ROM_LOAD( "620k07.13g", 0x00000, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* layer 0 lookup table */
314313   ROM_LOAD( "620k08.12g", 0x00100, 0x00100, CRC(b499800c) SHA1(46fa4e071ebceed12027de109be1e16dde5e846e) )    /* layer 1 lookup table */
315   ROM_LOAD( "620k07.13g", 0x00200, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* sprite lookup table, but its not used */
316                                             /* because it's always 0 1 2 ... f */
314   ROM_LOAD( "620k09.11g", 0x00200, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* sprite lookup table */
315
317316   ROM_REGION( 0x08000, "vlm", 0 ) /* VLM3050 data */
318317   ROM_LOAD( "620k04.6e", 0x00000, 0x08000, CRC(8be969f3) SHA1(9856b4c13fac77b645aed67a08cb4965b4966492) )
319318ROM_END
r241725r241726
339338   ROM_LOAD( "620g10b.8f", 0x030000, 0x10000, CRC(1618854a) SHA1(0afb34a9ed97f13c1910acd7767cb8546ea7e6cd) )
340339
341340   ROM_REGION( 0x0300, "proms", 0 )
342   ROM_LOAD( "620k09.11g", 0x00000, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* layer 0 lookup table */
341   ROM_LOAD( "620k07.13g", 0x00000, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* layer 0 lookup table */
343342   ROM_LOAD( "620k08.12g", 0x00100, 0x00100, CRC(b499800c) SHA1(46fa4e071ebceed12027de109be1e16dde5e846e) )    /* layer 1 lookup table */
344   ROM_LOAD( "620k07.13g", 0x00200, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* sprite lookup table, but its not used */
345                                             /* because it's always 0 1 2 ... f */
343   ROM_LOAD( "620k09.11g", 0x00200, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* sprite lookup table */
344
346345   ROM_REGION( 0x08000, "vlm", 0 ) /* VLM3050 data */
347346   ROM_LOAD( "620k04.6e", 0x00000, 0x08000, CRC(8be969f3) SHA1(9856b4c13fac77b645aed67a08cb4965b4966492) ) /* Same rom but labeled as ver "G" */
348347ROM_END
r241725r241726
364363   ROM_LOAD( "620k10.8g",  0x020000, 0x20000, CRC(0d1a95ab) SHA1(be565424f17af31dcd07004c6be03bbb00aef514) )
365364
366365   ROM_REGION( 0x0300, "proms", 0 )
367   ROM_LOAD( "620k09.11g", 0x00000, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* layer 0 lookup table */
366   ROM_LOAD( "620k07.13g", 0x00000, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* layer 0 lookup table */
368367   ROM_LOAD( "620k08.12g", 0x00100, 0x00100, CRC(b499800c) SHA1(46fa4e071ebceed12027de109be1e16dde5e846e) )    /* layer 1 lookup table */
369   ROM_LOAD( "620k07.13g", 0x00200, 0x00100, CRC(b6135ee0) SHA1(248a978987cff86c2bbad10ef332f63a6abd5bee) )    /* sprite lookup table, but its not used */
370                                             /* because it's always 0 1 2 ... f */
368   ROM_LOAD( "620k09.11g", 0x00200, 0x00100, CRC(9f0e0608) SHA1(c95bdb370e4a91f27afbd5ff3b39b2e0ad87da73) )    /* sprite lookup table */
369
371370   ROM_REGION( 0x08000, "vlm", 0 ) /* VLM3050 data */
372371   ROM_LOAD( "620k04.6e", 0x00000, 0x08000, CRC(8be969f3) SHA1(9856b4c13fac77b645aed67a08cb4965b4966492) )
373372ROM_END
trunk/src/mame/video/rockrage.c
r241725r241726
44PALETTE_INIT_MEMBER(rockrage_state, rockrage)
55{
66   const UINT8 *color_prom = memregion("proms")->base();
7   int i;
87
9   /* sprites */
10   for (i = 0x20; i < 0x40; i++)
11      palette.set_pen_indirect(i, i);
12
13   /* characters */
14   for (i = 0x40; i < 0x140; i++)
8   for (int i = 0; i < 256*3; i++)
159   {
16      UINT8 ctabentry;
17
18      ctabentry = (color_prom[(i - 0x40) + 0x000] & 0x0f) | 0x00;
19      palette.set_pen_indirect(i + 0x000, ctabentry);
20
21      ctabentry = (color_prom[(i - 0x40) + 0x100] & 0x0f) | 0x10;
22      palette.set_pen_indirect(i + 0x100, ctabentry);
10      // layer0 uses colors 0x00-0x0f; layer1 uses 0x10-0x1f; sprites use 0x20-0x2f
11      UINT8 colorbase = (i / 256) * 16;
12      UINT8 ctabentry = (color_prom[i] & 0x0f) | colorbase;
13      palette.set_pen_indirect(i, ctabentry);
2314   }
2415}
2516
r241725r241726
5041{
5142   *code |= ((*color & 0x40) << 2) | ((*color & 0x80) << 1) * ((m_vreg & 0x03) << 1);
5243   *code = (*code << 2) | ((*color & 0x30) >> 4);
53   *color = 0;
44   *color = 0 + (*color & 0x0f);
5445}
5546
5647


Previous 199869 Revisions Next


© 1997-2024 The MAME Team