Previous 15994 Revisions Next

r9765 Monday 13th December, 2010 at 08:04:38 UTC by Robbbert
[H19] Added notes. Added uart device. Added dipswitches.
[src/mess/drivers]h19.c

src/mess/drivers/h19.c
r9764r9765
44
55        12/05/2009 Skeleton driver.
66
7        The keyboard consists of a 9x10 matrix connected to a MM5740N
8        mask-programmed keyboard controller. The output of this passes
9        through a rom. The MM5740N may be custom-made, in which case it
10        will need to be procured and tested. There is a "default" array;
11        perhaps this is used. The presence of the rom would seem to
12        indicate that the default is being used. We won't know, of
13        course, until the device is emulated.
14
15        Keyboard input can also come from the serial port (a 8250).
16        Either device will signal an interrupt to the CPU when a key
17        is pressed/sent.
18
19        MAME's implentation of the 8250 seems incomplete, for example
20        there is no facility to change the clock speed.
21
22        For the moment, the "terminal" device is used for the keyboard,
23        and the interrupt is a periodic timer.
24
725****************************************************************************/
826
927#include "emu.h"
1028#include "cpu/z80/z80.h"
1129#include "video/mc6845.h"
1230#include "sound/beep.h"
31#include "machine/ins8250.h"
1332
33
1434#define H19_CLOCK (XTAL_12_288MHz / 6)
1535#define H19_BEEP_FRQ (H19_CLOCK / 1024)
16// next one needs to be measured
17#define H19_IRQ_PULSE (H19_BEEP_FRQ / 2)
1836
1937
2038class h19_state : public driver_device
r9764r9765
6381static ADDRESS_MAP_START( h19_io , ADDRESS_SPACE_IO, 8)
6482   ADDRESS_MAP_UNMAP_HIGH
6583   ADDRESS_MAP_GLOBAL_MASK(0xff)
66   AM_RANGE(0x60, 0x60) AM_MIRROR(0x1E) AM_DEVWRITE("crtc", mc6845_address_w)
67   AM_RANGE(0x61, 0x61) AM_MIRROR(0x1E) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
84   AM_RANGE(0x00, 0x1F) AM_READ_PORT("S401")
85   AM_RANGE(0x20, 0x3F) AM_READ_PORT("S402")
86   AM_RANGE(0x40, 0x47) AM_MIRROR(0x18) AM_DEVREADWRITE("ins8250", ins8250_r, ins8250_w )
87   AM_RANGE(0x60, 0x60) AM_DEVWRITE("crtc", mc6845_address_w)
88   AM_RANGE(0x61, 0x61) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
6889   AM_RANGE(0xc0, 0xff) AM_WRITE(h19_c0_w)
69   //AM_RANGE(0x00, 0x3F) powerup logic
70   //AM_RANGE(0x40, 0x5F) serial control
71   //AM_RANGE(0x80, 0x9F) keyboard data
90   //AM_RANGE(0x80, 0x9F) keyboard control
7291   //AM_RANGE(0xA0, 0xBF) keyboard control
7392ADDRESS_MAP_END
7493
7594/* Input ports */
7695static INPUT_PORTS_START( h19 )
96   PORT_START("S401")
97   PORT_DIPNAME( 0x0f, 0x03, "Baud Rate")
98   PORT_DIPSETTING(    0x01, "110")
99   PORT_DIPSETTING(    0x02, "150")
100   PORT_DIPSETTING(    0x03, "300")
101   PORT_DIPSETTING(    0x04, "600")
102   PORT_DIPSETTING(    0x05, "1200")
103   PORT_DIPSETTING(    0x06, "1800")
104   PORT_DIPSETTING(    0x07, "2000")
105   PORT_DIPSETTING(    0x08, "2400")
106   PORT_DIPSETTING(    0x09, "3600")
107   PORT_DIPSETTING(    0x0a, "4800")
108   PORT_DIPSETTING(    0x0b, "7200")
109   PORT_DIPSETTING(    0x0c, "9600")
110   PORT_DIPSETTING(    0x0d, "19200")
111   PORT_DIPNAME( 0x30, 0x00, "Parity")
112   PORT_DIPSETTING(    0x00, DEF_STR(None))
113   PORT_DIPSETTING(    0x10, "Odd")
114   PORT_DIPSETTING(    0x30, "Even")
115   PORT_DIPNAME( 0x40, 0x00, "Parity Type")
116   PORT_DIPSETTING(    0x00, DEF_STR(Normal))
117   PORT_DIPSETTING(    0x40, "Stick")
118   PORT_DIPNAME( 0x80, 0x00, "Duplex")
119   PORT_DIPSETTING(    0x00, "Half")
120   PORT_DIPSETTING(    0x80, "Full")
121
122   PORT_START("S402")
123   PORT_DIPNAME( 0x01, 0x00, "Cursor")
124   PORT_DIPSETTING(    0x00, "Underline")
125   PORT_DIPSETTING(    0x01, "Block")
126   PORT_DIPNAME( 0x02, 0x00, "Keyclick")
127   PORT_DIPSETTING(    0x02, DEF_STR(No))
128   PORT_DIPSETTING(    0x00, DEF_STR(Yes))
129   PORT_DIPNAME( 0x04, 0x00, "Wrap at EOL")
130   PORT_DIPSETTING(    0x00, DEF_STR(No))
131   PORT_DIPSETTING(    0x04, DEF_STR(Yes))
132   PORT_DIPNAME( 0x08, 0x00, "Auto LF on CR")
133   PORT_DIPSETTING(    0x00, DEF_STR(No))
134   PORT_DIPSETTING(    0x08, DEF_STR(Yes))
135   PORT_DIPNAME( 0x10, 0x00, "Auto CR on LF")
136   PORT_DIPSETTING(    0x00, DEF_STR(No))
137   PORT_DIPSETTING(    0x10, DEF_STR(Yes))
138   PORT_DIPNAME( 0x20, 0x00, "Mode")
139   PORT_DIPSETTING(    0x00, "VT52")
140   PORT_DIPSETTING(    0x20, "ANSI")
141   PORT_DIPNAME( 0x40, 0x00, "Keypad Shifted")
142   PORT_DIPSETTING(    0x00, DEF_STR(No))
143   PORT_DIPSETTING(    0x40, DEF_STR(Yes))
144   PORT_DIPNAME( 0x80, 0x00, "Refresh")
145   PORT_DIPSETTING(    0x00, "50Hz")
146   PORT_DIPSETTING(    0x80, "60Hz")
77147INPUT_PORTS_END
78148
79149
r9764r9765
132202   }
133203}
134204
205INS8250_INTERRUPT(h19_ace_irq)
206{
207   cputag_set_input_line(device->machine, "maincpu", 0, (state ? HOLD_LINE : CLEAR_LINE));
208}
209
210static const ins8250_interface h19_ace_interface =
211{
212   4800, // clock (baud * 16)
213   h19_ace_irq, // interrupt
214   NULL, // transmit func
215   NULL, // handshake out
216   NULL // refresh func
217};
218
135219static const mc6845_interface h19_crtc6845_interface =
136220{
137221   "screen",
r9764r9765
170254   MDRV_CPU_ADD("maincpu",Z80, H19_CLOCK) // From schematics
171255   MDRV_CPU_PROGRAM_MAP(h19_mem)
172256   MDRV_CPU_IO_MAP(h19_io)
173   MDRV_DEVICE_PERIODIC_INT(irq0_line_hold, H19_IRQ_PULSE)
257   MDRV_DEVICE_PERIODIC_INT(irq0_line_hold, 50) // see notes above
174258
175259   MDRV_MACHINE_RESET(h19)
176260
r9764r9765
186270   MDRV_PALETTE_INIT(black_and_white)
187271
188272   MDRV_MC6845_ADD("crtc", MC6845, XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
273   MDRV_INS8250_ADD( "ins8250", h19_ace_interface )
189274
190275   MDRV_VIDEO_START( h19 )
191276   MDRV_VIDEO_UPDATE( h19 )
r9764r9765
223308/* Driver (year is either 1978 or 1979) */
224309
225310/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
226COMP( 1978, h19,     0,       0,   h19,   h19,    0,    "Heath Inc", "Heathkit H-19", GAME_NOT_WORKING | GAME_NO_SOUND)
311COMP( 1978, h19,     0,       0,   h19,   h19,    0,    "Heath Inc", "Heathkit H-19", GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team