summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2018-08-04 23:06:38 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2018-08-04 23:06:38 +1000
commitcf98f490d48ebe943b9e5a533050cc768e629a32 (patch)
tree64d4f16c48a8b152c33c7df624a04f678102e521
parentafc360bfaa52e8ff4347ec92c880cd096a2a331c (diff)
(nw) radionic : added 8255
-rw-r--r--src/mame/drivers/trs80.cpp24
-rw-r--r--src/mame/includes/trs80.h4
2 files changed, 25 insertions, 3 deletions
diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp
index 4da7e62fe45..a255f524503 100644
--- a/src/mame/drivers/trs80.cpp
+++ b/src/mame/drivers/trs80.cpp
@@ -145,8 +145,7 @@ radionic: works
floppy not working (@6C0, DRQ never gets set)
add colour
expansion-box?
- uart?
- add i8255
+ uart
lnw80: works
add 1.77 / 4 MHz switch
@@ -261,6 +260,17 @@ void trs80_state::lnw80_io(address_map &map)
map(0xfe, 0xfe).rw(FUNC(trs80_state::lnw80_fe_r), FUNC(trs80_state::lnw80_fe_w));
}
+void trs80_state::radionic_mem(address_map &map)
+{
+ m1_mem(map);
+ // Optional external RS232 module with 8251
+ //map(0x3400, 0x3400).mirror(0xfe).rw("uart2", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w));
+ //map(0x3401, 0x3401).mirror(0xfe).rw("uart2", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w));
+ // Internal colour controls (need details)
+ //map(0x3500, 0x35ff).w(FUNC(trs80_state::colour_w));
+ // Internal interface to external slots
+ map(0x3600, 0x3603).mirror(0xfc).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
+}
/**************************************************************************
w/o SHIFT with SHIFT
@@ -618,11 +628,19 @@ MACHINE_CONFIG_START(trs80_state::radionic)
// whose master clock was approximately 11.8005 MHz (6 times ~1.966 MHz and 750 times 15.734 kHz). Though the schematics
// provide the main XTAL frequency as 12 MHz, that they also include a 3.579 MHz XTAL suggests this possibility.
MCFG_DEVICE_PERIODIC_INT_DRIVER(trs80_state, nmi_line_pulse, 12_MHz_XTAL / 12 / 16384)
+ MCFG_DEVICE_PROGRAM_MAP(radionic_mem)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_RAW_PARAMS(12_MHz_XTAL, 768, 0, 512, 312, 0, 256)
MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_radionic)
MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_radionic)
+
+ // Interface to external circuits
+ MCFG_DEVICE_ADD("ppi", I8255, 0)
+ //MCFG_I8255_OUT_PORTA_CB(WRITE8(*this, pulsar_state, ppi_pa_w)) // Data for external plugin printer module
+ //MCFG_I8255_OUT_PORTB_CB(WRITE8(*this, pulsar_state, ppi_pb_w)) // Control data to external
+ //MCFG_I8255_IN_PORTC_CB(READ8(*this, pulsar_state, ppi_pc_r)) // Sensing from external and printer status
+ //MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, pulsar_state, ppi_pc_w)) // Printer strobe
MACHINE_CONFIG_END
@@ -658,7 +676,7 @@ ROM_END
ROM_START(radionic)
- ROM_REGION(0x4000, "maincpu",0)
+ ROM_REGION(0x3800, "maincpu",0)
ROM_LOAD("ep1.bin", 0x0000, 0x1000, CRC(e8908f44) SHA1(7a5a60c3afbeb6b8434737dd302332179a7fca59))
ROM_LOAD("ep2.bin", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155))
ROM_LOAD("ep3.bin", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369))
diff --git a/src/mame/includes/trs80.h b/src/mame/includes/trs80.h
index cf2931a0b31..8b1c0fe8ac6 100644
--- a/src/mame/includes/trs80.h
+++ b/src/mame/includes/trs80.h
@@ -15,6 +15,7 @@
#include "imagedev/snapquik.h"
#include "machine/ay31015.h"
#include "machine/com8116.h"
+#include "machine/i8255.h"
#include "bus/rs232/rs232.h"
#include "machine/buffer.h"
#include "machine/wd_fdc.h"
@@ -40,6 +41,7 @@ public:
, m_cent_data_out(*this, "cent_data_out")
, m_cent_status_in(*this, "cent_status_in")
, m_uart(*this, "uart")
+ , m_ppi(*this, "ppi") // Radionic only
, m_brg(*this, "brg")
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
@@ -105,6 +107,7 @@ private:
void trs80_io(address_map &map);
void trs80_mem(address_map &map);
void ht1080z_io(address_map &map);
+ void radionic_mem(address_map &map);
uint8_t m_mode;
uint8_t m_irq;
@@ -130,6 +133,7 @@ private:
optional_device<output_latch_device> m_cent_data_out;
optional_device<input_buffer_device> m_cent_status_in;
optional_device<ay31015_device> m_uart;
+ optional_device<i8255_device> m_ppi;
optional_device<com8116_device> m_brg;
optional_device<fd1793_device> m_fdc;
optional_device<floppy_connector> m_floppy0;