mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
This fixes mtrap37b14gre. As an added bonus, the arrow is now visible in Venture on the zoomed out map. Also, in Hard Hat the twister fades away properly.
This commit is contained in:
parent
478d9053ef
commit
e4db091e2d
@ -189,7 +189,7 @@ static WRITE8_HANDLER( fax_bank_select_w )
|
||||
|
||||
static ADDRESS_MAP_START( common_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x03ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_READWRITE(videoram_r, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
AM_RANGE(0x5000, 0x503f) AM_WRITE(exidy_sprite1_xpos_w)
|
||||
AM_RANGE(0x5040, 0x507f) AM_WRITE(exidy_sprite1_ypos_w)
|
||||
AM_RANGE(0x5080, 0x50bf) AM_WRITE(exidy_sprite2_xpos_w)
|
||||
@ -199,21 +199,29 @@ static ADDRESS_MAP_START( common_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x5100, 0x5100) AM_MIRROR(0xfc) AM_WRITE(exidy_spriteno_w)
|
||||
AM_RANGE(0x5101, 0x5101) AM_MIRROR(0xfc) AM_WRITE(exidy_sprite_enable_w)
|
||||
AM_RANGE(0x5103, 0x5103) AM_MIRROR(0xfc) AM_READ(exidy_interrupt_r)
|
||||
AM_RANGE(0x5210, 0x5212) AM_WRITE(exidy_color_w)
|
||||
AM_RANGE(0x5210, 0x5212) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_color_latch)
|
||||
AM_RANGE(0x5213, 0x5213) AM_READ_PORT("IN2")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( sidetrac_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4800, 0x4fff) AM_ROM AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w)
|
||||
AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( targ_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4800, 0x4fff) AM_READWRITE(MRA8_RAM, exidy_characterram_w) AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w)
|
||||
AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( venture_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x4800, 0x4fff) AM_READWRITE(MRA8_RAM, exidy_characterram_w) AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -221,7 +229,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( pepper2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_READWRITE(MRA8_RAM, exidy_characterram_w) AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -234,7 +242,7 @@ static ADDRESS_MAP_START( fax_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1)
|
||||
AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x5213, 0x5217) AM_WRITE(MWA8_NOP) /* empty control lines on color/sound board */
|
||||
AM_RANGE(0x6000, 0x6fff) AM_READWRITE(MRA8_RAM, exidy_characterram_w) AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -824,11 +832,11 @@ static const struct CustomSound_interface exidy_custom_interface =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_DRIVER_START( targ )
|
||||
static MACHINE_DRIVER_START( sidetrac )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD_TAG("main", M6502, EXIDY_CPU_CLOCK)
|
||||
MDRV_CPU_PROGRAM_MAP(common_map,targ_map)
|
||||
MDRV_CPU_PROGRAM_MAP(common_map,sidetrac_map)
|
||||
MDRV_CPU_VBLANK_INT(exidy_vblank_interrupt,1)
|
||||
|
||||
/* video hardware */
|
||||
@ -854,6 +862,15 @@ static MACHINE_DRIVER_START( targ )
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( targ )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_IMPORT_FROM(sidetrac)
|
||||
MDRV_CPU_MODIFY("main")
|
||||
MDRV_CPU_PROGRAM_MAP(common_map,targ_map)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( venture )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -936,7 +953,7 @@ ROM_START( sidetrac )
|
||||
ROM_LOAD( "stl8a-1", 0x2800, 0x0800, CRC(e41750ff) SHA1(3868a0d7e34a5118b39b31cff9e4fc839df541ff) )
|
||||
ROM_LOAD( "stl7a-2", 0x3000, 0x0800, CRC(57fb28dc) SHA1(6addd633d655d6a56b3e509d18e5f7c0ab2d0fbb) )
|
||||
ROM_LOAD( "stl6a-2", 0x3800, 0x0800, CRC(4226d469) SHA1(fd18b732b66082988b01e04adc2b1e5dae410c98) )
|
||||
ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* prom instead of ram chr gen*/
|
||||
ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* PROM instead of RAM char generator */
|
||||
|
||||
ROM_REGION( 0x0200, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "stl11d", 0x0000, 0x0200, CRC(3bd1acc1) SHA1(06f900cb8f56cd4215c5fbf58a852426d390e0c1) )
|
||||
@ -1356,9 +1373,6 @@ static DRIVER_INIT( sidetrac )
|
||||
exidy_color_latch[2] = 0xf8;
|
||||
exidy_color_latch[1] = 0xdc;
|
||||
exidy_color_latch[0] = 0xb8;
|
||||
|
||||
/* ROM in place of character RAM */
|
||||
memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4bff, 0, 0, MWA8_ROM);
|
||||
}
|
||||
|
||||
|
||||
@ -1449,7 +1463,7 @@ static DRIVER_INIT( pepper2 )
|
||||
|
||||
/* two 6116 character RAMs */
|
||||
exidy_characterram = memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MRA8_RAM);
|
||||
exidy_characterram = memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, exidy_characterram_w);
|
||||
exidy_characterram = memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MWA8_RAM);
|
||||
memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MRA8_NOP);
|
||||
memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MWA8_NOP);
|
||||
}
|
||||
@ -1471,22 +1485,22 @@ static DRIVER_INIT( fax )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1979, sidetrac, 0, targ, sidetrac, sidetrac, ROT0, "Exidy", "Side Trak", 0 )
|
||||
GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ", 0 )
|
||||
GAME( 1980, targc, targ, targ, targ, targ, ROT0, "Exidy", "Targ (cocktail?)", 0 )
|
||||
GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 )
|
||||
GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 )
|
||||
GAME( 1980, rallys, spectar, targ, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 )
|
||||
GAME( 1980, phantoma, spectar, targ, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 )
|
||||
GAME( 1979, sidetrac, 0, sidetrac, sidetrac, sidetrac, ROT0, "Exidy", "Side Trak", 0 )
|
||||
GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ", 0 )
|
||||
GAME( 1980, targc, targ, targ, targ, targ, ROT0, "Exidy", "Targ (cocktail?)", 0 )
|
||||
GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 )
|
||||
GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 )
|
||||
GAME( 1980, rallys, spectar, targ, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 )
|
||||
GAME( 1980, phantoma, spectar, targ, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 )
|
||||
|
||||
GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", 0 )
|
||||
GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", 0 )
|
||||
GAME( 1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)", 0 )
|
||||
GAME( 1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)", 0 )
|
||||
GAME( 1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)", 0 )
|
||||
GAME( 1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)", 0 )
|
||||
GAME( 1982, teetert, 0, teetert, teetert, teetert, ROT0, "Exidy", "Teeter Torture (prototype)", 0 )
|
||||
GAME( 1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II", 0 )
|
||||
GAME( 1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat", 0 )
|
||||
GAME( 1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "FAX", 0 )
|
||||
GAME( 1983, fax2, fax, fax, fax, fax, ROT0, "Exidy", "FAX 2", 0 )
|
||||
GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", 0 )
|
||||
GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", 0 )
|
||||
GAME( 1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)", 0 )
|
||||
GAME( 1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)", 0 )
|
||||
GAME( 1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)", 0 )
|
||||
GAME( 1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)", 0 )
|
||||
GAME( 1982, teetert, 0, teetert, teetert, teetert, ROT0, "Exidy", "Teeter Torture (prototype)", 0 )
|
||||
GAME( 1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II", 0 )
|
||||
GAME( 1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat", 0 )
|
||||
GAME( 1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "FAX", 0 )
|
||||
GAME( 1983, fax2, fax, fax, fax, fax, ROT0, "Exidy", "FAX 2", 0 )
|
||||
|
@ -57,7 +57,7 @@ extern UINT8 *exidy_characterram;
|
||||
extern UINT8 exidy_collision_mask;
|
||||
extern UINT8 exidy_collision_invert;
|
||||
|
||||
extern UINT8 exidy_color_latch[3];
|
||||
extern UINT8 *exidy_color_latch;
|
||||
|
||||
VIDEO_START( exidy );
|
||||
VIDEO_EOF( exidy );
|
||||
@ -66,7 +66,6 @@ VIDEO_UPDATE( exidy );
|
||||
INTERRUPT_GEN( exidy_vblank_interrupt );
|
||||
INTERRUPT_GEN( teetert_vblank_interrupt );
|
||||
|
||||
WRITE8_HANDLER( exidy_characterram_w );
|
||||
WRITE8_HANDLER( exidy_color_w );
|
||||
WRITE8_HANDLER( exidy_sprite1_xpos_w );
|
||||
WRITE8_HANDLER( exidy_sprite1_ypos_w );
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "exidy.h"
|
||||
|
||||
UINT8 *exidy_characterram;
|
||||
UINT8 *exidy_color_latch;
|
||||
|
||||
UINT8 exidy_collision_mask;
|
||||
UINT8 exidy_collision_invert;
|
||||
@ -16,7 +17,6 @@ static mame_bitmap *motion_object_1_vid;
|
||||
static mame_bitmap *motion_object_2_vid;
|
||||
static mame_bitmap *motion_object_2_clip;
|
||||
|
||||
static UINT8 chardirty[256];
|
||||
static UINT8 update_complete;
|
||||
|
||||
static UINT8 int_condition;
|
||||
@ -28,8 +28,6 @@ static UINT8 sprite1_ypos;
|
||||
static UINT8 sprite2_xpos;
|
||||
static UINT8 sprite2_ypos;
|
||||
|
||||
UINT8 exidy_color_latch[3];
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -45,10 +43,6 @@ VIDEO_START( exidy )
|
||||
motion_object_1_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format);
|
||||
motion_object_2_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format);
|
||||
motion_object_2_clip = auto_bitmap_alloc(16, 16, machine->screen[0].format);
|
||||
|
||||
exidy_color_w(0, exidy_color_latch[0]);
|
||||
exidy_color_w(1, exidy_color_latch[1]);
|
||||
exidy_color_w(2, exidy_color_latch[2]);
|
||||
}
|
||||
|
||||
|
||||
@ -99,78 +93,59 @@ READ8_HANDLER( exidy_interrupt_r )
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Character RAM
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( exidy_characterram_w )
|
||||
{
|
||||
if (exidy_characterram[offset] != data)
|
||||
{
|
||||
exidy_characterram[offset] = data;
|
||||
chardirty[offset / 8 % 256] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Palette RAM
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE void set_1_color(int index, int palette)
|
||||
INLINE void set_1_color(running_machine *machine, int index, int palette)
|
||||
{
|
||||
palette_set_color_rgb(Machine, index, pal1bit(exidy_color_latch[2] >> palette), pal1bit(exidy_color_latch[1] >> palette), pal1bit(exidy_color_latch[0] >> palette));
|
||||
palette_set_color_rgb(machine, index, pal1bit(exidy_color_latch[2] >> palette), pal1bit(exidy_color_latch[1] >> palette), pal1bit(exidy_color_latch[0] >> palette));
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( exidy_color_w )
|
||||
static void set_colors(running_machine *machine)
|
||||
{
|
||||
exidy_color_latch[offset] = data;
|
||||
|
||||
/* motion object 1 */
|
||||
set_1_color(0, 0);
|
||||
set_1_color(1, 7);
|
||||
set_1_color(machine, 0, 0);
|
||||
set_1_color(machine, 1, 7);
|
||||
|
||||
/* motion object 2 */
|
||||
set_1_color(2, 0);
|
||||
set_1_color(3, 6);
|
||||
set_1_color(machine, 2, 0);
|
||||
set_1_color(machine, 3, 6);
|
||||
|
||||
/* one-bit characters */
|
||||
if (Machine->gfx[0]->color_granularity == 2)
|
||||
if (machine->gfx[0]->color_granularity == 2)
|
||||
{
|
||||
set_1_color(4, 0); /* chars 0x00-0x3F */
|
||||
set_1_color(5, 4);
|
||||
set_1_color(6, 0); /* chars 0x40-0x7F */
|
||||
set_1_color(7, 3);
|
||||
set_1_color(8, 0); /* chars 0x80-0xBF */
|
||||
set_1_color(9, 2);
|
||||
set_1_color(10, 0); /* chars 0xC0-0xFF */
|
||||
set_1_color(11, 1);
|
||||
set_1_color(machine, 4, 0); /* chars 0x00-0x3F */
|
||||
set_1_color(machine, 5, 4);
|
||||
set_1_color(machine, 6, 0); /* chars 0x40-0x7F */
|
||||
set_1_color(machine, 7, 3);
|
||||
set_1_color(machine, 8, 0); /* chars 0x80-0xBF */
|
||||
set_1_color(machine, 9, 2);
|
||||
set_1_color(machine, 10, 0); /* chars 0xC0-0xFF */
|
||||
set_1_color(machine, 11, 1);
|
||||
}
|
||||
|
||||
/* two-bit characters */
|
||||
else
|
||||
{
|
||||
set_1_color(4, 0); /* chars 0x00-0x3F */
|
||||
set_1_color(5, 0);
|
||||
set_1_color(6, 4);
|
||||
set_1_color(7, 3);
|
||||
set_1_color(8, 0); /* chars 0x40-0x7F */
|
||||
set_1_color(9, 0);
|
||||
set_1_color(10, 4);
|
||||
set_1_color(11, 3);
|
||||
set_1_color(12, 0); /* chars 0x80-0xBF */
|
||||
set_1_color(13, 0);
|
||||
set_1_color(14, 2);
|
||||
set_1_color(15, 1);
|
||||
set_1_color(16, 0); /* chars 0xC0-0xFF */
|
||||
set_1_color(17, 0);
|
||||
set_1_color(18, 2);
|
||||
set_1_color(19, 1);
|
||||
set_1_color(machine, 4, 0); /* chars 0x00-0x3F */
|
||||
set_1_color(machine, 5, 0);
|
||||
set_1_color(machine, 6, 4);
|
||||
set_1_color(machine, 7, 3);
|
||||
set_1_color(machine, 8, 0); /* chars 0x40-0x7F */
|
||||
set_1_color(machine, 9, 0);
|
||||
set_1_color(machine, 10, 4);
|
||||
set_1_color(machine, 11, 3);
|
||||
set_1_color(machine, 12, 0); /* chars 0x80-0xBF */
|
||||
set_1_color(machine, 13, 0);
|
||||
set_1_color(machine, 14, 2);
|
||||
set_1_color(machine, 15, 1);
|
||||
set_1_color(machine, 16, 0); /* chars 0xC0-0xFF */
|
||||
set_1_color(machine, 17, 0);
|
||||
set_1_color(machine, 18, 2);
|
||||
set_1_color(machine, 19, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,34 +197,25 @@ WRITE8_HANDLER( exidy_sprite_enable_w )
|
||||
|
||||
static void update_background(running_machine *machine)
|
||||
{
|
||||
int x, y, offs;
|
||||
int x, y, code, offs;
|
||||
|
||||
/* update the background and any dirty characters in it */
|
||||
/* decode chars */
|
||||
const gfx_layout *gfx = machine->drv->gfxdecodeinfo[0].gfxlayout;
|
||||
|
||||
for (code = 0; code < gfx->total; code++)
|
||||
decodechar(machine->gfx[0], code, exidy_characterram, gfx);
|
||||
|
||||
/* update the background */
|
||||
for (y = offs = 0; y < 32; y++)
|
||||
for (x = 0; x < 32; x++, offs++)
|
||||
{
|
||||
int code = videoram[offs];
|
||||
int color;
|
||||
|
||||
/* see if the character is dirty */
|
||||
if (chardirty[code] == 1)
|
||||
{
|
||||
decodechar(machine->gfx[0], code, exidy_characterram, machine->drv->gfxdecodeinfo[0].gfxlayout);
|
||||
chardirty[code] = 2;
|
||||
}
|
||||
code = videoram[offs];
|
||||
color = code >> 6;
|
||||
|
||||
/* see if the bitmap is dirty */
|
||||
if (dirtybuffer[offs] || chardirty[code])
|
||||
{
|
||||
int color = code >> 6;
|
||||
drawgfx(tmpbitmap, machine->gfx[0], code, color, 0, 0, x * 8, y * 8, NULL, TRANSPARENCY_NONE, 0);
|
||||
dirtybuffer[offs] = 0;
|
||||
}
|
||||
drawgfx(tmpbitmap, machine->gfx[0], code, color, 0, 0, x * 8, y * 8, NULL, TRANSPARENCY_NONE, 0);
|
||||
}
|
||||
|
||||
/* reset the char dirty array */
|
||||
for (y = 0; y < 256; y++)
|
||||
if (chardirty[y] == 2)
|
||||
chardirty[y] = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -290,14 +256,10 @@ INLINE int sprite_1_enabled(void)
|
||||
return (!(sprite_enable & 0x80) || (sprite_enable & 0x10) || (exidy_collision_mask == 0x00));
|
||||
}
|
||||
|
||||
INLINE int sprite_2_enabled(void)
|
||||
{
|
||||
return (!(sprite_enable & 0x40));
|
||||
}
|
||||
|
||||
VIDEO_EOF( exidy )
|
||||
{
|
||||
UINT8 enable_set = ((sprite_enable & 0x20) != 0);
|
||||
UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0);
|
||||
UINT8 enable_set_2 = ((sprite_enable & 0x40) != 0);
|
||||
static const rectangle clip = { 0, 15, 0, 15 };
|
||||
int bgmask = machine->gfx[0]->color_granularity - 1;
|
||||
int org_1_x = 0, org_1_y = 0;
|
||||
@ -309,13 +271,6 @@ VIDEO_EOF( exidy )
|
||||
if (exidy_collision_mask == 0)
|
||||
return;
|
||||
|
||||
/* if the sprites aren't enabled, we can't collide */
|
||||
if (!sprite_1_enabled() && !sprite_2_enabled())
|
||||
{
|
||||
update_complete = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* update the background if necessary */
|
||||
if (!update_complete)
|
||||
update_background(machine);
|
||||
@ -328,29 +283,26 @@ VIDEO_EOF( exidy )
|
||||
org_1_x = 236 - sprite1_xpos - 4;
|
||||
org_1_y = 244 - sprite1_ypos - 4;
|
||||
drawgfx(motion_object_1_vid, machine->gfx[1],
|
||||
(spriteno & 0x0f) + 16 * enable_set, 0,
|
||||
(spriteno & 0x0f) + 16 * enable_set_1, 0,
|
||||
0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0);
|
||||
}
|
||||
|
||||
/* draw sprite 2 */
|
||||
fillbitmap(motion_object_2_vid, 0xff, &clip);
|
||||
if (sprite_2_enabled())
|
||||
{
|
||||
org_2_x = 236 - sprite2_xpos - 4;
|
||||
org_2_y = 244 - sprite2_ypos - 4;
|
||||
drawgfx(motion_object_2_vid, machine->gfx[1],
|
||||
((spriteno >> 4) & 0x0f) + 32, 0,
|
||||
0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0);
|
||||
}
|
||||
org_2_x = 236 - sprite2_xpos - 4;
|
||||
org_2_y = 244 - sprite2_ypos - 4;
|
||||
drawgfx(motion_object_2_vid, machine->gfx[1],
|
||||
((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0,
|
||||
0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0);
|
||||
|
||||
/* draw sprite 2 clipped to sprite 1's location */
|
||||
fillbitmap(motion_object_2_clip, 0xff, &clip);
|
||||
if (sprite_1_enabled() && sprite_2_enabled())
|
||||
if (sprite_1_enabled())
|
||||
{
|
||||
sx = org_2_x - org_1_x;
|
||||
sy = org_2_y - org_1_y;
|
||||
drawgfx(motion_object_2_clip, machine->gfx[1],
|
||||
((spriteno >> 4) & 0x0f) + 32, 0,
|
||||
((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0,
|
||||
0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0);
|
||||
}
|
||||
|
||||
@ -395,26 +347,29 @@ VIDEO_EOF( exidy )
|
||||
VIDEO_UPDATE( exidy )
|
||||
{
|
||||
int sx, sy;
|
||||
UINT8 enable_set_2;
|
||||
|
||||
/* refresh the colors from the palette (static or dynamic) */
|
||||
set_colors(machine);
|
||||
|
||||
/* update the background and draw it */
|
||||
update_background(machine);
|
||||
copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0);
|
||||
|
||||
/* draw sprite 2 first */
|
||||
if (sprite_2_enabled())
|
||||
{
|
||||
sx = 236 - sprite2_xpos - 4;
|
||||
sy = 244 - sprite2_ypos - 4;
|
||||
enable_set_2 = ((sprite_enable & 0x40) != 0);
|
||||
|
||||
drawgfx(bitmap, machine->gfx[1],
|
||||
((spriteno >> 4) & 0x0f) + 32, 1,
|
||||
0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0);
|
||||
}
|
||||
sx = 236 - sprite2_xpos - 4;
|
||||
sy = 244 - sprite2_ypos - 4;
|
||||
|
||||
drawgfx(bitmap, machine->gfx[1],
|
||||
((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 1,
|
||||
0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0);
|
||||
|
||||
/* draw sprite 1 next */
|
||||
if (sprite_1_enabled())
|
||||
{
|
||||
UINT8 enable_set = ((sprite_enable & 0x20) != 0);
|
||||
UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0);
|
||||
|
||||
sx = 236 - sprite1_xpos - 4;
|
||||
sy = 244 - sprite1_ypos - 4;
|
||||
@ -422,7 +377,7 @@ VIDEO_UPDATE( exidy )
|
||||
if (sy < 0) sy = 0;
|
||||
|
||||
drawgfx(bitmap, machine->gfx[1],
|
||||
(spriteno & 0x0f) + 16 * enable_set, 0,
|
||||
(spriteno & 0x0f) + 16 * enable_set_1, 0,
|
||||
0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user