mirror of
https://github.com/86Box/86Box.git
synced 2026-02-26 05:53:15 -07:00
Another massive cleanup run. Ibm.h no longer includes system header files. ROM loading simplified, and moved from mem.c to rom.c. Fixes in Makefile. Corrected mamy wrong includes. Removed old junk from days long gone. First phase of new SCAT chipset driver - no longer gives errors in BIOS, but NOT DONE YET.
This commit is contained in:
@@ -8,18 +8,22 @@
|
||||
*
|
||||
* Handling of the emulated machines.
|
||||
*
|
||||
* Version: @(#)machine.c 1.0.14 2017/09/21
|
||||
* Version: @(#)machine.c 1.0.15 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
#include "../mem.h"
|
||||
#include "../rom.h"
|
||||
#include "../device.h"
|
||||
#include "../floppy/floppy.h"
|
||||
#include "../floppy/fdc.h"
|
||||
@@ -161,103 +165,108 @@ machine_t machines[] =
|
||||
};
|
||||
|
||||
|
||||
int machine_count(void)
|
||||
void
|
||||
machine_init(void)
|
||||
{
|
||||
return (sizeof(machines) / sizeof(machine)) - 1;
|
||||
pclog("Initializing as \"%s\"\n", machine_getname());
|
||||
|
||||
AMSTRAD = AT = PCI = TANDY = 0;
|
||||
|
||||
io_init();
|
||||
|
||||
fdc_update_is_nsc(0);
|
||||
|
||||
machines[machine].init();
|
||||
|
||||
if (machines[machine].get_device)
|
||||
device_add(machines[machine].get_device());
|
||||
}
|
||||
|
||||
|
||||
int machine_getromset(void)
|
||||
int
|
||||
machine_count(void)
|
||||
{
|
||||
return machines[machine].id;
|
||||
return((sizeof(machines) / sizeof(machine)) - 1);
|
||||
}
|
||||
|
||||
|
||||
int machine_getromset_ex(int m)
|
||||
int
|
||||
machine_getromset(void)
|
||||
{
|
||||
return machines[m].id;
|
||||
return(machines[machine].id);
|
||||
}
|
||||
|
||||
|
||||
int machine_getmachine(int romset)
|
||||
int
|
||||
machine_getromset_ex(int m)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (machines[c].id != -1)
|
||||
{
|
||||
if (machines[c].id == romset)
|
||||
return c;
|
||||
c++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return(machines[m].id);
|
||||
}
|
||||
|
||||
|
||||
char *machine_getname(void)
|
||||
int
|
||||
machine_getmachine(int romset)
|
||||
{
|
||||
return machines[machine].name;
|
||||
int c = 0;
|
||||
|
||||
while (machines[c].id != -1) {
|
||||
if (machines[c].id == romset)
|
||||
return(c);
|
||||
c++;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
device_t *machine_getdevice(int machine)
|
||||
char *
|
||||
machine_getname(void)
|
||||
{
|
||||
if (machines[machine].get_device)
|
||||
{
|
||||
return machines[machine].get_device();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return(machines[machine].name);
|
||||
}
|
||||
|
||||
|
||||
char *machine_get_internal_name(void)
|
||||
device_t *
|
||||
machine_getdevice(int machine)
|
||||
{
|
||||
return machines[machine].internal_name;
|
||||
if (machines[machine].get_device)
|
||||
return(machines[machine].get_device());
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
char *machine_get_internal_name_ex(int m)
|
||||
char *
|
||||
machine_get_internal_name(void)
|
||||
{
|
||||
return machines[m].internal_name;
|
||||
return(machines[machine].internal_name);
|
||||
}
|
||||
|
||||
|
||||
int machine_get_nvrmask(int m)
|
||||
char *
|
||||
machine_get_internal_name_ex(int m)
|
||||
{
|
||||
return machines[m].nvrmask;
|
||||
return(machines[m].internal_name);
|
||||
}
|
||||
|
||||
|
||||
int machine_get_machine_from_internal_name(char *s)
|
||||
int
|
||||
machine_get_nvrmask(int m)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (machines[c].id != -1)
|
||||
{
|
||||
if (!strcmp(machines[c].internal_name, s))
|
||||
return c;
|
||||
c++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return(machines[m].nvrmask);
|
||||
}
|
||||
|
||||
|
||||
void machine_init(void)
|
||||
int
|
||||
machine_get_machine_from_internal_name(char *s)
|
||||
{
|
||||
pclog("Initializing as %s\n", machine_getname());
|
||||
int c = 0;
|
||||
|
||||
AMSTRAD = AT = PCI = TANDY = 0;
|
||||
while (machines[c].id != -1) {
|
||||
if (!strcmp(machines[c].internal_name, s))
|
||||
return(c);
|
||||
c++;
|
||||
}
|
||||
|
||||
io_init();
|
||||
|
||||
fdc_update_is_nsc(0);
|
||||
|
||||
machines[machine].init();
|
||||
|
||||
if (machines[machine].get_device)
|
||||
device_add(machines[machine].get_device());
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
#include "../nmi.h"
|
||||
#include "../mem.h"
|
||||
#include "../rom.h"
|
||||
#include "../device.h"
|
||||
#include "../nvr.h"
|
||||
#include "../gameport.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../pic.h"
|
||||
#include "../pit.h"
|
||||
|
||||
@@ -8,18 +8,22 @@
|
||||
*
|
||||
* Implementation of the Intel 430FX PCISet chip.
|
||||
*
|
||||
* Version: @(#)machine_at_430fx.c 1.0.4 2017/09/03
|
||||
* Version: @(#)machine_at_430fx.c 1.0.5 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../mem.h"
|
||||
#include "../memregs.h"
|
||||
#include "../rom.h"
|
||||
#include "../pci.h"
|
||||
#include "../device.h"
|
||||
#include "../piix.h"
|
||||
|
||||
@@ -8,14 +8,17 @@
|
||||
*
|
||||
* Implementation of the Intel 430HX PCISet chip.
|
||||
*
|
||||
* Version: @(#)machine_at_430hx.c 1.0.4 2017/09/03
|
||||
* Version: @(#)machine_at_430hx.c 1.0.5 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -8,18 +8,22 @@
|
||||
*
|
||||
* Implementation of the Intel 430LX and 430NX PCISet chips.
|
||||
*
|
||||
* Version: @(#)machine_at_430lx_nx.c 1.0.4 2017/09/03
|
||||
* Version: @(#)machine_at_430lx_nx.c 1.0.5 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../mem.h"
|
||||
#include "../memregs.h"
|
||||
#include "../rom.h"
|
||||
#include "../pci.h"
|
||||
#include "../device.h"
|
||||
#include "../intel.h"
|
||||
|
||||
@@ -8,14 +8,17 @@
|
||||
*
|
||||
* Implementation of the Intel 430VX PCISet chip.
|
||||
*
|
||||
* Version: @(#)machine_at_430vx.c 1.0.5 2017/09/03
|
||||
* Version: @(#)machine_at_430vx.c 1.0.6 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -8,14 +8,17 @@
|
||||
*
|
||||
* Implementation of the Intel 440FX PCISet chip.
|
||||
*
|
||||
* Version: @(#)machine_at_440fx.c 1.0.4 2017/09/03
|
||||
* Version: @(#)machine_at_440fx.c 1.0.5 2017/09/24
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../io.h"
|
||||
#include "../lpt.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../mem.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
see COPYING for more details
|
||||
*/
|
||||
/*This is the chipset used in the AMI 286 clone model*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -251,6 +251,10 @@ Note: the block address is forced to be a multiple of the block size by
|
||||
ignoring the appropriate number of the least-significant bits
|
||||
SeeAlso: #P0178,#P0187
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,15 @@
|
||||
* SiS sis85c471 Super I/O Chip
|
||||
* Used by DTK PKM-0038S E-2
|
||||
*
|
||||
* Version: @(#)sis85c471.c 1.0.4 2017/09/03
|
||||
* Version: @(#)sis85c471.c 1.0.5 2017/09/24
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../io.h"
|
||||
#include "../memregs.h"
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -6,12 +6,16 @@
|
||||
*
|
||||
* Emulation of the SiS 50x PCI chips.
|
||||
*
|
||||
* Version: @(#)machine_at_sis_85c50x.c 1.0.2 2017/09/02
|
||||
* Version: @(#)machine_at_sis_85c50x.c 1.0.3 2017/09/24
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2017 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../io.h"
|
||||
#include "../pci.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../io.h"
|
||||
#include "../mem.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../dma.h"
|
||||
#include "../pic.h"
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
@@ -10,6 +12,7 @@
|
||||
#include "../mem.h"
|
||||
#include "../rom.h"
|
||||
#include "../device.h"
|
||||
#include "../nvr.h"
|
||||
#include "../gameport.h"
|
||||
#include "../keyboard_xt.h"
|
||||
#include "../lpt.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../nmi.h"
|
||||
#include "../pic.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
@@ -149,7 +153,8 @@ void ps1mb_init(void)
|
||||
io_sethandler(0x0320, 0x0001, ps1_read, NULL, NULL, ps1_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0322, 0x0001, ps1_read, NULL, NULL, ps1_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0324, 0x0001, ps1_read, NULL, NULL, ps1_write, NULL, NULL, NULL);
|
||||
|
||||
|
||||
#if 0
|
||||
if (!enable_xtide)
|
||||
{
|
||||
rom_init(&ps1_high_rom,
|
||||
@@ -160,14 +165,7 @@ void ps1mb_init(void)
|
||||
0,
|
||||
MEM_MAPPING_EXTERNAL);
|
||||
}
|
||||
/* rom_init_interleaved(&ps1_high_rom,
|
||||
L"roms/machines/ibmps1es/ibm_1057757_24-05-90.bin",
|
||||
L"roms/machines/ibmps1es/ibm_1057757_29-15-90.bin",
|
||||
0xfc0000,
|
||||
0x40000,
|
||||
0x3ffff,
|
||||
0,
|
||||
MEM_MAPPING_EXTERNAL);*/
|
||||
#endif
|
||||
ps1_190 = 0;
|
||||
|
||||
lpt1_remove();
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../cpu/x86.h"
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../nmi.h"
|
||||
#include "../mem.h"
|
||||
#include "../rom.h"
|
||||
#include "../device.h"
|
||||
#include "../gameport.h"
|
||||
#include "../keyboard_xt.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../nmi.h"
|
||||
#include "../pit.h"
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/*This is the chipset used in the LaserXT series model*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../ibm.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../io.h"
|
||||
|
||||
Reference in New Issue
Block a user