summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar ajrhacker <ajrhacker@users.noreply.github.com>2019-11-19 09:45:36 -0500
committerGravatarGravatar GitHub <noreply@github.com>2019-11-19 09:45:36 -0500
commit5434d49cd36e92ddb379bb96895128760ddeaf90 (patch) (github)
tree1e446a0c2585b6b58b9357aa3301927148690e66
parentd58af5f9d503635f106aba1c379004bacf3e1ce3 (diff)
parent98f4c0e063d1cdfb784244fcd123acb5d0e6865d (diff)
downloadmame-master.tar.bz2
mame-master.zip
Merge pull request #5927 from JoakimLarsson/epcisworkingHEADmaster
eispc.cpp, mda.cpp: epc LPT device properly installed and is promoted to working
-rw-r--r--src/devices/bus/isa/mda.cpp20
-rw-r--r--src/devices/bus/isa/mda.h2
-rw-r--r--src/mame/drivers/eispc.cpp8
3 files changed, 24 insertions, 6 deletions
diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp
index a620c891580..8d487e3303b 100644
--- a/src/devices/bus/isa/mda.cpp
+++ b/src/devices/bus/isa/mda.cpp
@@ -19,7 +19,7 @@
#define LOG_CHRG (1U << 5)
#define LOG_STAT (1U << 6)
-//#define VERBOSE (LOG_MODE|LOG_SETUP|LOG_ROW)
+//#define VERBOSE (LOG_MODE|LOG_STAT)
//#define LOG_OUTPUT_STREAM std::cout
#include "logmacro.h"
@@ -1175,7 +1175,10 @@ void isa8_epc_mda_device::device_reset()
if (m_installed == false)
{
- m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_epc_mda_device::io_read)), write8_delegate(*this, FUNC(isa8_epc_mda_device::io_write)));
+ m_isa->install_device(0x3b0, 0x3bb, read8_delegate(*this, FUNC(isa8_epc_mda_device::io_read)), write8_delegate(*this, FUNC(isa8_epc_mda_device::io_write)));
+ // The Ericsson PC MDA card 1070 doesn't respond to the LPT device addresses 3bc-3be because
+ // the LPT device is on the main PCB, but requires 3bf for mode register 2 so need to create a hole here - needs verification on hw as docs are wrong
+ m_isa->install_device(0x3bf, 0x3bf, read8_delegate(*this, FUNC(isa8_epc_mda_device::io_read2)), write8_delegate(*this, FUNC(isa8_epc_mda_device::io_write2)));
m_isa->install_bank(0xb0000, 0xb7fff, "bank_epc", &m_videoram[0]); // Monochrome emulation mode VRAM address
// This check allows a color monitor adapter to be installed at this address range if color emulation is disabled
@@ -1198,7 +1201,15 @@ void isa8_epc_mda_device::device_reset()
* Mode Register 2 0x3bf 0x3df rw CRT/CPU page reg (incompatible w PCjr only)
* Status Register 0x3ba 0x3da r CGA/MDA status reg (incompatible)
* w EGA/VGA feature ccontrol reg (not used by this board)
+ *
+ * NOTE: The LPT device resides on the Ericsson PC main board in the 3bc-3be address range
*/
+
+WRITE8_MEMBER(isa8_epc_mda_device::io_write2 )
+{
+ io_write(space, offset + 0x0f, data);
+}
+
WRITE8_MEMBER(isa8_epc_mda_device::io_write )
{
LOG("%s: %04x <- %02x\n", FUNCNAME, offset, data);
@@ -1251,6 +1262,11 @@ WRITE8_MEMBER(isa8_epc_mda_device::io_write )
}
}
+READ8_MEMBER( isa8_epc_mda_device::io_read2 )
+{
+ return io_read(space, offset + 0x0f);
+}
+
READ8_MEMBER( isa8_epc_mda_device::io_read )
{
LOG("%s: %04x <- ???\n", FUNCNAME, offset);
diff --git a/src/devices/bus/isa/mda.h b/src/devices/bus/isa/mda.h
index 548ffd8221b..4d361ff7969 100644
--- a/src/devices/bus/isa/mda.h
+++ b/src/devices/bus/isa/mda.h
@@ -149,6 +149,8 @@ public:
virtual DECLARE_READ8_MEMBER(io_read) override;
virtual DECLARE_WRITE8_MEMBER(io_write) override;
+ DECLARE_READ8_MEMBER(io_read2);
+ DECLARE_WRITE8_MEMBER(io_write2);
/* Monitor */
DECLARE_INPUT_CHANGED_MEMBER(monitor_changed);
diff --git a/src/mame/drivers/eispc.cpp b/src/mame/drivers/eispc.cpp
index eeca78cf408..603b62e7d6e 100644
--- a/src/mame/drivers/eispc.cpp
+++ b/src/mame/drivers/eispc.cpp
@@ -27,7 +27,8 @@
* - Complete the Ericsson 1070 MDA ISA board and test all the graphics modes including 640x400 (aka HR)
* - Add the Ericsson 1065 HDC and boot from a hard drive
* - Add softlist
- * - Pass the diagnostics software at EPC5.IMD
+ * - Pass the diagnostics software system test at EPC2.IMD, it currently hangs the keyboard.
+ * A later version of the test on EPC5.IMD works though so need to verify EPC2.IMD on real hardware first.
*
* CREDITS The driver code is inspired from m24.cpp, myb3k.cpp and genpc.cpp. Information about the EPC has
* been contributed by many, mainly the people at Dalby Computer museum http://www.datormuseum.se/
@@ -86,7 +87,7 @@
#define LOG_FPU (1U << 11)
#define LOG_COM (1U << 12)
-//#define VERBOSE (LOG_COM)
+//#define VERBOSE (LOG_LPT)
//#define LOG_OUTPUT_STREAM std::cout
#include "logmacro.h"
@@ -1073,6 +1074,5 @@ ROM_START( epc )
ROMX_LOAD("epcbios3.bin", 0xc000, 0x02000, CRC(70483280) SHA1(b44b09da94d77b0269fc48f07d130b2d74c4bb8f), ROM_BIOS(1))
ROM_END
-
-COMP( 1985, epc, 0, 0, epc, epc_ports, epc_state, init_epc, "Ericsson Information System", "Ericsson PC" , MACHINE_NOT_WORKING )
+COMP( 1985, epc, 0, 0, epc, epc_ports, epc_state, init_epc, "Ericsson Information System", "Ericsson PC" , 0)
//COMP( 1985, eppc, ibm5150, 0, pccga, pccga, pc_state, empty_init, "Ericsson Information System", "Ericsson Portable PC", MACHINE_NOT_WORKING )