mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
hp/hp98x6.cpp: Support 3 new machines (#12599)
New machines added as WORKING ----------------------------------- Hewlett-Packard 9826A Hewlett-Packard 9835A Hewlett-Packard 9836C
This commit is contained in:
parent
8f82bd0a7e
commit
8472b085c3
File diff suppressed because it is too large
Load Diff
@ -3,14 +3,14 @@
|
||||
|
||||
// **** High level emulation of 8041 UPI in HP98X6 systems ****
|
||||
//
|
||||
// Configuration jumpers I identified in RAM_POS_CFG_JUMPERS register:
|
||||
// Configuration jumpers in RAM_POS_CFG_JUMPERS register:
|
||||
//
|
||||
// | Bit | Meaning |
|
||||
// |------+---------------------------------------------------|
|
||||
// | 7 | ID PROM is installed |
|
||||
// | 6 | ? |
|
||||
// | 5 | Enter key is named either "ENTER" or "RETURN" (?) |
|
||||
// | 4..1 | ? |
|
||||
// | 6 | UPI revision |
|
||||
// | 5 | 0: HP-HIL keyboards not supported |
|
||||
// | 4..1 | - |
|
||||
// | 0 | Large (0) or small (1) keyboard |
|
||||
//
|
||||
// Sequence to read ID PROM:
|
||||
@ -27,7 +27,6 @@
|
||||
//
|
||||
// TODO:
|
||||
// - Find if FHS and delay timers are self canceling
|
||||
// - Identify more configuration jumpers
|
||||
|
||||
#include "emu.h"
|
||||
#include "hp98x6_upi.h"
|
||||
@ -35,7 +34,7 @@
|
||||
#include "speaker.h"
|
||||
|
||||
// Debugging
|
||||
#define VERBOSE 1
|
||||
#define VERBOSE 0
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
@ -60,26 +59,6 @@ namespace {
|
||||
// Device type definition
|
||||
DEFINE_DEVICE_TYPE(HP98X6_UPI, hp98x6_upi_device, "hp98x6_upi", "UPI of HP98x6 systems")
|
||||
|
||||
// ID PROM for 9816A (it comes straight from O. De Smet's emulator)
|
||||
static const uint8_t id_prom[] = {
|
||||
0x3e,0x38,0x00,0x32,0x30,0x31,0x30,0x41,0x30,0x30,0x30,0x30,0x30,0x30,0x39,0x38,
|
||||
0x31,0x36,0x41,0x20,0x20,0xff,0x01,0x02,0x03,0x04,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
|
||||
};
|
||||
|
||||
// Positions in internal RAM
|
||||
enum : uint8_t {
|
||||
RAM_POS_0_R0,
|
||||
@ -228,6 +207,7 @@ hp98x6_upi_device::hp98x6_upi_device(const machine_config &mconfig, const char *
|
||||
, m_10ms_timer(*this, "timer")
|
||||
, m_delay_timer(*this, "dly")
|
||||
, m_input_delay_timer(*this, "inp_dly")
|
||||
, m_idprom(*this, "idprom")
|
||||
, m_irq1_write_func(*this)
|
||||
, m_irq7_write_func(*this)
|
||||
{
|
||||
@ -456,8 +436,8 @@ void hp98x6_upi_device::device_reset()
|
||||
m_ram[RAM_POS_0_R7_KEY_DOWN] = SCANCODE_NONE;
|
||||
// Assume RESET key is down
|
||||
m_ram[RAM_POS_RST_DEB_CNT] = R2_FLAGS1_DEB_INIT;
|
||||
// PROM is present
|
||||
m_ram[RAM_POS_CFG_JUMPERS] = BIT_MASK<uint8_t>(CFG_JUMPERS_PROM_BIT);
|
||||
// PROM is present if m_idprom != nullptr
|
||||
m_ram[RAM_POS_CFG_JUMPERS] = bool(m_idprom) ? BIT_MASK<uint8_t>(CFG_JUMPERS_PROM_BIT) : 0;
|
||||
// Assume US English
|
||||
m_ram[RAM_POS_LNG_JUMPERS] = 0;
|
||||
m_ram[RAM_POS_1_R3_TIMER_STS] = 0;
|
||||
@ -623,7 +603,7 @@ void hp98x6_upi_device::decode_cmd(uint8_t cmd)
|
||||
// Read from ID PROM when enabled
|
||||
if (m_ram[RAM_POS_READING_PROM] &&
|
||||
m_ram[RAM_POS_1_R6_R_PTR] == RAM_POS_0_R1) {
|
||||
m_ram[RAM_POS_0_R1] = id_prom[m_ram[RAM_POS_PROM_ADDR]];
|
||||
m_ram[RAM_POS_0_R1] = m_idprom[m_ram[RAM_POS_PROM_ADDR]];
|
||||
LOG("PROM @%02x=%02x\n", m_ram[RAM_POS_PROM_ADDR], m_ram[RAM_POS_0_R1]);
|
||||
m_ram[RAM_POS_PROM_ADDR]++;
|
||||
}
|
||||
@ -659,9 +639,13 @@ void hp98x6_upi_device::decode_cmd(uint8_t cmd)
|
||||
case CMD_RD_PROM_START:
|
||||
// 1100'0001
|
||||
// Start reading ID PROM
|
||||
LOG("Start PROM read\n");
|
||||
m_ram[RAM_POS_READING_PROM] = 1;
|
||||
m_ram[RAM_POS_PROM_ADDR] = 0;
|
||||
if (bool(m_idprom)) {
|
||||
LOG("Start PROM read\n");
|
||||
m_ram[RAM_POS_READING_PROM] = 1;
|
||||
m_ram[RAM_POS_PROM_ADDR] = 0;
|
||||
} else {
|
||||
LOG("Attempt to read from non-existing PROM\n");
|
||||
}
|
||||
break;
|
||||
case CMD_RD_PROM_STOP:
|
||||
// 1100'0000
|
||||
|
@ -55,6 +55,9 @@ private:
|
||||
required_device<timer_device> m_delay_timer;
|
||||
required_device<timer_device> m_input_delay_timer;
|
||||
|
||||
// ID PROM
|
||||
optional_region_ptr<uint8_t> m_idprom;
|
||||
|
||||
devcb_write_line m_irq1_write_func;
|
||||
devcb_write_line m_irq7_write_func;
|
||||
uint8_t m_ram[64];
|
||||
|
@ -19831,6 +19831,9 @@ hp9845t_de //
|
||||
|
||||
@source:hp/hp98x6.cpp
|
||||
hp9816a //
|
||||
hp9826a //
|
||||
hp9836a //
|
||||
hp9836c //
|
||||
|
||||
@source:hp/hp9k.cpp
|
||||
hp9816 //
|
||||
|
Loading…
Reference in New Issue
Block a user