diff options
Diffstat (limited to 'src/devices/bus/electron/cart/peg400.cpp')
-rw-r--r-- | src/devices/bus/electron/cart/peg400.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/devices/bus/electron/cart/peg400.cpp b/src/devices/bus/electron/cart/peg400.cpp index abca703474a..82c348cf2f8 100644 --- a/src/devices/bus/electron/cart/peg400.cpp +++ b/src/devices/bus/electron/cart/peg400.cpp @@ -9,10 +9,11 @@ **********************************************************************/ - #include "emu.h" #include "peg400.h" +#include "formats/acorn_dsk.h" + //************************************************************************** // DEVICE DEFINITIONS @@ -22,14 +23,16 @@ DEFINE_DEVICE_TYPE(ELECTRON_PEG400, electron_peg400_device, "electron_peg400", " //------------------------------------------------- -// MACHINE_DRIVER( peg400 ) +// FLOPPY_FORMATS( peg400 ) //------------------------------------------------- -FLOPPY_FORMATS_MEMBER(electron_peg400_device::floppy_formats) - FLOPPY_ACORN_SSD_FORMAT, - FLOPPY_ACORN_DSD_FORMAT, - FLOPPY_ACORN_ADFS_OLD_FORMAT -FLOPPY_FORMATS_END0 +void electron_peg400_device::floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); + fr.add(FLOPPY_ACORN_SSD_FORMAT); + fr.add(FLOPPY_ACORN_DSD_FORMAT); + fr.add(FLOPPY_ACORN_ADFS_OLD_FORMAT); +} void peg400_floppies(device_slot_interface &device) { @@ -85,12 +88,9 @@ uint8_t electron_peg400_device::read(offs_t offset, int infc, int infd, int romq if (infc) { - switch (offset & 0xff) + switch (offset & 0xfc) { case 0xc4: - case 0xc5: - case 0xc6: - case 0xc7: data = m_fdc->read(offset & 0x03); break; } @@ -126,15 +126,12 @@ void electron_peg400_device::write(offs_t offset, uint8_t data, int infc, int in { if (infc) { - switch (offset & 0xff) + switch (offset & 0xfc) { case 0xc0: wd1770_control_w(data); break; case 0xc4: - case 0xc5: - case 0xc6: - case 0xc7: m_fdc->write(offset & 0x03, data); break; } @@ -175,7 +172,7 @@ void electron_peg400_device::wd1770_control_w(uint8_t data) // bit 5: head load } -WRITE_LINE_MEMBER(electron_peg400_device::fdc_drq_w) +void electron_peg400_device::fdc_drq_w(int state) { m_slot->nmi_w((state && m_fdc_ie) ? ASSERT_LINE : CLEAR_LINE); } |