new WORKING machines (ABL Pinball) + temp disable timer IRQ in rad_bb3 + significant nes_vt cleanups / state chop (#5900)

new WORKING machines
--------------------
Pinball (P8002, ABL TV Game) [David Haywood, Morten Kirkegaard, Peter Wilhelmsen]

* divided up large nes_vt.cpp class, and did some general tidy up, commented some known addresses etc. to stop code rot.
* temporarily disabled timer on elan when running rad_bb3 until timer enable can be identified, made a few notes.
This commit is contained in:
David Haywood 2019-11-15 19:15:11 +00:00 committed by ajrhacker
parent a0e2b82b63
commit c9a6c7ff4d
6 changed files with 613 additions and 390 deletions

View File

@ -21,6 +21,8 @@ DEFINE_DEVICE_TYPE(PPU_VT03PAL, ppu_vt03pal_device, "ppu_vt03pal", "VT03 PPU (PA
ppu_vt03_device::ppu_vt03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
ppu2c0x_device(mconfig, type, tag, owner, clock),
m_is_pal(false),
m_is_50hz(false),
m_read_bg(*this),
m_read_sp(*this)
{
@ -39,6 +41,8 @@ ppu_vt03pal_device::ppu_vt03pal_device(const machine_config &mconfig, const char
{
m_scanlines_per_frame = PAL_SCANLINES_PER_FRAME;
m_vblank_first_scanline = VBLANK_FIRST_SCANLINE_PALC;
m_is_pal = true;
m_is_50hz = true;
}
@ -54,6 +58,16 @@ READ8_MEMBER(ppu_vt03_device::palette_read)
}
}
void ppu_vt03_device::set_201x_descramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5)
{
m_2012_2017_descramble[0] = reg0; // TOOD: name regs
m_2012_2017_descramble[1] = reg1;
m_2012_2017_descramble[2] = reg2;
m_2012_2017_descramble[3] = reg3;
m_2012_2017_descramble[4] = reg4;
m_2012_2017_descramble[5] = reg5;
}
void ppu_vt03_device::set_new_pen(int i)
{
if((i < 0x20) && ((i & 0x3) == 0)) {

View File

@ -32,7 +32,7 @@ public:
auto read_sp() { return m_read_sp.bind(); }
void set_palette_mode(vtxx_pal_mode pmode) { m_pal_mode = pmode; }
void set_201x_descramble(const uint8_t descramble[6]) { for (int i = 0; i < 6; i++) m_2012_2017_descramble[i] = descramble[i]; }
void set_201x_descramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5);
virtual DECLARE_READ8_MEMBER(read) override;
virtual DECLARE_WRITE8_MEMBER(write) override;
@ -62,6 +62,13 @@ public:
uint8_t get_m_read_bg4_bg3();
uint8_t get_speva2_speva0();
bool get_is_pal() { return m_is_pal; }
bool get_is_50hz() { return m_is_50hz; }
protected:
bool m_is_pal;
bool m_is_50hz;
private:
devcb_read8 m_read_bg;
devcb_read8 m_read_sp;

View File

@ -98,6 +98,9 @@ public:
void radica_eu3a14_altrambase(machine_config& config);
void radica_eu3a14_altrambase_adc(machine_config &config);
void radica_eu3a14_altrambase_bb3(machine_config &config);
void radica_eu3a14p_altrambase_bb3(machine_config &config);
private:
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -799,6 +802,12 @@ void elan_eu3a14_state::radica_eu3a14_altrambase(machine_config& config)
m_vid->set_tilerambase(0x0a00 - 0x200);
}
void elan_eu3a14_state::radica_eu3a14_altrambase_bb3(machine_config& config)
{
radica_eu3a14_altrambase(config);
m_sys->disable_timer_irq();
}
void elan_eu3a14_state::radica_eu3a14_altrambase_adc(machine_config &config)
{
radica_eu3a14_altrambase(config);
@ -817,10 +826,15 @@ void elan_eu3a14_state::radica_eu3a14p(machine_config &config) // TODO, clocks d
void elan_eu3a14_state::radica_eu3a14p_altrambase(machine_config& config)
{
radica_eu3a14p(config);
m_vid->set_tilerambase(0x0a00 - 0x200);
}
void elan_eu3a14_state::radica_eu3a14p_altrambase_bb3(machine_config& config)
{
radica_eu3a14p_altrambase(config);
m_sys->disable_timer_irq();
}
ROM_START( rad_gtg )
ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASE00 )
@ -882,8 +896,8 @@ CONS( 2005, rad_rsgp, rad_rsg, 0, radica_eu3a14p_altrambase, rad_rsg,
// also has a Connectv Real Soccer logo in the roms, apparently unused, maybe that was to be the US title (without the logo being changed to Play TV) but Play TV Soccer ended up being a different game licensed from Epoch instead.
CONS( 2006, rad_foot, 0, 0, radica_eu3a14p, radica_foot, elan_eu3a14_state, empty_init, "Radica / Medialink", "Connectv Football", MACHINE_NOT_WORKING )
CONS( 2005, rad_bb3, 0, 0, radica_eu3a14_altrambase, radica_bb3, elan_eu3a14_state, empty_init, "Radica / FarSight Studios", "Play TV Baseball 3", MACHINE_NOT_WORKING )
CONS( 2005, rad_bb3p, rad_bb3, 0, radica_eu3a14p_altrambase, radica_bb3, elan_eu3a14_state, empty_init, "Radica / FarSight Studios", "Connectv Baseball 3", MACHINE_NOT_WORKING )
CONS( 2005, rad_bb3, 0, 0, radica_eu3a14_altrambase_bb3, radica_bb3, elan_eu3a14_state, empty_init, "Radica / FarSight Studios", "Play TV Baseball 3", MACHINE_NOT_WORKING )
CONS( 2005, rad_bb3p, rad_bb3, 0, radica_eu3a14p_altrambase_bb3, radica_bb3, elan_eu3a14_state, empty_init, "Radica / FarSight Studios", "Connectv Baseball 3", MACHINE_NOT_WORKING )
CONS( 2005, rad_hnt3, 0, 0, radica_eu3a14, radica_hnt3, elan_eu3a14_state, empty_init, "Radica / V-Tac Technology Co Ltd.", "Play TV Huntin' 3", MACHINE_NOT_WORKING )
CONS( 2005, rad_hnt3p,rad_hnt3, 0, radica_eu3a14p, radica_hnt3, elan_eu3a14_state, empty_init, "Radica / V-Tac Technology Co Ltd.", "Connectv Huntin' 3", MACHINE_NOT_WORKING )

File diff suppressed because it is too large Load Diff

View File

@ -173,7 +173,8 @@ elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &m
device_t(mconfig, type, tag, owner, clock),
m_cpu(*this, finder_base::DUMMY_TAG),
m_bank(*this, finder_base::DUMMY_TAG),
m_is_pal(false)
m_is_pal(false),
m_allow_timer_irq(true)
{
}
@ -182,6 +183,31 @@ elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &m
{
}
/*
rad_bb3 plays with address 0x5009 in this way, but never sets it, something else must set it (and 1->0 is 'activate' or 'acknowledge')
lda $5009
and #$ef
sta $5009
lda $5009
and #$df
sta $5009
0x5006 looks interesting too, again just seems to be masking out bits
(as one block of code)
lda $5006
and #$f0
sta $5006
lda $5006
and $#8f
sta $5006
todo: investigate rad_hnt3 which polls this address
*/
void elan_eu3a05commonsys_device::map(address_map &map)
{
@ -207,7 +233,10 @@ void elan_eu3a05commonsys_device::device_timer(emu_timer &timer, device_timer_id
{
case TIMER_UNK:
{
generate_custom_interrupt(0);
// rad_bb3 unmasks the interrupt, but the jumps use pointers in RAM, which haven't been set up at the time
// of unmasking, so we need to find some kind of global enable / disable, or timer enable.
if (m_allow_timer_irq)
generate_custom_interrupt(0);
break;
}
}
@ -297,6 +326,9 @@ READ8_MEMBER(elan_eu3a05commonsys_device::nmi_vector_r)
}
else
{
if(machine().side_effects_disabled())
return 0x00;
fatalerror("NMI without custom vector!");
}
}
@ -304,12 +336,18 @@ READ8_MEMBER(elan_eu3a05commonsys_device::nmi_vector_r)
// not currently used
READ8_MEMBER(elan_eu3a05commonsys_device::irq_vector_r)
{
if(machine().side_effects_disabled())
return 0x00;
if (m_custom_irq)
{
return m_custom_irq_vector >> (offset*8);
}
else
{
if(machine().side_effects_disabled())
return 0x00;
fatalerror("IRQ without custom vector!");
}
}

View File

@ -16,6 +16,7 @@ public:
template <typename T> void set_cpu(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); }
template <typename T> void set_addrbank(T &&tag) { m_bank.set_tag(std::forward<T>(tag)); }
void set_pal(void) { m_is_pal = true; }
void disable_timer_irq(void) { m_allow_timer_irq = false; }
void generate_custom_interrupt(int level);
@ -44,7 +45,7 @@ protected:
uint8_t m_rombank_lo;
bool m_is_pal; // this is usually a jumper connected to the chip that the software can read (clocks also differ on PAL units)
bool m_allow_timer_irq;
private:
DECLARE_READ8_MEMBER(intmask_r);
DECLARE_WRITE8_MEMBER(intmask_w);