Previous 199869 Revisions Next

r20542 Sunday 27th January, 2013 at 17:56:04 UTC by David Haywood
eolith.c tagmap cleanup + actually gave ironfortj an idle loop speedup, because whoever added it didn't at the time (nw)
[src/mame/drivers]eolith.c eolithsp.c
[src/mame/includes]eolith.h

trunk/src/mame/drivers/eolith.c
r20541r20542
100100#include "emu.h"
101101#include "cpu/e132xs/e132xs.h"
102102#include "cpu/mcs51/mcs51.h"
103#include "sound/qs1000.h"
103
104104#include "machine/eeprom.h"
105105#include "includes/eolith.h"
106106#include "includes/eolithsp.h"
r20541r20542
127127   */
128128   eolith_speedup_read(space);
129129
130   return (ioport("IN0")->read() & ~0x300) | (machine().rand() & 0x300);
130   return (m_in0->read() & ~0x300) | (machine().rand() & 0x300);
131131}
132132
133133WRITE32_MEMBER(eolith_state::systemcontrol_w)
r20541r20542
136136   coin_counter_w(machine(), 0, data & m_coin_counter_bit);
137137   set_led_status(machine(), 0, data & 1);
138138
139   ioport("EEPROMOUT")->write(data, 0xff);
139   m_eepromoutport->write(data, 0xff);
140140
141141   // bit 0x100 and 0x040 ?
142142}
r20541r20542
144144READ32_MEMBER(eolith_state::hidctch3_pen1_r)
145145{
146146   //320 x 240
147   int xpos = ioport("PEN_X_P1")->read();
148   int ypos = ioport("PEN_Y_P1")->read();
147   int xpos = m_penx1port->read();
148   int ypos = m_peny1port->read();
149149
150150   return xpos + (ypos*168*2);
151151}
r20541r20542
153153READ32_MEMBER(eolith_state::hidctch3_pen2_r)
154154{
155155   //320 x 240
156   int xpos = ioport("PEN_X_P2")->read();
157   int ypos = ioport("PEN_Y_P2")->read();
156   int xpos = m_penx2port->read();
157   int ypos = m_peny2port->read();
158158
159159   return xpos + (ypos*168*2);
160160}
r20541r20542
185185{
186186   // .... xxxx - Data ROM bank (32kB)
187187   // ...x .... - Unknown (Usually 1?)
188   membank("sound_bank")->set_entry(data & 0x0f);
188   m_sndbank->set_entry(data & 0x0f);
189189}
190190
191191
r20541r20542
227227
228228static void soundcpu_to_qs1000(device_t *device, int data)
229229{
230   qs1000_device *qs1000 = device->machine().device<qs1000_device>("qs1000");
231   qs1000->serial_in(data);
232
230   eolith_state *state = device->machine().driver_data<eolith_state>();
231   state->m_qs1000->serial_in(data);
233232   device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250));
234233}
235234
trunk/src/mame/drivers/eolithsp.c
r20541r20542
4747   /* eolith.c */
4848   { "linkypip", 0x4000825c, -1,/*0x4000ABAE,*/ 240 }, // 2nd address is used on the planet cutscene between but idle skipping between levels, but seems too aggressive
4949   { "ironfort", 0x40020854, -1, 240 },
50   { "ironfortj",0x40020234, -1, 240 },
5051   { "hidnctch", 0x4000bba0, -1, 240 },
5152   { "raccoon",  0x40008204, -1, 240 },
5253   { "puzzlekg", 0x40029458, -1, 240 },
trunk/src/mame/includes/eolith.h
r20541r20542
1
2#include "sound/qs1000.h"
3
14class eolith_state : public driver_device
25{
36public:
r20541r20542
47   eolith_state(const machine_config &mconfig, device_type type, const char *tag)
58      :   driver_device(mconfig, type, tag),
69         m_maincpu(*this, "maincpu"),
7         m_soundcpu(*this, "soundcpu")
8         { }
10         m_soundcpu(*this, "soundcpu"),
11         m_qs1000(*this, "qs1000"),
12         m_in0(*this, "IN0"),
13         m_eepromoutport(*this, "EEPROMOUT"),
14         m_penx1port(*this, "PEN_X_P1"),
15         m_peny1port(*this, "PEN_Y_P1"),
16         m_penx2port(*this, "PEN_X_P2"),
17         m_peny2port(*this, "PEN_Y_P2"),
18         m_sndbank(*this, "sound_bank")
19      { }
920
1021   int m_coin_counter_bit;
1122   int m_buffer;
r20541r20542
1627
1728   required_device<cpu_device> m_maincpu;
1829   optional_device<cpu_device> m_soundcpu;
30   optional_device<qs1000_device> m_qs1000;
31   optional_ioport m_in0; // klondkp doesn't have it
32   optional_ioport m_eepromoutport;
33   optional_ioport m_penx1port;
34   optional_ioport m_peny1port;
35   optional_ioport m_penx2port;
36   optional_ioport m_peny2port;
37   optional_memory_bank m_sndbank;
38   
1939
2040   DECLARE_READ32_MEMBER(eolith_custom_r);
2141   DECLARE_WRITE32_MEMBER(systemcontrol_w);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team