Skip to content

Commit

Permalink
pc98_usb: Add Windows and Menu key support
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk committed Jun 13, 2023
1 parent 6a6c07d commit e94fd4b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion converter/pc98_usb/matrix.c
Expand Up @@ -105,6 +105,19 @@ static bool pc98_is_newtype(void)
return true;
}

static void pc98_enable_winkey(void)
{
uint16_t code;
RETRY:
pc98_send(0x95);
code = pc98_wait_response();
if (code != 0xFA) return;

pc98_send(0x03);
code = pc98_wait_response();
if (code != 0xFA) goto RETRY;
}

static uint8_t pc98_led = 0;
static void pc98_led_set(void)
{
Expand Down Expand Up @@ -140,9 +153,15 @@ void matrix_init(void)
serial_init();

_delay_ms(50);
if (pc98_is_newtype()) xprintf("new type\n"); else xprintf("old type\n");
xprintf("\nKeyboard Type: ");
if (pc98_is_newtype()) xprintf("[NEW]"); else xprintf("[OLD]");

xprintf("\nInhibit Repeat: ");
pc98_inhibit_repeat();

xprintf("\nEnable Winkey: ");
pc98_enable_winkey();

// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;

Expand Down

0 comments on commit e94fd4b

Please sign in to comment.