Fixed several things, including built-in video on the Toshiba T1000 and T1200.

This commit is contained in:
OBattler
2018-03-02 21:57:37 +01:00
parent 33bc831f19
commit cb79f53c54
6 changed files with 32 additions and 64 deletions

View File

@@ -1140,7 +1140,7 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
{ {
cdrom[atapi_cdrom_drives[ide->channel]].error = 0; cdrom[atapi_cdrom_drives[ide->channel]].error = 0;
} }
if ((val >= WIN_SEEK) && (val <= 0x7F)) if (((val >= WIN_RESTORE) && (val <= 0x1F)) || ((val >= WIN_SEEK) && (val <= 0x7F)))
{ {
if (ide_drive_is_zip(ide)) if (ide_drive_is_zip(ide))
{ {
@@ -1152,18 +1152,18 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
} }
else else
{ {
ide->atastat = READY_STAT; ide->atastat = BUSY_STAT;
} }
timer_process(); timer_process();
if (ide_drive_is_zip(ide)) if (ide_drive_is_zip(ide))
{ {
zip[atapi_zip_drives[ide->channel]].callback = 100LL*IDE_TIME; zip[atapi_zip_drives[ide->channel]].callback = 40000LL * TIMER_USEC /*100LL*IDE_TIME*/;
} }
if (ide_drive_is_cdrom(ide)) if (ide_drive_is_cdrom(ide))
{ {
cdrom[atapi_cdrom_drives[ide->channel]].callback = 100LL*IDE_TIME; cdrom[atapi_cdrom_drives[ide->channel]].callback = 40000LL * TIMER_USEC /*100LL*IDE_TIME*/;
} }
idecallback[ide_board]=100LL*IDE_TIME; idecallback[ide_board]=40000LL * TIMER_USEC /*100LL*IDE_TIME*/;
timer_update_outstanding(); timer_update_outstanding();
return; return;
} }
@@ -1195,32 +1195,6 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
timer_update_outstanding(); timer_update_outstanding();
return; return;
case WIN_RESTORE:
if (ide_drive_is_zip(ide))
{
zip[atapi_zip_drives[ide->channel]].status = READY_STAT;
}
else if (ide_drive_is_cdrom(ide))
{
cdrom[atapi_cdrom_drives[ide->channel]].status = READY_STAT;
}
else
{
ide->atastat = READY_STAT;
}
timer_process();
if (ide_drive_is_zip(ide))
{
zip[atapi_zip_drives[ide->channel]].callback = 100LL*IDE_TIME;
}
if (ide_drive_is_cdrom(ide))
{
cdrom[atapi_cdrom_drives[ide->channel]].callback = 100LL*IDE_TIME;
}
idecallback[ide_board]=100LL*IDE_TIME;
timer_update_outstanding();
return;
case WIN_READ_MULTIPLE: case WIN_READ_MULTIPLE:
/* Fatal removed in accordance with the official ATAPI reference: /* Fatal removed in accordance with the official ATAPI reference:
If the Read Multiple command is attempted before the Set Multiple Mode If the Read Multiple command is attempted before the Set Multiple Mode
@@ -1917,24 +1891,21 @@ void callbackide(int ide_board)
zip_id = atapi_zip_drives[cur_ide[ide_board]]; zip_id = atapi_zip_drives[cur_ide[ide_board]];
zip_id_other = atapi_zip_drives[cur_ide[ide_board] ^ 1]; zip_id_other = atapi_zip_drives[cur_ide[ide_board] ^ 1];
if ((ide->command >= WIN_SEEK) && (ide->command <= 0x7F)) if (((ide->command >= WIN_RESTORE) && (ide->command <= 0x1F)) || ((ide->command >= WIN_SEEK) && (ide->command <= 0x7F)))
{ {
if (ide_drive_is_zip(ide) || ide_drive_is_cdrom(ide)) if (ide_drive_is_zip(ide) || ide_drive_is_cdrom(ide))
{ {
goto abort_cmd; goto abort_cmd;
} }
if (ide_drive_is_zip(ide)) if ((ide->command >= WIN_SEEK) && (ide->command <= 0x7F))
{ {
zip[zip_id].status = READY_STAT | DSC_STAT; full_size /= ide->t_hpc;
} full_size /= ide->t_spt;
else if (ide_drive_is_cdrom(ide))
{ if ((ide->cylinder >= full_size) || (ide->head >= ide->t_hpc) || !ide->sector || (ide->sector > ide->t_spt))
cdrom[cdrom_id].status = READY_STAT | DSC_STAT; goto id_not_found;
}
else
{
ide->atastat = READY_STAT | DSC_STAT;
} }
ide->atastat = READY_STAT | DSC_STAT;
ide_irq_raise(ide); ide_irq_raise(ide);
return; return;
} }
@@ -1969,11 +1940,6 @@ void callbackide(int ide_board)
} }
return; return;
case WIN_RESTORE:
if (ide_drive_is_zip(ide) || ide_drive_is_cdrom(ide))
{
goto abort_cmd;
}
case WIN_NOP: case WIN_NOP:
case WIN_STANDBYNOW1: case WIN_STANDBYNOW1:
case WIN_IDLENOW1: case WIN_IDLENOW1:

View File

@@ -384,7 +384,6 @@ void t3100e_turbo_set(uint8_t value)
t3100e_ems.turbo = value; t3100e_ems.turbo = value;
if (!value) if (!value)
{ {
int c = cpu;
cpu_dynamic_switch(0); /* 286/6 */ cpu_dynamic_switch(0); /* 286/6 */
} }
else else

View File

@@ -622,6 +622,8 @@ void machine_xt_t1000_init(machine_t *model)
nmi_init(); nmi_init();
nvr_tc8521_init(); nvr_tc8521_init();
/* No gameport, and no provision to fit one device_add(&gameport_device); */ /* No gameport, and no provision to fit one device_add(&gameport_device); */
device_add(&t1000_device);
} }
@@ -668,4 +670,6 @@ void machine_xt_t1200_init(machine_t *model)
nmi_init(); nmi_init();
nvr_tc8521_init(); nvr_tc8521_init();
/* No gameport, and no provision to fit one device_add(&gameport_device); */ /* No gameport, and no provision to fit one device_add(&gameport_device); */
device_add(&t1200_device);
} }

View File

@@ -11,7 +11,7 @@
* NOTES: OpenAT wip for 286-class machine with open BIOS. * NOTES: OpenAT wip for 286-class machine with open BIOS.
* PS2_M80-486 wip, pending receipt of TRM's for machine. * PS2_M80-486 wip, pending receipt of TRM's for machine.
* *
* Version: @(#)machine_table.c 1.0.22 2018/03/02 * Version: @(#)machine_table.c 1.0.23 2018/03/02
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -47,7 +47,7 @@ machine_t machines[] = {
{ "[8088] Schneider EuroPC", ROM_EUROPC, "europc", {{"Siemens",cpus_europc}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_HDC | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 0, machine_europc_init, NULL, NULL }, { "[8088] Schneider EuroPC", ROM_EUROPC, "europc", {{"Siemens",cpus_europc}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_HDC | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 0, machine_europc_init, NULL, NULL },
{ "[8088] Tandy 1000", ROM_TANDY, "tandy", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 128, 640, 128, 0, machine_tandy1k_init, tandy1k_get_device, NULL }, { "[8088] Tandy 1000", ROM_TANDY, "tandy", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 128, 640, 128, 0, machine_tandy1k_init, tandy1k_get_device, NULL },
{ "[8088] Tandy 1000 HX", ROM_TANDY1000HX, "tandy1000hx", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 256, 640, 128, 0, machine_tandy1k_init, tandy1k_hx_get_device, NULL }, { "[8088] Tandy 1000 HX", ROM_TANDY1000HX, "tandy1000hx", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 256, 640, 128, 0, machine_tandy1k_init, tandy1k_hx_get_device, NULL },
{ "[8088] Toshiba 1000", ROM_T1000, "t1000", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 512, 1280, 768, 0, machine_xt_t1000_init, t1000_get_device, NULL }, { "[8088] Toshiba 1000", ROM_T1000, "t1000", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO, 512, 1280, 768, 0, machine_xt_t1000_init, t1000_get_device, NULL },
#if defined(DEV_BRANCH) && defined(USE_LASERXT) #if defined(DEV_BRANCH) && defined(USE_LASERXT)
{ "[8088] VTech Laser Turbo XT", ROM_LTXT, "ltxt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 512, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL }, { "[8088] VTech Laser Turbo XT", ROM_LTXT, "ltxt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 512, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL },
#endif #endif
@@ -60,7 +60,7 @@ machine_t machines[] = {
{ "[8086] Amstrad PC20(0)", ROM_PC200, "pc200", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, machine_amstrad_init, NULL, nvr_at_close }, { "[8086] Amstrad PC20(0)", ROM_PC200, "pc200", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, machine_amstrad_init, NULL, nvr_at_close },
{ "[8086] Olivetti M24", ROM_OLIM24, "olivetti_m24", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_olim24_init, NULL, NULL }, { "[8086] Olivetti M24", ROM_OLIM24, "olivetti_m24", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_olim24_init, NULL, NULL },
{ "[8086] Tandy 1000 SL/2", ROM_TANDY1000SL2, "tandy1000sl2", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 512, 768, 128, 0, machine_tandy1k_init, NULL, NULL }, { "[8086] Tandy 1000 SL/2", ROM_TANDY1000SL2, "tandy1000sl2", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 512, 768, 128, 0, machine_tandy1k_init, NULL, NULL },
{ "[8086] Toshiba 1200", ROM_T1200, "t1200", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 1024, 2048,1024, 0, machine_xt_t1200_init, t1200_get_device, NULL }, { "[8086] Toshiba 1200", ROM_T1200, "t1200", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO, 1024, 2048,1024, 0, machine_xt_t1200_init, t1200_get_device, NULL },
#if defined(DEV_BRANCH) && defined(USE_LASERXT) #if defined(DEV_BRANCH) && defined(USE_LASERXT)
{ "[8086] VTech Laser XT3", ROM_LXT3, "lxt3", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 256, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL }, { "[8086] VTech Laser XT3", ROM_LXT3, "lxt3", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 256, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL },
#endif #endif

View File

@@ -8,7 +8,7 @@
* *
* Oak OTI037C/67/077 emulation. * Oak OTI037C/67/077 emulation.
* *
* Version: @(#)vid_oak_oti.c 1.0.6 2018/03/02 * Version: @(#)vid_oak_oti.c 1.0.7 2018/03/02
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -301,10 +301,11 @@ oti037c_available(void)
return(rom_present(BIOS_37C_PATH)); return(rom_present(BIOS_37C_PATH));
} }
static int static int
oti067_available(void) oti067_077_available(void)
{ {
return(rom_present(BIOS_67_PATH)); return(rom_present(BIOS_77_PATH));
} }
@@ -330,13 +331,6 @@ static device_config_t oti067_config[] =
}; };
static int
oti077_available(void)
{
return(rom_present(BIOS_77_PATH));
}
static device_config_t oti077_config[] = static device_config_t oti077_config[] =
{ {
{ {
@@ -380,7 +374,7 @@ device_t oti067_device =
DEVICE_ISA, DEVICE_ISA,
2, 2,
oti_init, oti_close, NULL, oti_init, oti_close, NULL,
oti067_available, oti067_077_available,
oti_speed_changed, oti_speed_changed,
oti_force_redraw, oti_force_redraw,
oti_add_status_info, oti_add_status_info,
@@ -393,7 +387,7 @@ device_t oti077_device =
DEVICE_ISA, DEVICE_ISA,
5, 5,
oti_init, oti_close, NULL, oti_init, oti_close, NULL,
oti077_available, oti067_077_available,
oti_speed_changed, oti_speed_changed,
oti_force_redraw, oti_force_redraw,
oti_add_status_info, oti_add_status_info,

View File

@@ -40,7 +40,7 @@
* W = 3 bus clocks * W = 3 bus clocks
* L = 4 bus clocks * L = 4 bus clocks
* *
* Version: @(#)video.c 1.0.17 2018/03/02 * Version: @(#)video.c 1.0.18 2018/03/02
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -346,6 +346,7 @@ static video_timings_t timing_pc1512 = {VIDEO_BUS, 0,0,0, 0,0,0}; /*PC1512 vid
static video_timings_t timing_pc1640 = {VIDEO_ISA, 8,16,32, 8,16,32}; static video_timings_t timing_pc1640 = {VIDEO_ISA, 8,16,32, 8,16,32};
static video_timings_t timing_pc200 = {VIDEO_ISA, 8,16,32, 8,16,32}; static video_timings_t timing_pc200 = {VIDEO_ISA, 8,16,32, 8,16,32};
static video_timings_t timing_m24 = {VIDEO_ISA, 8,16,32, 8,16,32}; static video_timings_t timing_m24 = {VIDEO_ISA, 8,16,32, 8,16,32};
static video_timings_t timing_t1000 = {VIDEO_ISA, 8,16,32, 8,16,32};
static video_timings_t timing_pvga1a = {VIDEO_ISA, 6, 8,16, 6, 8,16}; static video_timings_t timing_pvga1a = {VIDEO_ISA, 6, 8,16, 6, 8,16};
static video_timings_t timing_wd90c11 = {VIDEO_ISA, 3, 3, 6, 5, 5,10}; static video_timings_t timing_wd90c11 = {VIDEO_ISA, 3, 3, 6, 5, 5,10};
static video_timings_t timing_vga = {VIDEO_ISA, 8,16,32, 8,16,32}; static video_timings_t timing_vga = {VIDEO_ISA, 8,16,32, 8,16,32};
@@ -385,6 +386,10 @@ video_update_timing(void)
case ROM_PC3086: case ROM_PC3086:
timing = &timing_pvga1a; timing = &timing_pvga1a;
break; break;
case ROM_T1000:
case ROM_T1200:
timing = &timing_t1000;
break;
case ROM_MEGAPC: case ROM_MEGAPC:
case ROM_MEGAPCDX: case ROM_MEGAPCDX:
timing = &timing_wd90c11; timing = &timing_wd90c11;