mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
(MESS) ql: Expansions WIP. (nw)
This commit is contained in:
parent
2b58338233
commit
61742dfb4c
@ -85,6 +85,7 @@ void ql_expansion_slot_t::device_start()
|
||||
SLOT_INTERFACE_START( ql_expansion_cards )
|
||||
SLOT_INTERFACE("sdisk", SANDY_SUPER_DISK)
|
||||
SLOT_INTERFACE("sqboard", SANDY_SUPERQBOARD)
|
||||
SLOT_INTERFACE("sqboard512k", SANDY_SUPERQBOARD_512K)
|
||||
SLOT_INTERFACE("trump", QL_TRUMP_CARD)
|
||||
SLOT_INTERFACE("trump256k", QL_TRUMP_CARD_256K)
|
||||
SLOT_INTERFACE("trump512k", QL_TRUMP_CARD_512K)
|
||||
|
@ -115,7 +115,7 @@ machine_config_constructor sandy_super_disk_t::device_mconfig_additions() const
|
||||
//-------------------------------------------------
|
||||
|
||||
sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "sandy_super_disk", __FILE__),
|
||||
device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "ql_sdisk", __FILE__),
|
||||
device_ql_expansion_card_interface(mconfig, *this),
|
||||
m_fdc(*this, WD1772_TAG),
|
||||
m_floppy0(*this, WD1772_TAG":0"),
|
||||
@ -134,6 +134,9 @@ sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char
|
||||
|
||||
void sandy_super_disk_t::device_start()
|
||||
{
|
||||
// state saving
|
||||
save_item(NAME(m_busy));
|
||||
save_item(NAME(m_fd6));
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,6 +9,14 @@
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
- mouse
|
||||
|
||||
*/
|
||||
|
||||
#include "sandy_superqboard.h"
|
||||
|
||||
|
||||
@ -28,6 +36,7 @@
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SANDY_SUPERQBOARD = &device_creator<sandy_superqboard_t>;
|
||||
const device_type SANDY_SUPERQBOARD_512K = &device_creator<sandy_superqboard_512k_t>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -125,7 +134,7 @@ machine_config_constructor sandy_superqboard_t::device_mconfig_additions() const
|
||||
//-------------------------------------------------
|
||||
|
||||
sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SANDY_SUPERQBOARD, "Sandy SuperQBoard", tag, owner, clock, "sandy_superqboard", __FILE__),
|
||||
device_t(mconfig, SANDY_SUPERQBOARD, "Sandy SuperQBoard 256K", tag, owner, clock, "ql_sqboard", __FILE__),
|
||||
device_ql_expansion_card_interface(mconfig, *this),
|
||||
m_fdc(*this, WD1772_TAG),
|
||||
m_floppy0(*this, WD1772_TAG":0"),
|
||||
@ -134,6 +143,7 @@ sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const ch
|
||||
m_latch(*this, TTL74273_TAG),
|
||||
m_rom(*this, "rom"),
|
||||
m_ram(*this, "ram"),
|
||||
m_ram_size(256*1024),
|
||||
m_busy(1),
|
||||
m_int2(0),
|
||||
m_int3(0),
|
||||
@ -142,6 +152,28 @@ sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const ch
|
||||
{
|
||||
}
|
||||
|
||||
sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size) :
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
|
||||
device_ql_expansion_card_interface(mconfig, *this),
|
||||
m_fdc(*this, WD1772_TAG),
|
||||
m_floppy0(*this, WD1772_TAG":0"),
|
||||
m_floppy1(*this, WD1772_TAG":1"),
|
||||
m_centronics(*this, CENTRONICS_TAG),
|
||||
m_latch(*this, TTL74273_TAG),
|
||||
m_rom(*this, "rom"),
|
||||
m_ram(*this, "ram"),
|
||||
m_ram_size(ram_size),
|
||||
m_busy(1),
|
||||
m_int2(0),
|
||||
m_int3(0),
|
||||
m_fd6(0),
|
||||
m_fd7(0)
|
||||
{
|
||||
}
|
||||
|
||||
sandy_superqboard_512k_t::sandy_superqboard_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: sandy_superqboard_t(mconfig, SANDY_SUPERQBOARD_512K, "Sandy SuperQBoard 512K", tag, owner, clock, "ql_sqboard", __FILE__, 512*1024) { }
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
@ -149,6 +181,15 @@ sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const ch
|
||||
|
||||
void sandy_superqboard_t::device_start()
|
||||
{
|
||||
// allocate memory
|
||||
m_ram.allocate(m_ram_size);
|
||||
|
||||
// state saving
|
||||
save_item(NAME(m_busy));
|
||||
save_item(NAME(m_int2));
|
||||
save_item(NAME(m_int3));
|
||||
save_item(NAME(m_fd6));
|
||||
save_item(NAME(m_fd7));
|
||||
}
|
||||
|
||||
|
||||
@ -216,6 +257,14 @@ UINT8 sandy_superqboard_t::read(address_space &space, offs_t offset, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
if (offset >= 0x60000 && offset < 0xc0000)
|
||||
{
|
||||
if ((offset - 0x60000) < m_ram_size)
|
||||
{
|
||||
data = m_ram[offset - 0x60000];
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -298,6 +347,14 @@ void sandy_superqboard_t::write(address_space &space, offs_t offset, UINT8 data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (offset >= 0x60000 && offset < 0xc0000)
|
||||
{
|
||||
if ((offset - 0x60000) < m_ram_size)
|
||||
{
|
||||
m_ram[offset - 0x60000] = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sandy_superqboard_t::check_interrupt()
|
||||
|
@ -25,7 +25,7 @@
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sandy_superqboard_device
|
||||
// ======================> sandy_superqboard_t
|
||||
|
||||
class sandy_superqboard_t : public device_t,
|
||||
public device_ql_expansion_card_interface
|
||||
@ -33,6 +33,7 @@ class sandy_superqboard_t : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
sandy_superqboard_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size);
|
||||
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
@ -62,6 +63,7 @@ private:
|
||||
required_memory_region m_rom;
|
||||
optional_shared_ptr<UINT8> m_ram;
|
||||
|
||||
int m_ram_size;
|
||||
int m_busy;
|
||||
int m_int2;
|
||||
int m_int3;
|
||||
@ -70,8 +72,19 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// ======================> sandy_superqboard_512k_t
|
||||
|
||||
class sandy_superqboard_512k_t : public sandy_superqboard_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sandy_superqboard_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type SANDY_SUPERQBOARD;
|
||||
extern const device_type SANDY_SUPERQBOARD_512K;
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,14 @@
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
- RAM always 128KB on boot screen
|
||||
|
||||
*/
|
||||
|
||||
#include "trumpcard.h"
|
||||
|
||||
|
||||
@ -115,7 +123,7 @@ machine_config_constructor ql_trump_card_t::device_mconfig_additions() const
|
||||
//-------------------------------------------------
|
||||
|
||||
ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "trump", __FILE__),
|
||||
device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "ql_trump", __FILE__),
|
||||
device_ql_expansion_card_interface(mconfig, *this),
|
||||
m_fdc(*this, WD1772_TAG),
|
||||
m_floppy0(*this, WD1772_TAG":0"),
|
||||
@ -127,7 +135,7 @@ ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag,
|
||||
}
|
||||
|
||||
ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size) :
|
||||
device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "trump", __FILE__),
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
|
||||
device_ql_expansion_card_interface(mconfig, *this),
|
||||
m_fdc(*this, WD1772_TAG),
|
||||
m_floppy0(*this, WD1772_TAG":0"),
|
||||
@ -139,13 +147,13 @@ ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, device_type type
|
||||
}
|
||||
|
||||
ql_trump_card_256k_t::ql_trump_card_256k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_256K, "QL Trump Card 256K", tag, owner, clock, "trump256k", __FILE__, 256*1024) { }
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_256K, "QL Trump Card 256K", tag, owner, clock, "ql_trump", __FILE__, 256*1024) { }
|
||||
|
||||
ql_trump_card_512k_t::ql_trump_card_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_512K, "QL Trump Card 512K", tag, owner, clock, "trump512k", __FILE__, 512*1024) { }
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_512K, "QL Trump Card 512K", tag, owner, clock, "ql_trump", __FILE__, 512*1024) { }
|
||||
|
||||
ql_trump_card_768k_t::ql_trump_card_768k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_768K, "QL Trump Card 768K", tag, owner, clock, "trump768k", __FILE__, 768*1024) { }
|
||||
: ql_trump_card_t(mconfig, QL_TRUMP_CARD_768K, "QL Trump Card 768K", tag, owner, clock, "ql_trump", __FILE__, 768*1024) { }
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -154,7 +162,12 @@ ql_trump_card_768k_t::ql_trump_card_768k_t(const machine_config &mconfig, const
|
||||
|
||||
void ql_trump_card_t::device_start()
|
||||
{
|
||||
// allocate memory
|
||||
m_ram.allocate(m_ram_size);
|
||||
|
||||
// state saving
|
||||
save_item(NAME(m_rom_en));
|
||||
save_item(NAME(m_ram_en));
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,11 +17,6 @@
|
||||
// MACROS / CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define QL_CONFIG_PORT "config"
|
||||
#define QIMI_PORT_MASK 0x01
|
||||
#define QIMI_NONE 0x00
|
||||
#define QIMI_MOUSE 0x01
|
||||
|
||||
#define MOUSEX_TAG "MOUSEX"
|
||||
#define MOUSEY_TAG "MOUSEY"
|
||||
#define MOUSEB_TAG "MOUSEB"
|
||||
@ -58,11 +53,6 @@ const device_type QIMI = &device_creator<qimi_t>;
|
||||
//-------------------------------------------------
|
||||
|
||||
INPUT_PORTS_START( qimi )
|
||||
PORT_START(QL_CONFIG_PORT)
|
||||
PORT_CONFNAME( QIMI_PORT_MASK, QIMI_NONE, "QIMI enabled")
|
||||
PORT_CONFSETTING( QIMI_NONE, "No" )
|
||||
PORT_CONFSETTING( QIMI_MOUSE, "Yes" )
|
||||
|
||||
PORT_START(MOUSEX_TAG)
|
||||
PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1)
|
||||
|
||||
@ -100,8 +90,7 @@ qimi_t::qimi_t(const machine_config &mconfig, const char *tag, device_t *owner,
|
||||
m_write_extint(*this),
|
||||
m_mousex(*this, MOUSEX_TAG),
|
||||
m_mousey(*this, MOUSEY_TAG),
|
||||
m_mouseb(*this, MOUSEB_TAG),
|
||||
m_config(*this, QL_CONFIG_PORT)
|
||||
m_mouseb(*this, MOUSEB_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,6 @@ private:
|
||||
required_ioport m_mousex;
|
||||
required_ioport m_mousey;
|
||||
required_ioport m_mouseb;
|
||||
required_ioport m_config;
|
||||
|
||||
UINT8 m_mouse_int;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user