mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
eolith.c tagmap cleanup + actually gave ironfortj an idle loop speedup, because whoever added it didn't at the time (nw)
This commit is contained in:
parent
59ad3282df
commit
3e20f59cce
@ -100,7 +100,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/e132xs/e132xs.h"
|
||||
#include "cpu/mcs51/mcs51.h"
|
||||
#include "sound/qs1000.h"
|
||||
|
||||
#include "machine/eeprom.h"
|
||||
#include "includes/eolith.h"
|
||||
#include "includes/eolithsp.h"
|
||||
@ -127,7 +127,7 @@ READ32_MEMBER(eolith_state::eolith_custom_r)
|
||||
*/
|
||||
eolith_speedup_read(space);
|
||||
|
||||
return (ioport("IN0")->read() & ~0x300) | (machine().rand() & 0x300);
|
||||
return (m_in0->read() & ~0x300) | (machine().rand() & 0x300);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(eolith_state::systemcontrol_w)
|
||||
@ -136,7 +136,7 @@ WRITE32_MEMBER(eolith_state::systemcontrol_w)
|
||||
coin_counter_w(machine(), 0, data & m_coin_counter_bit);
|
||||
set_led_status(machine(), 0, data & 1);
|
||||
|
||||
ioport("EEPROMOUT")->write(data, 0xff);
|
||||
m_eepromoutport->write(data, 0xff);
|
||||
|
||||
// bit 0x100 and 0x040 ?
|
||||
}
|
||||
@ -144,8 +144,8 @@ WRITE32_MEMBER(eolith_state::systemcontrol_w)
|
||||
READ32_MEMBER(eolith_state::hidctch3_pen1_r)
|
||||
{
|
||||
//320 x 240
|
||||
int xpos = ioport("PEN_X_P1")->read();
|
||||
int ypos = ioport("PEN_Y_P1")->read();
|
||||
int xpos = m_penx1port->read();
|
||||
int ypos = m_peny1port->read();
|
||||
|
||||
return xpos + (ypos*168*2);
|
||||
}
|
||||
@ -153,8 +153,8 @@ READ32_MEMBER(eolith_state::hidctch3_pen1_r)
|
||||
READ32_MEMBER(eolith_state::hidctch3_pen2_r)
|
||||
{
|
||||
//320 x 240
|
||||
int xpos = ioport("PEN_X_P2")->read();
|
||||
int ypos = ioport("PEN_Y_P2")->read();
|
||||
int xpos = m_penx2port->read();
|
||||
int ypos = m_peny2port->read();
|
||||
|
||||
return xpos + (ypos*168*2);
|
||||
}
|
||||
@ -185,7 +185,7 @@ WRITE8_MEMBER( eolith_state::sound_p1_w )
|
||||
{
|
||||
// .... xxxx - Data ROM bank (32kB)
|
||||
// ...x .... - Unknown (Usually 1?)
|
||||
membank("sound_bank")->set_entry(data & 0x0f);
|
||||
m_sndbank->set_entry(data & 0x0f);
|
||||
}
|
||||
|
||||
|
||||
@ -227,9 +227,8 @@ WRITE8_MEMBER( eolith_state::qs1000_p1_w )
|
||||
|
||||
static void soundcpu_to_qs1000(device_t *device, int data)
|
||||
{
|
||||
qs1000_device *qs1000 = device->machine().device<qs1000_device>("qs1000");
|
||||
qs1000->serial_in(data);
|
||||
|
||||
eolith_state *state = device->machine().driver_data<eolith_state>();
|
||||
state->m_qs1000->serial_in(data);
|
||||
device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250));
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ static const struct
|
||||
/* eolith.c */
|
||||
{ "linkypip", 0x4000825c, -1,/*0x4000ABAE,*/ 240 }, // 2nd address is used on the planet cutscene between but idle skipping between levels, but seems too aggressive
|
||||
{ "ironfort", 0x40020854, -1, 240 },
|
||||
{ "ironfortj",0x40020234, -1, 240 },
|
||||
{ "hidnctch", 0x4000bba0, -1, 240 },
|
||||
{ "raccoon", 0x40008204, -1, 240 },
|
||||
{ "puzzlekg", 0x40029458, -1, 240 },
|
||||
|
@ -1,11 +1,22 @@
|
||||
|
||||
#include "sound/qs1000.h"
|
||||
|
||||
class eolith_state : public driver_device
|
||||
{
|
||||
public:
|
||||
eolith_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu")
|
||||
{ }
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_qs1000(*this, "qs1000"),
|
||||
m_in0(*this, "IN0"),
|
||||
m_eepromoutport(*this, "EEPROMOUT"),
|
||||
m_penx1port(*this, "PEN_X_P1"),
|
||||
m_peny1port(*this, "PEN_Y_P1"),
|
||||
m_penx2port(*this, "PEN_X_P2"),
|
||||
m_peny2port(*this, "PEN_Y_P2"),
|
||||
m_sndbank(*this, "sound_bank")
|
||||
{ }
|
||||
|
||||
int m_coin_counter_bit;
|
||||
int m_buffer;
|
||||
@ -16,6 +27,15 @@ public:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_soundcpu;
|
||||
optional_device<qs1000_device> m_qs1000;
|
||||
optional_ioport m_in0; // klondkp doesn't have it
|
||||
optional_ioport m_eepromoutport;
|
||||
optional_ioport m_penx1port;
|
||||
optional_ioport m_peny1port;
|
||||
optional_ioport m_penx2port;
|
||||
optional_ioport m_peny2port;
|
||||
optional_memory_bank m_sndbank;
|
||||
|
||||
|
||||
DECLARE_READ32_MEMBER(eolith_custom_r);
|
||||
DECLARE_WRITE32_MEMBER(systemcontrol_w);
|
||||
|
Loading…
Reference in New Issue
Block a user