- Finished seperating out the Exidy sound stuff

- Targ now uses loaded PROM instead of hardcoded one
- Renamed Side Trak to Side Track as per the title screen
- Removed audio/berzerk.c from make file
- Fixed collision detection but I introduced in video/exidy.c
This commit is contained in:
Zsolt Vasvari 2008-01-13 13:02:09 +00:00
parent 89f4f42e51
commit 4ba28b919d
5 changed files with 158 additions and 177 deletions

View File

@ -113,33 +113,6 @@ static double freq_to_step;
/*************************************
*
* PIA interface
*
*************************************/
static void update_irq_state(int);
/* PIA 0 */
static const pia6821_interface pia_0_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0,
/*outputs: A/B,CA/B2 */ pia_1_portb_w, pia_1_porta_w, pia_1_cb1_w, pia_1_ca1_w,
/*irqs : A/B */ 0, 0
};
/* PIA 1 */
static const pia6821_interface pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0,
/*outputs: A/B,CA/B2 */ pia_0_portb_w, pia_0_porta_w, pia_0_cb1_w, pia_0_ca1_w,
/*irqs : A/B */ 0, update_irq_state
};
/*************************************
*
* Interrupt generation helper
@ -374,18 +347,18 @@ static void exidy_stream_update(void *param, stream_sample_t **inputs, stream_sa
static TIMER_CALLBACK( riot_interrupt );
static void *common_sh_start(void)
static void *common_sh_start(int _has_sh8253, int _has_tms5220)
{
int sample_rate = SH8253_CLOCK;
int i;
has_sh8253 = _has_sh8253;
has_tms5220 = _has_tms5220;
/* determine which sound hardware is installed */
has_hc55516 = FALSE;
has_tms5220 = FALSE;
for (i = 0; i < MAX_SOUND; i++)
{
if (Machine->drv->sound[i].type == SOUND_TMS5220)
has_tms5220 = TRUE;
if (Machine->drv->sound[i].type == SOUND_HC55516)
has_hc55516 = TRUE;
}
@ -406,15 +379,6 @@ static void *common_sh_start(void)
}
void *exidy_sh_start(int clock, const struct CustomSound_interface *config)
{
pia_config(0, &pia_0_intf);
pia_config(1, &pia_1_intf);
has_sh8253 = TRUE;
return common_sh_start();
}
/*************************************
*
@ -455,12 +419,6 @@ static void common_sh_reset(void)
}
void exidy_sh_reset(void *token)
{
common_sh_reset();
}
/*************************************
*
@ -499,7 +457,7 @@ static TIMER_CALLBACK( riot_interrupt )
*
*************************************/
WRITE8_HANDLER( exidy_shriot_w )
static WRITE8_HANDLER( exidy_shriot_w )
{
/* I/O is done if A2 == 0 */
if ((offset & 0x04) == 0)
@ -574,7 +532,7 @@ WRITE8_HANDLER( exidy_shriot_w )
*
*************************************/
READ8_HANDLER( exidy_shriot_r )
static READ8_HANDLER( exidy_shriot_r )
{
/* I/O is done if A2 == 0 */
if ((offset & 0x04) == 0)
@ -643,7 +601,7 @@ READ8_HANDLER( exidy_shriot_r )
*
*************************************/
WRITE8_HANDLER( exidy_sh8253_w )
static WRITE8_HANDLER( exidy_sh8253_w )
{
int chan;
@ -679,9 +637,10 @@ WRITE8_HANDLER( exidy_sh8253_w )
}
READ8_HANDLER( exidy_sh8253_r )
static READ8_HANDLER( exidy_sh8253_r )
{
logerror("8253(R): %x\n",offset);
logerror("8253(R): %x\n",offset);
return 0;
}
@ -693,14 +652,15 @@ READ8_HANDLER( exidy_sh8253_r )
*
*************************************/
READ8_HANDLER( exidy_sh6840_r )
static READ8_HANDLER( exidy_sh6840_r )
{
fatalerror("exidy_sh6840_r - unexpected read");
return 0;
return 0;
}
WRITE8_HANDLER( exidy_sh6840_w )
static WRITE8_HANDLER( exidy_sh6840_w )
{
/* force an update of the stream */
stream_update(exidy_stream);
@ -760,7 +720,7 @@ WRITE8_HANDLER( exidy_sh6840_w )
*
*************************************/
WRITE8_HANDLER( exidy_sfxctrl_w )
static WRITE8_HANDLER( exidy_sfxctrl_w )
{
stream_update(exidy_stream);
@ -793,13 +753,85 @@ WRITE8_HANDLER( exidy_sound_filter_w )
/*************************************
*
* Venture, etc.
*
*************************************/
static const pia6821_interface venture_pia_0_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0,
/*outputs: A/B,CA/B2 */ pia_1_portb_w, pia_1_porta_w, pia_1_cb1_w, pia_1_ca1_w,
/*irqs : A/B */ 0, 0
};
static const pia6821_interface venture_pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0,
/*outputs: A/B,CA/B2 */ pia_0_portb_w, pia_0_porta_w, pia_0_cb1_w, pia_0_ca1_w,
/*irqs : A/B */ 0, update_irq_state
};
static void *venture_sh_start(int clock, const struct CustomSound_interface *config)
{
pia_config(0, &venture_pia_0_intf);
pia_config(1, &venture_pia_1_intf);
return common_sh_start(TRUE, FALSE);
}
static void venture_sh_reset(void *token)
{
common_sh_reset();
}
static const struct CustomSound_interface venture_custom_interface =
{
venture_sh_start,
0,
venture_sh_reset
};
static ADDRESS_MAP_START( venture_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(15) )
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0780) AM_RAM
AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_READWRITE(exidy_shriot_r, exidy_shriot_w)
AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_READWRITE(pia_1_r, pia_1_w)
AM_RANGE(0x1800, 0x1803) AM_MIRROR(0x07fc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x2000, 0x27ff) AM_WRITE(exidy_sound_filter_w)
AM_RANGE(0x2800, 0x2807) AM_MIRROR(0x07f8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)
AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x07fc) AM_WRITE(exidy_sfxctrl_w)
AM_RANGE(0x5800, 0x7fff) AM_ROM
ADDRESS_MAP_END
MACHINE_DRIVER_START( venture_audio )
MDRV_CPU_ADD(M6502, 3579545/4)
MDRV_CPU_PROGRAM_MAP(venture_audio_map,0)
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD(CUSTOM, 0)
MDRV_SOUND_CONFIG(venture_custom_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_DRIVER_END
/*************************************
*
* CVSD sound for Mouse Trap
*
*************************************/
WRITE8_HANDLER( mtrap_voiceio_w )
static WRITE8_HANDLER( mtrap_voiceio_w )
{
if (!(offset & 0x10))
{
@ -812,7 +844,7 @@ WRITE8_HANDLER( mtrap_voiceio_w )
}
READ8_HANDLER( mtrap_voiceio_r )
static READ8_HANDLER( mtrap_voiceio_r )
{
if (!(offset & 0x80))
{
@ -834,6 +866,30 @@ READ8_HANDLER( mtrap_voiceio_r )
}
static ADDRESS_MAP_START( cvsd_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(14) )
AM_RANGE(0x0000, 0x3fff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( cvsd_iomap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
AM_RANGE(0x00, 0xff) AM_READWRITE(mtrap_voiceio_r, mtrap_voiceio_w)
ADDRESS_MAP_END
MACHINE_DRIVER_START( mtrap_cvsd_audio )
MDRV_CPU_ADD(Z80, 3579545/2)
MDRV_CPU_PROGRAM_MAP(cvsd_map,0)
MDRV_CPU_IO_MAP(cvsd_iomap,0)
/* audio hardware */
MDRV_SOUND_ADD(HC55516, 0)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_DRIVER_END
/*************************************
*
@ -903,19 +959,6 @@ static WRITE8_HANDLER( victory_main_ack_w )
}
static ADDRESS_MAP_START( victory_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0f00) AM_RAM
AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_READWRITE(exidy_shriot_r, exidy_shriot_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_READWRITE(pia_1_r, pia_1_w)
AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x0ffc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x4000, 0x4fff) AM_NOP
AM_RANGE(0x5000, 0x5007) AM_MIRROR(0x0ff8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)
AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x0ffc) AM_WRITE(exidy_sfxctrl_w)
AM_RANGE(0x7000, 0xafff) AM_NOP
AM_RANGE(0xb000, 0xffff) AM_ROM
ADDRESS_MAP_END
static const pia6821_interface victory_pia_e5_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0,
@ -927,11 +970,10 @@ static const pia6821_interface victory_pia_e5_intf =
static void *victory_sh_start(int clock, const struct CustomSound_interface *config)
{
pia_config(1, &victory_pia_e5_intf);
has_sh8253 = TRUE;
state_save_register_global(victory_sound_response_ack_clk);
return common_sh_start();
return common_sh_start(TRUE, TRUE);
}
@ -958,6 +1000,19 @@ static const struct CustomSound_interface victory_custom_interface =
};
static ADDRESS_MAP_START( victory_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0f00) AM_RAM
AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_READWRITE(exidy_shriot_r, exidy_shriot_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_READWRITE(pia_1_r, pia_1_w)
AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x0ffc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x4000, 0x4fff) AM_NOP
AM_RANGE(0x5000, 0x5007) AM_MIRROR(0x0ff8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)
AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x0ffc) AM_WRITE(exidy_sfxctrl_w)
AM_RANGE(0x7000, 0xafff) AM_NOP
AM_RANGE(0xb000, 0xffff) AM_ROM
ADDRESS_MAP_END
MACHINE_DRIVER_START( victory_audio )
MDRV_CPU_ADD(M6502, VICTORY_AUDIO_CPU_CLOCK)
@ -989,8 +1044,7 @@ MACHINE_DRIVER_END
static void *berzerk_sh_start(int clock, const struct CustomSound_interface *config)
{
has_sh8253 = FALSE;
return common_sh_start();
return common_sh_start(FALSE, FALSE);
}

View File

@ -129,9 +129,6 @@
#include "exidy.h"
#include "targ.h"
#include "machine/6821pia.h"
#include "sound/custom.h"
#include "sound/samples.h"
#include "sound/hc55516.h"
static UINT8 last_dial;
@ -291,38 +288,6 @@ ADDRESS_MAP_END
/*************************************
*
* Sound CPU memory handlers
*
*************************************/
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(15) )
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0780) AM_RAM
AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_READWRITE(exidy_shriot_r, exidy_shriot_w)
AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_READWRITE(pia_1_r, pia_1_w)
AM_RANGE(0x1800, 0x1803) AM_MIRROR(0x07fc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x2000, 0x27ff) AM_WRITE(exidy_sound_filter_w)
AM_RANGE(0x2800, 0x2807) AM_MIRROR(0x07f8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)
AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x07fc) AM_WRITE(exidy_sfxctrl_w)
AM_RANGE(0x5800, 0x7fff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( cvsd_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(14) )
AM_RANGE(0x0000, 0x3fff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( cvsd_iomap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
AM_RANGE(0x00, 0xff) AM_READWRITE(mtrap_voiceio_r, mtrap_voiceio_w)
ADDRESS_MAP_END
/*************************************
*
* Port definitions
@ -807,21 +772,6 @@ GFXDECODE_END
/*************************************
*
* Sound definitions
*
*************************************/
static const struct CustomSound_interface exidy_custom_interface =
{
exidy_sh_start,
0,
exidy_sh_reset
};
/*************************************
*
* Machine drivers
@ -899,18 +849,10 @@ static MACHINE_DRIVER_START( venture )
MDRV_CPU_MODIFY("main")
MDRV_CPU_PROGRAM_MAP(exidy_map,venture_map)
/* audio CPU */
MDRV_CPU_ADD(M6502, 3579545/4)
MDRV_CPU_PROGRAM_MAP(sound_map,0)
MDRV_INTERLEAVE(10)
/* audio hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD(CUSTOM, 0)
MDRV_SOUND_CONFIG(exidy_custom_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MDRV_IMPORT_FROM(venture_audio)
MACHINE_DRIVER_END
@ -928,15 +870,10 @@ static MACHINE_DRIVER_START( mtrap )
/* basic machine hardware */
MDRV_IMPORT_FROM(venture)
MDRV_CPU_ADD(Z80, 3579545/2)
MDRV_CPU_PROGRAM_MAP(cvsd_map,0)
MDRV_CPU_IO_MAP(cvsd_iomap,0)
MDRV_INTERLEAVE(32)
/* sound hardware */
MDRV_SOUND_ADD(HC55516, 0)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
/* audio hardware */
MDRV_IMPORT_FROM(mtrap_cvsd_audio)
MACHINE_DRIVER_END

View File

@ -24,16 +24,9 @@
/*----------- defined in audio/exidy.c -----------*/
void *exidy_sh_start(int clock, const struct CustomSound_interface *config);
void exidy_sh_reset(void *token);
WRITE8_HANDLER( exidy_shriot_w );
WRITE8_HANDLER( exidy_sfxctrl_w );
WRITE8_HANDLER( exidy_sh8253_w );
WRITE8_HANDLER( exidy_sh6840_w );
WRITE8_HANDLER( exidy_sound_filter_w );
READ8_HANDLER( exidy_shriot_r );
READ8_HANDLER( exidy_sh8253_r );
READ8_HANDLER( exidy_sh6840_r );
MACHINE_DRIVER_EXTERN( venture_audio );
MACHINE_DRIVER_EXTERN( mtrap_cvsd_audio );
MACHINE_DRIVER_EXTERN( victory_audio );
READ8_HANDLER( victory_sound_response_r );
@ -44,9 +37,6 @@ MACHINE_DRIVER_EXTERN( berzerk_audio );
WRITE8_HANDLER( berzerk_audio_w );
READ8_HANDLER( berzerk_audio_r );
WRITE8_HANDLER( mtrap_voiceio_w );
READ8_HANDLER( mtrap_voiceio_r );
/*----------- defined in video/exidy.c -----------*/

View File

@ -1238,7 +1238,7 @@ $(MAMEOBJ)/snk.a: \
$(MAMEOBJ)/stern.a: \
$(DRIVERS)/astinvad.o \
$(DRIVERS)/berzerk.o $(AUDIO)/berzerk.o \
$(DRIVERS)/berzerk.o \
$(DRIVERS)/cliffhgr.o $(AUDIO)/cliffhgr.o \
$(DRIVERS)/mazerbla.o \
$(DRIVERS)/supdrapo.o \

View File

@ -145,7 +145,7 @@ static void set_colors(running_machine *machine)
*
*************************************/
static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
static void draw_background(void)
{
offs_t offs;
@ -183,9 +183,9 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
for (i = 0; i < 8; i++)
{
if (data1 & 0x80)
*BITMAP_ADDR16(bitmap, y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1;
*BITMAP_ADDR16(background_bitmap, y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1;
else
*BITMAP_ADDR16(bitmap, y, x) = off_pen;
*BITMAP_ADDR16(background_bitmap, y, x) = off_pen;
x = x + 1;
data1 = data1 << 1;
@ -199,7 +199,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
for (i = 0; i < 8; i++)
{
*BITMAP_ADDR16(bitmap, y, x) = (data & 0x80) ? on_pen_1 : off_pen;
*BITMAP_ADDR16(background_bitmap, y, x) = (data & 0x80) ? on_pen_1 : off_pen;
x = x + 1;
data = data << 1;
@ -230,19 +230,19 @@ INLINE int sprite_1_enabled(void)
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
{
/* draw sprite 2 first */
int enable_set_2 = ((*exidy_sprite_enable & 0x40) != 0);
int sprite_set_2 = ((*exidy_sprite_enable & 0x40) != 0);
int sx = 236 - *exidy_sprite2_xpos - 4;
int sy = 244 - *exidy_sprite2_ypos - 4;
drawgfx(bitmap, machine->gfx[0],
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 1,
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 1,
0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0);
/* draw sprite 1 next */
if (sprite_1_enabled())
{
int enable_set_1 = ((*exidy_sprite_enable & 0x20) != 0);
int sprite_set_1 = ((*exidy_sprite_enable & 0x20) != 0);
sx = 236 - *exidy_sprite1_xpos - 4;
sy = 244 - *exidy_sprite1_ypos - 4;
@ -250,7 +250,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
if (sy < 0) sy = 0;
drawgfx(bitmap, machine->gfx[0],
(*exidy_spriteno & 0x0f) + 16 * enable_set_1, 0,
(*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0,
0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0);
}
@ -280,6 +280,7 @@ static TIMER_CALLBACK( collision_irq_callback )
{
/* latch the collision bits */
latch_condition(param);
popmessage("Collision %02X", param);
/* set the IRQ line */
cpunum_set_input_line(0, 0, ASSERT_LINE);
@ -288,10 +289,9 @@ static TIMER_CALLBACK( collision_irq_callback )
static void check_collision(running_machine *machine)
{
UINT8 enable_set_1 = ((*exidy_sprite_enable & 0x20) != 0);
UINT8 enable_set_2 = ((*exidy_sprite_enable & 0x40) != 0);
UINT8 sprite_set_1 = ((*exidy_sprite_enable & 0x20) != 0);
UINT8 sprite_set_2 = ((*exidy_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;
int org_2_x = 0, org_2_y = 0;
int sx, sy;
@ -308,7 +308,7 @@ static void check_collision(running_machine *machine)
org_1_x = 236 - *exidy_sprite1_xpos - 4;
org_1_y = 244 - *exidy_sprite1_ypos - 4;
drawgfx(motion_object_1_vid, machine->gfx[0],
(*exidy_spriteno & 0x0f) + 16 * enable_set_1, 0,
(*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0,
0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0);
}
@ -317,7 +317,7 @@ static void check_collision(running_machine *machine)
org_2_x = 236 - *exidy_sprite2_xpos - 4;
org_2_y = 244 - *exidy_sprite2_ypos - 4;
drawgfx(motion_object_2_vid, machine->gfx[0],
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0,
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0,
0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0);
/* draw sprite 2 clipped to sprite 1's location */
@ -327,7 +327,7 @@ static void check_collision(running_machine *machine)
sx = org_2_x - org_1_x;
sy = org_2_y - org_1_y;
drawgfx(motion_object_2_clip, machine->gfx[0],
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0,
((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0,
0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0);
}
@ -337,26 +337,26 @@ static void check_collision(running_machine *machine)
{
if (*BITMAP_ADDR16(motion_object_1_vid, sy, sx) != 0xff)
{
UINT8 collision_mask = 0;
UINT8 current_collision_mask = 0;
/* check for background collision (M1CHAR) */
if (((*BITMAP_ADDR16(background_bitmap, org_1_y + sy, org_1_x + sx) - 4) & bgmask) != 0)
collision_mask |= 0x04;
if (*BITMAP_ADDR16(background_bitmap, org_1_y + sy, org_1_x + sx) != 0)
current_collision_mask |= 0x04;
/* check for motion object collision (M1M2) */
if (*BITMAP_ADDR16(motion_object_2_clip, sy, sx) != 0xff)
collision_mask |= 0x10;
current_collision_mask |= 0x10;
/* if we got one, trigger an interrupt */
if ((collision_mask & collision_mask) && count++ < 128)
timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), NULL, collision_mask, collision_irq_callback);
if ((current_collision_mask & collision_mask) && (count++ < 128))
timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), NULL, current_collision_mask, collision_irq_callback);
}
if (*BITMAP_ADDR16(motion_object_2_vid, sy, sx) != 0xff)
{
/* check for background collision (M2CHAR) */
if (((*BITMAP_ADDR16(background_bitmap, org_2_y + sy, org_2_x + sx) - 4) & bgmask) != 0)
if ((collision_mask & 0x08) && count++ < 128)
if (*BITMAP_ADDR16(background_bitmap, org_2_y + sy, org_2_x + sx) != 0)
if ((collision_mask & 0x08) && (count++ < 128))
timer_set(video_screen_get_time_until_pos(0, org_2_x + sx, org_2_y + sy), NULL, 0x08, collision_irq_callback);
}
}
@ -376,7 +376,7 @@ VIDEO_UPDATE( exidy )
set_colors(machine);
/* update the background and draw it */
draw_background(machine, background_bitmap, NULL);
draw_background();
copybitmap(bitmap, background_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0);
/* draw the sprites */