(mess) rmnimbus: extract keyboard and use z80dart and wd_fdc (nw)

This commit is contained in:
cracyc 2014-05-02 21:21:18 +00:00
parent 5f93fe13e8
commit c77aa0643a
8 changed files with 340 additions and 437 deletions

2
.gitattributes vendored
View File

@ -8676,6 +8676,8 @@ src/mess/machine/qx10kbd.h svneol=native#text/plain
src/mess/machine/radio86.c svneol=native#text/plain
src/mess/machine/rm380z.c svneol=native#text/plain
src/mess/machine/rmnimbus.c svneol=native#text/plain
src/mess/machine/rmnkbd.c svneol=native#text/plain
src/mess/machine/rmnkbd.h svneol=native#text/plain
src/mess/machine/rx01.c svneol=native#text/plain
src/mess/machine/rx01.h svneol=native#text/plain
src/mess/machine/samcoupe.c svneol=native#text/plain

View File

@ -385,7 +385,7 @@ void z80dart_device::trigger_interrupt(int index, int state)
{
priority = (prio_level == 2) ? index + 4 : ((index * 2) + prio_level);
}
if ((index == CHANNEL_B) && (m_chanB->m_wr[1] & z80dart_channel::WR1_STATUS_VECTOR))
if (m_chanB->m_wr[1] & z80dart_channel::WR1_STATUS_VECTOR)
{
vector = (!index << 2) | state;
if((m_chanA->m_wr[1] & 0x18) == z80dart_channel::WR2_MODE_8086_8088)
@ -401,7 +401,7 @@ void z80dart_device::trigger_interrupt(int index, int state)
else
{
priority = (index << 2) | state;
if ((index == CHANNEL_B) && (m_chanB->m_wr[1] & z80dart_channel::WR1_STATUS_VECTOR))
if (m_chanB->m_wr[1] & z80dart_channel::WR1_STATUS_VECTOR)
{
// status affects vector
vector = (m_chanB->m_wr[2] & 0xf1) | (!index << 3) | (state << 1);
@ -1315,6 +1315,7 @@ void z80dart_channel::update_serial()
{
set_tra_rate(m_txc / clocks);
}
receive_register_reset(); // if stop bits is changed from 0, receive register has to be reset
}

View File

@ -7,19 +7,16 @@
*/
#include "emu.h"
#include "cpu/i86/i186.h"
#include "includes/rmnimbus.h"
#include "cpu/mcs51/mcs51.h"
#include "imagedev/flopdrv.h"
#include "machine/ram.h"
#include "formats/pc_dsk.h"
#include "includes/rmnimbus.h"
#include "bus/scsi/scsihd.h"
#include "bus/scsi/s1410.h"
#include "bus/scsi/acb4070.h"
#include "machine/6522via.h"
#include "bus/centronics/ctronics.h"
#include "sound/ay8910.h"
#include "bus/isa/fdc.h"
#include "bus/rs232/rs232.h"
#include "machine/rmnkbd.h"
const unsigned char nimbus_palette[SCREEN_NO_COLOURS][3] =
{
@ -44,12 +41,13 @@ const unsigned char nimbus_palette[SCREEN_NO_COLOURS][3] =
{ 0xFF,0xFF,0xFF } /* white */
};
static const floppy_interface nimbus_floppy_interface =
{
FLOPPY_STANDARD_3_5_DSDD,
LEGACY_FLOPPY_OPTIONS_NAME(pc),
"floppy_3_5"
};
static SLOT_INTERFACE_START(rmnimbus_floppies)
SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
SLOT_INTERFACE_END
static SLOT_INTERFACE_START(keyboard)
SLOT_INTERFACE("rmnkbd", RMNIMBUS_KEYBOARD)
SLOT_INTERFACE_END
/* Null port handlers for now, I believe that the IO ports are used for */
/* the nimbus rompacks */
@ -83,136 +81,21 @@ static ADDRESS_MAP_START(nimbus_io, AS_IO, 16, rmnimbus_state )
AM_RANGE( 0x0092, 0x0093) AM_READWRITE8(nimbus_iou_r, nimbus_iou_w, 0x00FF)
AM_RANGE( 0x00A4, 0x00A5) AM_READWRITE8(nimbus_mouse_js_r, nimbus_mouse_js_w, 0x00FF)
AM_RANGE( 0X00c0, 0X00cf) AM_READWRITE8(nimbus_pc8031_r, nimbus_pc8031_w, 0x00FF)
AM_RANGE( 0X00e0, 0X00ef) AM_READWRITE8(nimbus_sound_ay8910_r, nimbus_sound_ay8910_w, 0x00FF)
AM_RANGE( 0x00f0, 0x00f7) AM_DEVREADWRITE8(Z80SIO_TAG, z80sio_device, read, write, 0x00ff)
AM_RANGE( 0x0400, 0x041f) AM_READWRITE8(nimbus_disk_r, nimbus_disk_w, 0x00FF)
AM_RANGE( 0X00e0, 0X00ef) AM_DEVREADWRITE8(AY8910_TAG, ay8910_device, data_r, address_data_w, 0x00FF)
AM_RANGE( 0x00f0, 0x00f7) AM_DEVREADWRITE8(Z80SIO_TAG, z80sio2_device, cd_ba_r, cd_ba_w, 0x00ff)
AM_RANGE( 0x0400, 0x0401) AM_WRITE8(fdc_ctl_w, 0x00ff)
AM_RANGE( 0x0408, 0x040f) AM_DEVREADWRITE8(FDC_TAG, wd2793_t, read, write, 0x00ff)
AM_RANGE( 0x0410, 0x041f) AM_READWRITE8(scsi_r, scsi_w, 0x00ff)
AM_RANGE( 0x0480, 0x049f) AM_DEVREADWRITE8(VIA_TAG, via6522_device, read, write, 0x00FF)
//AM_RANGE( 0xff00, 0xffff) AM_READWRITE(nimbus_i186_internal_port_r, nimbus_i186_internal_port_w)/* CPU 80186 */
ADDRESS_MAP_END
static INPUT_PORTS_START( nimbus )
PORT_START("config")
PORT_CONFNAME( 0x01, 0x00, "Input Port 0 Device")
PORT_CONFSETTING( 0x00, "Mouse" )
PORT_CONFSETTING( 0x01, DEF_STR( Joystick ) )
PORT_START("KEY0") /* Key row 0 scancodes 00..07 */
//PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
PORT_START("KEY1") /* Key row 1 scancodes 08..0F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09)
PORT_START("KEY2") /* Key row 2 scancodes 10..17 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I')
PORT_START("KEY3") /* Key row 3 scancodes 18..1F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0D)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) // Ether control
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S')
PORT_START("KEY4") /* Key row 4 scancodes 20..27 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';')
PORT_START("KEY5") /* Key row 5 scancodes 28..2F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('#')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSLASH") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LSHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TILDE") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V')
PORT_START("KEY6") /* Key row 6 scancodes 30..37 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RSHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_2)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRSCR") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('*')
PORT_START("KEY7") /* Key row 7 scancodes 38..3F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
PORT_START("KEY8") /* Key row 8 scancodes 40..47 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NUMLK") PORT_CODE(KEYCODE_NUMLOCK)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SCRLK") PORT_CODE(KEYCODE_SCRLOCK)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7')
PORT_START("KEY9") /* Key row 9 scancodes 48..4F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP8") PORT_CODE(KEYCODE_8_PAD) //PORT_CHAR('8')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP9") PORT_CODE(KEYCODE_9_PAD) //PORT_CHAR('9')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP-") PORT_CODE(KEYCODE_MINUS_PAD) //PORT_CHAR('-')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP4") PORT_CODE(KEYCODE_4_PAD) //PORT_CHAR('4')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) //PORT_CHAR('5')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) //PORT_CHAR('6')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) //PORT_CHAR('+')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) //PORT_CHAR('1')
PORT_START("KEY10") /* Key row 10 scancodes 50..57 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP2") PORT_CODE(KEYCODE_2_PAD) //PORT_CHAR('2')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP3") PORT_CODE(KEYCODE_3_PAD) //PORT_CHAR('3')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP0") PORT_CODE(KEYCODE_0_PAD) //PORT_CHAR('0')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP.") PORT_CODE(KEYCODE_DEL_PAD) //PORT_CHAR('.')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
//PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5')
//PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6')
//PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('+')
//PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1')
PORT_START(JOYSTICK0_TAG)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY // XB
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY // XA
@ -260,10 +143,12 @@ PALETTE_INIT_MEMBER(rmnimbus_state, rmnimbus)
static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
/* basic machine hardware */
MCFG_CPU_ADD(MAINCPU_TAG, I80186, 20000000)
MCFG_CPU_ADD(MAINCPU_TAG, I80186, 16000000) // the cpu is a 10Mhz part but the serial clocks are wrong unless it runs at 8Mhz
MCFG_CPU_PROGRAM_MAP(nimbus_mem)
MCFG_CPU_IO_MAP(nimbus_io)
MCFG_80186_IRQ_SLAVE_ACK(DEVREAD8(DEVICE_SELF, rmnimbus_state, cascade_callback))
MCFG_80186_IRQ_SLAVE_ACK(READ8(rmnimbus_state, cascade_callback))
MCFG_80186_TMROUT0_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxca_w))
MCFG_80186_TMROUT1_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxtxcb_w))
MCFG_CPU_ADD(IOCPU_TAG, I8031, 11059200)
MCFG_CPU_PROGRAM_MAP(nimbus_iocpu_mem)
@ -286,8 +171,11 @@ static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
// MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249)
/* Backing storage */
MCFG_WD2793_ADD(FDC_TAG, nimbus_wd17xx_interface )
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(nimbus_floppy_interface)
MCFG_WD2793x_ADD(FDC_TAG, 1000000)
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(rmnimbus_state,nimbus_fdc_intrq_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(rmnimbus_state,nimbus_fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", rmnimbus_floppies, "35dd", isa8_fdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", rmnimbus_floppies, "35dd", isa8_fdc_device::floppy_formats)
MCFG_DEVICE_ADD(SCSIBUS_TAG, SCSI_PORT, 0)
MCFG_SCSI_DATA_INPUT_BUFFER("scsi_data_in")
@ -315,7 +203,20 @@ static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
MCFG_RAM_EXTRA_OPTIONS("128K,256K,384K,512K,640K,1024K")
/* Peripheral chips */
MCFG_Z80SIO_ADD(Z80SIO_TAG, 4000000, nimbus_sio_intf)
MCFG_Z80SIO2_ADD(Z80SIO_TAG, 4000000, 0, 0, 0, 0)
MCFG_Z80DART_OUT_TXDB_CB(DEVWRITELINE("rs232b", rs232_port_device, write_txd))
MCFG_Z80DART_OUT_DTRB_CB(DEVWRITELINE("rs232b", rs232_port_device, write_dtr))
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE("rs232b", rs232_port_device, write_rts))
MCFG_Z80DART_OUT_INT_CB(WRITELINE(rmnimbus_state, sio_interrupt))
MCFG_RS232_PORT_ADD("rs232a", keyboard, "rmnkbd")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_PORT_ADD("rs232b", default_rs232_devices, NULL)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcdb_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rib_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsb_w))
MCFG_ER59256_ADD(ER59256_TAG)
@ -326,7 +227,7 @@ static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(rmnimbus_state,nimbus_via_irq_w))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer")
MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(rmnimbus_state, nimbus_ack_w))
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(VIA_TAG, via6522_device, write_ca1)) MCFG_DEVCB_INVERT
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")

View File

@ -5,10 +5,10 @@
Phill Harvey-Smith
2009-11-29.
*/
#include "emu.h"
#include "cpu/i86/i186.h"
#include "machine/z80sio.h"
#include "machine/wd17xx.h"
#include "machine/z80dart.h"
#include "machine/wd_fdc.h"
#include "bus/scsi/scsi.h"
#include "machine/6522via.h"
#include "machine/ram.h"
@ -21,8 +21,6 @@
#define IOCPU_TAG "iocpu"
#define num_ioports 0x80
#define NIMBUS_KEYROWS 11
#define KEYBOARD_QUEUE_SIZE 32
#define SCREEN_WIDTH_PIXELS 640
#define SCREEN_HEIGHT_LINES 250
@ -65,15 +63,6 @@ struct t_nimbus_brush
};
struct keyboard_t
{
UINT8 keyrows[NIMBUS_KEYROWS];
emu_timer *keyscan_timer;
UINT8 queue[KEYBOARD_QUEUE_SIZE];
UINT8 head;
UINT8 tail;
};
// Static data related to Floppy and SCSI hard disks
struct nimbus_drives_t
{
@ -172,7 +161,6 @@ extern const unsigned char nimbus_palette[SCREEN_NO_COLOURS][3];
#define EXTERNAL_INT_PC8031_8C 0x8c
#define EXTERNAL_INT_PC8031_8E 0x8E
#define EXTERNAL_INT_PC8031_8F 0x8F
#define EXTERNAL_INT_Z80SIO 0x9C
/* Memory controler */
@ -194,15 +182,9 @@ extern const unsigned char nimbus_palette[SCREEN_NO_COLOURS][3];
#define Z80SIO_TAG "z80sio"
extern const z80sio_interface nimbus_sio_intf;
/* Floppy/Fixed drive interface */
#define FDC_TAG "wd2793"
#define FDC_PAUSE 10000
extern const wd17xx_interface nimbus_wd17xx_interface;
#define NO_DRIVE_SELECTED 0xFF
@ -308,7 +290,6 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_msm(*this, MSM5205_TAG),
m_ay8910(*this, AY8910_TAG),
m_scsibus(*this, SCSIBUS_TAG),
m_ram(*this, RAM_TAG),
m_eeprom(*this, ER59256_TAG),
@ -317,13 +298,14 @@ public:
m_palette(*this, "palette"),
m_scsi_data_out(*this, "scsi_data_out"),
m_scsi_data_in(*this, "scsi_data_in"),
m_scsi_ctrl_out(*this, "scsi_ctrl_out")
m_scsi_ctrl_out(*this, "scsi_ctrl_out"),
m_fdc(*this, FDC_TAG),
m_z80sio(*this, Z80SIO_TAG)
{
}
required_device<i80186_cpu_device> m_maincpu;
required_device<msm5205_device> m_msm;
required_device<ay8910_device> m_ay8910;
required_device<SCSI_PORT_DEVICE> m_scsibus;
required_device<ram_device> m_ram;
required_device<er59256_device> m_eeprom;
@ -333,9 +315,10 @@ public:
required_device<output_latch_device> m_scsi_data_out;
required_device<input_buffer_device> m_scsi_data_in;
required_device<output_latch_device> m_scsi_ctrl_out;
required_device<wd2793_t> m_fdc;
required_device<z80sio2_device> m_z80sio;
UINT32 m_debug_machine;
keyboard_t m_keyboard;
nimbus_drives_t m_nimbus_drives;
ipc_interface_t m_ipc_interface;
UINT8 m_mcu_reg080;
@ -356,8 +339,9 @@ public:
DECLARE_WRITE8_MEMBER(nimbus_mcu_w);
DECLARE_READ16_MEMBER(nimbus_io_r);
DECLARE_WRITE16_MEMBER(nimbus_io_w);
DECLARE_READ8_MEMBER(nimbus_disk_r);
DECLARE_WRITE8_MEMBER(nimbus_disk_w);
DECLARE_READ8_MEMBER(scsi_r);
DECLARE_WRITE8_MEMBER(scsi_w);
DECLARE_WRITE8_MEMBER(fdc_ctl_w);
DECLARE_READ8_MEMBER(nimbus_pc8031_r);
DECLARE_WRITE8_MEMBER(nimbus_pc8031_w);
DECLARE_READ8_MEMBER(nimbus_pc8031_iou_r);
@ -366,8 +350,6 @@ public:
DECLARE_WRITE8_MEMBER(nimbus_pc8031_port_w);
DECLARE_READ8_MEMBER(nimbus_iou_r);
DECLARE_WRITE8_MEMBER(nimbus_iou_w);
DECLARE_READ8_MEMBER(nimbus_sound_ay8910_r);
DECLARE_WRITE8_MEMBER(nimbus_sound_ay8910_w);
DECLARE_WRITE8_MEMBER(nimbus_sound_ay8910_porta_w);
DECLARE_WRITE8_MEMBER(nimbus_sound_ay8910_portb_w);
DECLARE_READ8_MEMBER(nimbus_mouse_js_r);
@ -385,14 +367,10 @@ public:
TIMER_CALLBACK_MEMBER(keyscan_callback);
TIMER_CALLBACK_MEMBER(mouse_callback);
DECLARE_WRITE_LINE_MEMBER(sio_interrupt);
DECLARE_WRITE8_MEMBER(sio_dtr_w);
DECLARE_WRITE16_MEMBER(sio_serial_transmit);
DECLARE_READ16_MEMBER(sio_serial_receive);
DECLARE_WRITE_LINE_MEMBER(nimbus_fdc_intrq_w);
DECLARE_WRITE_LINE_MEMBER(nimbus_fdc_drq_w);
DECLARE_WRITE8_MEMBER(nimbus_via_write_portb);
DECLARE_WRITE_LINE_MEMBER(nimbus_via_irq_w);
DECLARE_WRITE_LINE_MEMBER(nimbus_ack_w);
DECLARE_WRITE_LINE_MEMBER(write_scsi_bsy);
DECLARE_WRITE_LINE_MEMBER(write_scsi_cd);
DECLARE_WRITE_LINE_MEMBER(write_scsi_io);
@ -400,8 +378,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(write_scsi_req);
DECLARE_WRITE_LINE_MEMBER(nimbus_msm5205_vck);
DECLARE_WRITE_LINE_MEMBER(write_scsi_iena);
DECLARE_WRITE_LINE_MEMBER(keyboard_clk);
IRQ_CALLBACK_MEMBER(int_callback);
UINT8 get_pixel(UINT16 x, UINT16 y);
UINT16 read_pixel_line(UINT16 x, UINT16 y, UINT8 width);
UINT16 read_pixel_data(UINT16 x, UINT16 y);
@ -427,12 +405,7 @@ public:
void *get_dssi_ptr(address_space &space, UINT16 ds, UINT16 si);
void nimbus_bank_memory();
void memory_reset();
void keyboard_reset();
void queue_scancode(UINT8 scancode);
int keyboard_queue_read();
void scan_keyboard();
void fdc_reset();
void set_disk_int(int state);
UINT8 fdc_driveno(UINT8 drivesel);
void hdc_reset();
void hdc_ctrl_write(UINT8 data);

View File

@ -53,20 +53,9 @@ chdman createhd -o ST125N.chd -chs 407,4,26 -ss 512
*/
#include "emu.h"
#include "debugger.h"
#include "cpu/i86/i186.h"
#include "debug/debugcpu.h"
#include "debug/debugcon.h"
#include "imagedev/flopdrv.h"
#include "machine/ram.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "machine/i8251.h"
#include "machine/6522via.h"
#include "bus/scsi/scsi.h"
#include "includes/rmnimbus.h"
@ -76,14 +65,6 @@ chdman createhd -o ST125N.chd -chs 407,4,26 -ss 512
/*-------------------------------------------------------------------------*/
/* CPU 80186 */
#define LATCH_INTS 1
#define LOG_PORTS 0
#define LOG_INTERRUPTS 0
#define LOG_INTERRUPTS_EXT 0
#define LOG_TIMER 0
#define LOG_OPTIMIZATION 0
#define LOG_DMA 0
#define CPU_RESUME_TRIGGER 7123
#define LOG_KEYBOARD 0
#define LOG_SIO 0
#define LOG_DISK_FDD 0
@ -102,38 +83,10 @@ chdman createhd -o ST125N.chd -chs 407,4,26 -ss 512
#define DEBUG_SET_STATE(flags) ((state->m_debug_machine & (flags))==(flags))
#define DEBUG_NONE 0x0000000
#define DMA_BREAK 0x0000001
#define DECODE_BIOS 0x0000002
#define DECODE_BIOS_RAW 0x0000004
#define DECODE_DOS21 0x0000008
/* Z80 SIO */
const z80sio_interface nimbus_sio_intf =
{
DEVCB_DRIVER_LINE_MEMBER(rmnimbus_state,sio_interrupt), /* interrupt handler */
DEVCB_NULL, //sio_dtr_w, /* DTR changed handler */
DEVCB_NULL, /* RTS changed handler */
DEVCB_NULL, /* BREAK changed handler */
DEVCB_DRIVER_MEMBER16(rmnimbus_state,sio_serial_transmit), /* transmit handler */
DEVCB_DRIVER_MEMBER16(rmnimbus_state,sio_serial_receive) /* receive handler */
};
/* Floppy drives WD2793 */
const wd17xx_interface nimbus_wd17xx_interface =
{
DEVCB_LINE_GND,
DEVCB_DRIVER_LINE_MEMBER(rmnimbus_state,nimbus_fdc_intrq_w),
DEVCB_DRIVER_LINE_MEMBER(rmnimbus_state,nimbus_fdc_drq_w),
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
static const UINT16 def_config[16] =
{
0x0280, 0x017F, 0xE822, 0x8129,
@ -192,11 +145,9 @@ READ8_MEMBER(rmnimbus_state::cascade_callback)
void rmnimbus_state::machine_reset()
{
/* CPU */
// nimbus_cpu_reset();
iou_reset();
fdc_reset();
hdc_reset();
keyboard_reset();
pc8031_reset();
rmni_sound_reset();
memory_reset();
@ -218,10 +169,6 @@ DRIVER_INIT_MEMBER(rmnimbus_state,nimbus)
void rmnimbus_state::machine_start()
{
/* init cpu */
// nimbus_cpu_init();
m_keyboard.keyscan_timer=machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rmnimbus_state::keyscan_callback),this));
m_nimbus_mouse.m_mouse_timer=machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rmnimbus_state::mouse_callback),this));
/* setup debug commands */
@ -235,6 +182,7 @@ void rmnimbus_state::machine_start()
}
m_debug_machine=DEBUG_NONE;
m_fdc->dden_w(0);
}
static void execute_debug_irq(running_machine &machine, int ref, int params, const char *param[])
@ -1039,83 +987,6 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_io_w)
}
}
/*
Keyboard emulation
*/
void rmnimbus_state::keyboard_reset()
{
memset(m_keyboard.keyrows,0xFF,NIMBUS_KEYROWS);
// Setup timer to scan m_keyboard.
m_keyboard.keyscan_timer->adjust(attotime::zero, 0, attotime::from_hz(50));
}
void rmnimbus_state::queue_scancode(UINT8 scancode)
{
m_keyboard.queue[m_keyboard.head] = scancode;
m_keyboard.head++;
m_keyboard.head %= ARRAY_LENGTH(m_keyboard.queue);
}
int rmnimbus_state::keyboard_queue_read()
{
int data;
if (m_keyboard.tail == m_keyboard.head)
return -1;
data = m_keyboard.queue[m_keyboard.tail];
if (LOG_KEYBOARD)
logerror("keyboard_queue_read(): Keyboard Read 0x%02x\n",data);
m_keyboard.tail++;
m_keyboard.tail %= ARRAY_LENGTH(m_keyboard.queue);
return data;
}
void rmnimbus_state::scan_keyboard()
{
UINT8 keyrow;
UINT8 row;
UINT8 bitno;
UINT8 mask;
static const char *const keynames[] = {
"KEY0", "KEY1", "KEY2", "KEY3", "KEY4",
"KEY5", "KEY6", "KEY7", "KEY8", "KEY9",
"KEY10"
};
for(row=0;row<NIMBUS_KEYROWS;row++)
{
keyrow=machine().root_device().ioport(keynames[row])->read();
for(mask=0x80, bitno=7;mask>0;mask=mask>>1, bitno-=1)
{
if(!(keyrow & mask) && (m_keyboard.keyrows[row] & mask))
{
if (LOG_KEYBOARD) logerror("keypress %02X\n",(row<<3)+bitno);
queue_scancode((row<<3)+bitno);
}
if((keyrow & mask) && !(m_keyboard.keyrows[row] & mask))
{
if (LOG_KEYBOARD) logerror("keyrelease %02X\n",0x80+(row<<3)+bitno);
queue_scancode(0x80+(row<<3)+bitno);
}
}
m_keyboard.keyrows[row]=keyrow;
}
}
TIMER_CALLBACK_MEMBER(rmnimbus_state::keyscan_callback)
{
scan_keyboard();
}
/*
Z80SIO, used for the keyboard interface
@ -1135,46 +1006,20 @@ WRITE_LINE_MEMBER(rmnimbus_state::sio_interrupt)
m_sio_int_state=state;
if(state)
external_int(0,EXTERNAL_INT_Z80SIO);
external_int(0, m_z80sio->m1_r());
}
}
#ifdef UNUSED_FUNCTION
WRITE8_MEMBER(rmnimbus_state::sio_dtr_w)
{
if (offset == 1)
{
}
}
#endif
WRITE16_MEMBER(rmnimbus_state::sio_serial_transmit)
{
}
READ16_MEMBER(rmnimbus_state::sio_serial_receive)
{
if(offset==0)
{
return keyboard_queue_read();
}
else
return -1;
}
/* Floppy disk */
void rmnimbus_state::fdc_reset()
{
wd2793_device *fdc = machine().device<wd2793_device>(FDC_TAG);
m_nimbus_drives.reg400=0;
m_scsi_ctrl_out->write(0);
m_nimbus_drives.int_ff=0;
fdc->set_pause_time(FDC_PAUSE);
}
void rmnimbus_state::set_disk_int(int state)
WRITE_LINE_MEMBER(rmnimbus_state::nimbus_fdc_intrq_w)
{
if(LOG_DISK)
logerror("nimbus_drives_intrq = %d\n",state);
@ -1188,11 +1033,6 @@ void rmnimbus_state::set_disk_int(int state)
}
}
WRITE_LINE_MEMBER(rmnimbus_state::nimbus_fdc_intrq_w)
{
set_disk_int(state);
}
WRITE_LINE_MEMBER(rmnimbus_state::nimbus_fdc_drq_w)
{
if(LOG_DISK)
@ -1231,51 +1071,41 @@ UINT8 rmnimbus_state::fdc_driveno(UINT8 drivesel)
7 !REQ from HDD
*/
READ8_MEMBER(rmnimbus_state::nimbus_disk_r)
READ8_MEMBER(rmnimbus_state::scsi_r)
{
int result = 0;
wd2793_device *fdc = machine().device<wd2793_device>(FDC_TAG);
int pc=space.device().safe_pc();
legacy_floppy_image_device *drive = machine().device<legacy_floppy_image_device>(nimbus_wd17xx_interface.floppy_drive_tags[FDC_DRIVE()]);
char drive[5];
floppy_image_device *floppy;
sprintf(drive, "%d", FDC_DRIVE());
floppy = m_fdc->subdevice<floppy_connector>(drive)->get_device();
switch(offset*2)
{
case 0x08 :
result = fdc->status_r(space, 0);
if (LOG_DISK_FDD) logerror("Disk status=%2.2X\n",result);
break;
case 0x0A :
result = fdc->track_r(space, 0);
break;
case 0x0C :
result = fdc->sector_r(space, 0);
break;
case 0x0E :
result = fdc->data_r(space, 0);
break;
case 0x10 :
case 0x00 :
result |= !m_scsi_req << 7;
result |= !m_scsi_cd << 6;
result |= !m_scsi_io << 5;
result |= !m_scsi_bsy << 4;
result |= m_scsi_msg << 3;
result |= FDC_MOTOR() << 2;
result |= !drive->floppy_drive_get_flag_state(FLOPPY_DRIVE_INDEX) << 1;
result |= drive->floppy_drive_get_flag_state(FLOPPY_DRIVE_READY) << 0;
if(floppy)
{
result |= FDC_MOTOR() << 2;
result |= (!floppy->idx_r()) << 1;
result |= floppy->ready_r() << 0;
}
break;
case 0x18 :
case 0x08 :
result = m_scsi_data_in->read();
hdc_post_rw();
default:
break;
}
if(LOG_DISK_FDD && ((offset*2)<=0x10))
logerror("Nimbus FDCR at pc=%08X from %04X data=%02X\n",pc,(offset*2)+0x400,result);
if((LOG_DISK_HDD) && ((offset*2)>=0x10))
logerror("Nimbus HDCR at pc=%08X from %04X data=%02X\n",pc,(offset*2)+0x400,result);
if(LOG_DISK_HDD)
logerror("Nimbus HDCR at pc=%08X from %04X data=%02X\n",pc,(offset*2)+0x410,result);
return result;
}
@ -1291,7 +1121,31 @@ READ8_MEMBER(rmnimbus_state::nimbus_disk_r)
5 fdc motor on
6 hdc drq enabled
7 fdc drq enabled
*/
WRITE8_MEMBER(rmnimbus_state::fdc_ctl_w)
{
UINT8 reg400_old = m_nimbus_drives.reg400;
char drive[5];
floppy_image_device *floppy;
m_nimbus_drives.reg400 = data;
sprintf(drive, "%d", FDC_DRIVE());
floppy = m_fdc->subdevice<floppy_connector>(drive)->get_device();
m_fdc->set_floppy(floppy);
if(floppy)
{
floppy->ss_w(FDC_SIDE());
floppy->mon_w(!FDC_MOTOR());
}
// if we enable hdc drq with a pending condition, act on it
if((data & HDC_DRQ_MASK) && (~reg400_old & HDC_DRQ_MASK))
hdc_drq();
}
/*
0x410 write bits
0 SCSI reset
@ -1299,45 +1153,15 @@ READ8_MEMBER(rmnimbus_state::nimbus_disk_r)
2 SCSI IRQ Enable
*/
WRITE8_MEMBER(rmnimbus_state::nimbus_disk_w)
WRITE8_MEMBER(rmnimbus_state::scsi_w)
{
wd2793_device *fdc = machine().device<wd2793_device>(FDC_TAG);
int pc=space.device().safe_pc();
UINT8 reg400_old = m_nimbus_drives.reg400;
int pc=space.device().safe_pc();
if(LOG_DISK_FDD && ((offset*2)<=0x10))
logerror("Nimbus FDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x400);
if((LOG_DISK_HDD) && (((offset*2)>=0x10) || (offset==0)))
logerror("Nimbus HDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x400);
if(LOG_DISK_HDD)
logerror("Nimbus HDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x410);
switch(offset*2)
{
case 0x00 :
m_nimbus_drives.reg400=data;
fdc->set_drive(FDC_DRIVE());
fdc->set_side(FDC_SIDE());
// Nimbus FDC is hard wired for double density
//fdc->set_density(DEN_MFM_LO);
// if we enable hdc drq with a pending condition, act on it
if((data & HDC_DRQ_MASK) && (~reg400_old & HDC_DRQ_MASK))
hdc_drq();
break;
case 0x08 :
fdc->command_w(space, 0, data);
break;
case 0x0A :
fdc->track_w(space, 0, data);
break;
case 0x0C :
fdc->sector_w(space, 0, data);
break;
case 0x0E :
fdc->data_w(space, 0, data);
break;
case 0x10 :
m_scsi_ctrl_out->write(data);
break;
@ -1361,7 +1185,7 @@ WRITE_LINE_MEMBER(rmnimbus_state::write_scsi_iena)
// If we enable the HDC interupt, and an interrupt is pending, go deal with it.
if (m_scsi_iena && !last && !m_scsi_io && !m_scsi_cd && !m_scsi_req)
set_disk_int(1);
nimbus_fdc_intrq_w(1);
}
void rmnimbus_state::hdc_post_rw()
@ -1644,7 +1468,6 @@ void rmnimbus_state::iou_reset()
void rmnimbus_state::rmni_sound_reset()
{
//m_ay8910->reset();
m_msm->reset_w(1);
m_last_playmode = MSM5205_S48_4B;
@ -1653,31 +1476,6 @@ void rmnimbus_state::rmni_sound_reset()
m_ay8910_a=0;
}
READ8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_r)
{
UINT8 result=0;
if ((offset*2)==0)
result = m_ay8910->data_r(space, 0);
return result;
}
WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_w)
{
int pc=space.device().safe_pc();
if(LOG_SOUND)
logerror("Nimbus SoundW %05X write of %02X to %04X\n",pc,data,(offset*2)+0xE0);
switch (offset*2)
{
case 0x00 : m_ay8910->data_address_w(space, 1, data); break;
case 0x02 : m_ay8910->data_address_w(space, 0, data); break;
}
}
WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_porta_w)
{
m_msm->data_w(data);
@ -1916,9 +1714,3 @@ WRITE_LINE_MEMBER(rmnimbus_state::nimbus_via_irq_w)
if(state)
external_int(VIA_INT,0x00);
}
WRITE_LINE_MEMBER(rmnimbus_state::nimbus_ack_w)
{
via6522_device *via_1 = machine().device<via6522_device>(VIA_TAG);
via_1->write_ca1(!state); /* ack seems to be inverted? */
}

207
src/mess/machine/rmnkbd.c Normal file
View File

@ -0,0 +1,207 @@
#include "machine/rmnkbd.h"
rmnimbus_keyboard_device::rmnimbus_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
serial_keyboard_device(mconfig, RMNIMBUS_KEYBOARD, "RM Nimbus Keyboard", tag, owner, 0, "rmnimbus_keyboard", __FILE__),
m_io_kbd8(*this, "TERM_LINE8"),
m_io_kbd9(*this, "TERM_LINE9"),
m_io_kbda(*this, "TERM_LINEA")
{
}
UINT8 rmnimbus_keyboard_device::keyboard_handler(UINT8 last_code, UINT8 *scan_line)
{
int i = *scan_line, j;
UINT8 code = 0, change;
if (i == 0) code = m_io_kbd0->read();
else
if (i == 1) code = m_io_kbd1->read();
else
if (i == 2) code = m_io_kbd2->read();
else
if (i == 3) code = m_io_kbd3->read();
else
if (i == 4) code = m_io_kbd4->read();
else
if (i == 5) code = m_io_kbd5->read();
else
if (i == 6) code = m_io_kbd6->read();
else
if (i == 7) code = m_io_kbd7->read();
else
if (i == 8) code = m_io_kbd8->read();
else
if (i == 9) code = m_io_kbd9->read();
else
if (i == 10) code = m_io_kbda->read();
*scan_line = (*scan_line + 1) % 11;
code = ~code;
if(m_state[i] == code)
return 0;
change = (m_state[i] ^ code);
for(j = 0; j < 8; j++)
if((change >> j) == 1) break;
change = (1 << j);
m_state[i] ^= change;
return ((change & code) ? 0 : 0x80) | ((i << 3) + j);
}
static INPUT_PORTS_START( rmnimbus_keyboard )
PORT_START("TERM_LINE0") /* Key row 0 scancodes 00..07 */
//PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
PORT_START("TERM_LINE1") /* Key row 1 scancodes 08..0F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09)
PORT_START("TERM_LINE2") /* Key row 2 scancodes 10..17 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I')
PORT_START("TERM_LINE3") /* Key row 3 scancodes 18..1F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0D)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) // Ether control
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S')
PORT_START("TERM_LINE4") /* Key row 4 scancodes 20..27 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';')
PORT_START("TERM_LINE5") /* Key row 5 scancodes 28..2F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('#')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSLASH") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LSHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TILDE") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V')
PORT_START("TERM_LINE6") /* Key row 6 scancodes 30..37 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RSHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_2)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRSCR") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('*')
PORT_START("TERM_LINE7") /* Key row 7 scancodes 38..3F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
PORT_START("TERM_LINE8") /* Key row 8 scancodes 40..47 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NUMLK") PORT_CODE(KEYCODE_NUMLOCK)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SCRLK") PORT_CODE(KEYCODE_SCRLOCK)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7')
PORT_START("TERM_LINE9") /* Key row 9 scancodes 48..4F */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP8") PORT_CODE(KEYCODE_8_PAD) //PORT_CHAR('8')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP9") PORT_CODE(KEYCODE_9_PAD) //PORT_CHAR('9')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP-") PORT_CODE(KEYCODE_MINUS_PAD) //PORT_CHAR('-')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP4") PORT_CODE(KEYCODE_4_PAD) //PORT_CHAR('4')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) //PORT_CHAR('5')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) //PORT_CHAR('6')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) //PORT_CHAR('+')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) //PORT_CHAR('1')
PORT_START("TERM_LINEA") /* Key row 10 scancodes 50..57 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP2") PORT_CODE(KEYCODE_2_PAD) //PORT_CHAR('2')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP3") PORT_CODE(KEYCODE_3_PAD) //PORT_CHAR('3')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP0") PORT_CODE(KEYCODE_0_PAD) //PORT_CHAR('0')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP.") PORT_CODE(KEYCODE_DEL_PAD) //PORT_CHAR('.')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
//PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5')
//PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6')
//PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('+')
//PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1')
PORT_START("TERM_LINEC")
PORT_START("RS232_TXBAUD")
PORT_CONFNAME(0xff, RS232_BAUD_9600, "TX Baud") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_keyboard_device, update_serial)
PORT_CONFSETTING( RS232_BAUD_9600, "9600")
PORT_START("RS232_STARTBITS")
PORT_CONFNAME(0xff, RS232_STARTBITS_1, "Start Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_keyboard_device, update_serial)
PORT_CONFSETTING( RS232_STARTBITS_1, "1")
PORT_START("RS232_DATABITS")
PORT_CONFNAME(0xff, RS232_DATABITS_8, "Data Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_keyboard_device, update_serial)
PORT_CONFSETTING( RS232_DATABITS_8, "8")
PORT_START("RS232_PARITY")
PORT_CONFNAME(0xff, RS232_PARITY_NONE, "Parity") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_keyboard_device, update_serial)
PORT_CONFSETTING( RS232_PARITY_NONE, "None")
PORT_START("RS232_STOPBITS")
PORT_CONFNAME(0xff, RS232_STOPBITS_1, "Stop Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_keyboard_device, update_serial)
PORT_CONFSETTING( RS232_STOPBITS_1, "1")
INPUT_PORTS_END
ioport_constructor rmnimbus_keyboard_device::device_input_ports() const
{
return INPUT_PORTS_NAME(rmnimbus_keyboard);
}
void rmnimbus_keyboard_device::device_start()
{
serial_keyboard_device::device_start();
memset(m_state, '\0', sizeof(m_state));
}
const device_type RMNIMBUS_KEYBOARD = &device_creator<rmnimbus_keyboard_device>;

26
src/mess/machine/rmnkbd.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef RMNKBD_H_
#define RMNKBD_H_
#include "bus/rs232/keyboard.h"
class rmnimbus_keyboard_device : public serial_keyboard_device
{
public:
rmnimbus_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ioport_constructor device_input_ports() const;
protected:
virtual void device_start();
private:
virtual UINT8 keyboard_handler(UINT8 last_code, UINT8 *scan_line);
required_ioport m_io_kbd8;
required_ioport m_io_kbd9;
required_ioport m_io_kbda;
UINT8 m_state[11];
};
extern const device_type RMNIMBUS_KEYBOARD;
#endif /* RMNKBD_H_ */

View File

@ -1644,6 +1644,7 @@ $(MESSOBJ)/rm.a: \
$(MESS_DRIVERS)/rmnimbus.o \
$(MESS_MACHINE)/rmnimbus.o \
$(MESS_VIDEO)/rmnimbus.o \
$(MESS_MACHINE)/rmnkbd.o \
$(MESSOBJ)/robotron.a: \
$(MESS_DRIVERS)/a5105.o \