exidy: increase number of collision detection timers (like how it was before the timer_set refactor)

This commit is contained in:
hap 2023-06-29 12:46:27 +02:00
parent fad04ad03e
commit 73c0fd2af3
5 changed files with 27 additions and 27 deletions

View File

@ -353,7 +353,7 @@ C1066 - ??
</part>
</software>
<!-- This maybe comes from a cart with "Bomb Blaster" label? -->
<!-- This maybe comes from a cart with "Bomb Blaster" label? -->
<software name="bomblasta" cloneof="bomblast">
<description>Bomb Blaster (alt)</description>
<year>1990</year>

View File

@ -241,8 +241,7 @@ private:
required_shared_ptr<uint8_t> m_sprite_enable;
optional_shared_ptr<uint8_t> m_characterram;
emu_timer *m_collision_mob_timer = nullptr;
emu_timer *m_collision_bg_timer = nullptr;
emu_timer *m_collision_timer[128];
uint8_t m_collision_mask = 0;
uint8_t m_collision_invert = 0;
int m_is_2bpp = 0;
@ -370,7 +369,7 @@ protected:
private:
required_ioport m_dial;
uint8_t m_last_dial;
uint8_t m_last_dial = 0;
};
@ -598,7 +597,7 @@ void fax_state::fax_map(address_map &map)
map(0x2000, 0x2000).w(FUNC(fax_state::fax_bank_select_w));
map(0x2000, 0x3fff).bankr(m_rom_bank);
map(0x5200, 0x520f).rw("pia", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x5213, 0x5217).nopw(); /* empty control lines on color/sound board */
map(0x5213, 0x5217).nopw(); // empty control lines on color/sound board
map(0x6000, 0x6fff).ram().share("characterram");
map(0x8000, 0xffff).rom();
}
@ -1155,11 +1154,11 @@ INTERRUPT_GEN_MEMBER(exidy_state::exidy_vblank_interrupt)
}
uint8_t exidy_state::exidy_interrupt_r()
{
/* clear any interrupts */
m_maincpu->set_input_line(0, CLEAR_LINE);
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(0, CLEAR_LINE);
/* return the latched condition */
return m_int_condition;
@ -1176,9 +1175,9 @@ uint8_t exidy_state::exidy_interrupt_r()
inline void exidy_state::set_1_color(int index, int which)
{
m_palette->set_pen_color(index,
pal1bit(m_color_latch[2] >> which),
pal1bit(m_color_latch[1] >> which),
pal1bit(m_color_latch[0] >> which));
pal1bit(m_color_latch[2] >> which),
pal1bit(m_color_latch[1] >> which),
pal1bit(m_color_latch[0] >> which));
}
void exidy_state::set_colors()
@ -1310,7 +1309,6 @@ void exidy_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
(*m_spriteno & 0x0f) + 16 * sprite_set_1, 0,
0, 0, sx, sy, 0);
}
}
@ -1403,16 +1401,22 @@ void exidy_state::check_collision()
current_collision_mask |= 0x10;
/* if we got one, trigger an interrupt */
if ((current_collision_mask & m_collision_mask) && (count++ < 128))
m_collision_mob_timer->adjust(m_screen->time_until_pos(org_1_x + sx, org_1_y + sy), current_collision_mask);
if ((current_collision_mask & m_collision_mask) && count < 128)
{
m_collision_timer[count]->adjust(m_screen->time_until_pos(org_1_x + sx, org_1_y + sy), current_collision_mask);
count++;
}
}
if (m_motion_object_2_vid.pix(sy, sx) != 0xff)
{
/* check for background collision (M2CHAR) */
if (m_background_bitmap.pix(org_2_y + sy, org_2_x + sx) != 0)
if ((m_collision_mask & 0x08) && (count++ < 128))
m_collision_bg_timer->adjust(m_screen->time_until_pos(org_2_x + sx, org_2_y + sy), 0x08);
if ((m_collision_mask & 0x08) && count < 128)
{
m_collision_timer[count]->adjust(m_screen->time_until_pos(org_2_x + sx, org_2_y + sy), 0x08);
count++;
}
}
}
}
@ -1453,17 +1457,14 @@ uint32_t exidy_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
void exidy_state::machine_start()
{
m_collision_mob_timer = timer_alloc(FUNC(exidy_state::latch_collision), this);
m_collision_bg_timer = timer_alloc(FUNC(exidy_state::latch_collision), this);
for (int i = 0; i < 128; i++)
m_collision_timer[i] = timer_alloc(FUNC(exidy_state::latch_collision), this);
}
void spectar_state::machine_start()
{
exidy_state::machine_start();
m_tone_freq = 0;
m_tone_active = 0;
/* start_raw can't be called here: chan.source will be set by
samples_device::device_start and then nulled out by samples_device::device_reset
at the soft_reset stage of init_machine() and will never be set again.
@ -1481,8 +1482,6 @@ void targ_state::machine_start()
{
spectar_state::machine_start();
m_tone_pointer = 0;
save_item(NAME(m_port_2_last));
save_item(NAME(m_tone_pointer));
}
@ -1689,6 +1688,7 @@ void fax_state::fax(machine_config &config)
exidy_video_config(0x04, 0x04, true);
}
/*************************************************************************
Targ hardware
@ -2470,7 +2470,7 @@ ROM_START( fax )
ROM_REGION( 0x0800, "gfx1", 0 )
ROM_LOAD( "fxl1-11d.32", 0x0000, 0x0800, CRC(62083db2) SHA1(0c6e90b73419bff53f991e66d4faa9495c7d8e09) )
// loaded, but not hooked up
// loaded, but not hooked up
ROM_REGION( 0x0240, "proms", 0 )
ROM_LOAD( "fxl-6b", 0x0000, 0x0100, CRC(e1e867ae) SHA1(fe4cb560860579102aedad2c81fd7bed5825f484) )
ROM_LOAD( "fxl-8b", 0x0100, 0x0020, CRC(0da1bdf9) SHA1(0c2d85da59cf86f2d9cf5f33bdc63902ca5507d3) )
@ -2523,7 +2523,7 @@ ROM_START( fax2 )
ROM_REGION( 0x0800, "gfx1", 0 )
ROM_LOAD( "fxl1-11d.32", 0x0000, 0x0800, CRC(62083db2) SHA1(0c6e90b73419bff53f991e66d4faa9495c7d8e09) )
// loaded, but not hooked up
// loaded, but not hooked up
ROM_REGION( 0x0240, "proms", 0 )
ROM_LOAD( "fxl-6b", 0x0000, 0x0100, CRC(e1e867ae) SHA1(fe4cb560860579102aedad2c81fd7bed5825f484) )
ROM_LOAD( "fxl-8b", 0x0100, 0x0020, CRC(0da1bdf9) SHA1(0c2d85da59cf86f2d9cf5f33bdc63902ca5507d3) )

View File

@ -186,7 +186,7 @@ void chesster_state::chesster(machine_config &config)
R65C02(config, m_maincpu, 5_MHz_XTAL); // RP65C02G
m_maincpu->set_addrmap(AS_PROGRAM, &chesster_state::main_map);
auto &irq_clock(CLOCK(config, "irq_clock", 9500)); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon)
auto &irq_clock(CLOCK(config, "irq_clock", 9600)); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon)
irq_clock.set_pulse_width(attotime::from_nsec(2600)); // active for 2.6us
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);

View File

@ -22,7 +22,7 @@ Chesster Phantom is on the same base hardware, and adds the Chesster voice to it
using the same ROM as the original Chesster. Model 6124 extra hardware is on a
daughterboard, the housing is the same as model 6100, except for button labels.
Model 6126 has a dedicated PCB, this version also has a motion sensor at the front
and 2 leds to mimick eyes, and the housing color theme is green instead of beige.
and 2 leds to mimic eyes, and the housing color theme is green instead of beige.
At boot-up, the computer will do a self-test, the user can start playing after the
motor has moved to the upper-right corner. The computer will continue positioning

View File

@ -702,7 +702,7 @@ ROM_END
known releases:
- USA: I Took a Lickin' From a Chicken, published by LJN
- Japan: Professor Chicken's Genius Classroom , published by Bandai
(not sure if it's the same ROM, or just licensed the outer shell)
- Netherlands: Kip ik heb je, published by Smith Family Toys
*******************************************************************************/