Previous 199869 Revisions Next

r20944 Monday 11th February, 2013 at 15:11:11 UTC by Curt Coder
(MESS) c64: Cartridge WIP. (nw)
[src/mess/machine]c128_comal80.c c64_sfx_sound_expander.c c64_sfx_sound_expander.h c64_vizastar.c c64_vizastar.h

trunk/src/mess/machine/c64_sfx_sound_expander.c
r20943r20944
205205
206206
207207//**************************************************************************
208//  INLINE HELPERS
209//**************************************************************************
210
211//-------------------------------------------------
212//  get_offset - get passthru expansion port offset
213//-------------------------------------------------
214
215inline offs_t c64_sfx_sound_expander_cartridge_device::get_offset(offs_t offset, int rw)
216{
217   // assimilate the 3 different MIDI cartridge 6850 ACIA register mappings?
218   return (offset & 0xfffc) | (rw << 1) | BIT(offset, 1);
219}
220
221
222
223//**************************************************************************
208224//  LIVE DEVICE
209225//**************************************************************************
210226
r20943r20944
244260
245261void c64_sfx_sound_expander_cartridge_device::device_reset()
246262{
263   m_opl->reset();
247264}
248265
249266
r20943r20944
253270
254271UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
255272{
256   data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
273   data = m_exp->cd_r(space, get_offset(offset, 1), data, sphi2, ba, roml, romh, io1, io2);
257274
258275   if (!io2)
259276   {
r20943r20944
292309      ym3526_w(m_opl, space, BIT(offset, 4), data);
293310   }
294311
295   m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
312   m_exp->cd_w(space, get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2);
296313}
297314
298315
r20943r20944
302319
303320int c64_sfx_sound_expander_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
304321{
305   return m_exp->game_r(offset, sphi2, ba, rw, hiram);
322   return m_exp->game_r(get_offset(offset, rw), sphi2, ba, rw, hiram);
306323}
307324
308325
r20943r20944
312329
313330int c64_sfx_sound_expander_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
314331{
315   return m_exp->exrom_r(offset, sphi2, ba, rw, hiram);
332   return m_exp->exrom_r(get_offset(offset, rw), sphi2, ba, rw, hiram);
316333}
trunk/src/mess/machine/c64_sfx_sound_expander.h
r20943r20944
4646
4747protected:
4848   // device-level overrides
49   virtual void device_config_complete() { m_shortname = "c64_sfx_sound_expander"; }
49   virtual void device_config_complete() { m_shortname = "c64_sfxse"; }
5050   virtual void device_start();
5151   virtual void device_reset();
5252
r20943r20944
6767   required_ioport m_kb5;
6868   required_ioport m_kb6;
6969   required_ioport m_kb7;
70
71   inline offs_t get_offset(offs_t offset, int rw);
7072};
7173
7274
trunk/src/mess/machine/c64_vizastar.c
r20943r20944
11/**********************************************************************
22
3    VizaWrite 64 cartridge emulation
3    VizaStar 64 XL4 cartridge emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
r20943r20944
2323    |=|                         |
2424    |===========================|
2525
26    ROM     - Hitachi HN462732G EPROM "V"
26    ROM     - Hitachi HN462732G 4Kx8 EPROM "V"
2727
2828*/
2929
r20943r20944
6060//-------------------------------------------------
6161
6262c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
63   device_t(mconfig, C64_VIZASTAR, "VizaStar 64", tag, owner, clock),
63   device_t(mconfig, C64_VIZASTAR, "VizaStar 64 XL4", tag, owner, clock),
6464   device_c64_expansion_card_interface(mconfig, *this)
6565{
6666}
trunk/src/mess/machine/c64_vizastar.h
r20943r20944
11/**********************************************************************
22
3    VizaStar 64 cartridge emulation
3    VizaStar 64 XL4 cartridge emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
trunk/src/mess/machine/c128_comal80.c
r20943r20944
2929
3030c128_comal80_cartridge_device::c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3131   device_t(mconfig, C128_COMAL80, "C128 COMAL 80 cartridge", tag, owner, clock),
32   device_c64_expansion_card_interface(mconfig, *this)
32   device_c64_expansion_card_interface(mconfig, *this),
33   m_bank(0)
3334{
3435}
3536

Previous 199869 Revisions Next


© 1997-2024 The MAME Team