Toshiba T3100e improvements :

* Enables [Fn]+key combinations (using right-Ctrl or right-Alt as [Fn]). In particular:
* Implements switching the built-in display adapter between the 'internal' plasma display ([Fn]+[Home]) and an 'external' CGA monitor ([Fn]+[End])
* Allows the video font to be toggled between thin and thick ([Fn]+[Right arrow]).
* Implements the four hardware fonts of the original, selectable in BIOS setup.
* Implements CRTC register 12h (attribute mapping and display type)
Patch from John Elliott
This commit is contained in:
SarahW 2017-10-28 16:03:44 +01:00
commit 65a9d17674
9 changed files with 296 additions and 115 deletions

View file

@ -5,6 +5,7 @@
#include "pit.h"
#include "sound.h"
#include "sound_speaker.h"
#include "t3100e.h"
#include "timer.h"
#include "x86.h"
@ -138,6 +139,29 @@ void keyboard_at_adddata_keyboard(uint8_t val)
if (key_1c == 4)
output = 3;
}*/
/* Test for T3100E 'Fn' key (Right Alt / Right Ctrl) */
if (romset == ROM_T3100E && (pcem_key[0xb8] || pcem_key[0x9d]))
{
switch (val)
{
case 0x4f: t3100e_notify_set(0x01); break; /* End */
case 0x50: t3100e_notify_set(0x02); break; /* Down */
case 0x51: t3100e_notify_set(0x03); break; /* PgDn */
case 0x52: t3100e_notify_set(0x04); break; /* Ins */
case 0x53: t3100e_notify_set(0x05); break; /* Del */
case 0x54: t3100e_notify_set(0x06); break; /* SysRQ */
case 0x45: t3100e_notify_set(0x07); break; /* NumLock */
case 0x46: t3100e_notify_set(0x08); break; /* ScrLock */
case 0x47: t3100e_notify_set(0x09); break; /* Home */
case 0x48: t3100e_notify_set(0x0A); break; /* Up */
case 0x49: t3100e_notify_set(0x0B); break; /* PgUp */
case 0x4A: t3100e_notify_set(0x0C); break; /* Keypad -*/
case 0x4B: t3100e_notify_set(0x0D); break; /* Left */
case 0x4C: t3100e_notify_set(0x0E); break; /* KP 5 */
case 0x4D: t3100e_notify_set(0x0F); break; /* Right */
}
}
key_queue[key_queue_end] = val;
key_queue_end = (key_queue_end + 1) & 0xf;
// pclog("keyboard_at : %02X added to key queue\n", val);
@ -397,6 +421,24 @@ void keyboard_at_write(uint16_t port, uint8_t val, void *priv)
}
else keyboard_at_adddata(0x00);
break;
/* For the T3100e, 0xB0 is 'turbo on' and 0xB1 is
* 'turbo off' */
case 0xb2: /* T3100e: Select external display */
if (romset == ROM_T3100E)
t3100e_display_set(0x00);
break;
case 0xb3: /* T3100e: Select internal display */
if (romset == ROM_T3100E)
t3100e_display_set(0x01);
break;
case 0xbc: /* T3100e: Reset Fn+Key notification */
if (romset == ROM_T3100E)
t3100e_notify_set(0x00);
break;
case 0xc0: /*Read input port*/
keyboard_at_adddata(keyboard_at.input_port | 4);