Keyboard controller file split and assorted clean-ups and fixes

This commit is contained in:
OBattler
2023-04-19 23:34:32 +02:00
parent 018c9ca39b
commit 19d155cdd7
13 changed files with 497 additions and 2708 deletions

View File

@@ -780,8 +780,8 @@ smram_restore_state_p6(uint32_t *saved_state)
cpu_state.seg_gs.ar_high = (saved_state[SMRAM_FIELD_P6_GS_SELECTOR_AR] >> 24) & 0xff;
smm_seg_load(&cpu_state.seg_gs);
mem_a20_alt = 0;
keyboard_at_set_a20_key(!saved_state[SMRAM_FIELD_P6_A20M]);
mem_a20_alt = 0x00;
mem_a20_key = saved_state[SMRAM_FIELD_P6_A20M] ? 0x00 : 0x02;
mem_a20_recalc();
if (SMM_REVISION_ID & SMM_SMBASE_RELOCATION)

View File

@@ -245,7 +245,7 @@ reset_common(int hard)
/* TODO: Hack, but will do for time being, because all AT machines currently are 286+,
and vice-versa. */
dma_set_at(is286);
device_reset_all();
device_reset_all(DEVICE_ALL);
}
}
@@ -322,7 +322,7 @@ reset_common(int hard)
/* If we have an AT or PS/2 keyboard controller, make sure the A20 state
is correct. */
kbc_at_a20_reset();
device_reset_all(DEVICE_KBC);
}
if (!is286)
@@ -359,7 +359,7 @@ hardresetx86(void)
/* TODO: Hack, but will do for time being, because all AT machines currently are 286+,
and vice-versa. */
dma_set_at(is286);
device_reset_all();
device_reset_all(DEVICE_ALL);
cpu_alt_reset = 0;