diff --git a/src/mame/sinclair/atm.cpp b/src/mame/sinclair/atm.cpp index 9d5452d5041..1a355649658 100644 --- a/src/mame/sinclair/atm.cpp +++ b/src/mame/sinclair/atm.cpp @@ -431,8 +431,6 @@ void atm_state::machine_start() ram_pages_mask = (m_ram->size() - 1) / 0x4000; m_bank_ram[0]->configure_entries(0, ram_pages_mask + 1, m_ram->pointer(), 0x4000); - - m_maincpu->space(AS_PROGRAM).specific(m_program); } void atm_state::machine_reset() diff --git a/src/mame/sinclair/atm.h b/src/mame/sinclair/atm.h index c04285a083a..e0903469d25 100644 --- a/src/mame/sinclair/atm.h +++ b/src/mame/sinclair/atm.h @@ -83,7 +83,6 @@ protected: memory_view m_io_view; required_memory_bank_array<4> m_bank_rom; optional_region_ptr m_char_rom; // required for ATM2, absent in ATM1 - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; required_device m_beta; required_device m_ata; diff --git a/src/mame/sinclair/chloe.cpp b/src/mame/sinclair/chloe.cpp index f7fdade4a09..c8af1e9d9e5 100644 --- a/src/mame/sinclair/chloe.cpp +++ b/src/mame/sinclair/chloe.cpp @@ -101,8 +101,6 @@ private: INTERRUPT_GEN_MEMBER(chloe_interrupt); memory_access<8, 0, 0, ENDIANNESS_LITTLE>::specific m_uno_regs; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; memory_bank_array_creator<8> m_bank_ram; memory_view m_bank0_view, m_bank1_view; required_device m_regs_map; @@ -838,8 +836,6 @@ void chloe_state::machine_start() m_irq_raster_off_timer = timer_alloc(FUNC(chloe_state::raster_irq_off), this); m_regs_map->space(AS_PROGRAM).specific(m_uno_regs); - m_maincpu->space(AS_PROGRAM).specific(m_program); - m_maincpu->space(AS_IO).specific(m_io); for (int i = 0; i < 8; i++) { diff --git a/src/mame/sinclair/pentagon.cpp b/src/mame/sinclair/pentagon.cpp index fcf51472d8f..8cbc4e7daa5 100644 --- a/src/mame/sinclair/pentagon.cpp +++ b/src/mame/sinclair/pentagon.cpp @@ -46,8 +46,6 @@ private: void pentagon_io(address_map &map) ATTR_COLD; void pentagon_mem(address_map &map) ATTR_COLD; void pentagon_switch(address_map &map) ATTR_COLD; - - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; }; class pent1024_state : public pentagon_state @@ -158,7 +156,6 @@ void pentagon_state::machine_start() { spectrum_128_state::machine_start(); m_bank_rom[0]->configure_entries(3, 1, memregion("beta:beta")->base(), 0x4000); - m_maincpu->space(AS_PROGRAM).specific(m_program); } void pentagon_state::machine_reset() diff --git a/src/mame/sinclair/scorpion.cpp b/src/mame/sinclair/scorpion.cpp index eca6935acec..901f420beb1 100644 --- a/src/mame/sinclair/scorpion.cpp +++ b/src/mame/sinclair/scorpion.cpp @@ -67,7 +67,6 @@ protected: virtual void do_nmi(); void update_io(bool dos_enable); - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_view m_bank0_rom; memory_view m_io_shadow_view; required_device m_beta; @@ -387,8 +386,6 @@ void scorpion_state::machine_start() save_item(NAME(m_ay_selected)); save_item(NAME(m_ram_banks)); - m_maincpu->space(AS_PROGRAM).specific(m_program); - // reconfigure ROMs memory_region *rom = memregion("maincpu"); m_bank_rom[0]->configure_entries(0, rom->bytes() / 0x4000, rom->base() + 0x10000, 0x4000); diff --git a/src/mame/sinclair/spec128.cpp b/src/mame/sinclair/spec128.cpp index 8895627ffcb..c6a1c4353d2 100644 --- a/src/mame/sinclair/spec128.cpp +++ b/src/mame/sinclair/spec128.cpp @@ -161,9 +161,9 @@ resulting mess can be seen in the F4 viewer display. #include "formats/tzx_cas.h" -/****************************************************************************************************/ -/* Spectrum 128 specific functions */ - +/**************************************************************************** + * Spectrum 128 specific functions + ****************************************************************************/ void spectrum_128_state::video_start() { spectrum_state::video_start(); @@ -180,7 +180,7 @@ uint8_t spectrum_128_state::spectrum_128_pre_opcode_fetch_r(offs_t offset) enable paged ROM and then fetches at 0700 to disable it */ m_exp->pre_opcode_fetch(offset); - uint8_t retval = m_maincpu->space(AS_PROGRAM).read_byte(offset); + uint8_t retval = m_program.read_byte(offset); m_exp->post_opcode_fetch(offset); return retval; } @@ -205,6 +205,7 @@ template void spectrum_128_state::spectrum_128_ram_w(offs_t offset, u8 ((u8*)m_bank_ram[Bank]->base())[offset] = data; } + // Base 128 models typically don't share RAM in bank0. Reserved for extension in 256+. template void spectrum_128_state::spectrum_128_ram_w<0>(offs_t offset, u8 data); @@ -216,23 +217,22 @@ template u8 spectrum_128_state::spectrum_128_ram_r(offs_t offset) return ((u8*)m_bank_ram[Bank]->base())[offset]; } +// D0-D2: RAM page located at 0x0c000-0x0ffff +// D3: Screen select (screen 0 in ram page 5, screen 1 in ram page 7 +// D4: ROM select - which rom paged into 0x0000-0x03fff +// D5: Disable paging void spectrum_128_state::spectrum_128_port_7ffd_w(offs_t offset, uint8_t data) { if (is_contended(offset)) content_early(); content_early(1); - /* D0-D2: RAM page located at 0x0c000-0x0ffff */ - /* D3 - Screen select (screen 0 in ram page 5, screen 1 in ram page 7 */ - /* D4 - ROM select - which rom paged into 0x0000-0x03fff */ - /* D5 - Disable paging */ - - /* disable paging? */ + // disable paging? if (m_port_7ffd_data & 0x20) return; - /* store new state */ + // store new state m_port_7ffd_data = data; - /* update memory */ + // update memory spectrum_128_update_memory(); m_exp->iorq_w(offset | 1, data); @@ -241,7 +241,7 @@ void spectrum_128_state::spectrum_128_port_7ffd_w(offs_t offset, uint8_t data) void spectrum_128_state::spectrum_128_update_memory() { m_bank_rom[0]->set_entry(BIT(m_port_7ffd_data, 4)); - /* select ram at 0x0c000-0x0ffff */ + // select ram at 0x0c000-0x0ffff m_bank_ram[3]->set_entry(m_port_7ffd_data & 0x07); m_screen->update_now(); @@ -288,13 +288,74 @@ void spectrum_128_state::spectrum_128_fetch(address_map &map) map(0x0000, 0xffff).r(FUNC(spectrum_128_state::spectrum_128_pre_opcode_fetch_r)); } +static INPUT_PORTS_START( spec_plus_joys ) + PORT_START("JOY2") // 0xF7FE + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_X_LEFT_SWITCH) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_Y_UP_SWITCH) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON1) + + PORT_START("JOY1") // 0xEFFE + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) PORT_CODE(JOYCODE_BUTTON1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_Y_UP_SWITCH) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_X_LEFT_SWITCH) +INPUT_PORTS_END + +/* These keys need not to be mapped in natural mode because Spectrum+ supports both these and the Spectrum sequences above. + Hence, we can simply keep using such sequences in natural keyboard emulation */ +INPUT_PORTS_START( spec128 ) + PORT_INCLUDE( spectrum ) + + PORT_START("PLUS0") // Spectrum+ Keys (Same as CAPS + 1-5) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EDIT") PORT_CODE(KEYCODE_INSERT) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRUE VID") PORT_CODE(KEYCODE_HOME) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INV VID") PORT_CODE(KEYCODE_END) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Left") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("PLUS1") // Spectrum+ Keys (Same as CAPS + 6-0) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_LALT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Right") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Up") PORT_CODE(KEYCODE_UP) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Down") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("PLUS2") // Spectrum+ Keys (Same as CAPS + SPACE and CAPS + SYMBOL) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_PAUSE) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EXT MODE") PORT_CODE(KEYCODE_LCONTROL) + PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("PLUS3") // Spectrum+ Keys (Same as SYMBOL SHIFT + O/P) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\"") PORT_CODE(KEYCODE_QUOTE) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) + PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("PLUS4") // Spectrum+ Keys (Same as SYMBOL SHIFT + N/M) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) + PORT_BIT(0xf3, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + +INPUT_PORTS_START( spec_plus ) + PORT_INCLUDE( spec128 ) + PORT_INCLUDE( spec_plus_joys ) +INPUT_PORTS_END + void spectrum_128_state::machine_start() { spectrum_state::machine_start(); save_item(NAME(m_port_7ffd_data)); - /* rom 0 is 128K rom, rom 1 is 48 BASIC */ + m_maincpu->space(AS_PROGRAM).specific(m_program); + m_maincpu->space(AS_IO).specific(m_io); + + // rom 0 is 128K rom, rom 1 is 48 BASIC memory_region *rom = memregion("maincpu"); m_bank_rom[0]->configure_entries(0, 2, rom->base() + 0x10000, 0x4000); @@ -302,15 +363,15 @@ void spectrum_128_state::machine_start() for (auto i = 1; i < 4; i++) m_bank_ram[i]->configure_entries(0, ram_entries, m_ram->pointer(), 0x4000); - m_bank_ram[1]->set_entry(ram_entries > 5 ? 5 : (ram_entries - 1)); /* Bank 5 is always in 0x4000 - 0x7fff */ - m_bank_ram[2]->set_entry(2); /* Bank 2 is always in 0x8000 - 0xbfff */ + m_bank_ram[1]->set_entry(ram_entries > 5 ? 5 : (ram_entries - 1)); // Bank 5 is always in 0x4000 - 0x7fff + m_bank_ram[2]->set_entry(2); // Bank 2 is always in 0x8000 - 0xbfff } void spectrum_128_state::machine_reset() { spectrum_state::machine_reset(); - /* set initial ram config */ + // set initial ram config m_port_7ffd_data = 0; spectrum_128_update_memory(); } @@ -329,13 +390,13 @@ bool spectrum_128_state::is_contended(offs_t offset) { static const gfx_layout spectrum_charlayout = { - 8, 8, /* 8 x 8 characters */ - 96, /* 96 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - {STEP8(0, 1)}, /* x offsets */ - {STEP8(0, 8)}, /* y offsets */ - 8*8 /* every char takes 8 bytes */ + 8, 8, // 8 x 8 characters + 96, // 96 characters + 1, // 1 bits per pixel + { 0 }, // no bitplanes + {STEP8(0, 1)}, // x offsets + {STEP8(0, 8)}, // y offsets + 8*8 // every char takes 8 bytes }; static GFXDECODE_START( spec128 ) @@ -361,23 +422,23 @@ void spectrum_128_state::spectrum_128(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60)); - /* video hardware */ + // video hardware rectangle visarea = { get_screen_area().left() - SPEC_LEFT_BORDER, get_screen_area().right() + SPEC_RIGHT_BORDER, get_screen_area().top() - SPEC_TOP_BORDER, get_screen_area().bottom() + SPEC_BOTTOM_BORDER }; m_screen->set_raw(X1_128_SINCLAIR / 5, SPEC128_CYCLES_PER_LINE * 2, SPEC128_UNSEEN_LINES + SPEC_SCREEN_HEIGHT, visarea); subdevice("gfxdecode")->set_info(spec128); - /* sound hardware */ + // sound hardware AY8912(config, "ay8912", X1_128_SINCLAIR / 20).add_route(ALL_OUTPUTS, "mono", 0.25); - /* expansion port */ + // expansion port SPECTRUM_EXPANSION_SLOT(config.replace(), m_exp, spec128_expansion_devices, nullptr); m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); m_exp->fb_r_handler().set(FUNC(spectrum_128_state::floating_bus_r)); - /* internal ram */ + // internal ram m_ram->set_default_size("128K"); } diff --git a/src/mame/sinclair/spec128.h b/src/mame/sinclair/spec128.h index 819a7502978..1422c3d74db 100644 --- a/src/mame/sinclair/spec128.h +++ b/src/mame/sinclair/spec128.h @@ -28,6 +28,8 @@ public: protected: memory_bank_array_creator<1> m_bank_rom; memory_bank_array_creator<4> m_bank_ram; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; virtual void video_start() override ATTR_COLD; virtual void machine_start() override ATTR_COLD; @@ -60,7 +62,7 @@ private: #define X1_128_AMSTRAD 35'469'000 // Main clock (Amstrad 128K model, +2A?) #define X1_128_SINCLAIR 35.469_MHz_XTAL // Main clock (Sinclair 128K model) -/* 128K machines take an extra 4 cycles per scan line - add this to retrace */ +// 128K machines take an extra 4 cycles per scan line - add this to retrace #define SPEC128_UNSEEN_LINES 15 #define SPEC128_RETRACE_CYCLES 52 #define SPEC128_CYCLES_PER_LINE 228 diff --git a/src/mame/sinclair/specnext.cpp b/src/mame/sinclair/specnext.cpp index c34a1628494..9bfd6a11207 100644 --- a/src/mame/sinclair/specnext.cpp +++ b/src/mame/sinclair/specnext.cpp @@ -287,8 +287,6 @@ private: void port_e7_reg_w(u8 data); memory_access<8, 0, 0, ENDIANNESS_LITTLE>::specific m_next_regs; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; memory_bank_creator m_bank_boot_rom; memory_bank_array_creator<8> m_bank_ram; memory_view m_view0, m_view1, m_view2, m_view3, m_view4, m_view5, m_view6, m_view7; @@ -2796,8 +2794,6 @@ void specnext_state::machine_start() m_spi_clock = timer_alloc(FUNC(specnext_state::spi_clock), this); m_regs_map->space(AS_PROGRAM).specific(m_next_regs); - m_maincpu->space(AS_PROGRAM).specific(m_program); - m_maincpu->space(AS_IO).specific(m_io); for (auto i = 0; i < 8; i++) m_bank_ram[i]->configure_entries(0, m_ram->size() / 0x2000, m_ram->pointer(), 0x2000); diff --git a/src/mame/sinclair/spectrum.cpp b/src/mame/sinclair/spectrum.cpp index cff35f78a63..cb92826746d 100644 --- a/src/mame/sinclair/spectrum.cpp +++ b/src/mame/sinclair/spectrum.cpp @@ -300,7 +300,7 @@ uint8_t spectrum_state::pre_opcode_fetch_r(offs_t offset) enable paged ROM and then fetches at 0700 to disable it */ m_exp->pre_opcode_fetch(offset); - uint8_t retval = m_specmem->space(AS_PROGRAM).read_byte(offset); + uint8_t retval = m_specmem->read8(offset); m_exp->post_opcode_fetch(offset); return retval; } @@ -310,7 +310,7 @@ uint8_t spectrum_state::spectrum_data_r(offs_t offset) if (is_contended(offset)) content_early(); m_exp->pre_data_fetch(offset); - uint8_t retval = m_specmem->space(AS_PROGRAM).read_byte(offset); + uint8_t retval = m_specmem->read8(offset); m_exp->post_data_fetch(offset); return retval; } @@ -320,7 +320,7 @@ void spectrum_state::spectrum_data_w(offs_t offset, uint8_t data) if (is_contended(offset)) content_early(); if (is_vram_write(offset)) m_screen->update_now(); - m_specmem->space(AS_PROGRAM).write_byte(offset,data); + m_specmem->write8(offset,data); } void spectrum_state::spectrum_rom_w(offs_t offset, uint8_t data) @@ -580,25 +580,7 @@ void spectrum_state::spectrum_clone_io(address_map &map) /* Input ports */ -/****************************************************************************************************/ - -static INPUT_PORTS_START( spec_plus_joys ) - PORT_START("JOY2") /* 0xF7FE */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_X_LEFT_SWITCH) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(2) PORT_CODE(JOYCODE_Y_UP_SWITCH) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON1) - - PORT_START("JOY1") /* 0xEFFE */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) PORT_CODE(JOYCODE_BUTTON1) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_Y_UP_SWITCH) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(1) PORT_CODE(JOYCODE_X_LEFT_SWITCH) -INPUT_PORTS_END - -/* +/**************************************************************************************************** Spectrum keyboard is quite complicate to emulate. Each key can have 5 or 6 different functions, depending on which input mode we are in: ------------------------------------------------------------------------------------------------------------------- @@ -693,48 +675,6 @@ INPUT_PORTS_START( spectrum ) PORT_BIT(0x7f, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -/* These keys need not to be mapped in natural mode because Spectrum+ supports both these and the Spectrum sequences above. - Hence, we can simply keep using such sequences in natural keyboard emulation */ -INPUT_PORTS_START( spec128 ) - PORT_INCLUDE( spectrum ) - - PORT_START("PLUS0") /* Spectrum+ Keys (Same as CAPS + 1-5) */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EDIT") PORT_CODE(KEYCODE_INSERT) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRUE VID") PORT_CODE(KEYCODE_HOME) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INV VID") PORT_CODE(KEYCODE_END) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Left") PORT_CODE(KEYCODE_LEFT) - PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("PLUS1") /* Spectrum+ Keys (Same as CAPS + 6-0) */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_LALT) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Right") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Up") PORT_CODE(KEYCODE_UP) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor Down") PORT_CODE(KEYCODE_DOWN) - PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("PLUS2") /* Spectrum+ Keys (Same as CAPS + SPACE and CAPS + SYMBOL) */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_PAUSE) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EXT MODE") PORT_CODE(KEYCODE_LCONTROL) - PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("PLUS3") /* Spectrum+ Keys (Same as SYMBOL SHIFT + O/P) */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\"") PORT_CODE(KEYCODE_QUOTE) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) - PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("PLUS4") /* Spectrum+ Keys (Same as SYMBOL SHIFT + N/M) */ - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) - PORT_BIT(0xf3, IP_ACTIVE_LOW, IPT_UNUSED) -INPUT_PORTS_END - -INPUT_PORTS_START( spec_plus ) - PORT_INCLUDE( spec128 ) - PORT_INCLUDE( spec_plus_joys ) -INPUT_PORTS_END - /* Machine initialization */ void spectrum_state::init_spectrum() { diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index edeea31d119..a01a35d525b 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -228,7 +228,6 @@ private: memory_bank_creator m_bank0_fastram; memory_view m_bank_view0; memory_view m_bank_view3; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; output_finder<> m_turbo_led; TILE_GET_INFO_MEMBER(get_tile_info); @@ -1468,7 +1467,6 @@ void sprinter_state::machine_start() m_bank_ram[i]->configure_entries(0, m_ram->size() / 0x4000, m_ram->pointer(), 0x4000); m_dcp_location = m_ram->pointer() + (0x40 << 14); - m_maincpu->space(AS_PROGRAM).specific(m_program); const u8 port_default[0x40] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Cx - SYS PORTS COPIES diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index cb8e38fba48..cc6f12dd4c0 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -170,7 +170,6 @@ void tsconf_state::video_start() void tsconf_state::machine_start() { spectrum_128_state::machine_start(); - m_maincpu->space(AS_PROGRAM).specific(m_program); // reconfigure ROMs memory_region *rom = memregion("maincpu"); diff --git a/src/mame/sinclair/tsconf.h b/src/mame/sinclair/tsconf.h index 46d627574f2..8810cc6aacf 100644 --- a/src/mame/sinclair/tsconf.h +++ b/src/mame/sinclair/tsconf.h @@ -214,7 +214,6 @@ private: std::map m_scanline_delayed_regs_update; u8 m_regs[0x100]; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_view m_bank0_rom; memory_share_array_creator m_tiles_raw; memory_share_creator m_sprites_raw;