Switch kbc to device_t kbd_device

This commit is contained in:
Jasmine Iwanek
2023-02-07 18:08:11 -05:00
parent fea5ac681b
commit 118ab005f0
3 changed files with 342 additions and 329 deletions

View File

@@ -39,8 +39,6 @@ typedef struct {
#define RSHIFT_OFF 0x105
/* KBC #define's */
#define KBC_UNKNOWN 0x0000 /* As yet unknown keyboard */
/* IBM-style controllers */
#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */
#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */

View File

@@ -288,7 +288,11 @@ typedef struct _machine_ {
const machine_memory_t ram;
int ram_granularity;
int nvrmask;
uint16_t kbc;
#ifdef EMU_DEVICE_H
const device_t *kbc_device;
#else
void *kbc_device;
#endif /* EMU_DEVICE_H */
/* Bits:
7-0 Set bits are forced set on P1 (no forced set = 0x00);
15-8 Clear bits are forced clear on P1 (no foced clear = 0xff). */
@@ -324,6 +328,7 @@ extern char *machine_get_internal_name(void);
extern int machine_get_machine_from_internal_name(char *s);
extern void machine_init(void);
#ifdef EMU_DEVICE_H
extern const device_t *machine_get_kbc_device(int m);
extern const device_t *machine_get_device(int m);
extern const device_t *machine_get_vid_device(int m);
extern const device_t *machine_get_snd_device(int m);

File diff suppressed because it is too large Load Diff