summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2020-06-05 22:31:53 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2020-06-05 22:31:53 +1000
commit71b6de4ea99c94fc6005b67a8c11bf70611346c7 (patch)
treed7eaca7ee966e1c13f824bffc00c9c6ba8116577
parent928f36426ab09b92948ee7d03d8f4369c595ccf6 (diff)
(nw) various cleanups
-rw-r--r--src/mame/drivers/rx78.cpp98
-rw-r--r--src/mame/drivers/sacstate.cpp35
-rw-r--r--src/mame/drivers/slc1.cpp22
-rw-r--r--src/mame/drivers/tec1.cpp66
-rw-r--r--src/mame/drivers/vd.cpp4
-rw-r--r--src/mame/drivers/wico.cpp16
6 files changed, 127 insertions, 114 deletions
diff --git a/src/mame/drivers/rx78.cpp b/src/mame/drivers/rx78.cpp
index 31a9d673a29..708b108a555 100644
--- a/src/mame/drivers/rx78.cpp
+++ b/src/mame/drivers/rx78.cpp
@@ -88,29 +88,31 @@ public:
void rx78(machine_config &config);
private:
- uint8_t key_r();
- uint8_t cass_r();
- uint8_t vram_r(offs_t offset);
- void cass_w(uint8_t data);
- void vram_w(offs_t offset, uint8_t data);
- void vram_read_bank_w(uint8_t data);
- void vram_write_bank_w(uint8_t data);
- void key_w(uint8_t data);
- void vdp_reg_w(offs_t offset, uint8_t data);
- void vdp_bg_reg_w(uint8_t data);
- void vdp_pri_mask_w(uint8_t data);
+ u8 key_r();
+ u8 cass_r();
+ u8 vram_r(offs_t offset);
+ void cass_w(u8 data);
+ void vram_w(offs_t offset, u8 data);
+ void vram_read_bank_w(u8 data);
+ void vram_write_bank_w(u8 data);
+ void key_w(u8 data);
+ void vdp_reg_w(offs_t offset, u8 data);
+ void vdp_bg_reg_w(u8 data);
+ void vdp_pri_mask_w(u8 data);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_reset() override;
+ virtual void machine_start() override;
void rx78_io(address_map &map);
void rx78_mem(address_map &map);
- uint8_t m_vram_read_bank;
- uint8_t m_vram_write_bank;
- uint8_t m_pal_reg[7];
- uint8_t m_pri_mask;
- uint8_t m_key_mux;
+ u8 m_vram_read_bank;
+ u8 m_vram_write_bank;
+ u8 m_pal_reg[7];
+ u8 m_pri_mask;
+ u8 m_key_mux;
+ std::unique_ptr<u8[]> m_vram;
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cass;
required_device<generic_slot_device> m_cart;
@@ -122,12 +124,12 @@ private:
#define MASTER_CLOCK XTAL(28'636'363)
-void rx78_state::cass_w(uint8_t data)
+void rx78_state::cass_w(u8 data)
{
m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
}
-uint8_t rx78_state::cass_r()
+u8 rx78_state::cass_r()
{
return (m_cass->input() > 0.03);
}
@@ -135,7 +137,6 @@ uint8_t rx78_state::cass_r()
uint32_t rx78_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint8_t *vram = memregion("vram")->base();
int color,pen[3];
const int borderx = 32, bordery = 20;
@@ -150,9 +151,9 @@ uint32_t rx78_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
for (u8 i = 0; i < 8; i++)
{
/* bg color */
- pen[0] = (m_pri_mask & 0x08) ? (vram[count + 0x6000] >> (i)) : 0x00;
- pen[1] = (m_pri_mask & 0x10) ? (vram[count + 0x8000] >> (i)) : 0x00;
- pen[2] = (m_pri_mask & 0x20) ? (vram[count + 0xa000] >> (i)) : 0x00;
+ pen[0] = (m_pri_mask & 0x08) ? (m_vram[count + 0x6000] >> (i)) : 0x00;
+ pen[1] = (m_pri_mask & 0x10) ? (m_vram[count + 0x8000] >> (i)) : 0x00;
+ pen[2] = (m_pri_mask & 0x20) ? (m_vram[count + 0xa000] >> (i)) : 0x00;
color = ((pen[0] & 1) << 0);
color |= ((pen[1] & 1) << 1);
@@ -162,9 +163,9 @@ uint32_t rx78_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
bitmap.pix16(y+bordery, x+i+borderx) = color | 8;
/* fg color */
- pen[0] = (m_pri_mask & 0x01) ? (vram[count + 0x0000] >> (i)) : 0x00;
- pen[1] = (m_pri_mask & 0x02) ? (vram[count + 0x2000] >> (i)) : 0x00;
- pen[2] = (m_pri_mask & 0x04) ? (vram[count + 0x4000] >> (i)) : 0x00;
+ pen[0] = (m_pri_mask & 0x01) ? (m_vram[count + 0x0000] >> (i)) : 0x00;
+ pen[1] = (m_pri_mask & 0x02) ? (m_vram[count + 0x2000] >> (i)) : 0x00;
+ pen[2] = (m_pri_mask & 0x04) ? (m_vram[count + 0x4000] >> (i)) : 0x00;
color = ((pen[0] & 1) << 0);
color |= ((pen[1] & 1) << 1);
@@ -181,7 +182,7 @@ uint32_t rx78_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
-uint8_t rx78_state::key_r()
+u8 rx78_state::key_r()
{
static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3",
"KEY4", "KEY5", "KEY6", "KEY7",
@@ -203,43 +204,39 @@ uint8_t rx78_state::key_r()
return 0;
}
-void rx78_state::key_w(uint8_t data)
+void rx78_state::key_w(u8 data)
{
m_key_mux = data;
}
-uint8_t rx78_state::vram_r(offs_t offset)
+u8 rx78_state::vram_r(offs_t offset)
{
- uint8_t *vram = memregion("vram")->base();
-
if(m_vram_read_bank == 0 || m_vram_read_bank > 6)
return 0xff;
- return vram[offset + ((m_vram_read_bank - 1) * 0x2000)];
+ return m_vram[offset + ((m_vram_read_bank - 1) * 0x2000)];
}
-void rx78_state::vram_w(offs_t offset, uint8_t data)
+void rx78_state::vram_w(offs_t offset, u8 data)
{
- uint8_t *vram = memregion("vram")->base();
-
for (u8 i = 0; i < 6; i++)
if (BIT(m_vram_write_bank, i))
- vram[offset + i * 0x2000] = data;
+ m_vram[offset + i * 0x2000] = data;
}
-void rx78_state::vram_read_bank_w(uint8_t data)
+void rx78_state::vram_read_bank_w(u8 data)
{
m_vram_read_bank = data;
}
-void rx78_state::vram_write_bank_w(uint8_t data)
+void rx78_state::vram_write_bank_w(u8 data)
{
m_vram_write_bank = data;
}
-void rx78_state::vdp_reg_w(offs_t offset, uint8_t data)
+void rx78_state::vdp_reg_w(offs_t offset, u8 data)
{
- uint8_t r,g,b,res,i;
+ u8 r,g,b,res,i;
m_pal_reg[offset] = data;
@@ -257,7 +254,7 @@ void rx78_state::vdp_reg_w(offs_t offset, uint8_t data)
}
}
-void rx78_state::vdp_bg_reg_w(uint8_t data)
+void rx78_state::vdp_bg_reg_w(u8 data)
{
int r,g,b;
@@ -268,7 +265,7 @@ void rx78_state::vdp_bg_reg_w(uint8_t data)
m_palette->set_pen_color(0x10, rgb_t(r,g,b));
}
-void rx78_state::vdp_pri_mask_w(uint8_t data)
+void rx78_state::vdp_pri_mask_w(u8 data)
{
m_pri_mask = data;
}
@@ -434,9 +431,20 @@ void rx78_state::machine_reset()
prg.install_read_handler(0x2000, 0x5fff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom)));
}
+void rx78_state::machine_start()
+{
+ m_vram = make_unique_clear<u8[]>(0xc000);
+ save_pointer(NAME(m_vram), 0xc000);
+ save_item(NAME(m_vram_read_bank));
+ save_item(NAME(m_vram_write_bank));
+ save_pointer(NAME(m_pal_reg), 7);
+ save_item(NAME(m_pri_mask));
+ save_item(NAME(m_key_mux));
+}
+
DEVICE_IMAGE_LOAD_MEMBER( rx78_state::cart_load )
{
- uint32_t size = m_cart->common_get_size("rom");
+ u32 size = m_cart->common_get_size("rom");
if (size != 0x2000 && size != 0x4000)
{
@@ -509,13 +517,11 @@ void rx78_state::rx78(machine_config &config)
ROM_START( rx78 )
ROM_REGION( 0x2000, "roms", 0 )
ROM_LOAD( "ipl.rom", 0x0000, 0x2000, CRC(a194ea53) SHA1(ba39e73e6eb7cbb8906fff1f81a98964cd62af0d))
-
- ROM_REGION( 6 * 0x2000, "vram", ROMREGION_ERASE00 )
ROM_END
void rx78_state::init_rx78()
{
- uint32_t ram_size = m_ram->size();
+ u32 ram_size = m_ram->size();
address_space &prg = m_maincpu->space(AS_PROGRAM);
if (ram_size == 0x4000)
@@ -525,4 +531,4 @@ void rx78_state::init_rx78()
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1983, rx78, 0, 0, rx78, rx78, rx78_state, init_rx78, "Bandai", "Gundam RX-78", MACHINE_NOT_WORKING )
+COMP( 1983, rx78, 0, 0, rx78, rx78, rx78_state, init_rx78, "Bandai", "Gundam RX-78", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/sacstate.cpp b/src/mame/drivers/sacstate.cpp
index 18b2b57a634..753d4b6e2cf 100644
--- a/src/mame/drivers/sacstate.cpp
+++ b/src/mame/drivers/sacstate.cpp
@@ -51,43 +51,44 @@ public:
void sacstate(machine_config &config);
private:
- uint8_t port00_r();
- uint8_t port01_r();
- uint8_t port04_r();
- void port08_w(uint8_t data);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ u8 port00_r();
+ u8 port01_r();
+ u8 port04_r();
+ void port08_w(u8 data);
void kbd_put(u8 data);
void sacstate_io(address_map &map);
void sacstate_mem(address_map &map);
- uint8_t m_term_data;
- uint8_t m_val;
- virtual void machine_reset() override;
+ u8 m_term_data;
+ u8 m_val;
required_device<cpu_device> m_maincpu;
required_device<generic_terminal_device> m_terminal;
};
-uint8_t sacstate_state::port01_r()
+u8 sacstate_state::port01_r()
{
- uint8_t ret = m_val;
+ u8 ret = m_val;
if (m_term_data)
ret |= 0x04; // data in
return ret;
}
-uint8_t sacstate_state::port00_r()
+u8 sacstate_state::port00_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = 0;
return ret;
}
-uint8_t sacstate_state::port04_r()
+u8 sacstate_state::port04_r()
{
logerror("unknown_r\n");
return 0;
}
-void sacstate_state::port08_w(uint8_t data)
+void sacstate_state::port08_w(u8 data)
{
if (data == 0x40)
m_val = 0x40;
@@ -133,6 +134,12 @@ void sacstate_state::machine_reset()
m_val = ioport("CONFIG")->read();
}
+void sacstate_state::machine_start()
+{
+ save_item(NAME(m_term_data));
+ save_item(NAME(m_val));
+}
+
void sacstate_state::sacstate(machine_config &config)
{
/* basic machine hardware */
@@ -161,4 +168,4 @@ ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1973, sacstate, 0, 0, sacstate, sacstate, sacstate_state, empty_init, "SacState", "SacState 8008", MACHINE_NO_SOUND_HW )
+COMP( 1973, sacstate, 0, 0, sacstate, sacstate, sacstate_state, empty_init, "SacState", "SacState 8008", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/slc1.cpp b/src/mame/drivers/slc1.cpp
index b7aec26ed68..ea349baddfc 100644
--- a/src/mame/drivers/slc1.cpp
+++ b/src/mame/drivers/slc1.cpp
@@ -73,8 +73,8 @@ public:
void slc1(machine_config &config);
private:
- uint8_t io_r(offs_t offset);
- void io_w(offs_t offset, uint8_t data);
+ u8 io_r(offs_t offset);
+ void io_w(offs_t offset, u8 data);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -82,7 +82,7 @@ private:
void mem_map(address_map &map);
void io_map(address_map &map);
- uint8_t m_digit = 0;
+ u8 m_digit = 0;
bool m_kbd_type = false;
required_device<cpu_device> m_maincpu;
@@ -99,7 +99,7 @@ private:
***************************************************************************/
-void slc1_state::io_w(offs_t offset, uint8_t data)
+void slc1_state::io_w(offs_t offset, u8 data)
{
bool const segonoff = BIT(data, 7);
bool const busyled = BIT(data, 4);
@@ -115,9 +115,9 @@ void slc1_state::io_w(offs_t offset, uint8_t data)
else if (offset == 0x2f07)
return;
- uint8_t segdata = m_display[m_digit];
- uint8_t const segnum = offset & 7;
- uint8_t const segmask = 1 << segnum;
+ u8 segdata = m_display[m_digit];
+ u8 const segnum = offset & 7;
+ u8 const segmask = 1 << segnum;
if (segonoff)
segdata |= segmask;
@@ -139,9 +139,9 @@ void slc1_state::io_w(offs_t offset, uint8_t data)
***************************************************************************/
-uint8_t slc1_state::io_r(offs_t offset)
+u8 slc1_state::io_r(offs_t offset)
{
- uint8_t data = 0xff, upper = (offset >> 8) & 7;
+ u8 data = 0xff, upper = (offset >> 8) & 7;
if (m_kbd_type)
{ // Trainer
@@ -294,7 +294,7 @@ void slc1_state::slc1(machine_config &config)
***************************************************************************/
ROM_START(slc1)
- ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF)
+ ROM_REGION(0x1000, "maincpu", 0 )
ROM_SYSTEM_BIOS(0, "bios0", "SLC-1")
ROMX_LOAD("slc1_0000.bin", 0x0000, 0x1000, CRC(06d32967) SHA1(f25eac66a4fca9383964d509c671a7ad2e020e7e), ROM_BIOS(0))
ROM_SYSTEM_BIOS(1, "bios1", "SC-1 v2")
@@ -305,4 +305,4 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-COMP( 1989, slc1, 0, 0, slc1, slc1, slc1_state, empty_init, "Dieter Scheuschner", "Schach- und Lerncomputer SLC 1", 0 )
+COMP( 1989, slc1, 0, 0, slc1, slc1, slc1_state, empty_init, "Dieter Scheuschner", "Schach- und Lerncomputer SLC 1", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp
index 865cae3fb11..f27b8fc26e0 100644
--- a/src/mame/drivers/tec1.cpp
+++ b/src/mame/drivers/tec1.cpp
@@ -60,10 +60,6 @@ The jmon includes a cassette interface, a serial input connection,
and an optional LCD, but the games of the tec1 have been removed.
-ToDo:
-- Save state support
-
-
JMON ToDo:
- Add LCD display (2 rows by 16 characters)
@@ -88,11 +84,11 @@ class tec1_state : public driver_device
public:
tec1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
+ , m_key_pressed(0)
, m_maincpu(*this, "maincpu")
, m_speaker(*this, "speaker")
, m_cass(*this, "cassette")
, m_kb(*this, "keyboard")
- , m_key_pressed(0)
, m_io_shift(*this, "SHIFT")
, m_display(*this, "display")
{ }
@@ -103,27 +99,26 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
private:
+ virtual void machine_start() override;
+ u8 kbd_r();
+ u8 latch_r();
+ void tec1_digit_w(u8 data);
+ void tecjmon_digit_w(u8 data);
+ void segment_w(u8 data);
+ DECLARE_WRITE_LINE_MEMBER(da_w);
+ bool m_key_pressed;
+ u8 m_seg;
+ u8 m_digit;
+ void tec1_io(address_map &map);
+ void tec1_map(address_map &map);
+ void tecjmon_io(address_map &map);
+ void tecjmon_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
optional_device<cassette_image_device> m_cass;
required_device<mm74c923_device> m_kb;
- bool m_key_pressed;
required_ioport m_io_shift;
required_device<pwm_display_device> m_display;
-
- uint8_t kbd_r();
- uint8_t latch_r();
- void tec1_digit_w(uint8_t data);
- void tecjmon_digit_w(uint8_t data);
- void segment_w(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(da_w);
- uint8_t m_seg;
- uint8_t m_digit;
-
- void tec1_io(address_map &map);
- void tec1_map(address_map &map);
- void tecjmon_io(address_map &map);
- void tecjmon_map(address_map &map);
};
@@ -135,7 +130,7 @@ private:
***************************************************************************/
-void tec1_state::segment_w(uint8_t data)
+void tec1_state::segment_w(u8 data)
{
/* d7 segment d
d6 segment e
@@ -150,7 +145,7 @@ void tec1_state::segment_w(uint8_t data)
m_display->matrix(m_digit, m_seg);
}
-void tec1_state::tec1_digit_w(uint8_t data)
+void tec1_state::tec1_digit_w(u8 data)
{
/* d7 speaker
d6 not used
@@ -167,7 +162,7 @@ void tec1_state::tec1_digit_w(uint8_t data)
m_display->matrix(m_digit, m_seg);
}
-void tec1_state::tecjmon_digit_w(uint8_t data)
+void tec1_state::tecjmon_digit_w(u8 data)
{
/* d7 speaker & cassout
d6 not used
@@ -191,10 +186,10 @@ void tec1_state::tecjmon_digit_w(uint8_t data)
***************************************************************************/
-uint8_t tec1_state::latch_r()
+u8 tec1_state::latch_r()
{
// bit 7 - cass in ; bit 6 low = key pressed
- uint8_t data = (m_key_pressed) ? 0 : 0x40;
+ u8 data = (m_key_pressed) ? 0 : 0x40;
if (m_cass->input() > 0.03)
data |= 0x80;
@@ -203,7 +198,7 @@ uint8_t tec1_state::latch_r()
}
-uint8_t tec1_state::kbd_r()
+u8 tec1_state::kbd_r()
{
return m_kb->read() | m_io_shift->read();
}
@@ -221,7 +216,12 @@ WRITE_LINE_MEMBER( tec1_state::da_w )
***************************************************************************/
-
+void tec1_state::machine_start()
+{
+ save_item(NAME(m_key_pressed));
+ save_item(NAME(m_seg));
+ save_item(NAME(m_digit));
+}
/***************************************************************************
@@ -251,7 +251,7 @@ void tec1_state::tecjmon_map(address_map &map)
map.global_mask(0x3fff);
map(0x0000, 0x07ff).rom();
map(0x0800, 0x37ff).ram();
- map(0x3800, 0x3fff).rom();
+ map(0x3800, 0x3fff).rom().region("maincpu", 0x0800);
}
void tec1_state::tecjmon_io(address_map &map)
@@ -386,7 +386,7 @@ void tec1_state::tecjmon(machine_config &config)
***************************************************************************/
ROM_START(tec1)
- ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF)
+ ROM_REGION(0x0800, "maincpu", 0 )
ROM_SYSTEM_BIOS(0, "mon1", "MON1")
ROMX_LOAD( "mon1.rom", 0x0000, 0x0800, CRC(5d379e6c) SHA1(5c810885a3f0d03c54aea74aaaa8fae8a2fd9ad4), ROM_BIOS(0) )
ROM_SYSTEM_BIOS(1, "mon1a", "MON1A")
@@ -399,11 +399,11 @@ ROM_START(tec1)
ROM_END
ROM_START(tecjmon)
- ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF)
+ ROM_REGION(0x1000, "maincpu", 0 )
ROM_LOAD("jmon.rom", 0x0000, 0x0800, CRC(202c47a2) SHA1(701588ec5640d633d90d94b2ccd6f65422e19a70) )
- ROM_LOAD("util.rom", 0x3800, 0x0800, CRC(7c19700d) SHA1(dc5b3ade66bb11c54430056966ed99cdd299d82b) )
+ ROM_LOAD("util.rom", 0x0800, 0x0800, CRC(7c19700d) SHA1(dc5b3ade66bb11c54430056966ed99cdd299d82b) )
ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1984, tec1, 0, 0, tec1, tec1, tec1_state, empty_init, "Talking Electronics magazine", "TEC-1", 0 )
-COMP( 1984, tecjmon, tec1, 0, tecjmon, tec1, tec1_state, empty_init, "Talking Electronics magazine", "TEC-1A with JMON", 0 )
+COMP( 1984, tec1, 0, 0, tec1, tec1, tec1_state, empty_init, "Talking Electronics magazine", "TEC-1", MACHINE_SUPPORTS_SAVE )
+COMP( 1984, tecjmon, tec1, 0, tecjmon, tec1, tec1_state, empty_init, "Talking Electronics magazine", "TEC-1A with JMON", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/vd.cpp b/src/mame/drivers/vd.cpp
index acfd9002b93..83300b91c9b 100644
--- a/src/mame/drivers/vd.cpp
+++ b/src/mame/drivers/vd.cpp
@@ -218,7 +218,7 @@ void vd_state::vd(machine_config &config)
/ Break '86", and the service manual's title page has "Modbreak."
/-------------------------------------------------------------------*/
ROM_START(break86)
- ROM_REGION(0x10000, "maincpu", 0)
+ ROM_REGION(0x6000, "maincpu", 0)
ROM_LOAD("break1.cpu", 0x0000, 0x2000, CRC(c187d263) SHA1(1790566799ccc41cd5445936e86f945150e24e8a))
ROM_LOAD("break2.cpu", 0x2000, 0x2000, CRC(ed8f84ab) SHA1(ff5d7e3c373ca345205e8b92c6ce7b02f36a3d95))
ROM_LOAD("break3.cpu", 0x4000, 0x2000, CRC(3cdfedc2) SHA1(309fd04c81b8facdf705e6297c0f4d507957ae1f))
@@ -228,7 +228,7 @@ ROM_END
/ Papillon (1986)
/-------------------------------------------------------------------*/
ROM_START(papillon)
- ROM_REGION(0x10000, "maincpu", 0)
+ ROM_REGION(0x6000, "maincpu", 0)
ROM_LOAD("u4.dat", 0x0000, 0x2000, CRC(e57bfcdd) SHA1(d0d5c798552a2436693dfee0e2ebf4b6f465b194))
ROM_LOAD("u5.dat", 0x2000, 0x2000, CRC(6d2ef02a) SHA1(0b67b2edd85624531630c162ae31af8078be01e3))
ROM_LOAD("u6.dat", 0x4000, 0x2000, CRC(6b2867b3) SHA1(720fe8a65b447e839b0eb9ea21e0b3cb0e50cf7a))
diff --git a/src/mame/drivers/wico.cpp b/src/mame/drivers/wico.cpp
index 6a259b065d3..c898ab72e99 100644
--- a/src/mame/drivers/wico.cpp
+++ b/src/mame/drivers/wico.cpp
@@ -113,7 +113,7 @@ void wico_state::hcpu_map(address_map &map)
//map(0x1fed, 0x1fed).r(FUNC(wico_state::solst1_r));
//map(0x1fee, 0x1fee).r(FUNC(wico_state::solst0_r));
map(0x1fef, 0x1fef).r(FUNC(wico_state::switch_r));
- map(0xf000, 0xffff).rom();
+ map(0xf000, 0xffff).rom().region("hcpu", 0);
}
// command cpu
@@ -137,8 +137,8 @@ void wico_state::ccpu_map(address_map &map)
//map(0x1fee, 0x1fee).r(FUNC(wico_state::solst0_r)); // switches
//map(0x1fef, 0x1fef).r(FUNC(wico_state::switch_r)); // switches
map(0x4000, 0x40ff).ram().share("nvram"); // X2212 4bit x 256 NVRAM, stores only when store_w is active
- map(0x8000, 0x9fff).rom();
- map(0xe000, 0xffff).rom();
+ map(0x8000, 0x9fff).rom().region("ccpu", 0);
+ map(0xe000, 0xffff).rom().region("ccpu", 0x2000);
}
static INPUT_PORTS_START( wico )
@@ -466,12 +466,12 @@ void wico_state::wico(machine_config &config)
/ Af-Tor (1984)
/-------------------------------------------------------------------*/
ROM_START(aftor)
- ROM_REGION(0x10000, "hcpu", 0)
- ROM_LOAD("u25.bin", 0xf000, 0x1000, CRC(d66e95ff) SHA1(f7e8c51f1b37e7ef560406f1968c12a2043646c5))
+ ROM_REGION(0x1000, "hcpu", 0)
+ ROM_LOAD("u25.bin", 0x0000, 0x1000, CRC(d66e95ff) SHA1(f7e8c51f1b37e7ef560406f1968c12a2043646c5))
- ROM_REGION(0x10000, "ccpu", 0)
- ROM_LOAD("u52.bin", 0x8000, 0x2000, CRC(8035b446) SHA1(3ec59015e259c315bf09f4e2046f9d98e2d7a732))
- ROM_LOAD("u48.bin", 0xe000, 0x2000, CRC(b4406563) SHA1(6d1a9086eb1f6f947eae3a92ccf7a9b7375d85d3))
+ ROM_REGION(0x4000, "ccpu", 0)
+ ROM_LOAD("u52.bin", 0x0000, 0x2000, CRC(8035b446) SHA1(3ec59015e259c315bf09f4e2046f9d98e2d7a732))
+ ROM_LOAD("u48.bin", 0x2000, 0x2000, CRC(b4406563) SHA1(6d1a9086eb1f6f947eae3a92ccf7a9b7375d85d3))
ROM_END
/*-------------------------------------------------------------------