diff options
Diffstat (limited to 'src/mame/drivers/c900.cpp')
-rw-r--r-- | src/mame/drivers/c900.cpp | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/src/mame/drivers/c900.cpp b/src/mame/drivers/c900.cpp index 18b3dc19cf5..4ded9072ca8 100644 --- a/src/mame/drivers/c900.cpp +++ b/src/mame/drivers/c900.cpp @@ -2,44 +2,39 @@ // copyright-holders:Curt Coder /****************************************************************************************** -Commodore C900 -UNIX prototype + Commodore C900 + UNIX prototype -http://www.zimmers.net/cbmpics/c900.html -http://www.zimmers.net/cbmpics/cbm/900/c900-chips.txt + http://www.zimmers.net/cbmpics/c900.html + http://www.zimmers.net/cbmpics/cbm/900/c900-chips.txt -Chips: Z8001 CPU, Z8010 MMU, Z8030 SCC, Z8036 CIO. Crystal: 12MHz + Chips: Z8001 CPU, Z8010 MMU, Z8030 SCC, Z8036 CIO. Crystal: 12MHz -The Z8030 runs 2 serial ports. The Z8036 runs the IEEE interface and the speaker. + The Z8030 runs 2 serial ports. The Z8036 runs the IEEE interface and the speaker. -The FDC is an intelligent device that communicates with the main board via the MMU. -It has a 6508 CPU. + The FDC is an intelligent device that communicates with the main board via the MMU. + It has a 6508 CPU. -Disk drive is a Matsushita JA-560-012 - -Our implementation of z80scc is currently incomplete and therefore unusable. - -Increasing the amount of RAM stops the error message, however it still keeps running -into the weeds (jumps to 00000). + Disk drive is a Matsushita JA-560-012 *******************************************************************************************/ #include "emu.h" #include "cpu/z8000/z8000.h" -//#include "machine/z80scc.h" -//#include "bus/rs232/rs232.h" #include "machine/terminal.h" +#define TERMINAL_TAG "terminal" class c900_state : public driver_device { public: c900_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_terminal(*this, "terminal") - { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_terminal(*this, TERMINAL_TAG) + { + } DECLARE_READ16_MEMBER(port1e_r); DECLARE_READ16_MEMBER(key_r); @@ -52,22 +47,21 @@ private: required_device<generic_terminal_device> m_terminal; }; -static ADDRESS_MAP_START(mem_map, AS_PROGRAM, 16, c900_state) +static ADDRESS_MAP_START(c900_mem, AS_PROGRAM, 16, c900_state) AM_RANGE(0x00000, 0x07fff) AM_ROM AM_REGION("roms", 0) ADDRESS_MAP_END -static ADDRESS_MAP_START(data_map, AS_DATA, 16, c900_state) +static ADDRESS_MAP_START(c900_data, AS_DATA, 16, c900_state) AM_RANGE(0x00000, 0x07fff) AM_ROM AM_REGION("roms", 0) AM_RANGE(0x08000, 0x6ffff) AM_RAM ADDRESS_MAP_END -static ADDRESS_MAP_START(io_map, AS_IO, 16, c900_state) - //AM_RANGE(0x0100, 0x011f) AM_DEVREADWRITE8("scc", scc8030_device, zbus_r, zbus_w, 0x00ff) // range for one channel +static ADDRESS_MAP_START(c900_io, AS_IO, 16, c900_state) AM_RANGE(0x0010, 0x0011) AM_READ(stat_r) AM_RANGE(0x001A, 0x001B) AM_READ(key_r) AM_RANGE(0x001E, 0x001F) AM_READ(port1e_r) AM_RANGE(0x0100, 0x0101) AM_READ(stat_r) - AM_RANGE(0x0110, 0x0111) AM_READ(key_r) AM_DEVWRITE8("terminal", generic_terminal_device, write, 0x00ff) + AM_RANGE(0x0110, 0x0111) AM_READ(key_r) AM_DEVWRITE8(TERMINAL_TAG, generic_terminal_device, write, 0x00ff) ADDRESS_MAP_END static INPUT_PORTS_START( c900 ) @@ -87,7 +81,7 @@ READ16_MEMBER( c900_state::key_r ) READ16_MEMBER( c900_state::stat_r ) { - return (m_term_data) ? 5 : 4; + return (m_term_data) ? 6 : 4; } void c900_state::kbd_put(u8 data) @@ -116,25 +110,14 @@ GFXDECODE_END static MACHINE_CONFIG_START( c900 ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z8001, XTAL_12MHz / 2) - MCFG_CPU_PROGRAM_MAP(mem_map) - MCFG_CPU_DATA_MAP(data_map) - MCFG_CPU_IO_MAP(io_map) + MCFG_CPU_PROGRAM_MAP(c900_mem) + MCFG_CPU_DATA_MAP(c900_data) + MCFG_CPU_IO_MAP(c900_io) - MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0) + MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(c900_state, kbd_put)) MCFG_GFXDECODE_ADD("gfxdecode", "palette", c900) MCFG_PALETTE_ADD_MONOCHROME("palette") - - //MCFG_SCC8030_ADD("scc", 6'000'000, 326400, 0, 326400, 0) - /* Port A */ - //MCFG_Z80SCC_OUT_TXDA_CB(DEVWRITELINE("rs232a", rs232_port_device, write_txd)) - //MCFG_Z80SCC_OUT_DTRA_CB(DEVWRITELINE("rs232a", rs232_port_device, write_dtr)) - //MCFG_Z80SCC_OUT_RTSA_CB(DEVWRITELINE("rs232a", rs232_port_device, write_rts)) - //MCFG_Z80SCC_OUT_INT_CB(WRITELINE(lwriter_state, scc_int)) - - //MCFG_RS232_PORT_ADD ("rs232a", default_rs232_devices, "terminal") - //MCFG_RS232_RXD_HANDLER (DEVWRITELINE ("scc", scc8030_device, rxa_w)) - //MCFG_RS232_CTS_HANDLER (DEVWRITELINE ("scc", scc8030_device, ctsa_w)) MACHINE_CONFIG_END ROM_START( c900 ) |