mirror of
https://github.com/holub/mame
synced 2025-05-30 09:33:05 +03:00
(MESS) mbee : more work on the old keyboard (nw)
Keyboard performance overall is much better, however Simply Write no longer works on mbee128p. The 2 minute delay in booting mbee56 has been fixed.
This commit is contained in:
parent
39c12fd21b
commit
4d315877fc
@ -5,17 +5,15 @@
|
||||
|
||||
system driver
|
||||
Juergen Buchmueller, Jan 2000
|
||||
Robbbert 2008-2015
|
||||
|
||||
Brett Selwood, Andrew Davies (technical assistance)
|
||||
Assistance from:
|
||||
Brett Selwood, Andrew Davies; E.J.Wordsworth (owner of Microbee Systems),
|
||||
nama, ChickenMan, and the author of the "ubee512" emulator.
|
||||
|
||||
Various additions by Robbbert.
|
||||
Keyboard notes are in video/microbee.c
|
||||
|
||||
Thanks to the author of the "ubee512" emulator for his help.
|
||||
|
||||
TeleTerm roms dumped by ejwords. The correct slots found by ubee512 author.
|
||||
Swedish roms dumped by nama. The correct slots found by ubee512 author.
|
||||
|
||||
Please note: the rom version 1.31 which appears to fit the 256TC is actually
|
||||
256tc: The 1.31 rom version which appears to fit the 256TC is actually
|
||||
part of the Z80 emulation in the Matilda model. If you fit this rom into a real
|
||||
256TC, the floppy disk will not be detected.
|
||||
|
||||
@ -24,7 +22,7 @@
|
||||
|
||||
Floppy formats:
|
||||
- All disks are the standard CPCEMU 'dsk' format.
|
||||
- Types are 9cm 80 track, and 13cm 40 track (single or double sided)
|
||||
- Types are 9/13cm 40/80 track (single or double sided)
|
||||
- 13cm has been specified as QD to prevent a nasty crash if an 80-track disk was mounted
|
||||
- The tracks/sector layout is the same regardless of size
|
||||
- Although certain models came with particular drives as standard, users could add
|
||||
@ -77,17 +75,6 @@
|
||||
intrq and drq are OR'd together, then gated to bit 7 of the data bus whenever
|
||||
port 48 is activated on read. There are no interrupts used.
|
||||
|
||||
Tests of old keyboard. Start mbeeic.
|
||||
1. Load ASTEROIDS PLUS, stay in attract mode, hold down spacebar,
|
||||
it should only fire bullets. If it sometimes starts turning,
|
||||
thrusting or using the shield, then there is a problem.
|
||||
|
||||
2. Load SCAVENGER and make sure it doesn't go to the next level
|
||||
until you find the Exit.
|
||||
|
||||
3. At the Basic prompt, type in EDASM press enter. At the memory size
|
||||
prompt press enter. Now, make sure the keyboard works properly.
|
||||
|
||||
How to use the config switch for PIO B7:
|
||||
- Teleterm: Must use RTC. Anything else makes teleterm go crazy.
|
||||
- 256TC, 128, 128p: Doesn't seem to matter, leave at the default.
|
||||
@ -95,25 +82,20 @@
|
||||
- Other rom-based models: "VS" to make the Telcom clock work, or "Tied high".
|
||||
- 56k: not sure yet, leave as "Tied high" until more is known.
|
||||
|
||||
How to use programs that need functions keys on models that use the old
|
||||
keyboard (for example, to run Simply Write on a 128k model).
|
||||
Press Ctrl+Shift+number, eg for F1 press hold down Ctrl Shift, press 1.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
TODO/not working:
|
||||
|
||||
- 256tc: Paste ignores shift key
|
||||
- All others: Paste drops most characters, shift operates randomly.
|
||||
- All others: Paste drops most characters.
|
||||
|
||||
- various fdc issues:
|
||||
- B drive doesn't work with most disks.
|
||||
- some disks cause MESS to freeze.
|
||||
- ENMF pin missing from wd_fdc.
|
||||
- incorrect timing for track register causes 256tc failure to boot a disk.
|
||||
- 56k model takes 120 seconds to boot a disk if loaded via command line.
|
||||
|
||||
- mbeeppc, mbee128p: In Basic, keyboard loses characters. Works fine in Wordbee.
|
||||
- Simply Write has keyboard problems (in 128k, no keys work).
|
||||
|
||||
- 256tc: At the menu, if F2 pressed to activate the Monitor, the emulated machine
|
||||
crashes due to a bug in z80pio emulation.
|
||||
@ -222,8 +204,8 @@ static ADDRESS_MAP_START(mbee_io, AS_IO, 8, mbee_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x00, 0x03) AM_MIRROR(0x10) AM_DEVREADWRITE("z80pio", z80pio_device, read_alt, write_alt)
|
||||
AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(mbeeic_io, AS_IO, 8, mbee_state)
|
||||
@ -234,8 +216,8 @@ static ADDRESS_MAP_START(mbeeic_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x09, 0x09) AM_WRITENOP /* Listed as "Colour Wait Off" or "USART 2651" but doesn't appear in the schematics */
|
||||
AM_RANGE(0x0a, 0x0a) AM_MIRROR(0x10) AM_WRITE(port0a_w)
|
||||
AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(mbeepc_io, AS_IO, 8, mbee_state)
|
||||
@ -244,8 +226,8 @@ static ADDRESS_MAP_START(mbeepc_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x0008, 0x0008) AM_MIRROR(0xff10) AM_READWRITE(port08_r, port08_w)
|
||||
AM_RANGE(0x0009, 0x0009) AM_MIRROR(0xff00) AM_WRITENOP
|
||||
AM_RANGE(0x000b, 0x000b) AM_MIRROR(0xff10) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff10) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff10) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff10) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff10) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
AM_RANGE(0x000a, 0x000a) AM_MIRROR(0xfe10) AM_READWRITE(telcom_low_r, port0a_w)
|
||||
AM_RANGE(0x010a, 0x010a) AM_MIRROR(0xfe10) AM_READWRITE(telcom_high_r, port0a_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -256,8 +238,8 @@ static ADDRESS_MAP_START(mbeeppc_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x0008, 0x0008) AM_MIRROR(0xff10) AM_READWRITE(port08_r, port08_w)
|
||||
AM_RANGE(0x0009, 0x0009) AM_MIRROR(0xff00) AM_WRITENOP
|
||||
AM_RANGE(0x000b, 0x000b) AM_MIRROR(0xff10) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff10) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff10) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
AM_RANGE(0x001c, 0x001c) AM_MIRROR(0xff00) AM_READWRITE(port1c_r, port1c_w)
|
||||
AM_RANGE(0x000a, 0x000a) AM_MIRROR(0xfe10) AM_READWRITE(telcom_low_r, port0a_w)
|
||||
AM_RANGE(0x010a, 0x010a) AM_MIRROR(0xfe10) AM_READWRITE(telcom_high_r, port0a_w)
|
||||
@ -271,8 +253,8 @@ static ADDRESS_MAP_START(mbeett_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x0007, 0x0007) AM_MIRROR(0xff00) AM_READ(port07_r)
|
||||
AM_RANGE(0x0008, 0x0008) AM_MIRROR(0xff00) AM_READWRITE(port08_r, port08_w)
|
||||
AM_RANGE(0x000b, 0x000b) AM_MIRROR(0xff00) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff00) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff00) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
AM_RANGE(0x0018, 0x001b) AM_MIRROR(0xff00) AM_READ(port18_r)
|
||||
AM_RANGE(0x001c, 0x001f) AM_MIRROR(0xff00) AM_READWRITE(port1c_r, port1c_w)
|
||||
AM_RANGE(0x0009, 0x0009) AM_MIRROR(0xfe00) AM_READ(speed_low_r)
|
||||
@ -289,8 +271,8 @@ static ADDRESS_MAP_START(mbee56_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x08, 0x08) AM_READWRITE(port08_r, port08_w)
|
||||
AM_RANGE(0x09, 0x09) AM_WRITENOP
|
||||
AM_RANGE(0x0b, 0x0b) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
|
||||
AM_RANGE(0x48, 0x4f) AM_READWRITE(fdc_status_r, fdc_motor_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -305,8 +287,8 @@ static ADDRESS_MAP_START(mbee128_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x08, 0x08) AM_READWRITE(port08_r, port08_w)
|
||||
AM_RANGE(0x09, 0x09) AM_WRITENOP
|
||||
AM_RANGE(0x0b, 0x0b) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x0c, 0x0c) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x0d, 0x0d) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
AM_RANGE(0x1c, 0x1f) AM_READWRITE(port1c_r, port1c_w)
|
||||
AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
|
||||
AM_RANGE(0x48, 0x4f) AM_READWRITE(fdc_status_r, fdc_motor_w)
|
||||
@ -324,8 +306,8 @@ static ADDRESS_MAP_START(mbee256_io, AS_IO, 8, mbee_state)
|
||||
AM_RANGE(0x0209, 0x0209) AM_MIRROR(0xfd00) AM_READ(speed_high_r)
|
||||
AM_RANGE(0x0009, 0x0009) AM_MIRROR(0xff00) AM_WRITENOP
|
||||
AM_RANGE(0x000b, 0x000b) AM_MIRROR(0xff00) AM_WRITE(port0b_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_READWRITE(m6545_status_r, m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff00) AM_READWRITE(m6545_data_r, m6545_data_w)
|
||||
AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_DEVREAD("crtc", mc6845_device, status_r) AM_WRITE(m6545_index_w)
|
||||
AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff00) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(m6545_data_w)
|
||||
// AM_RANGE(0x0010, 0x0013) AM_MIRROR(0xff00) Optional SN76489AN audio chip
|
||||
AM_RANGE(0x0018, 0x001b) AM_MIRROR(0xff00) AM_READ(port18_r)
|
||||
AM_RANGE(0x001c, 0x001f) AM_MIRROR(0xff00) AM_READWRITE(port1c_r, port1c_w)
|
||||
@ -337,7 +319,7 @@ static ADDRESS_MAP_START(mbee256_io, AS_IO, 8, mbee_state)
|
||||
// AM_RANGE(0x0068, 0x006f) AM_MIRROR(0xff00) Reserved for 8530 SCC (unused)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( mbee )
|
||||
static INPUT_PORTS_START( oldkb )
|
||||
PORT_START("X.0") /* IN0 KEY ROW 0 [000] */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("@") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') PORT_CHAR('`')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01)
|
||||
@ -417,6 +399,11 @@ static INPUT_PORTS_START( mbee )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( mbee )
|
||||
|
||||
PORT_INCLUDE( oldkb )
|
||||
|
||||
// Autorun on quickload
|
||||
PORT_START("CONFIG")
|
||||
@ -424,13 +411,30 @@ static INPUT_PORTS_START( mbee )
|
||||
PORT_CONFSETTING( 0x00, DEF_STR(No))
|
||||
PORT_CONFSETTING( 0x01, DEF_STR(Yes))
|
||||
// Wire links on motherboard
|
||||
PORT_CONFNAME( 0xc0, 0x80, "PIO B7")
|
||||
PORT_CONFNAME( 0xc0, 0x00, "PIO B7")
|
||||
PORT_CONFSETTING( 0x00, "VS") // sync pulse to enable telcom clock
|
||||
PORT_CONFSETTING( 0x40, "RTC") // optional board usually not fitted
|
||||
PORT_CONFSETTING( 0x80, "Tied high") // default resistor to vcc
|
||||
PORT_CONFSETTING( 0xc0, "Reserved for net")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( mbee128 )
|
||||
|
||||
PORT_INCLUDE( oldkb )
|
||||
|
||||
// Autorun on quickload
|
||||
PORT_START("CONFIG")
|
||||
PORT_CONFNAME( 0x01, 0x01, "Autorun on Quickload")
|
||||
PORT_CONFSETTING( 0x00, DEF_STR(No))
|
||||
PORT_CONFSETTING( 0x01, DEF_STR(Yes))
|
||||
// Wire links on motherboard
|
||||
PORT_CONFNAME( 0xc0, 0x40, "PIO B7")
|
||||
PORT_CONFSETTING( 0x00, "VS") // sync pulse to enable telcom clock
|
||||
PORT_CONFSETTING( 0x40, "RTC") // RTC IRQ for clock
|
||||
PORT_CONFSETTING( 0x80, "Tied high") // default resistor to vcc
|
||||
PORT_CONFSETTING( 0xc0, "Reserved for net")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( mbee256 )
|
||||
PORT_START("Y.0") /* IN0 KEY ROW 0 [+00] */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
|
||||
@ -1134,6 +1138,6 @@ COMP( 1985, mbeepc85s,mbee, 0, mbeepc, mbee, mbee_state, mbeepc8
|
||||
COMP( 1986, mbeeppc, mbee, 0, mbeeppc, mbee, mbee_state, mbeeppc, "Applied Technology", "Microbee Premium PC85" , 0 )
|
||||
COMP( 1986, mbeett, mbee, 0, mbeett, mbee256, mbee_state, mbeett, "Applied Technology", "Microbee Teleterm" , GAME_NOT_WORKING )
|
||||
COMP( 1986, mbee56, mbee, 0, mbee56, mbee, mbee_state, mbee56, "Applied Technology", "Microbee 56k" , GAME_NOT_WORKING )
|
||||
COMP( 1986, mbee128, mbee, 0, mbee128, mbee, mbee_state, mbee128, "Applied Technology", "Microbee 128k Standard" , GAME_NOT_WORKING )
|
||||
COMP( 1986, mbee128p, mbee, 0, mbee128p, mbee, mbee_state, mbee128, "Applied Technology", "Microbee 128k Premium" , GAME_NOT_WORKING )
|
||||
COMP( 1986, mbee128, mbee, 0, mbee128, mbee128, mbee_state, mbee128, "Applied Technology", "Microbee 128k Standard" , GAME_NOT_WORKING )
|
||||
COMP( 1986, mbee128p, mbee, 0, mbee128p, mbee128, mbee_state, mbee128, "Applied Technology", "Microbee 128k Premium" , GAME_NOT_WORKING )
|
||||
COMP( 1987, mbee256, mbee, 0, mbee256, mbee256, mbee_state, mbee256, "Applied Technology", "Microbee 256TC" , GAME_NOT_WORKING )
|
||||
|
@ -72,9 +72,7 @@ public:
|
||||
DECLARE_READ8_MEMBER(telcom_high_r);
|
||||
DECLARE_READ8_MEMBER(speed_low_r);
|
||||
DECLARE_READ8_MEMBER(speed_high_r);
|
||||
DECLARE_READ8_MEMBER(m6545_status_r);
|
||||
DECLARE_WRITE8_MEMBER(m6545_index_w);
|
||||
DECLARE_READ8_MEMBER(m6545_data_r);
|
||||
DECLARE_WRITE8_MEMBER(m6545_data_w);
|
||||
DECLARE_READ8_MEMBER(video_low_r);
|
||||
DECLARE_READ8_MEMBER(video_high_r);
|
||||
@ -138,7 +136,6 @@ private:
|
||||
UINT8 m_mbee256_was_pressed[15];
|
||||
UINT8 m_mbee256_q[20];
|
||||
UINT8 m_mbee256_q_pos;
|
||||
UINT8 m_sy6545_status;
|
||||
UINT8 m_sy6545_reg[32];
|
||||
UINT8 m_sy6545_ind;
|
||||
UINT8 m_fdc_rq;
|
||||
|
@ -180,7 +180,7 @@ TIMER_CALLBACK_MEMBER( mbee_state::timer_newkb )
|
||||
if (m_b2)
|
||||
m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
|
||||
|
||||
timer_set(attotime::from_hz(10), TIMER_MBEE_NEWKB);
|
||||
timer_set(attotime::from_hz(50), TIMER_MBEE_NEWKB);
|
||||
}
|
||||
|
||||
READ8_MEMBER( mbee_state::port18_r )
|
||||
|
@ -6,6 +6,38 @@
|
||||
|
||||
Rewritten by Robbbert
|
||||
|
||||
Operation of old keyboard:
|
||||
The design is taken from the SY6545 Application Note AN3. As the CRTC
|
||||
renders the picture, the MA lines also scan the keyboard. When a keydown
|
||||
is detected, the lightpen pin is activated, which sets bit 6 of the status
|
||||
register. The CPU continuously monitors this register. Once bit 6 is set,
|
||||
the CPU needs to determine which key is pressed. It firstly clears bit 6,
|
||||
then sets port 0B to 1. This prevents the CRTC from scanning the keyboard
|
||||
and causing interference. Next, the CPU writes an address to regs 18,19 and
|
||||
then instigates the transparent access. This checks one keyboard row, which
|
||||
if the pressed key is found, will once again set bit 6. If not found, the
|
||||
next row will be checked. Once found, the CPU clears bit 6 and port 0B, then
|
||||
works out the ascii key code of the pressed key.
|
||||
|
||||
Tests of old keyboard. Start mbeeic.
|
||||
1. Load ASTEROIDS PLUS, stay in attract mode, hold down spacebar,
|
||||
it should only fire bullets. If it sometimes starts turning,
|
||||
thrusting or using the shield, then there is a problem.
|
||||
|
||||
2. Load SCAVENGER and make sure it doesn't go to the next level
|
||||
until you find the Exit.
|
||||
|
||||
3. At the Basic prompt, type in EDASM press enter. At the memory size
|
||||
prompt press enter. Now, make sure the keyboard works properly.
|
||||
|
||||
Old keyboard ToDo:
|
||||
- Occasional characters dropped while typing
|
||||
- Lots of characters dropped when pasting
|
||||
- On mbee128p, Simply Write doesn't accept any input
|
||||
|
||||
New keyboard ToDo:
|
||||
- On mbeett, various problems caused by phantom characters.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
@ -156,55 +188,54 @@ void mbee_state::oldkb_matrix_r(UINT16 offs)
|
||||
{
|
||||
if (m_has_oldkb)
|
||||
{
|
||||
offs &= 0x3f0; // safety check
|
||||
UINT8 port = (offs >> 7) & 7;
|
||||
UINT8 bit = (offs >> 4) & 7;
|
||||
UINT8 extra = 0;
|
||||
UINT8 data = m_io_oldkb[port]->read();
|
||||
if ((port == 0) || (port == 2) || (port == 3))
|
||||
extra = m_io_x7->read();
|
||||
else
|
||||
if (port == 7)
|
||||
extra = data;
|
||||
|
||||
bool keydown = ( data >> bit ) & 1;
|
||||
bool keydown = BIT(data, bit);
|
||||
|
||||
// This adds premium-style cursor keys to the old keyboard.
|
||||
// They are used by the pc85 menu. Premium keyboards already
|
||||
// have these keys fitted.
|
||||
if (!keydown && !m_is_premium && extra)
|
||||
if (!keydown && !m_is_premium)
|
||||
{
|
||||
if BIT(extra, 0) // cursor up
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 5 ) keydown = 1; // control E
|
||||
}
|
||||
if ((port == 0) || (port == 2) || (port == 3))
|
||||
extra = m_io_x7->read();
|
||||
else
|
||||
if BIT(extra, 2) // cursor down
|
||||
if (port == 7)
|
||||
extra = data;
|
||||
|
||||
if (extra)
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 3 && bit == 0 ) keydown = 1; // control X
|
||||
}
|
||||
else
|
||||
if BIT(extra, 3) // cursor left
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 2 && bit == 3 ) keydown = 1; // control S
|
||||
}
|
||||
else
|
||||
if BIT(extra, 6) // cursor right
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 4 ) keydown = 1; // control D
|
||||
if BIT(extra, 0) // cursor up
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 5 ) keydown = 1; // control E
|
||||
}
|
||||
else
|
||||
if BIT(extra, 2) // cursor down
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 3 && bit == 0 ) keydown = 1; // control X
|
||||
}
|
||||
else
|
||||
if BIT(extra, 3) // cursor left
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 2 && bit == 3 ) keydown = 1; // control S
|
||||
}
|
||||
else
|
||||
if BIT(extra, 6) // cursor right
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 4 ) keydown = 1; // control D
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( keydown )
|
||||
{
|
||||
m_sy6545_reg[17] = offs;
|
||||
m_sy6545_reg[16] = (offs >> 8) & 0x3f;
|
||||
m_sy6545_status |= 0x40; //lpen_strobe
|
||||
}
|
||||
m_crtc->assert_light_pen_input(); //lpen_strobe
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,43 +254,6 @@ void mbee_state::oldkb_scan( UINT16 param )
|
||||
|
||||
************************************************************/
|
||||
|
||||
READ8_MEMBER( mbee_state::m6545_status_r )
|
||||
{
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
UINT8 data = m_sy6545_status; // bit 6 = lpen strobe, bit 7 = update strobe
|
||||
int y = m_screen->vpos();
|
||||
|
||||
if( y < visarea.min_y || y > visarea.max_y )
|
||||
data |= 0x20; /* vertical blanking */
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
READ8_MEMBER( mbee_state::m6545_data_r )
|
||||
{
|
||||
UINT16 addr;
|
||||
UINT8 data = m_crtc->register_r( space, 0 );
|
||||
|
||||
switch( m_sy6545_ind )
|
||||
{
|
||||
case 16:
|
||||
case 17:
|
||||
m_sy6545_status &= 0x80; // turn off lpen_strobe
|
||||
break;
|
||||
case 31:
|
||||
// This firstly pushes the contents of the transparent registers onto the MA lines,
|
||||
// then increments the address, then sets update strobe on.
|
||||
addr = (m_sy6545_reg[18] << 8) | m_sy6545_reg[19];
|
||||
oldkb_matrix_r(addr);
|
||||
m_sy6545_reg[19]++;
|
||||
if (!m_sy6545_reg[19]) m_sy6545_reg[18]++;
|
||||
m_sy6545_status |= 0x80; // update_strobe
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER ( mbee_state::m6545_index_w )
|
||||
{
|
||||
data &= 0x1f;
|
||||
@ -270,7 +264,6 @@ WRITE8_MEMBER ( mbee_state::m6545_index_w )
|
||||
WRITE8_MEMBER ( mbee_state::m6545_data_w )
|
||||
{
|
||||
static const UINT8 sy6545_mask[32]={0xff,0xff,0xff,0x0f,0x7f,0x1f,0x7f,0x7f,3,0x1f,0x7f,0x1f,0x3f,0xff,0x3f,0xff,0,0,0x3f,0xff};
|
||||
UINT16 addr = 0;
|
||||
|
||||
switch( m_sy6545_ind )
|
||||
{
|
||||
@ -279,15 +272,6 @@ WRITE8_MEMBER ( mbee_state::m6545_data_w )
|
||||
if( m_sy6545_reg[12] != data )
|
||||
memcpy(m_p_gfxram, memregion("gfx")->base() + (((data & 0x30) == 0x20) << 11), 0x800);
|
||||
break;
|
||||
case 31:
|
||||
// This firstly pushes the contents of the transparent registers onto the MA lines,
|
||||
// then increments the address, then sets update strobe on.
|
||||
addr = (m_sy6545_reg[18] << 8) | m_sy6545_reg[19];
|
||||
oldkb_matrix_r(addr);
|
||||
m_sy6545_reg[19]++;
|
||||
if (!m_sy6545_reg[19]) m_sy6545_reg[18]++;
|
||||
m_sy6545_status |= 0x80; // update_strobe
|
||||
break;
|
||||
}
|
||||
m_sy6545_reg[m_sy6545_ind] = data & sy6545_mask[m_sy6545_ind]; /* save data in register */
|
||||
m_crtc->register_w( space, 0, data );
|
||||
@ -337,8 +321,10 @@ UINT32 mbee_state::screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitma
|
||||
|
||||
MC6845_ON_UPDATE_ADDR_CHANGED( mbee_state::crtc_update_addr )
|
||||
{
|
||||
// not sure what goes in here - parameters passed are device, address, strobe
|
||||
// parameters passed are device, address, strobe(always 0)
|
||||
// not used on 256TC
|
||||
|
||||
oldkb_matrix_r(address);
|
||||
}
|
||||
|
||||
|
||||
@ -496,7 +482,7 @@ PALETTE_INIT_MEMBER( mbee_state, premium )
|
||||
UINT8 i, r, b, g;
|
||||
|
||||
/* set up 8 low intensity colours */
|
||||
for (i = 0; i < 8; i++)
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
r = BIT(i, 0) ? 0xc0 : 0;
|
||||
g = BIT(i, 1) ? 0xc0 : 0;
|
||||
@ -504,6 +490,9 @@ PALETTE_INIT_MEMBER( mbee_state, premium )
|
||||
palette.set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
|
||||
// colour 8 is dark grey, rather than black
|
||||
palette.set_pen_color(8, rgb_t(96, 96, 96));
|
||||
|
||||
/* set up 8 high intensity colours */
|
||||
for (i = 9; i < 16; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user