diff options
Diffstat (limited to 'src/devices/bus/electron/plus1.h')
-rw-r--r-- | src/devices/bus/electron/plus1.h | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/src/devices/bus/electron/plus1.h b/src/devices/bus/electron/plus1.h index e211594a2c6..cd0cb1b05dd 100644 --- a/src/devices/bus/electron/plus1.h +++ b/src/devices/bus/electron/plus1.h @@ -11,10 +11,11 @@ #define MAME_BUS_ELECTRON_PLUS1_H #include "exp.h" -#include "softlist.h" #include "machine/adc0844.h" #include "bus/centronics/ctronics.h" #include "bus/electron/cart/slot.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" //************************************************************************** // TYPE DEFINITIONS @@ -29,6 +30,8 @@ public: electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: + electron_plus1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device-level overrides virtual void device_start() override; @@ -40,11 +43,6 @@ protected: virtual uint8_t expbus_r(offs_t offset) override; virtual void expbus_w(offs_t offset, uint8_t data) override; -private: - u8 status_r(); - DECLARE_WRITE_LINE_MEMBER(busy_w); - DECLARE_WRITE_LINE_MEMBER(ready_w); - required_memory_region m_exp_rom; required_device<electron_cartslot_device> m_cart_sk1; required_device<electron_cartslot_device> m_cart_sk2; @@ -60,8 +58,56 @@ private: }; +class electron_ap1_device : public electron_plus1_device +{ +public: + electron_ap1_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + +protected: + // optional information overrides + virtual const tiny_rom_entry* device_rom_region() const override; +}; + + +class electron_ap6_device : public electron_plus1_device +{ +public: + electron_ap6_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + +protected: + // device-level overrides + virtual void device_start() override; + + // 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 expbus_r(offs_t offset) override; + virtual void expbus_w(offs_t offset, uint8_t data) override; + +private: + image_init_result load_rom(device_image_interface &image, generic_slot_device *slot); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom1_load) { return load_rom(image, m_rom[0]); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom2_load) { return load_rom(image, m_rom[1]); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom3_load) { return load_rom(image, m_rom[2]); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom4_load) { return load_rom(image, m_rom[3]); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom5_load) { return load_rom(image, m_rom[4]); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom6_load) { return load_rom(image, m_rom[5]); } + + required_device_array<generic_slot_device, 6> m_rom; + required_ioport m_links; + + std::unique_ptr<uint8_t[]> m_ram; + bool m_bank_locked[2]; +}; + + + // device type definition DECLARE_DEVICE_TYPE(ELECTRON_PLUS1, electron_plus1_device) +DECLARE_DEVICE_TYPE(ELECTRON_AP1, electron_ap1_device) +DECLARE_DEVICE_TYPE(ELECTRON_AP6, electron_ap6_device) #endif /* MAME_BUS_ELECTRON_PLUS1_H */ |