Various fixes needed to fix the two Laser XT boards.

This commit is contained in:
OBattler
2018-01-25 22:36:24 +01:00
parent cfe2912aec
commit cf6023aed2
6 changed files with 132 additions and 124 deletions

View File

@@ -8,7 +8,7 @@
*
* Implementation of the XT-style keyboard.
*
* Version: @(#)keyboard_xt.c 1.0.5 2018/01/09
* Version: @(#)keyboard_xt.c 1.0.6 2018/01/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -462,7 +462,7 @@ kbd_read(uint16_t port, void *priv)
switch (port) {
case 0x60:
if ((romset == ROM_IBMPC) && (kbd->pb & 0x80)) {
if (VGA || gfxcard == GFX_EGA)
if (EGA_VGA)
ret = 0x4d;
else if (MDA)
ret = 0x7d;
@@ -484,14 +484,20 @@ kbd_read(uint16_t port, void *priv)
ret = ((mem_size-64) / 32) >> 4;
} else {
if (kbd->pb & 0x08) {
if (VGA || gfxcard == GFX_EGA)
ret = 4;
if (EGA_VGA)
ret = 0x4;
else if (MDA)
ret = 7;
ret = 0x7;
else
ret = 6;
} else
ret = 0x0d;
ret = 0x6;
} else {
/* LaserXT = Always 512k RAM;
LaserXT/3 = Bit 0: set = 512k, clear = 256k. */
if (romset == ROM_LXT3)
ret = (mem_size == 512) ? 0x0d : 0x0c;
else
ret = 0x0d;
}
}
ret |= (ppispeakon ? 0x20 : 0);

View File

@@ -11,7 +11,7 @@
* NOTES: OpenAT wip for 286-class machine with open BIOS.
* PS2_M80-486 wip, pending receipt of TRM's for machine.
*
* Version: @(#)machine_table.c 1.0.14 2018/01/22
* Version: @(#)machine_table.c 1.0.15 2018/01/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* 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] Tandy 1000", ROM_TANDY, "tandy", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 128, 640, 128, 0, machine_tandy1k_init, NULL, NULL },
{ "[8088] Tandy 1000 HX", ROM_TANDY1000HX, "tandy1000hx", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 256, 640, 128, 0, machine_tandy1k_init, NULL, NULL },
{ "[8088] VTech Laser Turbo XT", ROM_LTXT, "ltxt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 1152, 64, 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 },
{ "[8086] Amstrad PC1512", ROM_PC1512, "pc1512", {{"", cpus_pc1512}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, machine_amstrad_init, NULL, nvr_at_close },
{ "[8086] Amstrad PC1640", ROM_PC1640, "pc1640", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 0, 63, machine_amstrad_init, NULL, nvr_at_close },
@@ -56,7 +56,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] 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] VTech Laser XT3", ROM_LXT3, "lxt3", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 512, 1152, 128, 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 },
{ "[286 ISA] AMI 286 clone", ROM_AMI286, "ami286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 127, machine_at_neat_ami_init, NULL, nvr_at_close },
{ "[286 ISA] Award 286 clone", ROM_AWARD286, "award286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 127, machine_at_scat_init, NULL, nvr_at_close },

View File

@@ -13,7 +13,7 @@
* - c386sx16 BIOS fails checksum
* - the loadfont() calls should be done elsewhere
*
* Version: @(#)rom.c 1.0.26 2018/01/01
* Version: @(#)rom.c 1.0.27 2018/01/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -373,6 +373,7 @@ rom_load_bios(int rom_id)
0x00c000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc200/40109", L"rb");
if (f == NULL) break;
(void)fclose(f);
return(1);
case ROM_TANDY:

201
src/rom.h
View File

@@ -8,7 +8,7 @@
*
* Definitions for the ROM image handler.
*
* Version: @(#)rom.h 1.0.11 2018/01/01
* Version: @(#)rom.h 1.0.12 2018/01/25
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
* Copyright 2018 Fred N. van Kempen.
@@ -18,7 +18,7 @@
#define PCJR (romset==ROM_IBMPCJR)
#ifdef GREENB
#if defined(DEV_BRANCH) && defined(USE_GREENB)
#define AMIBIOS (romset==ROM_AMI386SX || \
romset==ROM_AMI486 || \
romset==ROM_WIN486 || \
@@ -39,124 +39,119 @@ typedef struct {
enum {
ROM_IBMPC = 0, /* 301 keyboard error, 131 cassette (!!!) error */
ROM_IBMXT, /* 301 keyboard error */
ROM_IBMPCJR,
ROM_GENXT, /* 'Generic XT BIOS' */
ROM_AMIXT, /* XT Clone with AMI BIOS */
ROM_DTKXT,
ROM_EUROPC,
ROM_OLIM24,
ROM_IBMXT, /* 301 keyboard error */
ROM_GENXT, /* 'Generic XT BIOS' */
ROM_JUKOPC,
ROM_PORTABLE,
ROM_LTXT,
ROM_PXXT,
ROM_LXT3,
ROM_IBMPCJR,
ROM_TANDY,
ROM_TANDY1000HX,
ROM_EUROPC,
ROM_PC1512,
ROM_PC200,
ROM_PC1640,
ROM_PC200,
ROM_PC2086,
ROM_PC3086,
ROM_AMIXT, /* XT Clone with AMI BIOS */
ROM_LTXT,
ROM_LXT3,
ROM_DTK386,
ROM_PXXT,
ROM_JUKOPC,
ROM_TANDY1000HX,
ROM_OLIM24,
ROM_TANDY1000SL2,
ROM_IBMAT,
ROM_CMDPC30,
ROM_T3100E,
ROM_AMI286,
ROM_AWARD286,
ROM_MEGAPC,
ROM_AMI386SX,
ROM_AMI486,
ROM_WIN486,
ROM_430VX,
ROM_ENDEAVOR,
ROM_REVENGE,
ROM_IBMPS1_2011,
ROM_IBMXT286,
#ifdef DEV_BRANCH
#ifdef USE_PORTABLE3
ROM_DESKPRO_386,
#endif
#endif
ROM_PORTABLE,
ROM_CMDPC30,
ROM_PORTABLEII,
#ifdef DEV_BRANCH
#ifdef USE_PORTABLE3
#if defined(DEV_BRANCH) && defined(USE_PORTABLE3)
ROM_PORTABLEIII,
ROM_PORTABLEIII386,
#endif
#endif
ROM_IBMPS1_2121,
ROM_AMI386DX_OPTI495,
ROM_MR386DX_OPTI495,
ROM_IBMPS2_M30_286,
ROM_IBMPS2_M50,
ROM_IBMPS2_M55SX,
ROM_IBMPS2_M80,
ROM_DTK486, /* DTK PKM-0038S E-2/SiS 471/Award/SiS 85C471 */
#ifdef UNIMPLEMENTED_MACHINES
ROM_VLI486SV2G, /* ASUS VL/I-486SV2G/SiS 471/Award/SiS 85C471 */ /* 51 */
#endif
ROM_R418, /* Rise Computer R418/SiS 496/497/Award/SMC FDC37C665 */
ROM_PLATO, /* Intel Premiere/PCI II/430NX/AMI/SMC FDC37C665 */
ROM_MB500N, /* PC Partner MB500N/430FX/Award/SMC FDC37C665 */
ROM_P54TP4XE, /* ASUS P/I-P55TP4XE/430FX/Award/SMC FDC37C665 */
ROM_AP53, /* AOpen AP53/430HX/AMI/SMC FDC37C665/669 */
ROM_P55T2S, /* ASUS P/I-P55T2S/430HX/AMI/NS PC87306 */
ROM_ACERM3A, /* Acer M3A/430HX/Acer/SMC FDC37C932FR */
ROM_ACERV35N, /* Acer V35N/430HX/Acer/SMC FDC37C932FR */
ROM_P55T2P4, /* ASUS P/I-P55T2P4/430HX/Award/Winbond W8387F*/
ROM_P55TVP4, /* ASUS P/I-P55TVP4/430HX/Award/Winbond W8387F*/
ROM_P55VA, /* Epox P55-VA/430VX/Award/SMC FDC37C932FR*/
ROM_THOR, /* Intel Advanced_ATX/430FX/AMI/NS PC87306 */
ROM_MRTHOR, /* Intel Advanced_ATX/430FX/MR.BIOS/NS PC87306 */
#ifdef UNIMPLEMENTED_MACHINES
ROM_POWERMATE_V, /* NEC PowerMate V/430FX/Phoenix/SMC FDC37C66 5*/ /* 68 */
#endif
#ifdef DEV_BRANCH
#ifdef USE_I686
ROM_440FX, /* Tyan Titan-Pro AT/440FX/Award BIOS/SMC FDC37C665 */
#endif
#endif
ROM_IBMPS1_2121_ISA,/* IBM PS/1 Model 2121 with ISA expansion bus */
ROM_SPC4200P, /* Samsung SPC-4200P/SCAT/Phoenix */
ROM_SUPER286TR, /* Hyundai Super-286TR/SCAT/Award */
ROM_AWARD386SX_OPTI495,
ROM_AWARD386DX_OPTI495,
ROM_AWARD486_OPTI495,
ROM_MEGAPCDX, /* 386DX mdl - Note: documentation (in German) clearly says such a model exists */
ROM_ZAPPA, /* Intel Advanced_ZP/430FX/AMI/NS PC87306 */
#ifdef DEV_BRANCH
#ifdef USE_I686
ROM_S1668, /* Tyan Titan-Pro ATX/440FX/AMI/SMC FDC37C669 */
#endif
#endif
ROM_IBMPS1_2133,
ROM_PRESIDENT, /* President Award 430FX PCI/430FX/Award/Unknown SIO */
#ifdef WALTJE
ROM_IBMPS2_M80_486,
#endif
#ifdef DEV_BRANCH
#ifdef USE_GREENB
ROM_4GPV31, /* Green-B 4GPV3.1 ISA/VLB 486/Pentium, AMI */
#endif
#endif
ROM_IBMAT,
ROM_IBMPS1_2011,
ROM_IBMPS2_M30_286,
ROM_IBMXT286,
ROM_SPC4200P, /* Samsung SPC-4200P/SCAT/Phoenix */
#ifdef WALTJE
ROM_OPENAT, /* PC/AT clone with Open BIOS */
#endif
ROM_T3100E,
ROM_IBMPS2_M50,
ROM_AMI386SX,
ROM_MEGAPC,
ROM_AWARD386SX_OPTI495,
#if defined(DEV_BRANCH) && defined(USE_PORTABLE3)
ROM_DESKPRO_386,
#endif
ROM_DTK386,
ROM_IBMPS1_2121,
ROM_IBMPS1_2121_ISA,/* IBM PS/1 Model 2121 with ISA expansion bus */
#if defined(DEV_BRANCH) && defined(USE_PORTABLE3)
ROM_PORTABLEIII386,
#endif
ROM_IBMPS2_M55SX,
ROM_AMI386DX_OPTI495,
ROM_MEGAPCDX, /* 386DX mdl - Note: documentation (in German) clearly says such a model exists */
ROM_AWARD386DX_OPTI495,
ROM_MR386DX_OPTI495,
ROM_IBMPS2_M80,
ROM_AMI486,
ROM_WIN486,
#ifdef UNIMPLEMENTED_MACHINES
ROM_VLI486SV2G, /* ASUS VL/I-486SV2G/SiS 471/Award/SiS 85C471 */ /* 51 */
#endif
ROM_AWARD486_OPTI495,
ROM_DTK486, /* DTK PKM-0038S E-2/SiS 471/Award/SiS 85C471 */
#if defined(DEV_BRANCH) && defined(USE_GREENB)
ROM_4GPV31, /* Green-B 4GPV3.1 ISA/VLB 486/Pentium, AMI */
#endif
ROM_IBMPS1_2133,
#ifdef WALTJE
ROM_IBMPS2_M80_486,
#endif
ROM_R418, /* Rise Computer R418/SiS 496/497/Award/SMC FDC37C665 */
ROM_REVENGE, /* Intel Premiere/PCI I/430LX/AMI/SMC FDC37C665 */
ROM_PLATO, /* Intel Premiere/PCI II/430NX/AMI/SMC FDC37C665 */
ROM_P54TP4XE, /* ASUS P/I-P55TP4XE/430FX/Award/SMC FDC37C665 */
ROM_ENDEAVOR, /* Intel Advanced_EV/430FX/AMI/NS PC87306 */
ROM_ZAPPA, /* Intel Advanced_ZP/430FX/AMI/NS PC87306 */
#ifdef UNIMPLEMENTED_MACHINES
ROM_POWERMATE_V, /* NEC PowerMate V/430FX/Phoenix/SMC FDC37C66 5*/
#endif
ROM_MB500N, /* PC Partner MB500N/430FX/Award/SMC FDC37C665 */
ROM_PRESIDENT, /* President Award 430FX PCI/430FX/Award/Unknown SIO */
ROM_THOR, /* Intel Advanced_ATX/430FX/AMI/NS PC87306 */
ROM_MRTHOR, /* Intel Advanced_ATX/430FX/MR.BIOS/NS PC87306 */
ROM_ACERM3A, /* Acer M3A/430HX/Acer/SMC FDC37C932FR */
ROM_ACERV35N, /* Acer V35N/430HX/Acer/SMC FDC37C932FR */
ROM_AP53, /* AOpen AP53/430HX/AMI/SMC FDC37C665/669 */
ROM_P55T2P4, /* ASUS P/I-P55T2P4/430HX/Award/Winbond W8387F*/
ROM_P55T2S, /* ASUS P/I-P55T2S/430HX/AMI/NS PC87306 */
ROM_P55TVP4, /* ASUS P/I-P55TVP4/430HX/Award/Winbond W8387F*/
ROM_430VX, /* Award 430VX PCI/430VX/Award/UMC UM8669F*/
ROM_P55VA, /* Epox P55-VA/430VX/Award/SMC FDC37C932FR*/
#if defined(DEV_BRANCH) && defined(USE_I686)
ROM_440FX, /* Tyan Titan-Pro AT/440FX/Award BIOS/SMC FDC37C665 */
ROM_S1668, /* Tyan Titan-Pro ATX/440FX/AMI/SMC FDC37C669 */
#endif
ROM_MAX
};

View File

@@ -8,7 +8,7 @@
*
* Define all known video cards.
*
* Version: @(#)vid_table.c 1.0.11 2018/01/25
* Version: @(#)vid_table.c 1.0.12 2018/01/25
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
@@ -83,7 +83,7 @@ video_cards[] = {
{ "Internal", "internal",
NULL, GFX_INTERNAL },
{"[ISA] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_isa",
&mach64gx_isa_device, GFX_MACH64GX_VLB },
&mach64gx_isa_device, GFX_MACH64GX_ISA },
{ "[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800",
&ati28800_device, GFX_VGACHARGER },
{ "[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w",

View File

@@ -8,7 +8,7 @@
*
* Definitions for the video controller module.
*
* Version: @(#)video.h 1.0.9 2018/01/25
* Version: @(#)video.h 1.0.10 2018/01/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -107,13 +107,19 @@ enum {
GFX_MAX
};
#define MDA ((gfxcard>=GFX_MDA) && \
(gfxcard<=GFX_INCOLOR) && \
(romset<ROM_TANDY || romset>=ROM_IBMAT))
#define MDA ( (gfxcard >= GFX_MDA) && \
(gfxcard < GFX_EGA) && \
((romset < ROM_TANDY) || \
(romset >= ROM_AMI286)))
#define VGA ((gfxcard>=GFX_VGA) && \
(romset!=ROM_PC1640 && romset!=ROM_PC1512 && \
romset!=ROM_TANDY && romset!=ROM_PC200 && romset!=ROM_T3100E))
#define EGA ((gfxcard >= GFX_EGA) && \
(gfxcard < GFX_VGA))
#define VGA ((gfxcard >= GFX_VGA))
#define EGA_VGA ( (EGA || VGA) && \
((romset < ROM_TANDY) || \
(romset >= ROM_AMI286)))
enum {
FULLSCR_SCALE_FULL = 0,