From 97592223815e3f074cd467ff3fd26a1ff3c6eda7 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Wed, 29 Mar 2023 07:24:07 +0300 Subject: abc80: Refactor ABC Memory Card to use generic slots. [Curt Coder] New working software list items ------------------------------- abc80_rom: ABC-DOS, ABC-DOS DD, UFD-DOS v.20, IEC Option 4027 v1.02.4b, Printer option 9704, Printer option 9704 0.1 [Curt Coder] --- hash/abc80_rom.xml | 83 ++++++++++++++++++++++++++++++++++++++ src/devices/bus/abcbus/memcard.cpp | 43 +++++--------------- src/devices/bus/abcbus/memcard.h | 12 +++--- src/mame/luxor/abc80.cpp | 1 + 4 files changed, 101 insertions(+), 38 deletions(-) create mode 100644 hash/abc80_rom.xml diff --git a/hash/abc80_rom.xml b/hash/abc80_rom.xml new file mode 100644 index 00000000000..6789dbd970b --- /dev/null +++ b/hash/abc80_rom.xml @@ -0,0 +1,83 @@ + + + + + + + + ABC-DOS + 19?? + unknown + + + + + + + + + + + ABC-DOS DD + 19?? + unknown + + + + + + + + + + + UFD-DOS v.20 + 19?? + unknown + + + + + + + + + + IEC option 4027 v1.02.4b + 19?? + unknown + + + + + + + + + + Printer option 9704 + 19?? + unknown + + + + + + + + + + Printer option 9704 0.1 + 19?? + unknown + + + + + + + + + diff --git a/src/devices/bus/abcbus/memcard.cpp b/src/devices/bus/abcbus/memcard.cpp index 8f6f0e980cc..8ace715f696 100644 --- a/src/devices/bus/abcbus/memcard.cpp +++ b/src/devices/bus/abcbus/memcard.cpp @@ -67,38 +67,15 @@ DEFINE_DEVICE_TYPE(ABC_MEMORY_CARD, abc_memory_card_device, "abc_memcard", "ABC //------------------------------------------------- -// ROM( abc_dos ) +// device_add_mconfig - add device configuration //------------------------------------------------- -ROM_START( abc_dos ) - ROM_REGION( 0x1000, "dos", 0 ) - ROM_DEFAULT_BIOS("ufd20") - ROM_SYSTEM_BIOS( 0, "abcdos", "ABC-DOS" ) // Scandia Metric FD2 - ROMX_LOAD( "abcdos.3d", 0x0000, 0x1000, CRC(2cb2192f) SHA1(a6b3a9587714f8db807c05bee6c71c0684363744), ROM_BIOS(0) ) - ROM_SYSTEM_BIOS( 1, "dosdd80", "ABC-DOS DD" ) // ABC 830 - ROMX_LOAD( "dosdd80.3d", 0x0000, 0x1000, CRC(36db4c15) SHA1(ae462633f3a9c142bb029beb14749a84681377fa), ROM_BIOS(1) ) - ROM_SYSTEM_BIOS( 2, "ufd20", "UFD-DOS v.20" ) // ABC 830 - ROMX_LOAD( "ufddos20.3d", 0x0000, 0x1000, CRC(69b09c0b) SHA1(403997a06cf6495b8fa13dc74eff6a64ef7aa53e), ROM_BIOS(2) ) - - ROM_REGION( 0x400, "iec", 0 ) - ROM_LOAD( "abc80-iec-option-4027-ver1.02.4b", 0x000, 0x400, CRC(b4998599) SHA1(1d46d1334599c31025cc8481daa4d38d470a7b48) ) - - ROM_REGION( 0x400, "opt", 0 ) - ROM_LOAD_OPTIONAL( "spare.4a", 0x000, 0x400, NO_DUMP ) - - ROM_REGION( 0x400, "prn", 0 ) - ROM_LOAD( "abc80-printer-option-9704.3b", 0x000, 0x400, CRC(f2f0d808) SHA1(6355495542e77411137426effbe1059532735bb2) ) - ROM_LOAD( "abc80-printer-option-9704-0.1.3b", 0x000, 0x400, CRC(5bfaee54) SHA1(fc62d8c27c69c7ca0870faa922ccd7aa1b650ecf) ) -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const tiny_rom_entry *abc_memory_card_device::device_rom_region() const +void abc_memory_card_device::device_add_mconfig(machine_config & config) { - return ROM_NAME( abc_dos ); + GENERIC_SOCKET(config, m_dos_rom, generic_plain_slot, "abc80_dos", "bin"); + GENERIC_SOCKET(config, m_iec_rom, generic_plain_slot, "abc80_iec", "bin"); + GENERIC_SOCKET(config, m_opt_rom, generic_plain_slot, "abc80_opt", "bin"); + GENERIC_SOCKET(config, m_prn_rom, generic_plain_slot, "abc80_prn", "bin"); } @@ -146,19 +123,19 @@ uint8_t abc_memory_card_device::abcbus_xmemfl(offs_t offset) if (offset >= 0x6000 && offset < 0x7000) { - data = m_dos_rom->base()[offset & 0xfff]; + data = m_dos_rom->read_rom(offset & 0xfff); } if (offset >= 0x7000 && offset < 0x7400) { - data = m_iec_rom->base()[offset & 0x3ff]; + data = m_iec_rom->read_rom(offset & 0x3ff); } if (offset >= 0x7400 && offset < 0x7800) { - data = m_opt_rom->base()[offset & 0x3ff]; + data = m_opt_rom->read_rom(offset & 0x3ff); } if (offset >= 0x7800 && offset < 0x7c00) { - data = m_prn_rom->base()[offset & 0x3ff]; + data = m_prn_rom->read_rom(offset & 0x3ff); } return data; diff --git a/src/devices/bus/abcbus/memcard.h b/src/devices/bus/abcbus/memcard.h index dae0a14fd50..f2f47cabb9e 100644 --- a/src/devices/bus/abcbus/memcard.h +++ b/src/devices/bus/abcbus/memcard.h @@ -12,6 +12,8 @@ #pragma once #include "abcbus.h" +#include "bus/generic/carts.h" +#include "bus/generic/slot.h" @@ -28,7 +30,7 @@ public: abc_memory_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; protected: // device-level overrides @@ -39,10 +41,10 @@ protected: virtual uint8_t abcbus_xmemfl(offs_t offset) override; private: - required_memory_region m_dos_rom; - required_memory_region m_iec_rom; - required_memory_region m_opt_rom; - required_memory_region m_prn_rom; + required_device m_dos_rom; + required_device m_iec_rom; + required_device m_opt_rom; + required_device m_prn_rom; }; diff --git a/src/mame/luxor/abc80.cpp b/src/mame/luxor/abc80.cpp index 8549997f764..db00ef6cdf2 100644 --- a/src/mame/luxor/abc80.cpp +++ b/src/mame/luxor/abc80.cpp @@ -550,6 +550,7 @@ void abc80_state::abc80(machine_config &config) // software list SOFTWARE_LIST(config, "cass_list").set_original("abc80_cass"); SOFTWARE_LIST(config, "flop_list").set_original("abc80_flop"); + SOFTWARE_LIST(config, "rom_list").set_original("abc80_rom"); } -- cgit v1.2.3