From a7945659e0a364312620014a7659243c5b60ea8f Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 22 Sep 2017 03:10:38 +1000 Subject: (nw) May as well save this.. --- src/mame/drivers/aim65_40.cpp | 37 +++++++++++++++++++---------- src/mame/drivers/horizon.cpp | 55 +++++++++++++++++++++++++++++++------------ 2 files changed, 65 insertions(+), 27 deletions(-) diff --git a/src/mame/drivers/aim65_40.cpp b/src/mame/drivers/aim65_40.cpp index 62e19748afd..e1121a2f014 100644 --- a/src/mame/drivers/aim65_40.cpp +++ b/src/mame/drivers/aim65_40.cpp @@ -50,6 +50,7 @@ The source code there implies that *maybe* ff7e and ff7f are also open bus. #include "cpu/m6502/m6502.h" #include "machine/6522via.h" #include "machine/mos6551.h" +#include "bus/rs232/rs232.h" #include "aim65_40.lh" @@ -72,13 +73,15 @@ class aim65_40_state : public driver_device { public: aim65_40_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag) + { } // devices - device_t *m_via0; - device_t *m_via1; - device_t *m_via2; - device_t *m_speaker; + //device_t *m_via0; + //device_t *m_via1; + //device_t *m_via2; + //device_t *m_speaker; +private: }; @@ -88,12 +91,13 @@ public: static ADDRESS_MAP_START( aim65_40_mem, AS_PROGRAM, 8, aim65_40_state ) AM_RANGE(0x0000, 0x3fff) AM_RAM - AM_RANGE(0xa000, 0xff7f) AM_ROM + AM_RANGE(0xa000, 0xcfff) AM_ROM AM_REGION("roms", 0) + AM_RANGE(0xf000, 0xff7f) AM_ROM AM_REGION("roms", 0x3000) AM_RANGE(0xffa0, 0xffaf) AM_DEVREADWRITE(M6522_0_TAG, via6522_device, read, write) AM_RANGE(0xffb0, 0xffbf) AM_DEVREADWRITE(M6522_1_TAG, via6522_device, read, write) AM_RANGE(0xffc0, 0xffcf) AM_DEVREADWRITE(M6522_2_TAG, via6522_device, read, write) AM_RANGE(0xffd0, 0xffd3) AM_DEVREADWRITE(M6551_TAG, mos6551_device, read, write) - AM_RANGE(0xffe0, 0xffff) AM_ROM + AM_RANGE(0xffe0, 0xffff) AM_ROM AM_REGION("roms", 0x3fe0) ADDRESS_MAP_END /*************************************************************************** @@ -123,6 +127,15 @@ static MACHINE_CONFIG_START( aim65_40 ) MCFG_DEVICE_ADD(M6522_2_TAG, VIA6522, 0) MCFG_DEVICE_ADD(M6551_TAG, MOS6551, 0) MCFG_MOS6551_XTAL(XTAL_1_8432MHz) + MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) + MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) + MCFG_MOS6551_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr)) + + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal") + MCFG_RS232_RXD_HANDLER(DEVWRITELINE(M6551_TAG, mos6551_device, write_rxd)) + MCFG_RS232_DCD_HANDLER(DEVWRITELINE(M6551_TAG, mos6551_device, write_dcd)) + MCFG_RS232_DSR_HANDLER(DEVWRITELINE(M6551_TAG, mos6551_device, write_dsr)) + MCFG_RS232_CTS_HANDLER(DEVWRITELINE(M6551_TAG, mos6551_device, write_cts)) MACHINE_CONFIG_END /*************************************************************************** @@ -130,11 +143,11 @@ MACHINE_CONFIG_END ***************************************************************************/ ROM_START( aim65_40 ) - ROM_REGION( 0x10000, M6502_TAG, 0 ) - ROM_LOAD( "mon a v1.0 r32u5-11.z65", 0xa000, 0x1000, CRC(8c970c67) SHA1(5c8aecb2155a10777a57d4f0f2d16b7ba7b1fb45) ) - ROM_LOAD( "mon b v1.0 r32u6-11.z66", 0xb000, 0x1000, CRC(38a1e0cd) SHA1(37c34e32ad25d27e9590ee3f325801ca311be7b1) ) - ROM_LOAD( "r2332lp r3224-11.z70", 0xc000, 0x1000, CRC(0878b399) SHA1(483e92b57d64be51643a9f6490521a8572aa2f68) ) // Assembler - ROM_LOAD( "i-of v1.0 r32t3-12.z73", 0xf000, 0x1000, CRC(a62bec4a) SHA1(a2fc69a33dc3b7684bf3399beff7b22eaf05c843) ) + ROM_REGION( 0x4000, "roms", 0 ) + ROM_LOAD( "mon a v1.0 r32u5-11.z65", 0x0000, 0x1000, CRC(8c970c67) SHA1(5c8aecb2155a10777a57d4f0f2d16b7ba7b1fb45) ) + ROM_LOAD( "mon b v1.0 r32u6-11.z66", 0x1000, 0x1000, CRC(38a1e0cd) SHA1(37c34e32ad25d27e9590ee3f325801ca311be7b1) ) + ROM_LOAD( "r2332lp r3224-11.z70", 0x2000, 0x1000, CRC(0878b399) SHA1(483e92b57d64be51643a9f6490521a8572aa2f68) ) // Assembler + ROM_LOAD( "i-of v1.0 r32t3-12.z73", 0x3000, 0x1000, CRC(a62bec4a) SHA1(a2fc69a33dc3b7684bf3399beff7b22eaf05c843) ) ROM_END /*************************************************************************** diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp index c40e693cccd..bf9fc9ee6d0 100644 --- a/src/mame/drivers/horizon.cpp +++ b/src/mame/drivers/horizon.cpp @@ -2,15 +2,18 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - NorthStar Horizon +NorthStar Horizon - 07/12/2009 Skeleton driver. +2009-12-07 Skeleton driver. - It appears these machines say nothing until a floppy disk is - succesfully loaded. The memory range EA00-EB40 appears to be - used by devices, particularly the FDC. +http://www.hartetechnologies.com/manuals/Northstar/ - http://www.hartetechnologies.com/manuals/Northstar/ +The tiny bios (only about 200 bytes) initialises nothing, but only loads the +initial sector from the disk and transfers control to it. All the used memory +locations in the EA00-EB40 range are listed in the memory map. It does not +use the IO map, and has no text. + +Without schematics and technical manuals, it is not possible to progress. ****************************************************************************/ @@ -49,12 +52,16 @@ class horizon_state : public driver_device { public: horizon_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_usart_l(*this, I8251_L_TAG), - m_usart_r(*this, I8251_L_TAG) - { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, Z80_TAG) + , m_usart_l(*this, I8251_L_TAG) + , m_usart_r(*this, I8251_L_TAG) + { } + + DECLARE_READ8_MEMBER(ff_r); +private: + virtual void machine_reset() override; required_device m_maincpu; required_device m_usart_l; required_device m_usart_r; @@ -71,6 +78,16 @@ public: //------------------------------------------------- static ADDRESS_MAP_START( horizon_mem, AS_PROGRAM, 8, horizon_state ) + AM_RANGE(0x0000, 0xe7ff) AM_RAM + AM_RANGE(0xe800, 0xe9ff) AM_ROM AM_REGION("roms", 0) + AM_RANGE(0xea01, 0xea01) + AM_RANGE(0xea11, 0xea11) + AM_RANGE(0xea21, 0xea21) + AM_RANGE(0xea31, 0xea31) + AM_RANGE(0xeb10, 0xeb17) AM_READ(ff_r) + AM_RANGE(0xeb20, 0xeb20) + AM_RANGE(0xeb35, 0xeb35) + AM_RANGE(0xeb40, 0xeb40) ADDRESS_MAP_END @@ -88,13 +105,21 @@ ADDRESS_MAP_END //************************************************************************** //------------------------------------------------- -// INPUT_PORTS( sage2 ) +// INPUT_PORTS //------------------------------------------------- static INPUT_PORTS_START( horizon ) INPUT_PORTS_END +void horizon_state::machine_reset() +{ + m_maincpu->set_pc(0xe800); +} +READ8_MEMBER( horizon_state::ff_r ) +{ + return 0xff; +} //************************************************************************** // DEVICE CONFIGURATION @@ -198,7 +223,7 @@ MACHINE_CONFIG_END //------------------------------------------------- ROM_START( nshrz ) - ROM_REGION( 0x400, Z80_TAG, 0 ) + ROM_REGION( 0x400, "roms", 0 ) ROM_LOAD( "option.prom", 0x000, 0x400, NO_DUMP ) ROM_END @@ -208,8 +233,8 @@ ROM_END //------------------------------------------------- ROM_START( vector1 ) // This one have different I/O - ROM_REGION( 0x10000, Z80_TAG, ROMREGION_ERASEFF ) - ROM_LOAD( "horizon.bin", 0xe800, 0x0100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48)) + ROM_REGION( 0x400, "roms", ROMREGION_ERASEFF ) + ROM_LOAD( "horizon.bin", 0x0000, 0x0100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48)) ROM_END -- cgit v1.2.3