Merge pull request #2030 from mgarlanger/basic_heathkit_updates

- h19 [Mark Garlanger]
   - Added comments about the memory and port layout from the manual.
   - Fixed the frequency of the beep/keyclick: 2kHz -> 1 kHz
   - Fixed the duration of the keyclick: 4 mSec -> 6 mSec
   - Fixed the screen size: 200 pixels high -> 250 pixels high
   - The code appears to ignore it, and goes by what is programmed in the mc6845, which 
      is wrong, on a real H19, the screen size/character size does not change when the 25th 
      line is enabled/disabled. Only an extra line is shown on the screen. The emulated h19, 
      should always have space for 25 line, whether or not the 25th is enabled.
   - Separated the alternative ROMs into separate machines.

-h89.cpp  [Mark Garlanger]
   - Fixed the memory map.
   - Added the disk controller RAM to the lower memory
   - Added comment about banked-switched ROM/RAM (Org-0).
   - Fixed port addresses and added more comments to them.
   - Many are still commented out, but the addresses are all valid now.
   - Added SW501 switch definitions for the early ROMs.
   - These are commented out, not show the right way to represent multiple definitions.
This commit is contained in:
Miodrag Milanović 2017-02-05 13:08:41 +01:00 committed by GitHub
commit 4ca104b092
2 changed files with 137 additions and 28 deletions

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Robbbert
// copyright-holders:Robbbert, Mark Garlanger
/***************************************************************************
Heathkit H19
@ -32,6 +32,34 @@
Bios 1 (super19) has the videoram at D800. This is not emulated.
However, a keyclick can be heard, to assure you it does in fact work.
****************************************************************************/
/***************************************************************************
Memory Layout
The U435 three-to-eight line decoder uses A14 and A15 to generate three memory addresses:
1. Program ROM 0x0000
2. Scratchpad RAM 0x4000
3. Display Memory 0xF800
Port Layout
Only address lines A5, A6, A7 are used by the U442 three-to-eight line decoder
1. Keyboard encoder 0x80
2. Keyboard status 0xA0
3. CRT controller 0x60
4. Power-up configuration (primary) 0x00
5. Power-up configuration (secondary) 0x20
6. ACE (communications) 0x40
7. Bell enable 0xE0
8. Key click enable 0xC0
Decoder U442 is enabled only during an I/O read or write operation to elimnate the
possibility of false decoding on a refresh address coming from the Z80.
****************************************************************************/
#include "emu.h"
@ -41,8 +69,11 @@
#include "machine/ins8250.h"
#include "machine/keyboard.h"
// Standard H19 used a 2.048 MHz clock
#define H19_CLOCK (XTAL_12_288MHz / 6)
#define H19_BEEP_FRQ (H19_CLOCK / 1024)
// Beep Frequency is 1 KHz
#define H19_BEEP_FRQ (H19_CLOCK / 2048)
class h19_state : public driver_device
@ -115,11 +146,11 @@ READ8_MEMBER( h19_state::h19_a0_r )
WRITE8_MEMBER( h19_state::h19_c0_w )
{
/* Beeper control - a 96L02 contains 2 oneshots, one for bell and one for keyclick.
- lengths need verifying
offset 00-1F = keyclick
offset 20-3F = terminal bell */
uint8_t length = (offset & 0x20) ? 200 : 4;
uint8_t length = (offset & 0x20) ? 200 : 6;
m_beep->set_state(1);
timer_set(attotime::from_msec(length), TIMER_BEEP_OFF);
}
@ -360,7 +391,7 @@ static const gfx_layout h19_charlayout =
{
8, 10, /* 8 x 10 characters */
128, /* 128 characters */
1, /* 1 bits per pixel */
1, /* 1 bits per pixel */
{ 0 }, /* no bitplanes */
/* x offsets */
{ 0, 1, 2, 3, 4, 5, 6, 7 },
@ -391,8 +422,8 @@ static MACHINE_CONFIG_START( h19, h19_state )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
MCFG_SCREEN_SIZE(640, 200)
MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1)
MCFG_SCREEN_SIZE(640, 250)
MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 250 - 1)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", h19)
MCFG_PALETTE_ADD_MONOCHROME("palette")
@ -418,14 +449,7 @@ MACHINE_CONFIG_END
ROM_START( h19 )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
// Original
ROM_SYSTEM_BIOS(0, "orig", "Original")
ROMX_LOAD( "2732_444-46_h19code.bin", 0x0000, 0x1000, CRC(f4447da0) SHA1(fb4093d5b763be21a9580a0defebed664b1f7a7b), ROM_BIOS(1))
// Super H19 ROM (
ROM_SYSTEM_BIOS(1, "super", "Super 19")
ROMX_LOAD( "2732_super19_h447.bin", 0x0000, 0x1000, CRC(6c51aaa6) SHA1(5e368b39fe2f1af44a905dc474663198ab630117), ROM_BIOS(2))
// Watzman ROM
ROM_SYSTEM_BIOS(2, "watzman", "Watzman")
ROMX_LOAD( "watzman.bin", 0x0000, 0x1000, CRC(8168b6dc) SHA1(bfaebb9d766edbe545d24bc2b6630be4f3aa0ce9), ROM_BIOS(3))
ROM_LOAD( "2732_444-46_h19code.bin", 0x0000, 0x1000, CRC(f4447da0) SHA1(fb4093d5b763be21a9580a0defebed664b1f7a7b))
ROM_REGION( 0x0800, "chargen", 0 )
// Original font dump
@ -434,11 +458,38 @@ ROM_START( h19 )
ROM_REGION( 0x1000, "keyboard", 0 )
// Original dump
ROM_LOAD( "2716_444-37_h19keyb.bin", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c))
ROM_END
ROM_START( super19 )
// Super H19 ROM
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD( "2732_super19_h447.bin", 0x0000, 0x1000, CRC(6c51aaa6) SHA1(5e368b39fe2f1af44a905dc474663198ab630117))
ROM_REGION( 0x0800, "chargen", 0 )
// Original font dump
ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0))
ROM_REGION( 0x1000, "keyboard", 0 )
// Original dump
ROM_LOAD( "2716_444-37_h19keyb.bin", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c))
ROM_END
ROM_START( watz19 )
// Watzman ROM
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD( "watzman.bin", 0x0000, 0x1000, CRC(8168b6dc) SHA1(bfaebb9d766edbe545d24bc2b6630be4f3aa0ce9))
ROM_REGION( 0x0800, "chargen", 0 )
// Original font dump
ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0))
// Watzman keyboard
ROM_REGION( 0x1000, "keyboard", 0 )
ROM_LOAD( "keybd.bin", 0x0800, 0x0800, CRC(58dc8217) SHA1(1b23705290bdf9fc6342065c6a528c04bff67b13))
ROM_END
/* Driver (year is either 1978 or 1979) */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
COMP( 1979, h19, 0, 0, h19, h19, driver_device, 0, "Heath Inc", "Heathkit H-19", MACHINE_NOT_WORKING )
/* TODO - verify the years for these third-party replacement ROMs. */
COMP( 1982, super19, h19, 0, h19, h19, driver_device, 0, "Heath Inc", "Heathkit H-19 w/ Super-19 ROM", MACHINE_NOT_WORKING )
COMP( 1982, watz19, h19, 0, h19, h19, driver_device, 0, "Heath Inc", "Heathkit H-19 w/ Watzman ROM", MACHINE_NOT_WORKING )
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
COMP( 1978, h19, 0, 0, h19, h19, driver_device, 0, "Heath Inc", "Heathkit H-19", MACHINE_NOT_WORKING )

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Sandro Ronco
// copyright-holders:Sandro Ronco, Mark Garlanger
/***************************************************************************
Heathkit H89
@ -46,27 +46,82 @@ public:
static ADDRESS_MAP_START(h89_mem, AS_PROGRAM, 8, h89_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x1fff) AM_ROM
// Bank 0 - At startup has the format defined below, but software could swap it for RAM (Later H-89s and
// Early ones with the Org-0 modification),
// TODO - define the RAM so it can swap in/out under program control.
AM_RANGE(0x0000, 0x0fff) AM_ROM // Page 0-4 - System ROM (at most 4k(MTR-90), early versions(MTR-88, MTR-89) only had 2k)
AM_RANGE(0x1000, 0x13ff) AM_RAM // Page 5 - Floppy Disk RAM (Write-protectable)
AM_RANGE(0x1400, 0x1fff) AM_ROM // Page 6-7 - Floppy Disk ROM
// Banks 1-7
AM_RANGE(0x2000, 0xffff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( h89_io, AS_IO, 8, h89_state)
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
// AM_RANGE(0x78, 0x7b) expansion 1
// AM_RANGE(0x7c, 0x7f) expansion 2
// AM_RANGE(0x78, 0x7b) expansion 1 // Options - Cassette I/O (only uses 0x78 - 0x79) Requires MTR-88 ROM
// - H37 5-1/4" Soft-sectored Controller MTR-90 ROM
// - H47 Dual 8" Drives - Requires MTR-89 or MTR-90 ROM
// - H67 8" Hard disk + 8" Floppy Drives - MTR-90 ROM
// AM_RANGE(0x7c, 0x7f) expansion 2 // Options - 5-1/4" Hard-sectored Controller (works with ALL ROMs)
// - H47 Dual 8" Drives - Requires MTR-89 or MTR-90 ROM
// - H67 8" Hard disk + 8" Floppy Drives - MTR-90 ROM
// AM_RANGE(0xd0, 0xd7) 8250 UART DCE
// AM_RANGE(0xd8, 0xdf) 8250 UART DTE
// AM_RANGE(0xe0, 0xe7) 8250 UART LP
AM_RANGE(0xe8, 0xef) AM_DEVREADWRITE("ins8250", ins8250_device, ins8250_r, ins8250_w) // 8250 UART console
// AM_RANGE(0xf0, 0xf1) front panel
// AM_RANGE(0xd8, 0xdf) 8250 UART DTE - MODEM
// AM_RANGE(0xe0, 0xe7) 8250 UART DCE - LP
AM_RANGE(0xe8, 0xef) AM_DEVREADWRITE("ins8250", ins8250_device, ins8250_r, ins8250_w) // 8250 UART console - this
// connects internally to a Terminal board
// that is also used in the H19. Ideally,
// the H19 code could be connected and ran
// as a separate thread.
// AM_RANGE(0xf0, 0xf1) // ports defined on the H8 - on the H89, access to these addresses causes a NMI
AM_RANGE(0xf2, 0xf2) AM_WRITE(port_f2_w) AM_READ_PORT("SW501")
// AM_RANGE(0xf8, 0xf9) cassette
// AM_RANGE(0xfa, 0xff) serial I/O
// AM_RANGE(0xf3, 0xf3) // ports defined on the H8 - on the H89, access to these addresses causes a NMI
ADDRESS_MAP_END
/* Input ports */
static INPUT_PORTS_START( h89 )
// Settings with the MTR-88 ROM (#444-40)
// PORT_START("SW501")
// PORT_DIPNAME( 0x1f, 0x00, "Unused" ) PORT_DIPLOCATION("S1:1,S1:2,S1:3,S1:4,S1:5")
// PORT_DIPNAME( 0x20, 0x20, "Perform memory test at start" ) PORT_DIPLOCATION("S1:6")
// PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x00, DEF_STR( On ) )
// PORT_DIPNAME( 0xc0, 0x00, "Console Baud rate" ) PORT_DIPLOCATION("S1:7")
// PORT_DIPSETTING( 0x00, "9600" )
// PORT_DIPSETTING( 0x40, "19200" )
// PORT_DIPSETTING( 0x80, "38400" )
// PORT_DIPSETTING( 0xc0, "57600" )
// Settings with the MTR-89 ROM (#444-62)
// PORT_START("SW501")
// PORT_DIPNAME( 0x03, 0x00, "Expansion 1" ) PORT_DIPLOCATION("S1:1,S1:2")
// PORT_DIPSETTING( 0x00, "H-88-1" )
// PORT_DIPSETTING( 0x01, "H/Z-47" )
// PORT_DIPSETTING( 0x02, "Undefined" )
// PORT_DIPSETTING( 0x03, "Undefined" )
// PORT_DIPNAME( 0x0c, 0x00, "Expansion 2" ) PORT_DIPLOCATION("S1:3,S1:4")
// PORT_DIPSETTING( 0x00, "Unused" )
// PORT_DIPSETTING( 0x04, "H/Z-47" )
// PORT_DIPSETTING( 0x08, "Undefined" )
// PORT_DIPSETTING( 0x0c, "Undefined" )
// PORT_DIPNAME( 0x10, 0x00, "Boot from" ) PORT_DIPLOCATION("S1:5")
// PORT_DIPSETTING( 0x00, "Expansion 1" )
// PORT_DIPSETTING( 0x10, "Expansion 2" )
// PORT_DIPNAME( 0x20, 0x20, "Perform memory test at start" ) PORT_DIPLOCATION("S1:6")
// PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x00, DEF_STR( On ) )
// PORT_DIPNAME( 0x40, 0x00, "Console Baud rate" ) PORT_DIPLOCATION("S1:7")
// PORT_DIPSETTING( 0x00, "9600" )
// PORT_DIPSETTING( 0x40, "19200" )
// PORT_DIPNAME( 0x80, 0x00, "Boot mode" ) PORT_DIPLOCATION("S1:8")
// PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
// PORT_DIPSETTING( 0x80, "Auto" )
// Settings with the MTR-90 ROM (#444-84 or 444-142)
PORT_START("SW501")
PORT_DIPNAME( 0x03, 0x00, "Expansion 1" ) PORT_DIPLOCATION("S1:1,S1:2")
PORT_DIPSETTING( 0x00, "H-88-1" )
@ -105,10 +160,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(h89_state::h89_irq_timer)
WRITE8_MEMBER( h89_state::port_f2_w )
{
// Bit 0 - Single-step
// Bit 1 - Enable timer interrupt (2mSec Clock)
m_port_f2 = data;
}
static DEVICE_INPUT_DEFAULTS_START( terminal )
// TODO - baud rate should be controlled by SW501 setting
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )