mirror of
https://github.com/holub/mame
synced 2025-05-27 16:21:34 +03:00
(MESS) c64: Cartridge WIP. (nw)
This commit is contained in:
parent
45fd5f3a39
commit
f07681252e
@ -29,7 +29,8 @@ const device_type C128_COMAL80 = &device_creator<c128_comal80_cartridge_device>;
|
||||
|
||||
c128_comal80_cartridge_device::c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, C128_COMAL80, "C128 COMAL 80 cartridge", tag, owner, clock),
|
||||
device_c64_expansion_card_interface(mconfig, *this)
|
||||
device_c64_expansion_card_interface(mconfig, *this),
|
||||
m_bank(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -204,6 +204,22 @@ ioport_constructor c64_sfx_sound_expander_cartridge_device::device_input_ports()
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INLINE HELPERS
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// get_offset - get passthru expansion port offset
|
||||
//-------------------------------------------------
|
||||
|
||||
inline offs_t c64_sfx_sound_expander_cartridge_device::get_offset(offs_t offset, int rw)
|
||||
{
|
||||
// assimilate the 3 different MIDI cartridge 6850 ACIA register mappings?
|
||||
return (offset & 0xfffc) | (rw << 1) | BIT(offset, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -244,6 +260,7 @@ void c64_sfx_sound_expander_cartridge_device::device_start()
|
||||
|
||||
void c64_sfx_sound_expander_cartridge_device::device_reset()
|
||||
{
|
||||
m_opl->reset();
|
||||
}
|
||||
|
||||
|
||||
@ -253,7 +270,7 @@ void c64_sfx_sound_expander_cartridge_device::device_reset()
|
||||
|
||||
UINT8 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)
|
||||
{
|
||||
data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
|
||||
data = m_exp->cd_r(space, get_offset(offset, 1), data, sphi2, ba, roml, romh, io1, io2);
|
||||
|
||||
if (!io2)
|
||||
{
|
||||
@ -292,7 +309,7 @@ void c64_sfx_sound_expander_cartridge_device::c64_cd_w(address_space &space, off
|
||||
ym3526_w(m_opl, space, BIT(offset, 4), data);
|
||||
}
|
||||
|
||||
m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
|
||||
m_exp->cd_w(space, get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2);
|
||||
}
|
||||
|
||||
|
||||
@ -302,7 +319,7 @@ void c64_sfx_sound_expander_cartridge_device::c64_cd_w(address_space &space, off
|
||||
|
||||
int c64_sfx_sound_expander_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
|
||||
{
|
||||
return m_exp->game_r(offset, sphi2, ba, rw, hiram);
|
||||
return m_exp->game_r(get_offset(offset, rw), sphi2, ba, rw, hiram);
|
||||
}
|
||||
|
||||
|
||||
@ -312,5 +329,5 @@ int c64_sfx_sound_expander_cartridge_device::c64_game_r(offs_t offset, int sphi2
|
||||
|
||||
int c64_sfx_sound_expander_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
|
||||
{
|
||||
return m_exp->exrom_r(offset, sphi2, ba, rw, hiram);
|
||||
return m_exp->exrom_r(get_offset(offset, rw), sphi2, ba, rw, hiram);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() { m_shortname = "c64_sfx_sound_expander"; }
|
||||
virtual void device_config_complete() { m_shortname = "c64_sfxse"; }
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
@ -67,6 +67,8 @@ private:
|
||||
required_ioport m_kb5;
|
||||
required_ioport m_kb6;
|
||||
required_ioport m_kb7;
|
||||
|
||||
inline offs_t get_offset(offs_t offset, int rw);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**********************************************************************
|
||||
|
||||
VizaWrite 64 cartridge emulation
|
||||
VizaStar 64 XL4 cartridge emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
@ -23,7 +23,7 @@
|
||||
|=| |
|
||||
|===========================|
|
||||
|
||||
ROM - Hitachi HN462732G EPROM "V"
|
||||
ROM - Hitachi HN462732G 4Kx8 EPROM "V"
|
||||
|
||||
*/
|
||||
|
||||
@ -60,7 +60,7 @@ const device_type C64_VIZASTAR = &device_creator<c64_vizastar_cartridge_device>;
|
||||
//-------------------------------------------------
|
||||
|
||||
c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, C64_VIZASTAR, "VizaStar 64", tag, owner, clock),
|
||||
device_t(mconfig, C64_VIZASTAR, "VizaStar 64 XL4", tag, owner, clock),
|
||||
device_c64_expansion_card_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**********************************************************************
|
||||
|
||||
VizaStar 64 cartridge emulation
|
||||
VizaStar 64 XL4 cartridge emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
Loading…
Reference in New Issue
Block a user