summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/amstrad.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/amstrad.h')
-rw-r--r--src/mame/includes/amstrad.h58
1 files changed, 12 insertions, 46 deletions
diff --git a/src/mame/includes/amstrad.h b/src/mame/includes/amstrad.h
index ac333140579..55799d9f58f 100644
--- a/src/mame/includes/amstrad.h
+++ b/src/mame/includes/amstrad.h
@@ -145,27 +145,10 @@ public:
m_rtc(*this, "rtc"),
m_region_maincpu(*this, "maincpu"),
m_region_user1(*this, "user1"),
- m_bank1(*this, "bank1"),
- m_bank2(*this, "bank2"),
- m_bank3(*this, "bank3"),
- m_bank4(*this, "bank4"),
- m_bank5(*this, "bank5"),
- m_bank6(*this, "bank6"),
- m_bank7(*this, "bank7"),
- m_bank8(*this, "bank8"),
- m_bank9(*this, "bank9"),
- m_bank10(*this, "bank10"),
- m_bank11(*this, "bank11"),
- m_bank12(*this, "bank12"),
- m_bank13(*this, "bank13"),
- m_bank14(*this, "bank14"),
- m_bank15(*this, "bank15"),
- m_bank16(*this, "bank16"),
- m_io_kbrow(*this, "kbrow.%u", 0),
- m_io_analog(*this, "analog.%u", 0),
- m_io_mouse1(*this,"mouse_input1"),
- m_io_mouse2(*this,"mouse_input2"),
- m_io_mouse3(*this,"mouse_input3"),
+ m_banks(*this, "bank%u", 1U),
+ m_io_kbrow(*this, "kbrow.%u", 0U),
+ m_io_analog(*this, "analog.%u", 0U),
+ m_io_mouse(*this,"mouse_input%u", 1U),
m_io_solder_links(*this, "solder_links"),
m_io_green_display(*this, "green_display"),
m_io_ctrltype(*this,"controller_type"),
@@ -221,19 +204,19 @@ public:
DECLARE_MACHINE_START(amstrad);
DECLARE_MACHINE_RESET(amstrad);
DECLARE_VIDEO_START(amstrad);
- DECLARE_PALETTE_INIT(amstrad_cpc);
- DECLARE_PALETTE_INIT(amstrad_cpc_green);
+ void amstrad_cpc_palette(palette_device &palette) const;
+ void amstrad_cpc_green_palette(palette_device &palette) const;
DECLARE_MACHINE_START(plus);
DECLARE_MACHINE_RESET(plus);
- DECLARE_PALETTE_INIT(amstrad_plus);
+ void amstrad_plus_palette(palette_device &palette) const;
DECLARE_MACHINE_START(gx4000);
DECLARE_MACHINE_RESET(gx4000);
DECLARE_MACHINE_START(kccomp);
DECLARE_MACHINE_RESET(kccomp);
- DECLARE_PALETTE_INIT(kccomp);
+ void kccomp_palette(palette_device &palette) const;
DECLARE_MACHINE_START(aleste);
DECLARE_MACHINE_RESET(aleste);
- DECLARE_PALETTE_INIT(aleste);
+ void aleste_palette(palette_device &palette) const;
uint32_t screen_update_amstrad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_amstrad);
DECLARE_INPUT_CHANGED_MEMBER(cpc_monitor_changed);
@@ -280,27 +263,10 @@ public:
protected:
required_memory_region m_region_maincpu;
optional_memory_region m_region_user1;
- required_memory_bank m_bank1;
- required_memory_bank m_bank2;
- required_memory_bank m_bank3;
- required_memory_bank m_bank4;
- required_memory_bank m_bank5;
- required_memory_bank m_bank6;
- required_memory_bank m_bank7;
- required_memory_bank m_bank8;
- required_memory_bank m_bank9;
- required_memory_bank m_bank10;
- required_memory_bank m_bank11;
- required_memory_bank m_bank12;
- required_memory_bank m_bank13;
- required_memory_bank m_bank14;
- required_memory_bank m_bank15;
- required_memory_bank m_bank16;
+ required_memory_bank_array<16> m_banks;
optional_ioport_array<11> m_io_kbrow;
optional_ioport_array<4> m_io_analog;
- optional_ioport m_io_mouse1;
- optional_ioport m_io_mouse2;
- optional_ioport m_io_mouse3;
+ optional_ioport_array<3> m_io_mouse;
required_ioport m_io_solder_links;
required_ioport m_io_green_display;
optional_ioport m_io_ctrltype;
@@ -330,7 +296,7 @@ protected:
void update_psg();
void amstrad_common_init();
void enumerate_roms();
- unsigned char kccomp_get_colour_element(int colour_value);
+ static uint8_t kccomp_get_colour_element(int colour_value);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
int m_centronics_busy;