mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
New systems marked not working
------------------------------ Executive 10/102 [Dirk Best, Bitsavers] crt9007: Add support to test cursor location
This commit is contained in:
parent
85a3c394d2
commit
fb1a8b66de
7 changed files with 713 additions and 0 deletions
|
@ -950,3 +950,13 @@ void crt9007_device::set_character_width(unsigned value)
|
|||
if (started())
|
||||
recompute_parameters();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// cursor_active - is cursor active at location
|
||||
//-------------------------------------------------
|
||||
|
||||
bool crt9007_device::cursor_active(unsigned x, unsigned y)
|
||||
{
|
||||
return (x == HORIZONTAL_CURSOR && y == VERTICAL_CURSOR);
|
||||
}
|
||||
|
|
|
@ -71,6 +71,9 @@ public:
|
|||
void ack_w(int state);
|
||||
void lpstb_w(int state);
|
||||
|
||||
// cursor location
|
||||
bool cursor_active(unsigned x, unsigned y);
|
||||
|
||||
protected:
|
||||
// device_t implementation
|
||||
virtual void device_start() override;
|
||||
|
|
|
@ -241,6 +241,7 @@ const double XTAL::known_xtals[] = {
|
|||
14'314'000, /* 14.314_MHz_XTAL Taito TTL Board */
|
||||
14'318'181, /* 14.318181_MHz_XTAL Extremely common, used on 100's of PCBs (4x NTSC subcarrier) */
|
||||
14'349'600, /* 14.3496_MHz_XTAL Roland S-50 VDP */
|
||||
14'469'000, /* 14.469_MHz_XTAL Esprit Systems Executive 10/102 */
|
||||
14'580'000, /* 14.58_MHz_XTAL Fortune 32:16 Video Controller */
|
||||
14'705'882, /* 14.705882_MHz_XTAL Aleck64 */
|
||||
14'728'000, /* 14.728_MHz_XTAL ADM 36 */
|
||||
|
@ -286,6 +287,7 @@ const double XTAL::known_xtals[] = {
|
|||
16'670'000, /* 16.67_MHz_XTAL - */
|
||||
16'777'216, /* 16.777216_MHz_XTAL Nintendo Game Boy Advance */
|
||||
16'934'400, /* 16.9344_MHz_XTAL Usually used to drive 90's Yamaha OPL/FM chips (44100 * 384) */
|
||||
16'960'000, /* 16.960_MHz_XTAL Esprit Systems Executive 10/102 */
|
||||
17'010'000, /* 17.01_MHz_XTAL Epic 14E */
|
||||
17'064'000, /* 17.064_MHz_XTAL Memorex 1377 */
|
||||
17'074'800, /* 17.0748_MHz_XTAL SWTPC 8212 */
|
||||
|
|
352
src/mame/esprit/executive10.cpp
Normal file
352
src/mame/esprit/executive10.cpp
Normal file
|
@ -0,0 +1,352 @@
|
|||
// license: BSD-3-Clause
|
||||
// copyright-holders: Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Esprit Systems Executive 10/102
|
||||
|
||||
VT102 compatible terminal
|
||||
|
||||
Hardware:
|
||||
- Intel P8088
|
||||
- Intel D8284A
|
||||
- Intel P8259A-8
|
||||
- 2x 2764 EPROM, 1x 2732 EPROM
|
||||
- SY2128-2 (2k RAM)
|
||||
- X2212D NOVRAM
|
||||
- MC68B50P
|
||||
- SCN2681A
|
||||
- 14.469 MHz XTAL (near CPU), 3.6864 MHz XTAL (near 2681)
|
||||
- CRT 9007
|
||||
- 2x CRT 9006-135
|
||||
- CRT9021A
|
||||
- 2764 EPROM
|
||||
- 4x SY2128-2 (8k RAM)
|
||||
- 21.800 MHz XTAL (near 9007), 16.960 MHz XTAL (near 9007)
|
||||
- 9 position DIP switch
|
||||
|
||||
TODO:
|
||||
- Improve rendering (132 columns, smooth scrolling, non-line attributes(?))
|
||||
- NOVRAM store/recall
|
||||
- Printer
|
||||
- DIP switch
|
||||
|
||||
Notes:
|
||||
- Other models in this line: 10/51 (IBM 5251), 10/78 (IBM 3278)
|
||||
- To go online: Enter Set-Up, press 5 for next screen, press 4 to switch
|
||||
from local to online (no feedback, would be shown on keyboard LEDs)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "executive10_102_kbd.h"
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/mc68681.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/x2212.h"
|
||||
#include "video/crt9007.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "multibyte.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class executive10_state : public driver_device
|
||||
{
|
||||
public:
|
||||
executive10_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_novram(*this, "novram"),
|
||||
m_pic(*this, "pic"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_vpac(*this, "vpac"),
|
||||
m_duart(*this, "duart"),
|
||||
m_acia(*this, "acia"),
|
||||
m_cram(*this, "cram"),
|
||||
m_aram(*this, "aram"),
|
||||
m_chargen(*this, "chargen")
|
||||
{ }
|
||||
|
||||
void executive10(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<i8088_cpu_device> m_maincpu;
|
||||
required_device<x2212_device> m_novram;
|
||||
required_device<pic8259_device> m_pic;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<crt9007_device> m_vpac;
|
||||
required_device<scn2681_device> m_duart;
|
||||
required_device<acia6850_device> m_acia;
|
||||
required_shared_ptr<uint8_t> m_cram;
|
||||
required_shared_ptr<uint8_t> m_aram;
|
||||
required_region_ptr<uint8_t> m_chargen;
|
||||
|
||||
void mem_map(address_map &map);
|
||||
void io_map(address_map &map);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ADDRESS MAPS
|
||||
//**************************************************************************
|
||||
|
||||
void executive10_state::mem_map(address_map &map)
|
||||
{
|
||||
map.global_mask(0xffff);
|
||||
map(0x0000, 0x07ff).ram();
|
||||
map(0x2000, 0x2fff).ram().share("cram");
|
||||
map(0x4000, 0x4fff).ram().share("aram");
|
||||
map(0x6000, 0x60ff).rw(m_novram, FUNC(x2210_device::read), FUNC(x2210_device::write));
|
||||
map(0xb000, 0xffff).rom().region("maincpu", 0);
|
||||
}
|
||||
|
||||
void executive10_state::io_map(address_map &map)
|
||||
{
|
||||
map(0x000, 0x03f).rw(m_vpac, FUNC(crt9007_device::read), FUNC(crt9007_device::write));
|
||||
map(0x040, 0x04f).rw(m_duart, FUNC(scn2681_device::read), FUNC(scn2681_device::write));
|
||||
map(0x080, 0x080).w(m_acia, FUNC(acia6850_device::control_w));
|
||||
map(0x081, 0x081).r(m_acia, FUNC(acia6850_device::status_r));
|
||||
map(0x082, 0x082).w(m_acia, FUNC(acia6850_device::data_w));
|
||||
map(0x083, 0x083).r(m_acia, FUNC(acia6850_device::data_r));
|
||||
map(0x0c0, 0x0c1).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write));
|
||||
//map(0x180, 0x180).nopw(); // novram store/recall?
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INPUT PORT DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
static INPUT_PORTS_START( executive10 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// VIDEO EMULATION
|
||||
//**************************************************************************
|
||||
|
||||
uint32_t executive10_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
const pen_t *const pen = m_palette->pens();
|
||||
|
||||
for (int y = 0; y < 25; y++)
|
||||
{
|
||||
// f--------------- double height line
|
||||
// -e-------------- double width line
|
||||
// --dc------------ unknown
|
||||
// ----ba9876543210 line address
|
||||
|
||||
uint16_t addr = get_u16le(&m_cram[0xfcc + (y * 2)]);
|
||||
bool dw = addr & 0xc000;
|
||||
|
||||
uint8_t line_attr = 0x00;
|
||||
|
||||
for (int x = 0; x < (dw ? 40 : 80); x++)
|
||||
{
|
||||
uint16_t code = m_cram[(addr & 0x0fff) + x];
|
||||
|
||||
// move bit 7 to 8 (acs characters)
|
||||
code = bitswap<9>(code, 7, 8, 6, 5, 4, 3, 2, 1, 0);
|
||||
|
||||
// select 80/132 column character set
|
||||
code |= 0x80; // fixed 80 columns mode for now
|
||||
|
||||
// 7------- active for line attributes
|
||||
// -6------ unknown
|
||||
// --5----- blink
|
||||
// ---4---- reverse
|
||||
// ----3--- 0 = blank?
|
||||
// -----2-- underline
|
||||
// ------1- unknown
|
||||
// -------0 highlight
|
||||
|
||||
uint8_t attr = m_aram[(addr & 0x0fff) + x];
|
||||
|
||||
// new line attribute?
|
||||
if (BIT(attr, 7))
|
||||
line_attr = attr;
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
unsigned char_line = i;
|
||||
|
||||
// adjust rendered line for double height mode
|
||||
if (BIT(addr, 15))
|
||||
char_line = (i / 2) + (BIT(addr, 14) * (12 / 2));
|
||||
|
||||
uint16_t data = m_chargen[(code << 4) + char_line] << 1;
|
||||
|
||||
// maybe? fixes line drawing characters
|
||||
if (BIT(data, 8) == 1)
|
||||
{
|
||||
if (BIT(data, 1) == 1)
|
||||
data |= 0x001;
|
||||
|
||||
if (BIT(data, 7) == 0)
|
||||
data &= ~0x100;
|
||||
}
|
||||
|
||||
// underline?
|
||||
if (BIT(line_attr, 2) && i == 10)
|
||||
data = 0x1ff;
|
||||
|
||||
// reverse?
|
||||
if (BIT(line_attr, 4))
|
||||
data = ~data;
|
||||
|
||||
// blink?
|
||||
if (BIT(line_attr, 5) && (m_screen->frame_number() & 0x20)) // wrong timing
|
||||
data = 0x000;
|
||||
|
||||
// cursor?
|
||||
if (m_vpac->cursor_active(x, y))
|
||||
data = ~data; // might be solid instead
|
||||
|
||||
// foreground/background colors
|
||||
rgb_t fg = BIT(line_attr, 0) ? pen[2] : pen[1];
|
||||
rgb_t bg = pen[0];
|
||||
|
||||
// draw character line
|
||||
if (dw)
|
||||
{
|
||||
for (int p = 0; p < 9; p++)
|
||||
{
|
||||
bitmap.pix(y * 12 + i, x * 18 + p * 2 + 0) = BIT(data, 8 - p) ? fg : bg;
|
||||
bitmap.pix(y * 12 + i, x * 18 + p * 2 + 1) = BIT(data, 8 - p) ? fg : bg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int p = 0; p < 9; p++)
|
||||
bitmap.pix(y * 12 + i, x * 9 + p) = BIT(data, 8 - p) ? fg : bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const gfx_layout char_layout =
|
||||
{
|
||||
8, 12,
|
||||
RGN_FRAC(1,1),
|
||||
1,
|
||||
{ 0 },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8 },
|
||||
8 * 16
|
||||
};
|
||||
|
||||
static GFXDECODE_START( chars )
|
||||
GFXDECODE_ENTRY("chargen", 0, char_layout, 0, 1)
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE EMULATION
|
||||
//**************************************************************************
|
||||
|
||||
void executive10_state::machine_start()
|
||||
{
|
||||
}
|
||||
|
||||
void executive10_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE DEFINTIONS
|
||||
//**************************************************************************
|
||||
|
||||
void executive10_state::executive10(machine_config &config)
|
||||
{
|
||||
I8088(config, m_maincpu, 14.469_MHz_XTAL / 3);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &executive10_state::mem_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &executive10_state::io_map);
|
||||
m_maincpu->set_irq_acknowledge_callback(m_pic, FUNC(pic8259_device::inta_cb));
|
||||
|
||||
X2212(config, m_novram);
|
||||
|
||||
PIC8259(config, m_pic);
|
||||
m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_color(rgb_t::green());
|
||||
m_screen->set_raw(16.960_MHz_XTAL, 890, 0, 720, 320, 0, 300); // maybe
|
||||
m_screen->set_screen_update(FUNC(executive10_state::screen_update));
|
||||
|
||||
PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);
|
||||
|
||||
GFXDECODE(config, "gfxdecode", m_palette, chars);
|
||||
|
||||
CRT9007(config, m_vpac, 16.960_MHz_XTAL / 9);
|
||||
m_vpac->set_screen("screen");
|
||||
m_vpac->set_character_width(9);
|
||||
m_vpac->int_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
|
||||
|
||||
SCN2681(config, m_duart, 3.6864_MHz_XTAL);
|
||||
m_duart->a_tx_cb().set("serial", FUNC(rs232_port_device::write_txd));
|
||||
m_duart->outport_cb().set(m_acia, FUNC(acia6850_device::write_rxc)).bit(3);
|
||||
m_duart->outport_cb().append(m_acia, FUNC(acia6850_device::write_txc)).bit(3);
|
||||
m_duart->outport_cb().append(m_pic, FUNC(pic8259_device::ir0_w)).bit(4).invert();
|
||||
m_duart->outport_cb().append(m_pic, FUNC(pic8259_device::ir1_w)).bit(5).invert();
|
||||
|
||||
rs232_port_device &serial(RS232_PORT(config, "serial", default_rs232_devices, nullptr));
|
||||
serial.rxd_handler().set(m_duart, FUNC(scn2681_device::rx_a_w));
|
||||
serial.cts_handler().set(m_duart, FUNC(scn2681_device::ip0_w));
|
||||
|
||||
ACIA6850(config, m_acia);
|
||||
m_acia->irq_handler().set(m_pic, FUNC(pic8259_device::ir4_w));
|
||||
m_acia->txd_handler().set("kbd", FUNC(executive10_102_kbd_device::rxd_w));
|
||||
|
||||
executive10_102_kbd_device &kbd(EXECUTIVE10_102_KBD(config, "kbd"));
|
||||
kbd.txd_cb().set(m_acia, FUNC(acia6850_device::write_rxd));
|
||||
kbd.cts_cb().set(m_acia, FUNC(acia6850_device::write_cts));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ROM DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
ROM_START( exe10102 )
|
||||
ROM_REGION(0x5000, "maincpu", 0)
|
||||
ROM_LOAD("113-03-0.u25", 0x0000, 0x1000, CRC(bf5498d4) SHA1(46a3e832a1ba9a08c1d4938d6c94b2194ef00081))
|
||||
ROM_LOAD("113-01-0.u26", 0x1000, 0x2000, CRC(5e6babb3) SHA1(4669107e9cfaba1a697db6e832bc36c8220ee591))
|
||||
ROM_LOAD("113-02-0.u27", 0x3000, 0x2000, CRC(05bcd49b) SHA1(fbeac116ded46215644df7db1810f4f9d41e49ca))
|
||||
|
||||
ROM_REGION(0x2000, "chargen", 0)
|
||||
ROM_LOAD("111-01-0.u59", 0x0000, 0x2000, CRC(4e54c69f) SHA1(92640a57863c5eab9db6d07c31deebfa3d1dafa5))
|
||||
ROM_END
|
||||
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SYSTEM DRIVERS
|
||||
//**************************************************************************
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1983, exe10102, 0, 0, executive10, executive10, executive10_state, empty_init, "Esprit Systems", "Executive 10/102", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
278
src/mame/esprit/executive10_102_kbd.cpp
Normal file
278
src/mame/esprit/executive10_102_kbd.cpp
Normal file
|
@ -0,0 +1,278 @@
|
|||
// license: BSD-3-Clause
|
||||
// copyright-holders: Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Esprit Systems Executive 10/102 Keyboard
|
||||
|
||||
Hardware:
|
||||
- Intel D8749
|
||||
- 6.144 MHz XTAL
|
||||
- NE556
|
||||
- Buzzer
|
||||
- 8 LEDs
|
||||
|
||||
TODO:
|
||||
- Verify Break/No Scroll key
|
||||
- LEDs
|
||||
|
||||
Notes:
|
||||
- A/N 9102 754 2200
|
||||
- P/N 3001 900 8108
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "executive10_102_kbd.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(EXECUTIVE10_102_KBD, executive10_102_kbd_device, "executive10_102_kbd", "Executive 10/102 Keyboard")
|
||||
|
||||
executive10_102_kbd_device::executive10_102_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, EXECUTIVE10_102_KBD, tag, owner, 0U),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_buzzer(*this, "buzzer"),
|
||||
m_shift(*this, "shift"),
|
||||
m_ctrl(*this, "ctrl"),
|
||||
m_keys(*this, "row_%x", 0U),
|
||||
m_txd_cb(*this),
|
||||
m_cts_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ROM DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
ROM_START( firmware )
|
||||
ROM_REGION(0x800, "mcu", 0)
|
||||
ROM_LOAD("118-01-1.u1", 0x000, 0x800, CRC(311ed6a6) SHA1(2701ab4eaaf89270575ecff841f813db1907a434))
|
||||
ROM_END
|
||||
|
||||
const tiny_rom_entry *executive10_102_kbd_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( firmware );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
void executive10_102_kbd_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
I8749(config, m_mcu, 6.144_MHz_XTAL);
|
||||
m_mcu->t0_in_cb().set(FUNC(executive10_102_kbd_device::t0_r));
|
||||
m_mcu->t1_in_cb().set(FUNC(executive10_102_kbd_device::t1_r));
|
||||
m_mcu->bus_in_cb().set(FUNC(executive10_102_kbd_device::bus_r));
|
||||
m_mcu->p1_out_cb().set(FUNC(executive10_102_kbd_device::p1_w));
|
||||
m_mcu->p2_out_cb().set(FUNC(executive10_102_kbd_device::p2_w));
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
BEEP(config, m_buzzer, 786); // unknown frequency
|
||||
m_buzzer->add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INPUT PORT DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
static INPUT_PORTS_START( keyboard )
|
||||
PORT_START("shift")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_NAME("Shift")
|
||||
|
||||
PORT_START("ctrl")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_NAME("Ctrl")
|
||||
|
||||
PORT_START("row_0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR(9)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("Set Up")
|
||||
|
||||
PORT_START("row_1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
|
||||
|
||||
PORT_START("row_2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
|
||||
PORT_START("row_3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
|
||||
|
||||
PORT_START("row_4")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
|
||||
|
||||
PORT_START("row_5")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
|
||||
|
||||
PORT_START("row_6")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_NAME(u8"\u2192") // →
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_NAME(u8"\u2190") // ←
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_NAME(u8"\u2193") // ↓
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_NAME(u8"\u2191") // ↑
|
||||
|
||||
PORT_START("row_7")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(10) PORT_NAME("Line Feed")
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CANCEL) PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) PORT_NAME("Break")
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
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_START("row_8")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad .")
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("PF1")
|
||||
|
||||
PORT_START("row_9")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("PF3")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("PF2")
|
||||
|
||||
PORT_START("row_a")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("No Scroll")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD))
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("PF4")
|
||||
|
||||
PORT_START("row_b")
|
||||
PORT_BIT(0xff, 0xff, IPT_UNUSED)
|
||||
|
||||
PORT_START("row_c")
|
||||
PORT_BIT(0xff, 0xff, IPT_UNUSED)
|
||||
|
||||
PORT_START("row_d")
|
||||
PORT_BIT(0xff, 0xff, IPT_UNUSED)
|
||||
|
||||
PORT_START("row_e")
|
||||
PORT_BIT(0xff, 0xff, IPT_UNUSED)
|
||||
|
||||
PORT_START("row_f")
|
||||
PORT_BIT(0xff, 0xff, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor executive10_102_kbd_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( keyboard );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE EMULATION
|
||||
//**************************************************************************
|
||||
|
||||
void executive10_102_kbd_device::device_start()
|
||||
{
|
||||
// register for save states
|
||||
save_item(NAME(m_key_row));
|
||||
}
|
||||
|
||||
void executive10_102_kbd_device::device_reset()
|
||||
{
|
||||
// signal we are connected to the host
|
||||
m_cts_cb(0);
|
||||
}
|
||||
|
||||
void executive10_102_kbd_device::rxd_w(int state)
|
||||
{
|
||||
m_mcu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
int executive10_102_kbd_device::t0_r()
|
||||
{
|
||||
return m_shift->read();
|
||||
}
|
||||
|
||||
int executive10_102_kbd_device::t1_r()
|
||||
{
|
||||
return m_ctrl->read();
|
||||
}
|
||||
|
||||
uint8_t executive10_102_kbd_device::bus_r()
|
||||
{
|
||||
return m_keys[m_key_row]->read();
|
||||
}
|
||||
|
||||
void executive10_102_kbd_device::p1_w(uint8_t data)
|
||||
{
|
||||
// LEDs
|
||||
}
|
||||
|
||||
void executive10_102_kbd_device::p2_w(uint8_t data)
|
||||
{
|
||||
// 76------ unknown
|
||||
// --5----- serial data output
|
||||
// ---4---- buzzer
|
||||
// ----3210 key row to scan
|
||||
|
||||
m_key_row = data & 0x0f;
|
||||
m_buzzer->set_state(BIT(~data, 4));
|
||||
m_txd_cb(BIT(data, 5));
|
||||
}
|
65
src/mame/esprit/executive10_102_kbd.h
Normal file
65
src/mame/esprit/executive10_102_kbd.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
// license: BSD-3-Clause
|
||||
// copyright-holders: Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Esprit Systems Executive 10/102 Keyboard
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_ESPRIT_EXECUTIVE10_102_KBD_H
|
||||
#define MAME_ESPRIT_EXECUTIVE10_102_KBD_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
#include "sound/beep.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class executive10_102_kbd_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
executive10_102_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
// callbacks
|
||||
auto txd_cb() { return m_txd_cb.bind(); }
|
||||
auto cts_cb() { return m_cts_cb.bind(); }
|
||||
|
||||
// from host
|
||||
void rxd_w(int state);
|
||||
|
||||
protected:
|
||||
// device_t overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
required_device<i8749_device> m_mcu;
|
||||
required_device<beep_device> m_buzzer;
|
||||
required_ioport m_shift;
|
||||
required_ioport m_ctrl;
|
||||
required_ioport_array<16> m_keys;
|
||||
|
||||
devcb_write_line m_txd_cb;
|
||||
devcb_write_line m_cts_cb;
|
||||
|
||||
uint8_t m_key_row;
|
||||
|
||||
int t0_r();
|
||||
int t1_r();
|
||||
uint8_t bus_r();
|
||||
void p1_w(uint8_t data);
|
||||
void p2_w(uint8_t data);
|
||||
};
|
||||
|
||||
// device type declaration
|
||||
DECLARE_DEVICE_TYPE(EXECUTIVE10_102_KBD, executive10_102_kbd_device)
|
||||
|
||||
#endif // MAME_ESPRIT_EXECUTIVE10_102_KBD_H
|
|
@ -17756,6 +17756,9 @@ e9161 //
|
|||
@source:ericsson/eispc.cpp
|
||||
epc // 1984 Ericsson PC
|
||||
|
||||
@source:esprit/executive10.cpp
|
||||
exe10102 // 1983 Esprit Systems
|
||||
|
||||
@source:excalibur/igor.cpp
|
||||
igor
|
||||
|
||||
|
|
Loading…
Reference in a new issue