diff --git a/src/piix.c b/src/intel_piix.c similarity index 99% rename from src/piix.c rename to src/intel_piix.c index 50cfb456e..4f3607bf1 100644 --- a/src/piix.c +++ b/src/intel_piix.c @@ -6,13 +6,11 @@ * * Emulation of the Intel PIIX and PIIX3 Xcelerators. * - * Emulation core dispatcher. - * * PRD format : * word 0 - base address - * word 1 - bits 1 - 15 = byte count, bit 31 = end of transfer + * word 1 - bits 1-15 = byte count, bit 31 = end of transfer * - * Version: @(#)piix.c 1.0.8 2017/11/04 + * Version: @(#)intel_piix.c 1.0.9 2017/11/11 * * Authors: Sarah Walker, * Miran Grca, diff --git a/src/piix4.c b/src/intel_piix4.c similarity index 98% rename from src/piix4.c rename to src/intel_piix4.c index 759934703..fa3b795bd 100644 --- a/src/piix4.c +++ b/src/intel_piix4.c @@ -6,13 +6,11 @@ * * Preliminary emulation of the Intel PIIX4 Xcelerator. * - * Emulation core dispatcher. - * * PRD format : * word 0 - base address - * word 1 - bits 1 - 15 = byte count, bit 31 = end of transfer + * word 1 - bits 1-15 = byte count, bit 31 = end of transfer * - * Version: @(#)piix4.c 1.0.1 2017/11/04 + * Version: @(#)intel_piix4.c 1.0.2 2017/11/11 * * Authors: Sarah Walker, * Miran Grca, @@ -28,7 +26,7 @@ #include "dma.h" #include "io.h" #include "device.h" -#include "keyboard_at.h" +#include "keyboard.h" #include "mem.h" #include "pci.h" #include "disk/hdc.h" diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index cd0016433..645fee357 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -24,6 +24,10 @@ #include "../86box.h" #include "../cpu/cpu.h" #include "../mem.h" +#include "../rom.h" +#include "../device.h" +#include "../disk/hdc.h" +#include "../disk/hdc_ide.h" #include "machine.h" @@ -100,4 +104,25 @@ machine_at_compaq_init(machine_t *model) read_ram, read_ramw, read_raml, write_ram, write_ramw, write_raml, 0xa0000+ram, MEM_MAPPING_INTERNAL, NULL); + + switch(model->id) { + case ROM_DESKPRO_386: + if (hdc_current == 1) + ide_init(); + break; + + case ROM_PORTABLE: + break; + + case ROM_PORTABLEII: + break; + + case ROM_PORTABLEIII: + break; + + case ROM_PORTABLEIII386: + if (hdc_current == 1) + ide_init(); + break; + } } diff --git a/src/machine/m_olivetti_m24.c b/src/machine/m_olivetti_m24.c index d62028950..fc70cab96 100644 --- a/src/machine/m_olivetti_m24.c +++ b/src/machine/m_olivetti_m24.c @@ -8,7 +8,7 @@ * * Emulation of the Olivetti M24. * - * Version: @(#)m_olivetti_m24.c 1.0.2 2017/11/03 + * Version: @(#)m_olivetti_m24.c 1.0.3 2017/11/11 * * Authors: Sarah Walker, * Miran Grca, @@ -761,7 +761,7 @@ machine_olim24_init(machine_t *model) vid_write, NULL, NULL, NULL, 0, m24); io_sethandler(0x03d0, 16, vid_in, NULL, NULL, vid_out, NULL, NULL, m24); timer_add(vid_poll, &m24->vidtime, TIMER_ALWAYS_ENABLED, m24); - device_add(&m24_device); + device_add_ex(&m24_device, m24); /* Initialize the keyboard. */ m24->status = STAT_LOCK | STAT_CD; diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c new file mode 100644 index 000000000..c72aca1a8 --- /dev/null +++ b/src/machine/m_xt_compaq.c @@ -0,0 +1,52 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Emulation of various Compaq XT-class PC's. + * + * Version: @(#)m_xt_compaq.c 1.0.1 2017/11/11 + * + * Authors: Sarah Walker, + * Miran Grca, + * TheCollector1995, + * + * Copyright 2008-2017 Sarah Walker. + * Copyright 2016,2017 Miran Grca. + */ +#include +#include +#include +#include +#include "../86box.h" +#include "../cpu/cpu.h" +#include "../nmi.h" +#include "../pit.h" +#include "../mem.h" +#include "../rom.h" +#include "../device.h" +#include "../game/gameport.h" +#include "../keyboard.h" +#include "machine.h" + + +void +machine_xt_compaq_init(machine_t *model) +{ + machine_common_init(model); + + pit_set_out_func(&pit, 1, pit_refresh_timer_xt); + + device_add(&keyboard_xt_device); + nmi_init(); + if (joystick_type != 7) + device_add(&gameport_device); + + switch(model->id) { + case ROM_PORTABLE: + break; + } +} diff --git a/src/machine/machine.h b/src/machine/machine.h index f1b9c7c7a..3263f1fcc 100644 --- a/src/machine/machine.h +++ b/src/machine/machine.h @@ -156,6 +156,7 @@ extern void machine_tandy1k_init(machine_t *); extern int tandy1k_eeprom_read(void); extern void machine_xt_init(machine_t *); +extern void machine_xt_compaq_init(machine_t *); extern void machine_xt_laserxt_init(machine_t *); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index af9c88fef..0604d83cc 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -32,7 +32,7 @@ machine_t machines[] = { { "[8088] AMI XT clone", ROM_AMIXT, "amixt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, NULL }, - { "[8088] Compaq Portable", ROM_PORTABLE, "portable", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 128, 640, 128, 0, machine_xt_init, NULL }, + { "[8088] Compaq Portable", ROM_PORTABLE, "portable", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO, 128, 640, 128, 0, machine_xt_compaq_init, NULL }, { "[8088] DTK XT clone", ROM_DTKXT, "dtk", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, NULL }, { "[8088] IBM PC", ROM_IBMPC, "ibmpc", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 32, 0, machine_xt_init, NULL }, { "[8088] IBM PCjr", ROM_IBMPCJR, "ibmpcjr", {{"", cpus_pcjr}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO, 128, 640, 128, 0, machine_pcjr_init, NULL }, @@ -84,7 +84,7 @@ machine_t machines[] = { { "[386DX ISA] Amstrad MegaPC 386DX", ROM_MEGAPCDX, "megapcdx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 16, 1, 127, machine_at_wd76c10_init, NULL }, { "[386DX ISA] Award 386DX clone", ROM_AWARD386DX_OPTI495, "award386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 127, machine_at_opti495_init, NULL }, { "[386DX ISA] MR 386DX clone", ROM_MR386DX_OPTI495, "mr386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 127, machine_at_opti495_init, NULL }, - { "[386DX ISA] Compaq Portable III (386)", ROM_PORTABLEIII386, "portableiii386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 127, machine_at_compaq_init, NULL }, + { "[386DX ISA] Compaq Portable III (386)", ROM_PORTABLEIII386, "portableiii386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 14, 1, 127, machine_at_compaq_init, NULL }, { "[386DX MCA] IBM PS/2 model 80", ROM_IBMPS2_M80, "ibmps2_m80", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_MCA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC_PS2, 1, 12, 1, 63, machine_ps2_model_80_init, NULL }, diff --git a/src/video/vid_voodoo.c b/src/video/vid_voodoo.c index 64c9f19ca..cc276f6b9 100644 --- a/src/video/vid_voodoo.c +++ b/src/video/vid_voodoo.c @@ -2681,7 +2681,9 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood int dither = params->fbzMode & FBZ_DITHER;*/ int texels; int c; +#ifndef NO_CODEGEN uint8_t (*voodoo_draw)(voodoo_state_t *state, voodoo_params_t *params, int x, int real_y); +#endif int y_diff = SLI_ENABLED ? 2 : 1; if ((params->textureMode[0] & TEXTUREMODE_MASK) == TEXTUREMODE_PASSTHROUGH || diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 6ce17a1a9..33be2f901 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -269,20 +269,16 @@ endif MAINOBJ := pc.o config.o random.o timer.o io.o dma.o nmi.o pic.o \ pit.o ppi.o pci.o mca.o mcr.o mem.o memregs.o rom.o \ device.o nvr.o nvr_at.o nvr_ps2.o $(VNCOBJ) $(RDPOBJ) \ - intel.o intel_flash.o intel_sio.o + intel.o intel_flash.o intel_piix.o intel_piix4.o intel_sio.o CPUOBJ := cpu.o cpu_table.o \ 808x.o 386.o x86seg.o x87.o \ 386_dynarec.o $(DYNARECOBJ) MCHOBJ := machine.o machine_table.o \ - m_amstrad.o $(EUROPC) \ - m_olivetti_m24.o \ - m_pcjr.o \ - m_tandy.o \ - m_xt.o m_xt_laserxt.o \ - m_at.o \ - m_at_ali1429.o m_at_commodore.o \ + m_amstrad.o $(EUROPC) m_olivetti_m24.o m_tandy.o \ + m_xt.o m_xt_compaq.o m_xt_laserxt.o \ + m_at.o m_at_ali1429.o m_at_commodore.o \ m_at_neat.o m_at_headland.o \ m_at_opti495.o m_at_scat.o \ m_at_compaq.o m_at_wd76c10.o \ @@ -290,16 +286,12 @@ MCHOBJ := machine.o machine_table.o \ m_at_430lx_nx.o m_at_430fx.o \ m_at_430hx.o m_at_430vx.o \ m_at_440fx.o \ - m_ps1.o \ - m_ps2_isa.o m_ps2_mca.o + m_pcjr.o m_ps1.o m_ps2_isa.o m_ps2_mca.o DEVOBJ := bugger.o lpt.o $(SERIAL) \ sio_detect.o \ - sio_fdc37c66x.o sio_fdc37c669.o \ - sio_fdc37c93x.o \ - sio_pc87306.o sio_w83877f.o \ - sio_um8669f.o \ - piix.o \ + sio_fdc37c66x.o sio_fdc37c669.o sio_fdc37c93x.o \ + sio_pc87306.o sio_w83877f.o sio_um8669f.o \ keyboard.o \ keyboard_xt.o keyboard_at.o \ gameport.o \