Previous 199869 Revisions Next

r33185 Monday 3rd November, 2014 at 22:57:43 UTC by Robbbert
MT 05776
[src/mame/includes]tx1.h
[src/mame/video]tx1.c

trunk/src/mame/includes/tx1.h
r241696r241697
193193
194194   void buggyboy_draw_char(UINT8 *bitmap, bool wide);
195195   void buggyboy_get_roadpix(int screen, int ls161, UINT8 rva0_6, UINT8 sld, UINT32 *_rorev,
196                        UINT8 *rc0, UINT8 *rc1, UINT8 *rc2, UINT8 *rc3,
197                        const UINT8 *rom, const UINT8 *prom0, const UINT8 *prom1, const UINT8 *prom2);
196                        UINT8 *rc0, UINT8 *rc1, UINT8 *rc2, UINT8 *rc3);
198197   void buggyboy_draw_road(UINT8 *bitmap);
199198   void buggybjr_draw_road(UINT8 *bitmap);
200199   void buggyboy_draw_objs(UINT8 *bitmap, bool wide);
trunk/src/mame/video/tx1.c
r241696r241697
14381438***************************************************************************/
14391439
14401440void tx1_state::buggyboy_get_roadpix(int screen, int ls161, UINT8 rva0_6, UINT8 sld, UINT32 *_rorev,
1441                           UINT8 *rc0, UINT8 *rc1, UINT8 *rc2, UINT8 *rc3,
1442                           const UINT8 *rom, const UINT8 *prom0, const UINT8 *prom1, const UINT8 *prom2)
1441                           UINT8 *rc0, UINT8 *rc1, UINT8 *rc2, UINT8 *rc3)
14431442{
14441443   /* Counter Q10-7 are added to 384 */
14451444   UINT16 ls283_159 = (ls161 & 0x780) + 128 + (256 * screen);
r241696r241697
14491448   UINT8 d0 = 0;
14501449   UINT8 d1 = 0;
14511450
1451   /* ROM/PROM lookup tables */
1452   const UINT8 *rom   = memregion("road")->base();
1453   const UINT8 *prom0 = rom + 0x4000;
1454   const UINT8 *prom1 = rom + 0x4200;
1455   const UINT8 *prom2 = rom + 0x4400;
1456
14521457   /* Latch road reverse bit */
14531458   *_rorev = !( (rom_en && rom_flip) || (!rom_en && (ls161 & 0x4000)) );
14541459
r241696r241697
15391544
15401545   /* ROM/PROM lookup tables */
15411546   const UINT8 *rcols = (UINT8*)(memregion("proms")->base() + 0x1500);
1542   const UINT8 *rom   = memregion("road")->base();
1543   const UINT8 *prom0 = rom + 0x4000;
1544   const UINT8 *prom1 = rom + 0x4200;
1545   const UINT8 *prom2 = rom + 0x4400;
1546   const UINT8 *vprom = rom + 0x4600;
1547   const UINT8 *vprom   = memregion("road")->base() + 0x4600;
15471548
15481549   /* Extract constant values */
15491550   tcmd     = ((vregs.scol & 0xc000) >> 12) | ((vregs.scol & 0x00c0) >> 6);
r241696r241697
16671668      /* Have we crossed a road gfx strip boundary? */
16681669      if (ls161 & 7)
16691670      {
1670         buggyboy_get_roadpix(0, ls161, rva0_6, sld, &_rorevls, &rc0[0], &rc1[0], &rc2[0], &rc3[0], rom, prom0, prom1, prom2);
1671         buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0[1], &rc1[1], &rc2[1], &rc3[1], rom, prom0, prom1, prom2);
1672         buggyboy_get_roadpix(2, ls161, rva0_6, sld, &_rorevrs, &rc0[2], &rc1[2], &rc2[2], &rc3[2], rom, prom0, prom1, prom2);
1671         buggyboy_get_roadpix(0, ls161, rva0_6, sld, &_rorevls, &rc0[0], &rc1[0], &rc2[0], &rc3[0]);
1672         buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0[1], &rc1[1], &rc2[1], &rc3[1]);
1673         buggyboy_get_roadpix(2, ls161, rva0_6, sld, &_rorevrs, &rc0[2], &rc1[2], &rc2[2], &rc3[2]);
16731674      }
16741675
16751676      /* We can evaluate some of the pixel logic outside of the x-loop */
r241696r241697
17491750         /* Load in a new road gfx strip? */
17501751         if (!(ls161 & 7))
17511752         {
1752            buggyboy_get_roadpix(0, ls161, rva0_6, sld, &_rorevls, &rc0[0], &rc1[0], &rc2[0], &rc3[0], rom, prom0, prom1, prom2);
1753            buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0[1], &rc1[1], &rc2[1], &rc3[1], rom, prom0, prom1, prom2);
1754            buggyboy_get_roadpix(2, ls161, rva0_6, sld, &_rorevrs, &rc0[2], &rc1[2], &rc2[2], &rc3[2], rom, prom0, prom1, prom2);
1753            buggyboy_get_roadpix(0, ls161, rva0_6, sld, &_rorevls, &rc0[0], &rc1[0], &rc2[0], &rc3[0]);
1754            buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0[1], &rc1[1], &rc2[1], &rc3[1]);
1755            buggyboy_get_roadpix(2, ls161, rva0_6, sld, &_rorevrs, &rc0[2], &rc1[2], &rc2[2], &rc3[2]);
17551756         }
17561757
17571758         /* Road camber/banking */
r241696r241697
21702171
21712172   /* ROM/PROM lookup tables */
21722173   const UINT8 *rcols = (UINT8*)(memregion("proms")->base() + 0x1500);
2173   const UINT8 *rom   = memregion("road")->base();
2174   const UINT8 *prom0 = rom + 0x4000;
2175   const UINT8 *prom1 = rom + 0x4200;
2176   const UINT8 *prom2 = rom + 0x4400;
2177   const UINT8 *vprom = rom + 0x4600;
2174   const UINT8 *vprom = memregion("road")->base() + 0x4600;
21782175
21792176   /* Extract constant values */
21802177   tcmd     = ((vregs.scol & 0xc000) >> 12) | ((vregs.scol & 0x00c0) >> 6);
r241696r241697
22962293
22972294      /* Have we crossed a road gfx strip boundary? */
22982295      if (ls161 & 7)
2299         buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0, &rc1, &rc2, &rc3, rom, prom0, prom1, prom2);
2296         buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0, &rc1, &rc2, &rc3);
23002297
23012298      for (x = 0; x < 256; ++x)
23022299      {
r241696r241697
23312328
23322329         /* Load in a new road gfx strip? */
23332330         if (!(ls161 & 7))
2334            buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0, &rc1, &rc2, &rc3, rom, prom0, prom1, prom2);
2331            buggyboy_get_roadpix(1, ls161, rva0_6, sld, &_rorevcs, &rc0, &rc1, &rc2, &rc3);
23352332
23362333         /* Road camber */
23372334         if (vregs.bank_mode == 0)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team