Fix video initialization on four 486 machines and the IDE SET DRIVE PARAMETERS command.

This commit is contained in:
OBattler
2026-02-07 18:37:11 +01:00
parent 7ec2e3f6a6
commit 6fa6e5c1ea
4 changed files with 10 additions and 2 deletions

View File

@@ -2610,8 +2610,8 @@ ide_callback(void *priv)
err = ABRT_ERR;
else {
/* Only accept after RESET or DIAG. */
if (ide->params_specified) {
ide->cfg_spt = ide->tf->secount;
if (!ide->params_specified) {
ide->cfg_spt = (ide->tf->secount == 0) ? 256 : ide->tf->secount;
ide->cfg_hpc = ide->tf->head + 1;
ide->params_specified = 1;

View File

@@ -396,6 +396,8 @@ machine_at_tuliptc38_init(const machine_t *model)
device_add(&ide_isa_device);
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));
video_reset(gfxcard[0]);
if (gfxcard[0] == VID_INTERNAL) {
bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN",
0x000c0000, 32768, 0);

View File

@@ -311,6 +311,8 @@ machine_at_dell466np_init(const machine_t *model)
machine_at_common_init(model);
device_add(&sis_85c461_device);
video_reset(gfxcard[0]);
if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
else {
@@ -354,6 +356,8 @@ machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2
if (fdc_current[0] == FDC_INTERNAL)
device_add(&fdc_at_device);
video_reset(gfxcard[0]);
if (gfxcard[0] != VID_INTERNAL) {
for (uint16_t i = 0; i < 32768; i++)
rom[i] = mem_readb_phys(0x000c0000 + i);

View File

@@ -490,6 +490,8 @@ machine_at_tg486g_init(const machine_t *model)
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
video_reset(gfxcard[0]);
if (gfxcard[0] != VID_INTERNAL) {
for (uint16_t i = 0; i < 32768; i++)
rom[i] = mem_readb_phys(0x000c0000 + i);