gcpinbal.cpp: raster effects for pwrflip (Power Flipper Pinball Shooting) (#4344)

* raster IRQ for pwrflip / gcpinbal

* tweak (nw)

* (nw)

* note update (nw)
This commit is contained in:
David Haywood 2018-11-26 17:58:21 +00:00 committed by ajrhacker
parent a8f8999dc2
commit 0e9fc60364
3 changed files with 22 additions and 34 deletions

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:David Graves, R. Belmont
// copyright-holders:David Graves, R. Belmont, David Haywood
/***************************************************************************
Excellent System's ES-9209B Hardware
@ -26,8 +26,7 @@ TODO
- Modernize ES-8712 and hook up to MSM6585 and HCT157
- Figure out which customs use D80010-D80077 and merge implementation with Aquarium
- Is SW3 actually used?
- Missing row scroll (column scroll?)
Reference video showing effect: https://www.youtube.com/watch?v=zBGjncVsSf4
- Power Flipper reference video: https://www.youtube.com/watch?v=zBGjncVsSf4 (seems to have been recorded with 'flipscreen' dipswitch on, because it causes a jumping glitch before the raster effect, same in MAME)
BGMs (controlled by OKI MSM6585 sound chip)
MSM6585: is an upgraded MSM5205 voice synth IC.
@ -93,27 +92,20 @@ NOTE: Mask ROMs from Power Flipper Pinball Shooting have not been dumped, but as
INTERRUPTS
***********************************************************/
void gcpinbal_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
TIMER_DEVICE_CALLBACK_MEMBER(gcpinbal_state::scanline_cb)
{
switch (id)
{
case TIMER_GCPINBAL_INTERRUPT1:
m_maincpu->set_input_line(1, HOLD_LINE);
break;
default:
assert_always(false, "Unknown id in gcpinbal_state::device_timer");
}
if (param>=16)
m_screen->update_partial(m_screen->vpos()-1);
if (param==240)
m_maincpu->set_input_line(1, HOLD_LINE); // V-blank
else if ((param>=16) && (param<240))
m_maincpu->set_input_line(4, HOLD_LINE); // H-blank? (or programmable, used for raster effects)
// IRQ level 3 is sound related, hooked up to MSM6585
}
INTERRUPT_GEN_MEMBER(gcpinbal_state::gcpinbal_interrupt)
{
/* Unsure of actual sequence */
m_int1_timer->adjust(m_maincpu->cycles_to_attotime(500));
device.execute().set_input_line(4, HOLD_LINE);
}
/***********************************************************
IOC
***********************************************************/
@ -338,8 +330,6 @@ GFXDECODE_END
void gcpinbal_state::machine_start()
{
m_int1_timer = timer_alloc(TIMER_GCPINBAL_INTERRUPT1);
save_item(NAME(m_scrollx));
save_item(NAME(m_scrolly));
save_item(NAME(m_bg0_gfxset));
@ -367,7 +357,8 @@ MACHINE_CONFIG_START(gcpinbal_state::gcpinbal)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, 32_MHz_XTAL/2) /* 16 MHz */
MCFG_DEVICE_PROGRAM_MAP(gcpinbal_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gcpinbal_state, gcpinbal_interrupt)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gcpinbal_state, scanline_cb, "screen", 0, 1)
EEPROM_93C46_16BIT(config, "eeprom");

View File

@ -11,6 +11,8 @@
#include "sound/okim6295.h"
#include "video/excellent_spr.h"
#include "emupal.h"
#include "machine/timer.h"
#include "screen.h"
class gcpinbal_state : public driver_device
{
@ -28,15 +30,12 @@ public:
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_sprgen(*this, "spritegen")
, m_screen(*this, "screen")
{ }
void gcpinbal(machine_config &config);
private:
enum
{
TIMER_GCPINBAL_INTERRUPT1
};
/* devices */
required_device<cpu_device> m_maincpu;
@ -53,8 +52,6 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
emu_timer *m_int1_timer;
/* video-related */
tilemap_t *m_tilemap[3];
uint16_t m_scrollx[3];
@ -68,6 +65,7 @@ private:
/* sound-related */
uint32_t m_msm_bank;
DECLARE_WRITE16_MEMBER(d80010_w);
DECLARE_WRITE8_MEMBER(d80040_w);
DECLARE_WRITE16_MEMBER(d80060_w);
@ -83,14 +81,13 @@ private:
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_gcpinbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(gcpinbal_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
void gcpinbal_core_vh_start( );
DECLARE_WRITE_LINE_MEMBER(gcp_adpcm_int);
required_device<excellent_spr_device> m_sprgen;
required_device<screen_device> m_screen;
void gcpinbal_map(address_map &map);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
#endif // MAME_INCLUDES_GCPINBAL_H

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:David Graves, R. Belmont
// copyright-holders:David Graves, R. Belmont, David Haywood
#include "emu.h"
#include "includes/gcpinbal.h"
#include "screen.h"