From d498d5cedfaa93a485f41ce85482114d1ffe916e Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Tue, 17 Mar 2015 21:09:39 +0100 Subject: (MESS) ti99: Added a sanity check for disk format detection and a non-locking Alphalock --- src/lib/formats/ti99_dsk.c | 3 +++ src/mess/drivers/ti99_4x.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/formats/ti99_dsk.c b/src/lib/formats/ti99_dsk.c index ab6c564fb79..a2abbd2902f 100644 --- a/src/lib/formats/ti99_dsk.c +++ b/src/lib/formats/ti99_dsk.c @@ -835,6 +835,9 @@ void ti99_sdf_format::determine_sizes(io_generic *io, int& cell_size, int& secto have_vib = true; } + // Do we have a broken VIB? The Pascal disks are known to have such incomplete VIBs + if (heads == 0 || sector_count == 0) have_vib = false; + // We're also checking the size of the image int cell_size1 = 0; int sector_count1 = 0; diff --git a/src/mess/drivers/ti99_4x.c b/src/mess/drivers/ti99_4x.c index fff2de23de1..ee661e7c471 100644 --- a/src/mess/drivers/ti99_4x.c +++ b/src/mess/drivers/ti99_4x.c @@ -351,6 +351,12 @@ static INPUT_PORTS_START(ti99_4a) PORT_START("ALPHA") /* one more port for Alpha line */ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alpha Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE + /* another version of Alpha Lock which is non-toggling; this is useful when we want to attach + a real TI keyboard for input. For home computers, the Alpha Lock / Shift Lock was a physically + locking key. */ + PORT_START("ALPHA1") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alpha Lock non-toggle") PORT_CODE(KEYCODE_RWIN) + INPUT_PORTS_END @@ -462,7 +468,7 @@ READ8_MEMBER( ti99_4x_state::read_by_9901 ) // the line enough to make the TMS9901 sense the low level. // A reported, feasible fix was to cut the line and insert a diode // below the Alphalock key. - if ((ioport("ALPHABUG")!=0) && (m_model!=MODEL_4)) answer |= ioport("ALPHA")->read(); + if ((ioport("ALPHABUG")!=0) && (m_model!=MODEL_4)) answer |= (ioport("ALPHA")->read() | ioport("ALPHA1")->read()); } else { @@ -470,7 +476,7 @@ READ8_MEMBER( ti99_4x_state::read_by_9901 ) } if (m_check_alphalock) // never true for TI-99/4 { - answer &= ~(ioport("ALPHA")->read()); + answer &= ~(ioport("ALPHA")->read() | ioport("ALPHA1")->read()); } answer = (answer << 3); if (m_int1 == CLEAR_LINE) answer |= 0x02; -- cgit v1.2.3