Merge pull request #6389 from jriwanek-forks/pcjr-ir

Support for PCjr keyboard IR reciever option
This commit is contained in:
Miran Grča
2025-10-22 05:06:22 +02:00
committed by GitHub
2 changed files with 21 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ typedef struct pcjr_s {
uint8_t pb;
uint8_t option_fdc;
uint8_t option_ir;
pc_timer_t send_delay_timer;

View File

@@ -667,6 +667,8 @@ kbd_read(uint16_t port, void *priv)
ret |= (pcjr->data ? 0x40 : 0);
if (pcjr->data)
ret |= 0x40;
if (pcjr->option_ir)
ret |= 0x80; /* Keyboard cable not connected */
break;
case 0xa0:
@@ -816,6 +818,19 @@ static const device_config_t pcjr_config[] = {
.selection = { { 0 } },
.bios = { { 0 } }
},
#if 0
{
.name = "ir_reciever",
.description = "Enable IR Reciever",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
@@ -850,6 +865,11 @@ machine_pcjr_init(UNUSED(const machine_t *model))
pcjr = calloc(1, sizeof(pcjr_t));
pcjr->option_fdc = 0;
#if 0
pcjr->option_ir = device_get_config_int("ir_reciever");
#else
pcjr->option_ir = 0;
#endif
is_pcjr = 1;