mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
bus/coco: Simplify handler signatures and uint type names (nw)
This commit is contained in:
parent
9257036d98
commit
fc4092f42a
@ -37,7 +37,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_dc_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_dc_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_DCMODEM, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_uart(*this, UART_TAG)
|
||||
@ -66,17 +66,17 @@ namespace
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
// CoCo cartridge level overrides
|
||||
virtual uint8_t *get_cart_base() override
|
||||
virtual u8 *get_cart_base() override
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
|
||||
virtual memory_region* get_cart_memregion() override
|
||||
virtual memory_region *get_cart_memregion() override
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
|
||||
private:
|
||||
// internal state
|
||||
@ -126,7 +126,7 @@ const tiny_rom_entry *coco_dc_modem_device::device_rom_region() const
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_dc_modem_device::cts_read)
|
||||
u8 coco_dc_modem_device::cts_read(offs_t offset)
|
||||
{
|
||||
return m_eprom->base()[offset & 0x1fff];
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ INPUT_CHANGED_MEMBER(beckerport_device::drivewire_port_changed)
|
||||
// beckerport_device - constructor / destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_DWSOCK, tag, owner, clock)
|
||||
, m_hostname(nullptr), m_dwconfigport(*this, DRIVEWIRE_PORT_TAG), m_dwtcpport(0)
|
||||
{
|
||||
@ -89,7 +89,7 @@ void beckerport_device::device_start(void)
|
||||
|
||||
osd_printf_verbose("Connecting to Drivewire server on %s:%d... ", m_hostname, m_dwtcpport);
|
||||
|
||||
uint64_t filesize; // unused
|
||||
u64 filesize; // unused
|
||||
osd_file::error filerr = osd_file::open(chAddress, 0, m_pSocket, filesize);
|
||||
if (filerr != osd_file::error::NONE)
|
||||
{
|
||||
@ -127,7 +127,7 @@ void beckerport_device::device_config_complete(void)
|
||||
read
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(beckerport_device::read)
|
||||
u8 beckerport_device::read(offs_t offset)
|
||||
{
|
||||
unsigned char data = 0x5a;
|
||||
|
||||
@ -169,11 +169,11 @@ READ8_MEMBER(beckerport_device::read)
|
||||
write
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE8_MEMBER(beckerport_device::write)
|
||||
void beckerport_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
char d = char(data);
|
||||
osd_file::error filerr;
|
||||
std::uint32_t written;
|
||||
u32 written;
|
||||
|
||||
if (!m_pSocket)
|
||||
return;
|
||||
|
@ -24,7 +24,7 @@
|
||||
class beckerport_device : public device_t
|
||||
{
|
||||
public:
|
||||
beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual ~beckerport_device();
|
||||
|
||||
// optional information overrides
|
||||
@ -39,8 +39,8 @@ public:
|
||||
// driver update handlers
|
||||
DECLARE_INPUT_CHANGED_MEMBER(drivewire_port_changed);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read);
|
||||
virtual DECLARE_WRITE8_MEMBER(write);
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
// types
|
||||
enum dwsock_ports {
|
||||
|
@ -107,7 +107,7 @@ class coco_fdc_device_base : public coco_family_fdc_device_base
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
enum class rtc_type
|
||||
{
|
||||
@ -121,14 +121,14 @@ protected:
|
||||
virtual void device_reset() override;
|
||||
|
||||
// device-level overrides
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
// methods
|
||||
virtual void update_lines() override;
|
||||
void dskreg_w(uint8_t data);
|
||||
void dskreg_w(u8 data);
|
||||
rtc_type real_time_clock();
|
||||
|
||||
// devices
|
||||
@ -142,13 +142,13 @@ protected:
|
||||
optional_ioport m_rtc;
|
||||
|
||||
// Protected
|
||||
virtual DECLARE_READ8_MEMBER(ff74_read);
|
||||
virtual DECLARE_WRITE8_MEMBER(ff74_write);
|
||||
u8 ff74_read(offs_t offset);
|
||||
void ff74_write(offs_t offset, u8 data);
|
||||
|
||||
private:
|
||||
// registers
|
||||
uint8_t m_cache_controler;
|
||||
uint8_t m_cache_pointer;
|
||||
u8 m_cache_controler;
|
||||
u8 m_cache_pointer;
|
||||
required_device<ram_device> m_cache_buffer;
|
||||
};
|
||||
|
||||
@ -222,7 +222,7 @@ void coco_family_fdc_device_base::device_reset()
|
||||
// coco_family_fdc_device_base::get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* coco_family_fdc_device_base::get_cart_base()
|
||||
u8 *coco_family_fdc_device_base::get_cart_base()
|
||||
{
|
||||
return memregion("eprom")->base();
|
||||
}
|
||||
@ -232,7 +232,7 @@ uint8_t* coco_family_fdc_device_base::get_cart_base()
|
||||
// coco_family_fdc_device_base::get_cart_memregion
|
||||
//-------------------------------------------------
|
||||
|
||||
memory_region* coco_family_fdc_device_base::get_cart_memregion()
|
||||
memory_region *coco_family_fdc_device_base::get_cart_memregion()
|
||||
{
|
||||
return memregion("eprom");
|
||||
}
|
||||
@ -246,7 +246,7 @@ memory_region* coco_family_fdc_device_base::get_cart_memregion()
|
||||
// coco_fdc_device_base - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_fdc_device_base::coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_fdc_device_base::coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_family_fdc_device_base(mconfig, type, tag, owner, clock)
|
||||
, m_wd17xx(*this, WD_TAG)
|
||||
, m_ds1315(*this, CLOUD9_TAG)
|
||||
@ -266,8 +266,8 @@ coco_fdc_device_base::coco_fdc_device_base(const machine_config &mconfig, device
|
||||
void coco_fdc_device_base::device_start()
|
||||
{
|
||||
install_readwrite_handler(0xFF74, 0xFF76,
|
||||
read8_delegate(*this, FUNC(coco_fdc_device_base::ff74_read)),
|
||||
write8_delegate(*this, FUNC(coco_fdc_device_base::ff74_write)));
|
||||
read8sm_delegate(*this, FUNC(coco_fdc_device_base::ff74_read)),
|
||||
write8sm_delegate(*this, FUNC(coco_fdc_device_base::ff74_write)));
|
||||
|
||||
save_item(NAME(m_cache_controler));
|
||||
save_item(NAME(m_cache_pointer));
|
||||
@ -291,9 +291,9 @@ void coco_fdc_device_base::device_reset()
|
||||
// ff74_read - no halt registers
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_fdc_device_base::ff74_read)
|
||||
u8 coco_fdc_device_base::ff74_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0x0;
|
||||
u8 data = 0x0;
|
||||
|
||||
switch(offset)
|
||||
{
|
||||
@ -319,7 +319,7 @@ READ8_MEMBER(coco_fdc_device_base::ff74_read)
|
||||
// ff74_write - no halt registers
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_fdc_device_base::ff74_write)
|
||||
void coco_fdc_device_base::ff74_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
@ -394,19 +394,19 @@ void coco_fdc_device_base::update_lines()
|
||||
{
|
||||
if( (m_cache_controler & 0x07) == 0x07) /* Read cache on */
|
||||
{
|
||||
uint8_t data = m_wd17xx->data_r();
|
||||
u8 data = m_wd17xx->data_r();
|
||||
LOG("Cached drq read: %2.2x\n", data );
|
||||
m_cache_buffer->write(m_cache_pointer++, data);
|
||||
}
|
||||
else if( (m_cache_controler & 0x07) == 0x04 ) /* Write cache on */
|
||||
{
|
||||
uint8_t data = m_cache_buffer->read(m_cache_pointer++);
|
||||
u8 data = m_cache_buffer->read(m_cache_pointer++);
|
||||
LOG("Cached drq write: %2.2x\n", data );
|
||||
m_wd17xx->data_w(data);
|
||||
}
|
||||
else if( (m_cache_controler & 0x07) == 0x06 ) /* Copy Write cache to controller */
|
||||
{
|
||||
uint8_t data = m_cache_buffer->read(m_cache_pointer++);
|
||||
u8 data = m_cache_buffer->read(m_cache_pointer++);
|
||||
LOG("Cached drq write: %2.2x\n", data );
|
||||
m_wd17xx->data_w(data);
|
||||
}
|
||||
@ -437,10 +437,10 @@ void coco_fdc_device_base::update_lines()
|
||||
// dskreg_w - function to write to CoCo dskreg
|
||||
//-------------------------------------------------
|
||||
|
||||
void coco_fdc_device_base::dskreg_w(uint8_t data)
|
||||
void coco_fdc_device_base::dskreg_w(u8 data)
|
||||
{
|
||||
uint8_t drive = 0;
|
||||
uint8_t head;
|
||||
u8 drive = 0;
|
||||
u8 head;
|
||||
|
||||
LOG("fdc_coco_dskreg_w(): %c%c%c%c%c%c%c%c ($%02x)\n",
|
||||
data & 0x80 ? 'H' : 'h',
|
||||
@ -496,7 +496,7 @@ void coco_fdc_device_base::dskreg_w(uint8_t data)
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_fdc_device_base::cts_read)
|
||||
u8 coco_fdc_device_base::cts_read(offs_t offset)
|
||||
{
|
||||
return memregion("eprom")->base()[offset];
|
||||
}
|
||||
@ -506,9 +506,9 @@ READ8_MEMBER(coco_fdc_device_base::cts_read)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_fdc_device_base::scs_read)
|
||||
u8 coco_fdc_device_base::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0;
|
||||
u8 result = 0;
|
||||
|
||||
switch(offset & 0x1F)
|
||||
{
|
||||
@ -562,7 +562,7 @@ READ8_MEMBER(coco_fdc_device_base::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_fdc_device_base::scs_write)
|
||||
void coco_fdc_device_base::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch(offset & 0x1F)
|
||||
{
|
||||
@ -619,7 +619,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, COCO_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -656,7 +656,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_fdc_v11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_fdc_v11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, COCO_FDC_V11, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -691,7 +691,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco3_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco3_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, COCO3_HDB1, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -725,7 +725,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco2_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco2_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, COCO2_HDB1, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -761,7 +761,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cp450_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
cp450_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, CP450_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -795,7 +795,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cd6809_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
cd6809_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_fdc_device_base(mconfig, CD6809_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
coco_family_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_family_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
{
|
||||
@ -45,18 +45,18 @@ protected:
|
||||
|
||||
// FDC overrides
|
||||
virtual void update_lines() = 0;
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual memory_region* get_cart_memregion() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual memory_region *get_cart_memregion() override;
|
||||
|
||||
// accessors
|
||||
uint8_t dskreg() const { return m_dskreg; }
|
||||
u8 dskreg() const { return m_dskreg; }
|
||||
bool intrq() const { return m_intrq; }
|
||||
bool drq() const { return m_drq; }
|
||||
void set_dskreg(uint8_t data) { m_dskreg = data; }
|
||||
void set_dskreg(u8 data) { m_dskreg = data; }
|
||||
|
||||
private:
|
||||
// registers
|
||||
uint8_t m_dskreg;
|
||||
u8 m_dskreg;
|
||||
bool m_intrq;
|
||||
bool m_drq;
|
||||
};
|
||||
|
@ -38,12 +38,12 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
|
||||
private:
|
||||
required_device<sn76489a_device> m_psg;
|
||||
@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_PAK_GMC, device_cococart_interface, coco_pak_gmc
|
||||
// coco_pak_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_pak_gmc_device::coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_gmc_device::coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_pak_banked_device(mconfig, COCO_PAK_GMC, tag, owner, clock)
|
||||
, m_psg(*this, SN76489AN_TAG)
|
||||
{
|
||||
@ -79,13 +79,13 @@ coco_pak_gmc_device::coco_pak_gmc_device(const machine_config &mconfig, const ch
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_pak_gmc_device::scs_write)
|
||||
void coco_pak_gmc_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
case 0:
|
||||
/* set the bank */
|
||||
coco_pak_banked_device::scs_write(space, offset, data, mem_mask);
|
||||
coco_pak_banked_device::scs_write(offset, data);
|
||||
break;
|
||||
case 1:
|
||||
m_psg->write(data);
|
||||
|
@ -78,7 +78,7 @@
|
||||
// MACROS / CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
static constexpr uint8_t MULTI_SLOT_LOOKUP[] = {0xcc, 0xdd, 0xee, 0xff};
|
||||
static constexpr u8 MULTI_SLOT_LOOKUP[] = {0xcc, 0xdd, 0xee, 0xff};
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
@ -95,7 +95,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
INPUT_CHANGED_MEMBER( switch_changed );
|
||||
|
||||
@ -103,17 +103,17 @@ namespace
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual READ8_MEMBER(cts_read) override;
|
||||
virtual WRITE8_MEMBER(cts_write) override;
|
||||
virtual READ8_MEMBER(scs_read) override;
|
||||
virtual WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual void cts_write(offs_t offset, u8 data) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
virtual void set_sound_enable(bool sound_enable) override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual uint32_t get_cart_size() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual u32 get_cart_size() override;
|
||||
|
||||
virtual address_space &cartridge_space() override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
@ -123,8 +123,8 @@ namespace
|
||||
required_device_array<cococart_slot_device, 4> m_slots;
|
||||
|
||||
// internal state
|
||||
uint8_t m_select;
|
||||
uint8_t m_block;
|
||||
u8 m_select;
|
||||
u8 m_block;
|
||||
|
||||
// internal accessors
|
||||
int active_scs_slot_number() const;
|
||||
@ -134,9 +134,9 @@ namespace
|
||||
cococart_slot_device &active_cts_slot();
|
||||
|
||||
// methods
|
||||
void set_select(uint8_t new_select);
|
||||
DECLARE_READ8_MEMBER(ff7f_read);
|
||||
DECLARE_WRITE8_MEMBER(ff7f_write);
|
||||
void set_select(u8 new_select);
|
||||
u8 ff7f_read();
|
||||
void ff7f_write(u8 data);
|
||||
void update_line(int slot_number, line ln);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(multi_slot1_cart_w);
|
||||
@ -240,7 +240,7 @@ ioport_constructor coco_multipak_device::device_input_ports() const
|
||||
// coco_multipak_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_MULTIPAK, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_slots(*this, "slot%u", 1), m_select(0), m_block(0)
|
||||
@ -255,7 +255,7 @@ coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const
|
||||
void coco_multipak_device::device_start()
|
||||
{
|
||||
// install $FF7F handler
|
||||
install_readwrite_handler(0xFF7F, 0xFF7F, read8_delegate(*this, FUNC(coco_multipak_device::ff7f_read)), write8_delegate(*this, FUNC(coco_multipak_device::ff7f_write)));
|
||||
install_readwrite_handler(0xFF7F, 0xFF7F, read8smo_delegate(*this, FUNC(coco_multipak_device::ff7f_read)), write8smo_delegate(*this, FUNC(coco_multipak_device::ff7f_write)));
|
||||
|
||||
// initial state
|
||||
m_select = 0xFF;
|
||||
@ -354,7 +354,7 @@ cococart_slot_device &coco_multipak_device::active_cts_slot()
|
||||
// set_select
|
||||
//-------------------------------------------------
|
||||
|
||||
void coco_multipak_device::set_select(uint8_t new_select)
|
||||
void coco_multipak_device::set_select(u8 new_select)
|
||||
{
|
||||
// identify old value for CART, in case this needs to change
|
||||
cococart_slot_device::line_value old_cart = active_cts_slot().get_line_value(line::CART);
|
||||
@ -375,7 +375,7 @@ void coco_multipak_device::set_select(uint8_t new_select)
|
||||
// ff7f_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_multipak_device::ff7f_read)
|
||||
u8 coco_multipak_device::ff7f_read()
|
||||
{
|
||||
return m_select | 0xcc;
|
||||
}
|
||||
@ -384,7 +384,7 @@ READ8_MEMBER(coco_multipak_device::ff7f_read)
|
||||
// ff7f_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_multipak_device::ff7f_write)
|
||||
void coco_multipak_device::ff7f_write(u8 data)
|
||||
{
|
||||
m_block = 0xff;
|
||||
set_select(data);
|
||||
@ -440,7 +440,7 @@ void coco_multipak_device::set_sound_enable(bool sound_enable)
|
||||
// get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* coco_multipak_device::get_cart_base()
|
||||
u8 *coco_multipak_device::get_cart_base()
|
||||
{
|
||||
return active_cts_slot().get_cart_base();
|
||||
}
|
||||
@ -450,7 +450,7 @@ uint8_t* coco_multipak_device::get_cart_base()
|
||||
// get_cart_size
|
||||
//-------------------------------------------------
|
||||
|
||||
uint32_t coco_multipak_device::get_cart_size()
|
||||
u32 coco_multipak_device::get_cart_size()
|
||||
{
|
||||
return active_cts_slot().get_cart_size();
|
||||
}
|
||||
@ -460,9 +460,9 @@ uint32_t coco_multipak_device::get_cart_size()
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_multipak_device::cts_read)
|
||||
u8 coco_multipak_device::cts_read(offs_t offset)
|
||||
{
|
||||
return active_cts_slot().cts_read(space, offset);
|
||||
return active_cts_slot().cts_read(offset);
|
||||
}
|
||||
|
||||
|
||||
@ -470,9 +470,9 @@ READ8_MEMBER(coco_multipak_device::cts_read)
|
||||
// cts_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_multipak_device::cts_write)
|
||||
void coco_multipak_device::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
active_cts_slot().cts_write(space, offset, data);
|
||||
active_cts_slot().cts_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
@ -480,9 +480,9 @@ WRITE8_MEMBER(coco_multipak_device::cts_write)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_multipak_device::scs_read)
|
||||
u8 coco_multipak_device::scs_read(offs_t offset)
|
||||
{
|
||||
return active_scs_slot().scs_read(space, offset);
|
||||
return active_scs_slot().scs_read(offset);
|
||||
}
|
||||
|
||||
|
||||
@ -490,9 +490,9 @@ READ8_MEMBER(coco_multipak_device::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_multipak_device::scs_write)
|
||||
void coco_multipak_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
active_scs_slot().scs_write(space, offset, data);
|
||||
active_scs_slot().scs_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_ORCH90, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -75,8 +75,8 @@ namespace
|
||||
virtual void device_start() override
|
||||
{
|
||||
// install handlers
|
||||
install_write_handler(0xFF7A, 0xFF7A, write8_delegate(*this, FUNC(coco_orch90_device::write_left)));
|
||||
install_write_handler(0xFF7B, 0xFF7B, write8_delegate(*this, FUNC(coco_orch90_device::write_right)));
|
||||
install_write_handler(0xFF7A, 0xFF7A, write8smo_delegate(*this, FUNC(coco_orch90_device::write_left)));
|
||||
install_write_handler(0xFF7B, 0xFF7B, write8smo_delegate(*this, FUNC(coco_orch90_device::write_right)));
|
||||
|
||||
// Orch-90 ties CART to Q
|
||||
set_line_value(line::CART, line_value::Q);
|
||||
@ -88,21 +88,21 @@ namespace
|
||||
}
|
||||
|
||||
// CoCo cartridge level overrides
|
||||
virtual uint8_t *get_cart_base() override
|
||||
virtual u8 *get_cart_base() override
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
|
||||
virtual memory_region* get_cart_memregion() override
|
||||
virtual memory_region *get_cart_memregion() override
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
|
||||
private:
|
||||
WRITE8_MEMBER(write_left) { m_ldac->write(data); }
|
||||
WRITE8_MEMBER(write_right) { m_rdac->write(data); }
|
||||
void write_left(u8 data) { m_ldac->write(data); }
|
||||
void write_right(u8 data) { m_rdac->write(data); }
|
||||
|
||||
// internal state
|
||||
required_memory_region m_eprom;
|
||||
@ -131,7 +131,7 @@ void coco_orch90_device::device_add_mconfig(machine_config &config)
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_orch90_device::cts_read)
|
||||
u8 coco_orch90_device::cts_read(offs_t offset)
|
||||
{
|
||||
return m_eprom->base()[offset & 0x1fff];
|
||||
}
|
||||
|
@ -55,14 +55,14 @@ DEFINE_DEVICE_TYPE(COCO_PAK, coco_pak_device, "cocopak", "CoCo Program PAK")
|
||||
//-------------------------------------------------
|
||||
// coco_pak_device - constructor
|
||||
//-------------------------------------------------
|
||||
coco_pak_device::coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_device::coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_cart(nullptr), m_eprom(*this, CARTSLOT_TAG), m_autostart(*this, CART_AUTOSTART_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_pak_device(mconfig, COCO_PAK, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -99,7 +99,7 @@ const tiny_rom_entry *coco_pak_device::device_rom_region() const
|
||||
// get_cart_size
|
||||
//-------------------------------------------------
|
||||
|
||||
uint32_t coco_pak_device::get_cart_size()
|
||||
u32 coco_pak_device::get_cart_size()
|
||||
{
|
||||
return 0x8000;
|
||||
}
|
||||
@ -125,7 +125,7 @@ void coco_pak_device::device_reset()
|
||||
get_cart_base
|
||||
-------------------------------------------------*/
|
||||
|
||||
uint8_t* coco_pak_device::get_cart_base()
|
||||
u8 *coco_pak_device::get_cart_base()
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
@ -134,7 +134,7 @@ uint8_t* coco_pak_device::get_cart_base()
|
||||
get_cart_memregion
|
||||
-------------------------------------------------*/
|
||||
|
||||
memory_region* coco_pak_device::get_cart_memregion()
|
||||
memory_region *coco_pak_device::get_cart_memregion()
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
@ -143,7 +143,7 @@ memory_region* coco_pak_device::get_cart_memregion()
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_pak_device::cts_read)
|
||||
u8 coco_pak_device::cts_read(offs_t offset)
|
||||
{
|
||||
if (offset < m_eprom->bytes())
|
||||
return m_eprom->base()[offset];
|
||||
@ -171,12 +171,12 @@ DEFINE_DEVICE_TYPE(COCO_PAK_BANKED, coco_pak_banked_device, "cocopak_banked", "C
|
||||
// coco_pak_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_pak_device(mconfig, type, tag, owner, clock)
|
||||
, m_pos(0)
|
||||
{
|
||||
}
|
||||
coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_pak_banked_device(mconfig, COCO_PAK_BANKED, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -216,7 +216,7 @@ void coco_pak_banked_device::device_reset()
|
||||
// get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t *coco_pak_banked_device::get_cart_base()
|
||||
u8 *coco_pak_banked_device::get_cart_base()
|
||||
{
|
||||
return m_eprom->base() + (m_pos * 0x4000) % m_eprom->bytes();
|
||||
}
|
||||
@ -225,7 +225,7 @@ uint8_t *coco_pak_banked_device::get_cart_base()
|
||||
// get_cart_size
|
||||
//-------------------------------------------------
|
||||
|
||||
uint32_t coco_pak_banked_device::get_cart_size()
|
||||
u32 coco_pak_banked_device::get_cart_size()
|
||||
{
|
||||
return 0x4000;
|
||||
}
|
||||
@ -234,7 +234,7 @@ uint32_t coco_pak_banked_device::get_cart_size()
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_pak_banked_device::cts_read)
|
||||
u8 coco_pak_banked_device::cts_read(offs_t offset)
|
||||
{
|
||||
return m_eprom->base()[(m_pos * 0x4000) % m_eprom->bytes() | offset];
|
||||
}
|
||||
@ -243,7 +243,7 @@ READ8_MEMBER(coco_pak_banked_device::cts_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_pak_banked_device::scs_write)
|
||||
void coco_pak_banked_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
|
@ -19,23 +19,23 @@ class coco_pak_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual uint32_t get_cart_size() override;
|
||||
virtual memory_region* get_cart_memregion() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual u32 get_cart_size() override;
|
||||
virtual memory_region *get_cart_memregion() override;
|
||||
|
||||
protected:
|
||||
coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
|
||||
// internal state
|
||||
device_image_interface *m_cart;
|
||||
@ -50,22 +50,22 @@ class coco_pak_banked_device : public coco_pak_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual uint8_t *get_cart_base() override;
|
||||
virtual uint32_t get_cart_size() override;
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual u32 get_cart_size() override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
|
||||
private:
|
||||
uint8_t m_pos;
|
||||
u8 m_pos;
|
||||
};
|
||||
|
||||
|
||||
|
@ -104,7 +104,7 @@ void coco_psg_device::device_add_mconfig(machine_config &config)
|
||||
// coco_psg_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_psg_device::coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_psg_device::coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_PSG, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_psg(*this, "psg")
|
||||
@ -118,7 +118,7 @@ coco_psg_device::coco_psg_device(const machine_config &mconfig, const char *tag,
|
||||
|
||||
void coco_psg_device::device_start()
|
||||
{
|
||||
m_sram = std::make_unique<uint8_t[]>(0x80000);
|
||||
m_sram = std::make_unique<u8[]>(0x80000);
|
||||
|
||||
/* registers are set to a default of zero */
|
||||
m_bank[0] = 0x00;
|
||||
@ -143,7 +143,7 @@ void coco_psg_device::device_reset()
|
||||
install_write_handler(0xbaaa, 0xbaaa, write8sm_delegate(*this, FUNC(coco_psg_device::flash2aaa_w)));
|
||||
}
|
||||
|
||||
void coco_psg_device::flash2aaa_w(offs_t offset, uint8_t data)
|
||||
void coco_psg_device::flash2aaa_w(offs_t offset, u8 data)
|
||||
{
|
||||
if (BIT(m_control, 5) && BIT(m_control, 3))
|
||||
{
|
||||
@ -151,7 +151,7 @@ void coco_psg_device::flash2aaa_w(offs_t offset, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
void coco_psg_device::flash5555_w(offs_t offset, uint8_t data)
|
||||
void coco_psg_device::flash5555_w(offs_t offset, u8 data)
|
||||
{
|
||||
if (BIT(m_control, 5) && BIT(m_control, 3))
|
||||
{
|
||||
@ -163,9 +163,9 @@ void coco_psg_device::flash5555_w(offs_t offset, uint8_t data)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_psg_device::scs_read)
|
||||
u8 coco_psg_device::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0x00;
|
||||
u8 data = 0x00;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -188,7 +188,7 @@ READ8_MEMBER(coco_psg_device::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_psg_device::scs_write)
|
||||
void coco_psg_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
@ -238,9 +238,9 @@ WRITE8_MEMBER(coco_psg_device::scs_write)
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_psg_device::cts_read)
|
||||
u8 coco_psg_device::cts_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0x00;
|
||||
u8 data = 0x00;
|
||||
|
||||
if (m_bank[BIT(offset, 13)] & 0x80)
|
||||
{
|
||||
@ -258,7 +258,7 @@ READ8_MEMBER(coco_psg_device::cts_read)
|
||||
// cts_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_psg_device::cts_write)
|
||||
void coco_psg_device::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
if (BIT(m_control, 3))
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ class coco_psg_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
@ -34,21 +34,21 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(cts_write) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual void cts_write(offs_t offset, u8 data) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
|
||||
private:
|
||||
required_device<ay8910_device> m_psg;
|
||||
required_device<sst_39sf040_device> m_flash;
|
||||
|
||||
void flash2aaa_w(offs_t offset, uint8_t data);
|
||||
void flash5555_w(offs_t offset, uint8_t data);
|
||||
void flash2aaa_w(offs_t offset, u8 data);
|
||||
void flash5555_w(offs_t offset, u8 data);
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_sram;
|
||||
uint8_t m_bank[2];
|
||||
uint8_t m_control;
|
||||
std::unique_ptr<u8[]> m_sram;
|
||||
u8 m_bank[2];
|
||||
u8 m_control;
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,15 +41,15 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
|
||||
private:
|
||||
required_device<ram_device> m_staticram;
|
||||
@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_PAK_RAM, device_cococart_interface, coco_pak_ram
|
||||
// coco_pak_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_pak_ram_device::coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_pak_ram_device::coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_PAK_RAM, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_staticram(*this, STATICRAM_TAG)
|
||||
@ -122,7 +122,7 @@ void coco_pak_ram_device::device_reset()
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_pak_ram_device::scs_write)
|
||||
void coco_pak_ram_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
// int idata = data;
|
||||
|
||||
@ -154,9 +154,9 @@ WRITE8_MEMBER(coco_pak_ram_device::scs_write)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_pak_ram_device::scs_read)
|
||||
u8 coco_pak_ram_device::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0x00;
|
||||
u8 data = 0x00;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_RS232, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -64,17 +64,17 @@ namespace
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
// CoCo cartridge level overrides
|
||||
virtual uint8_t *get_cart_base() override
|
||||
virtual u8 *get_cart_base() override
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
|
||||
virtual memory_region* get_cart_memregion() override
|
||||
virtual memory_region *get_cart_memregion() override
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
|
||||
private:
|
||||
// internal state
|
||||
@ -120,7 +120,7 @@ const tiny_rom_entry *coco_rs232_device::device_rom_region() const
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_rs232_device::cts_read)
|
||||
u8 coco_rs232_device::cts_read(offs_t offset)
|
||||
{
|
||||
return m_eprom->base()[offset & 0x0fff];
|
||||
}
|
||||
|
@ -77,36 +77,36 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
uint8_t ssc_port_a_r();
|
||||
void ssc_port_b_w(uint8_t data);
|
||||
uint8_t ssc_port_c_r();
|
||||
void ssc_port_c_w(uint8_t data);
|
||||
uint8_t ssc_port_d_r();
|
||||
void ssc_port_d_w(uint8_t data);
|
||||
u8 ssc_port_a_r();
|
||||
void ssc_port_b_w(u8 data);
|
||||
u8 ssc_port_c_r();
|
||||
void ssc_port_c_w(u8 data);
|
||||
u8 ssc_port_d_r();
|
||||
void ssc_port_d_w(u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
virtual DECLARE_READ8_MEMBER(ff7d_read);
|
||||
virtual DECLARE_WRITE8_MEMBER(ff7d_write);
|
||||
u8 ff7d_read(offs_t offset);
|
||||
void ff7d_write(offs_t offset, u8 data);
|
||||
virtual void set_sound_enable(bool sound_enable) override;
|
||||
static constexpr device_timer_id BUSY_TIMER_ID = 0;
|
||||
|
||||
private:
|
||||
uint8_t m_reset_line;
|
||||
u8 m_reset_line;
|
||||
bool m_tms7000_busy;
|
||||
uint8_t m_tms7000_porta;
|
||||
uint8_t m_tms7000_portb;
|
||||
uint8_t m_tms7000_portc;
|
||||
uint8_t m_tms7000_portd;
|
||||
u8 m_tms7000_porta;
|
||||
u8 m_tms7000_portb;
|
||||
u8 m_tms7000_portc;
|
||||
u8 m_tms7000_portd;
|
||||
emu_timer *m_tms7000_busy_timer;
|
||||
required_device<tms7040_device> m_tms7040;
|
||||
required_device<ram_device> m_staticram;
|
||||
@ -121,7 +121,7 @@ namespace
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
~cocossc_sac_device() { }
|
||||
bool sound_activity_circuit_output();
|
||||
|
||||
@ -193,7 +193,7 @@ ROM_END
|
||||
// coco_ssc_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_ssc_device::coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_ssc_device::coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCO_SSC, tag, owner, clock),
|
||||
device_cococart_interface(mconfig, *this ),
|
||||
m_tms7040(*this, PIC_TAG),
|
||||
@ -212,8 +212,8 @@ void coco_ssc_device::device_start()
|
||||
{
|
||||
// install $FF7D-E handler
|
||||
install_readwrite_handler(0xFF7D, 0xFF7E,
|
||||
read8_delegate(*this, FUNC(coco_ssc_device::ff7d_read)),
|
||||
write8_delegate(*this, FUNC(coco_ssc_device::ff7d_write)));
|
||||
read8sm_delegate(*this, FUNC(coco_ssc_device::ff7d_read)),
|
||||
write8sm_delegate(*this, FUNC(coco_ssc_device::ff7d_write)));
|
||||
|
||||
save_item(NAME(m_reset_line));
|
||||
save_item(NAME(m_tms7000_busy));
|
||||
@ -290,9 +290,9 @@ void coco_ssc_device::set_sound_enable(bool sound_enable)
|
||||
// ff7d_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(coco_ssc_device::ff7d_read)
|
||||
u8 coco_ssc_device::ff7d_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
u8 data = 0xff;
|
||||
|
||||
switch(offset)
|
||||
{
|
||||
@ -348,7 +348,7 @@ READ8_MEMBER(coco_ssc_device::ff7d_read)
|
||||
// ff7d_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(coco_ssc_device::ff7d_write)
|
||||
void coco_ssc_device::ff7d_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
@ -391,7 +391,7 @@ WRITE8_MEMBER(coco_ssc_device::ff7d_write)
|
||||
// Handlers for secondary CPU ports
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t coco_ssc_device::ssc_port_a_r()
|
||||
u8 coco_ssc_device::ssc_port_a_r()
|
||||
{
|
||||
if (LOG_SSC)
|
||||
{
|
||||
@ -403,7 +403,7 @@ uint8_t coco_ssc_device::ssc_port_a_r()
|
||||
return m_tms7000_porta;
|
||||
}
|
||||
|
||||
void coco_ssc_device::ssc_port_b_w(uint8_t data)
|
||||
void coco_ssc_device::ssc_port_b_w(u8 data)
|
||||
{
|
||||
if (LOG_SSC)
|
||||
{
|
||||
@ -413,7 +413,7 @@ void coco_ssc_device::ssc_port_b_w(uint8_t data)
|
||||
m_tms7000_portb = data;
|
||||
}
|
||||
|
||||
uint8_t coco_ssc_device::ssc_port_c_r()
|
||||
u8 coco_ssc_device::ssc_port_c_r()
|
||||
{
|
||||
if (LOG_SSC)
|
||||
{
|
||||
@ -423,11 +423,11 @@ uint8_t coco_ssc_device::ssc_port_c_r()
|
||||
return m_tms7000_portc;
|
||||
}
|
||||
|
||||
void coco_ssc_device::ssc_port_c_w(uint8_t data)
|
||||
void coco_ssc_device::ssc_port_c_w(u8 data)
|
||||
{
|
||||
if( (data & C_RCS) == 0 && (data & C_RRW) == 0) /* static RAM write */
|
||||
{
|
||||
uint16_t address = (uint16_t)data << 8;
|
||||
u16 address = u16(data) << 8;
|
||||
address += m_tms7000_portb;
|
||||
address &= 0x7ff;
|
||||
|
||||
@ -475,14 +475,14 @@ void coco_ssc_device::ssc_port_c_w(uint8_t data)
|
||||
m_tms7000_portc = data;
|
||||
}
|
||||
|
||||
uint8_t coco_ssc_device::ssc_port_d_r()
|
||||
u8 coco_ssc_device::ssc_port_d_r()
|
||||
{
|
||||
if( ((m_tms7000_portc & C_RCS) == 0) && ((m_tms7000_portc & C_ACS) == 0))
|
||||
logerror( "[%s] Warning: Reading RAM and PSG at the same time!\n", machine().describe_context() );
|
||||
|
||||
if( ((m_tms7000_portc & C_RCS) == 0) && ((m_tms7000_portc & C_RRW) == C_RRW)) /* static ram chip select (low) and static ram chip read (high) */
|
||||
{
|
||||
uint16_t address = (uint16_t)m_tms7000_portc << 8;
|
||||
u16 address = u16(m_tms7000_portc) << 8;
|
||||
address += m_tms7000_portb;
|
||||
address &= 0x7ff;
|
||||
|
||||
@ -505,7 +505,7 @@ uint8_t coco_ssc_device::ssc_port_d_r()
|
||||
return m_tms7000_portd;
|
||||
}
|
||||
|
||||
void coco_ssc_device::ssc_port_d_w(uint8_t data)
|
||||
void coco_ssc_device::ssc_port_d_w(u8 data)
|
||||
{
|
||||
if (LOG_SSC)
|
||||
{
|
||||
@ -520,7 +520,7 @@ void coco_ssc_device::ssc_port_d_w(uint8_t data)
|
||||
// cocossc_sac_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
cocossc_sac_device::cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
cocossc_sac_device::cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, COCOSSC_SAC, tag, owner, clock),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_stream(nullptr),
|
||||
|
@ -95,15 +95,15 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
void pia_A_w(uint8_t data);
|
||||
virtual u8 *get_cart_base() override;
|
||||
void pia_A_w(u8 data);
|
||||
|
||||
// Clocks
|
||||
void write_acia_clocks(int id, int state);
|
||||
@ -117,7 +117,7 @@ namespace
|
||||
DECLARE_WRITE_LINE_MEMBER (write_f13_clock){ write_acia_clocks(mc14411_device::TIMER_F13, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER (write_f15_clock){ write_acia_clocks(mc14411_device::TIMER_F15, state); }
|
||||
protected:
|
||||
coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
@ -125,13 +125,13 @@ namespace
|
||||
|
||||
// internal state
|
||||
device_image_interface *m_cart;
|
||||
uint8_t m_select;
|
||||
u8 m_select;
|
||||
|
||||
optional_ioport m_autostart;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
private:
|
||||
// internal state
|
||||
required_memory_region m_eprom;
|
||||
@ -236,7 +236,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_T4426, device_cococart_interface, coco_t4426_dev
|
||||
// coco_t4426_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_cart(nullptr)
|
||||
@ -251,7 +251,7 @@ coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type
|
||||
{
|
||||
}
|
||||
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_t4426_device(mconfig, COCO_T4426, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -326,9 +326,9 @@ void coco_t4426_device::write_acia_clocks(int id, int state)
|
||||
ACIA is located at ff48-ff4F with A1 = 1
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(coco_t4426_device::scs_read)
|
||||
u8 coco_t4426_device::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
u8 result = 0x00;
|
||||
|
||||
LOG("%s Offs:%d\n", FUNCNAME, offset);
|
||||
|
||||
@ -358,7 +358,7 @@ READ8_MEMBER(coco_t4426_device::scs_read)
|
||||
ACIA is located at ff48-ff4F with A1 = 1
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE8_MEMBER(coco_t4426_device::scs_write)
|
||||
void coco_t4426_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
LOG("%s Offs:%d Data:%02x\n", FUNCNAME, offset, data);
|
||||
LOGSETUP(" * Offs:%02x <- %02x\n", offset, data);
|
||||
@ -397,7 +397,7 @@ WRITE8_MEMBER(coco_t4426_device::scs_write)
|
||||
#define ROM6 (~0x40 & 0xff)
|
||||
#define ROM7 (~0x80 & 0xff)
|
||||
|
||||
void coco_t4426_device::pia_A_w(uint8_t data)
|
||||
void coco_t4426_device::pia_A_w(u8 data)
|
||||
{
|
||||
LOGPIA("%s(%02x)\n", FUNCNAME, data);
|
||||
m_select = data;
|
||||
@ -407,9 +407,9 @@ void coco_t4426_device::pia_A_w(uint8_t data)
|
||||
cts_read
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(coco_t4426_device::cts_read)
|
||||
u8 coco_t4426_device::cts_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
u8 result = 0x00;
|
||||
|
||||
switch (offset & 0x2000)
|
||||
{
|
||||
@ -440,7 +440,7 @@ READ8_MEMBER(coco_t4426_device::cts_read)
|
||||
get_cart_base
|
||||
-------------------------------------------------*/
|
||||
|
||||
uint8_t* coco_t4426_device::get_cart_base()
|
||||
u8 *coco_t4426_device::get_cart_base()
|
||||
{
|
||||
LOG("%s - m_select %02x -> %02x\n", FUNCNAME, m_select, ~m_select & 0xff );
|
||||
return memregion(CARTSLOT_TAG)->base();
|
||||
|
@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(COCOCART_SLOT, cococart_slot_device, "cococart_slot", "CoCo C
|
||||
//-------------------------------------------------
|
||||
// cococart_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
cococart_slot_device::cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
cococart_slot_device::cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
device_t(mconfig, COCOCART_SLOT, tag, owner, clock),
|
||||
device_single_card_slot_interface<device_cococart_interface>(mconfig, *this),
|
||||
device_image_interface(mconfig, *this),
|
||||
@ -155,11 +155,11 @@ void cococart_slot_device::device_timer(emu_timer &timer, device_timer_id id, in
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(cococart_slot_device::cts_read)
|
||||
u8 cococart_slot_device::cts_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
u8 result = 0x00;
|
||||
if (m_cart)
|
||||
result = m_cart->cts_read(space, offset);
|
||||
result = m_cart->cts_read(offset);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -168,10 +168,10 @@ READ8_MEMBER(cococart_slot_device::cts_read)
|
||||
// cts_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(cococart_slot_device::cts_write)
|
||||
void cococart_slot_device::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->cts_write(space, offset, data);
|
||||
m_cart->cts_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
@ -179,11 +179,11 @@ WRITE8_MEMBER(cococart_slot_device::cts_write)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(cococart_slot_device::scs_read)
|
||||
u8 cococart_slot_device::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
u8 result = 0x00;
|
||||
if (m_cart)
|
||||
result = m_cart->scs_read(space, offset);
|
||||
result = m_cart->scs_read(offset);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -192,10 +192,10 @@ READ8_MEMBER(cococart_slot_device::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(cococart_slot_device::scs_write)
|
||||
void cococart_slot_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->scs_write(space, offset, data);
|
||||
m_cart->scs_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
@ -395,7 +395,7 @@ cococart_slot_device::line_value cococart_slot_device::get_line_value(cococart_s
|
||||
// get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* cococart_slot_device::get_cart_base()
|
||||
u8 *cococart_slot_device::get_cart_base()
|
||||
{
|
||||
if (m_cart != nullptr)
|
||||
return m_cart->get_cart_base();
|
||||
@ -407,7 +407,7 @@ uint8_t* cococart_slot_device::get_cart_base()
|
||||
// get_cart_size
|
||||
//-------------------------------------------------
|
||||
|
||||
uint32_t cococart_slot_device::get_cart_size()
|
||||
u32 cococart_slot_device::get_cart_size()
|
||||
{
|
||||
if (m_cart != nullptr)
|
||||
return m_cart->get_cart_size();
|
||||
@ -435,7 +435,7 @@ image_init_result cococart_slot_device::call_load()
|
||||
if (m_cart)
|
||||
{
|
||||
memory_region *cart_mem = m_cart->get_cart_memregion();
|
||||
uint8_t *base = cart_mem->base();
|
||||
u8 *base = cart_mem->base();
|
||||
offs_t read_length, cart_length = cart_mem->bytes();
|
||||
|
||||
if (!loaded_through_softlist())
|
||||
@ -530,7 +530,7 @@ void device_cococart_interface::interface_pre_start()
|
||||
// on the cartridge slot was asserted ($C000-FFEF)
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(device_cococart_interface::cts_read)
|
||||
u8 device_cococart_interface::cts_read(offs_t offset)
|
||||
{
|
||||
return 0x00;
|
||||
}
|
||||
@ -541,7 +541,7 @@ READ8_MEMBER(device_cococart_interface::cts_read)
|
||||
// on the cartridge slot was asserted ($C000-FFEF)
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(device_cococart_interface::cts_write)
|
||||
void device_cococart_interface::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ WRITE8_MEMBER(device_cococart_interface::cts_write)
|
||||
// on the cartridge slot was asserted ($FF40-5F)
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(device_cococart_interface::scs_read)
|
||||
u8 device_cococart_interface::scs_read(offs_t offset)
|
||||
{
|
||||
return 0x00;
|
||||
}
|
||||
@ -562,7 +562,7 @@ READ8_MEMBER(device_cococart_interface::scs_read)
|
||||
// on the cartridge slot was asserted ($FF40-5F)
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(device_cococart_interface::scs_write)
|
||||
void device_cococart_interface::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
}
|
||||
|
||||
@ -580,7 +580,7 @@ void device_cococart_interface::set_sound_enable(bool sound_enable)
|
||||
// get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* device_cococart_interface::get_cart_base()
|
||||
u8 *device_cococart_interface::get_cart_base()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@ -590,7 +590,7 @@ uint8_t* device_cococart_interface::get_cart_base()
|
||||
// get_cart_size
|
||||
//-------------------------------------------------
|
||||
|
||||
uint32_t device_cococart_interface::get_cart_size()
|
||||
u32 device_cococart_interface::get_cart_size()
|
||||
{
|
||||
return 0x8000;
|
||||
}
|
||||
@ -626,7 +626,7 @@ void device_cococart_interface::cart_base_changed(void)
|
||||
get_cart_memregion
|
||||
-------------------------------------------------*/
|
||||
|
||||
memory_region* device_cococart_interface::get_cart_memregion()
|
||||
memory_region *device_cococart_interface::get_cart_memregion()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
// ======================> cococart_base_update_delegate
|
||||
|
||||
// direct region update handler
|
||||
typedef delegate<void (uint8_t *)> cococart_base_update_delegate;
|
||||
typedef delegate<void (u8 *)> cococart_base_update_delegate;
|
||||
|
||||
|
||||
// ======================> cococart_slot_device
|
||||
@ -53,7 +53,7 @@ public:
|
||||
|
||||
// construction/destruction
|
||||
template <typename T>
|
||||
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
|
||||
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt)
|
||||
: cococart_slot_device(mconfig, tag, owner, clock)
|
||||
{
|
||||
option_reset();
|
||||
@ -61,7 +61,7 @@ public:
|
||||
set_default_option(dflt);
|
||||
set_fixed(false);
|
||||
}
|
||||
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
auto cart_callback() { return m_cart_callback.bind(); }
|
||||
auto nmi_callback() { return m_nmi_callback.bind(); }
|
||||
@ -89,12 +89,12 @@ public:
|
||||
virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override;
|
||||
|
||||
// reading and writing to $C000-$FFEF
|
||||
DECLARE_READ8_MEMBER(cts_read);
|
||||
DECLARE_WRITE8_MEMBER(cts_write);
|
||||
u8 cts_read(offs_t offset);
|
||||
void cts_write(offs_t offset, u8 data);
|
||||
|
||||
// reading and writing to $FF40-$FF5F
|
||||
DECLARE_READ8_MEMBER(scs_read);
|
||||
DECLARE_WRITE8_MEMBER(scs_write);
|
||||
u8 scs_read(offs_t offset);
|
||||
void scs_write(offs_t offset, u8 data);
|
||||
|
||||
// manipulation of cartridge lines
|
||||
void set_line_value(line line, line_value value);
|
||||
@ -105,8 +105,8 @@ public:
|
||||
void twiddle_q_lines();
|
||||
|
||||
// cart base
|
||||
uint8_t *get_cart_base();
|
||||
virtual uint32_t get_cart_size();
|
||||
u8 *get_cart_base();
|
||||
u32 get_cart_size();
|
||||
void set_cart_base_update(cococart_base_update_delegate update);
|
||||
|
||||
private:
|
||||
@ -165,16 +165,16 @@ public:
|
||||
// construction/destruction
|
||||
virtual ~device_cococart_interface();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read);
|
||||
virtual DECLARE_WRITE8_MEMBER(cts_write);
|
||||
virtual DECLARE_READ8_MEMBER(scs_read);
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write);
|
||||
virtual u8 cts_read(offs_t offset);
|
||||
virtual void cts_write(offs_t offset, u8 data);
|
||||
virtual u8 scs_read(offs_t offset);
|
||||
virtual void scs_write(offs_t offset, u8 data);
|
||||
virtual void set_sound_enable(bool sound_enable);
|
||||
|
||||
virtual uint8_t* get_cart_base();
|
||||
virtual uint32_t get_cart_size();
|
||||
virtual u8 *get_cart_base();
|
||||
virtual u32 get_cart_size();
|
||||
void set_cart_base_update(cococart_base_update_delegate update);
|
||||
virtual memory_region* get_cart_memregion();
|
||||
virtual memory_region *get_cart_memregion();
|
||||
|
||||
protected:
|
||||
virtual void interface_config_complete() override;
|
||||
|
@ -53,7 +53,7 @@ INPUT_PORTS_END
|
||||
// dragon_amtor_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dragon_amtor_device::dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_amtor_device::dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, DRAGON_AMTOR, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this)
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -93,7 +93,7 @@ const tiny_rom_entry *dragon_amtor_device::device_rom_region() const
|
||||
// dragon_amtor_device::get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* dragon_amtor_device::get_cart_base()
|
||||
u8 *dragon_amtor_device::get_cart_base()
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
@ -102,7 +102,7 @@ uint8_t* dragon_amtor_device::get_cart_base()
|
||||
// dragon_amtor_device::get_cart_memregion
|
||||
//-------------------------------------------------
|
||||
|
||||
memory_region* dragon_amtor_device::get_cart_memregion()
|
||||
memory_region *dragon_amtor_device::get_cart_memregion()
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
@ -111,7 +111,7 @@ memory_region* dragon_amtor_device::get_cart_memregion()
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_amtor_device::cts_read)
|
||||
u8 dragon_amtor_device::cts_read(offs_t offset)
|
||||
{
|
||||
offset = bitswap<16>(offset, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 0, 1);
|
||||
|
||||
|
@ -19,7 +19,7 @@ class dragon_amtor_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
@ -28,10 +28,10 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual memory_region* get_cart_memregion() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual memory_region *get_cart_memregion() override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
|
||||
private:
|
||||
required_memory_region m_eprom;
|
||||
|
@ -96,12 +96,12 @@ namespace
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void update_lines() override;
|
||||
|
||||
@ -111,19 +111,19 @@ namespace
|
||||
required_device_array<floppy_connector, 4> m_floppies;
|
||||
|
||||
// methods
|
||||
void dskreg_w(uint8_t data);
|
||||
void dskreg_w(u8 data);
|
||||
};
|
||||
|
||||
class premier_fdc_device_base : public coco_family_fdc_device_base
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void update_lines() override;
|
||||
|
||||
@ -133,7 +133,7 @@ namespace
|
||||
required_device_array<floppy_connector, 4> m_floppies;
|
||||
|
||||
// methods
|
||||
void dskreg_w(uint8_t data);
|
||||
void dskreg_w(u8 data);
|
||||
};
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ void premier_fdc_device_base::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// dragon_fdc_device_base - constructor
|
||||
//-------------------------------------------------
|
||||
dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_family_fdc_device_base(mconfig, type, tag, owner, clock)
|
||||
, m_wd2797(*this, "wd2797")
|
||||
, m_floppies(*this, "wd2797:%u", 0)
|
||||
@ -186,7 +186,7 @@ dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, de
|
||||
}
|
||||
|
||||
|
||||
premier_fdc_device_base::premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
premier_fdc_device_base::premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: coco_family_fdc_device_base(mconfig, type, tag, owner, clock)
|
||||
, m_wd2791(*this, "wd2791")
|
||||
, m_floppies(*this, "wd2791:%u", 0)
|
||||
@ -219,7 +219,7 @@ void premier_fdc_device_base::update_lines()
|
||||
// Dragon dskreg
|
||||
//-------------------------------------------------
|
||||
|
||||
void dragon_fdc_device_base::dskreg_w(uint8_t data)
|
||||
void dragon_fdc_device_base::dskreg_w(u8 data)
|
||||
{
|
||||
if (LOG_FDC)
|
||||
{
|
||||
@ -251,7 +251,7 @@ void dragon_fdc_device_base::dskreg_w(uint8_t data)
|
||||
}
|
||||
|
||||
|
||||
void premier_fdc_device_base::dskreg_w(uint8_t data)
|
||||
void premier_fdc_device_base::dskreg_w(u8 data)
|
||||
{
|
||||
if (LOG_FDC)
|
||||
{
|
||||
@ -293,13 +293,13 @@ void premier_fdc_device_base::dskreg_w(uint8_t data)
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_fdc_device_base::cts_read)
|
||||
u8 dragon_fdc_device_base::cts_read(offs_t offset)
|
||||
{
|
||||
return memregion("eprom")->base()[offset];
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(premier_fdc_device_base::cts_read)
|
||||
u8 premier_fdc_device_base::cts_read(offs_t offset)
|
||||
{
|
||||
return memregion("eprom")->base()[offset];
|
||||
}
|
||||
@ -309,9 +309,9 @@ READ8_MEMBER(premier_fdc_device_base::cts_read)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_fdc_device_base::scs_read)
|
||||
u8 dragon_fdc_device_base::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0;
|
||||
u8 result = 0;
|
||||
switch (offset & 0xef)
|
||||
{
|
||||
case 0:
|
||||
@ -325,9 +325,9 @@ READ8_MEMBER(dragon_fdc_device_base::scs_read)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(premier_fdc_device_base::scs_read)
|
||||
u8 premier_fdc_device_base::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0;
|
||||
u8 result = 0;
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
@ -345,7 +345,7 @@ READ8_MEMBER(premier_fdc_device_base::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(dragon_fdc_device_base::scs_write)
|
||||
void dragon_fdc_device_base::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset & 0xef)
|
||||
{
|
||||
@ -363,7 +363,7 @@ WRITE8_MEMBER(dragon_fdc_device_base::scs_write)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(premier_fdc_device_base::scs_write)
|
||||
void premier_fdc_device_base::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
@ -395,7 +395,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dragon_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: dragon_fdc_device_base(mconfig, DRAGON_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -427,7 +427,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
premier_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
premier_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: premier_fdc_device_base(mconfig, PREMIER_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
@ -459,7 +459,7 @@ namespace
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sdtandy_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
sdtandy_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: dragon_fdc_device_base(mconfig, SDTANDY_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(DRAGON_JCBSND, dragon_jcbsnd_device, "dragon_jcbsnd", "Dragon
|
||||
// dragon_jcbsnd_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dragon_jcbsnd_device::dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_jcbsnd_device::dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, DRAGON_JCBSND, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this )
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -61,7 +61,7 @@ void dragon_jcbsnd_device::device_start()
|
||||
// dragon_jcbsnd_device::get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* dragon_jcbsnd_device::get_cart_base()
|
||||
u8 *dragon_jcbsnd_device::get_cart_base()
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
@ -70,7 +70,7 @@ uint8_t* dragon_jcbsnd_device::get_cart_base()
|
||||
// dragon_jcbsnd_device::get_cart_memregion
|
||||
//-------------------------------------------------
|
||||
|
||||
memory_region* dragon_jcbsnd_device::get_cart_memregion()
|
||||
memory_region *dragon_jcbsnd_device::get_cart_memregion()
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
@ -99,7 +99,7 @@ const tiny_rom_entry *dragon_jcbsnd_device::device_rom_region() const
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_jcbsnd_device::cts_read)
|
||||
u8 dragon_jcbsnd_device::cts_read(offs_t offset)
|
||||
{
|
||||
if (offset == 0x3eff)
|
||||
return m_ay8910->data_r();
|
||||
@ -111,7 +111,7 @@ READ8_MEMBER(dragon_jcbsnd_device::cts_read)
|
||||
// cts_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(dragon_jcbsnd_device::cts_write)
|
||||
void dragon_jcbsnd_device::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
if ((offset & ~1) == 0x3efe)
|
||||
m_ay8910->address_data_w(offset & 1, data);
|
||||
|
@ -20,7 +20,7 @@ class dragon_jcbsnd_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
@ -28,11 +28,11 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual memory_region* get_cart_memregion() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual memory_region *get_cart_memregion() override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(cts_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual void cts_write(offs_t offset, u8 data) override;
|
||||
|
||||
// internal state
|
||||
device_image_interface *m_cart;
|
||||
|
@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(DRAGON_JCBSPCH, dragon_jcbspch_device, "dragon_jcbspch", "Dra
|
||||
// dragon_jcbspch_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dragon_jcbspch_device::dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_jcbspch_device::dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, DRAGON_JCBSPCH, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this )
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -63,7 +63,7 @@ void dragon_jcbspch_device::device_start()
|
||||
// dragon_jcbspch_device::get_cart_base
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* dragon_jcbspch_device::get_cart_base()
|
||||
u8 *dragon_jcbspch_device::get_cart_base()
|
||||
{
|
||||
return m_eprom->base();
|
||||
}
|
||||
@ -72,7 +72,7 @@ uint8_t* dragon_jcbspch_device::get_cart_base()
|
||||
// dragon_jcbspch_device::get_cart_memregion
|
||||
//-------------------------------------------------
|
||||
|
||||
memory_region* dragon_jcbspch_device::get_cart_memregion()
|
||||
memory_region *dragon_jcbspch_device::get_cart_memregion()
|
||||
{
|
||||
return m_eprom;
|
||||
}
|
||||
@ -107,7 +107,7 @@ const tiny_rom_entry *dragon_jcbspch_device::device_rom_region() const
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_jcbspch_device::cts_read)
|
||||
u8 dragon_jcbspch_device::cts_read(offs_t offset)
|
||||
{
|
||||
return m_eprom->base()[offset & 0x0fff];
|
||||
}
|
||||
@ -116,9 +116,9 @@ READ8_MEMBER(dragon_jcbspch_device::cts_read)
|
||||
// scs_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_jcbspch_device::scs_read)
|
||||
u8 dragon_jcbspch_device::scs_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
u8 result = 0x00;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -133,7 +133,7 @@ READ8_MEMBER(dragon_jcbspch_device::scs_read)
|
||||
// scs_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(dragon_jcbspch_device::scs_write)
|
||||
void dragon_jcbspch_device::scs_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class dragon_jcbspch_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
@ -29,12 +29,12 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
virtual memory_region* get_cart_memregion() override;
|
||||
virtual u8 *get_cart_base() override;
|
||||
virtual memory_region *get_cart_memregion() override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_READ8_MEMBER(scs_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(scs_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual u8 scs_read(offs_t offset) override;
|
||||
virtual void scs_write(offs_t offset, u8 data) override;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE_LINE_MEMBER(pia_cb2_w);
|
||||
|
@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(DRAGON_SPRITES, dragon_sprites_device, "dragon_sprites", "Dra
|
||||
// dragon_sprites_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dragon_sprites_device::dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dragon_sprites_device::dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, DRAGON_SPRITES, tag, owner, clock)
|
||||
, device_cococart_interface(mconfig, *this )
|
||||
, m_eprom(*this, "eprom")
|
||||
@ -74,9 +74,9 @@ const tiny_rom_entry *dragon_sprites_device::device_rom_region() const
|
||||
// cts_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(dragon_sprites_device::cts_read)
|
||||
u8 dragon_sprites_device::cts_read(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0x00;
|
||||
u8 data = 0x00;
|
||||
switch (offset)
|
||||
{
|
||||
case 0x2000:
|
||||
@ -97,7 +97,7 @@ READ8_MEMBER(dragon_sprites_device::cts_read)
|
||||
// cts_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(dragon_sprites_device::cts_write)
|
||||
void dragon_sprites_device::cts_write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class dragon_sprites_device :
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
@ -31,8 +31,8 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(cts_read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(cts_write) override;
|
||||
virtual u8 cts_read(offs_t offset) override;
|
||||
virtual void cts_write(offs_t offset, u8 data) override;
|
||||
|
||||
private:
|
||||
required_memory_region m_eprom;
|
||||
|
@ -91,11 +91,11 @@ public:
|
||||
DECLARE_INPUT_CHANGED_MEMBER(joystick_mode_changed);
|
||||
|
||||
// IO
|
||||
virtual DECLARE_WRITE8_MEMBER( ff20_write );
|
||||
virtual DECLARE_READ8_MEMBER( ff40_read );
|
||||
virtual DECLARE_WRITE8_MEMBER( ff40_write );
|
||||
DECLARE_READ8_MEMBER( ff60_read );
|
||||
DECLARE_WRITE8_MEMBER( ff60_write );
|
||||
virtual void ff20_write(offs_t offset, uint8_t data);
|
||||
virtual uint8_t ff40_read(offs_t offset);
|
||||
virtual void ff40_write(offs_t offset, uint8_t data);
|
||||
uint8_t ff60_read(offs_t offset);
|
||||
void ff60_write(offs_t offset, uint8_t data);
|
||||
|
||||
// PIA0
|
||||
void pia0_pa_w(uint8_t data);
|
||||
|
@ -40,9 +40,9 @@ public:
|
||||
: coco_state(mconfig, type, tag)
|
||||
, m_gime(*this, GIME_TAG) { }
|
||||
|
||||
virtual DECLARE_WRITE8_MEMBER( ff20_write ) override;
|
||||
virtual DECLARE_READ8_MEMBER( ff40_read ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( ff40_write ) override;
|
||||
virtual void ff20_write(offs_t offset, uint8_t data) override;
|
||||
virtual uint8_t ff40_read(offs_t offset) override;
|
||||
virtual void ff40_write(offs_t offset, uint8_t data) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(gime_firq_w) { recalculate_firq(); }
|
||||
DECLARE_WRITE_LINE_MEMBER(gime_irq_w) { recalculate_irq(); }
|
||||
|
@ -421,7 +421,7 @@ WRITE_LINE_MEMBER( coco_state::pia0_irq_b )
|
||||
// ff20_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( coco_state::ff20_write )
|
||||
void coco_state::ff20_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
/* write to the PIA */
|
||||
pia_1().write(offset, data);
|
||||
@ -1106,7 +1106,7 @@ coco_vhd_image_device *coco_state::current_vhd()
|
||||
// ff60_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( coco_state::ff60_read )
|
||||
uint8_t coco_state::ff60_read(offs_t offset)
|
||||
{
|
||||
uint8_t result;
|
||||
|
||||
@ -1128,7 +1128,7 @@ READ8_MEMBER( coco_state::ff60_read )
|
||||
// ff60_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( coco_state::ff60_write )
|
||||
void coco_state::ff60_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
if ((current_vhd() != nullptr) && (offset >= 32) && (offset <= 37))
|
||||
{
|
||||
@ -1155,14 +1155,14 @@ WRITE8_MEMBER( coco_state::ff60_write )
|
||||
// ff40_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( coco_state::ff40_read )
|
||||
uint8_t coco_state::ff40_read(offs_t offset)
|
||||
{
|
||||
if (offset >= 1 && offset <= 2 && m_beckerportconfig.read_safe(0) == 1)
|
||||
{
|
||||
return m_beckerport->read(space, offset-1, mem_mask);
|
||||
return m_beckerport->read(offset-1);
|
||||
}
|
||||
|
||||
return m_cococart->scs_read(space, offset, mem_mask);
|
||||
return m_cococart->scs_read(offset);
|
||||
}
|
||||
|
||||
|
||||
@ -1170,14 +1170,14 @@ READ8_MEMBER( coco_state::ff40_read )
|
||||
// ff40_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( coco_state::ff40_write )
|
||||
void coco_state::ff40_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (offset >= 1 && offset <= 2 && m_beckerportconfig.read_safe(0) == 1)
|
||||
{
|
||||
return m_beckerport->write(space, offset-1, data, mem_mask);
|
||||
return m_beckerport->write(offset-1, data);
|
||||
}
|
||||
|
||||
m_cococart->scs_write(space, offset, data, mem_mask);
|
||||
m_cococart->scs_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,9 +50,9 @@
|
||||
// ff20_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( coco3_state::ff20_write )
|
||||
void coco3_state::ff20_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
coco_state::ff20_write(space, offset, data, mem_mask);
|
||||
coco_state::ff20_write(offset, data);
|
||||
|
||||
if (offset == 0x02)
|
||||
m_gime->ff22_write(data);
|
||||
@ -64,11 +64,11 @@ WRITE8_MEMBER( coco3_state::ff20_write )
|
||||
// ff40_read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( coco3_state::ff40_read )
|
||||
uint8_t coco3_state::ff40_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
if (m_gime->spare_chip_select_enabled())
|
||||
result = coco_state::ff40_read(space, offset, mem_mask);
|
||||
result = coco_state::ff40_read(offset);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -78,10 +78,10 @@ READ8_MEMBER( coco3_state::ff40_read )
|
||||
// ff40_write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( coco3_state::ff40_write )
|
||||
void coco3_state::ff40_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_gime->spare_chip_select_enabled())
|
||||
coco_state::ff40_write(space, offset, data, mem_mask);
|
||||
coco_state::ff40_write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user