From 3f2d50c4a24b8e3639bac6f331fe4c2d74013482 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 16 Feb 2019 17:34:05 +0100 Subject: move fidelity SC6 rom externally to softwarelist, as in original machine (nw) --- hash/fidel_sc6.xml | 19 +++++++++++++++++++ src/mame/drivers/fidelmcs48.cpp | 41 ++++++++++++++++++++++++++++++++++++++--- src/mame/drivers/fidelz80.cpp | 1 - 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 hash/fidel_sc6.xml diff --git a/hash/fidel_sc6.xml b/hash/fidel_sc6.xml new file mode 100644 index 00000000000..720ec1c8c2a --- /dev/null +++ b/hash/fidel_sc6.xml @@ -0,0 +1,19 @@ + + + + + + + + + SC6: original program + 1982 + Fidelity Electronics + + + + + + + + diff --git a/src/mame/drivers/fidelmcs48.cpp b/src/mame/drivers/fidelmcs48.cpp index f68d968c82c..f7da11afce8 100644 --- a/src/mame/drivers/fidelmcs48.cpp +++ b/src/mame/drivers/fidelmcs48.cpp @@ -21,6 +21,13 @@ Sensory Chess Challenger 6 (model SC6): - external 4KB ROM 2332 101-1035A01, in module slot - buzzer, 2 7seg LEDs, 8*8 chessboard buttons +released modules, * denotes not dumped yet: +- *BO6: Book Openings I +- *CG6: Greatest Chess Games 1 +- SC6: pack-in, original program + +SC6 program is contained in BO6 and CG6. + ******************************************************************************/ #include "emu.h" @@ -52,6 +59,7 @@ private: DECLARE_READ_LINE_MEMBER(sc6_input6_r); DECLARE_READ_LINE_MEMBER(sc6_input7_r); void sc6_map(address_map &map); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(sc6_cartridge); }; @@ -62,6 +70,26 @@ private: SC6 ******************************************************************************/ +// cartridge + +DEVICE_IMAGE_LOAD_MEMBER(fidelmcs48_state, sc6_cartridge) +{ + u32 size = m_cart->common_get_size("rom"); + + // 4KB ROM only? + if (size != 0x1000) + { + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size"); + return image_init_result::FAIL; + } + + m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + + return image_init_result::PASS; +} + + // MCU ports/generic void fidelmcs48_state::sc6_prepare_display() @@ -120,7 +148,7 @@ READ_LINE_MEMBER(fidelmcs48_state::sc6_input7_r) void fidelmcs48_state::sc6_map(address_map &map) { - map(0x0000, 0x0fff).rom(); + map(0x0000, 0x0fff).r("cartslot", FUNC(generic_slot_device::read_rom)); } @@ -169,6 +197,13 @@ void fidelmcs48_state::sc6(machine_config &config) voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); vref.set_output(5.0); vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + + /* cartridge */ + generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_sc6", "bin")); + cartslot.set_device_load(device_image_load_delegate(&fidelmcs48_state::device_image_load_sc6_cartridge, this)); + cartslot.set_must_be_loaded(true); + + SOFTWARE_LIST(config, "cart_list").set_original("fidel_sc6"); } @@ -178,8 +213,8 @@ void fidelmcs48_state::sc6(machine_config &config) ******************************************************************************/ ROM_START( fscc6 ) - ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD("101-1035a01", 0x0000, 0x1000, CRC(0024971f) SHA1(76b16364913ada2fb94b9e6a8524b924e6832ddf) ) // 2332 + ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 ) + // none here, it's in the module slot ROM_END diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp index 9062c5b772f..ac9ef521266 100644 --- a/src/mame/drivers/fidelz80.cpp +++ b/src/mame/drivers/fidelz80.cpp @@ -37,7 +37,6 @@ - Fidelity Challenger Printer - thermal printer, MCU=D8048C243 Program/data cartridges, for various boards, some cross-compatible: - - CG6: Greatest Chess Games 1 - CAC: Challenger Advanced Chess - 8KB 101-1038A01 - CB9: Challenger Book Openings 1 - 8KB (label not known) - CB16: Challenger Book Openings 2 - 8+8KB 101-1042A01,02 -- cgit v1.2.3