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:
waltje
2017-09-25 04:31:20 -04:00
parent 637ce66da2
commit 43b055b5ee
227 changed files with 2861 additions and 2082 deletions

View File

@@ -1,10 +1,12 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <math.h>
#ifndef INFINITY
# define INFINITY (__builtin_inff())
#endif
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "../ibm.h"
#include "cpu.h"
#include "x86.h"

View File

@@ -1,10 +1,12 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <math.h>
#ifndef INFINITY
# define INFINITY (__builtin_inff())
#endif
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "../ibm.h"
#include "cpu.h"
#include "x86.h"

View File

@@ -1,3 +1,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include <math.h>
#ifndef INFINITY
# define INFINITY (__builtin_inff())

View File

@@ -8,30 +8,34 @@
*
* 808x CPU emulation.
*
* Version: @(#)808x.c 1.0.1 2017/09/19
* SHR AX,1
*
* 4 clocks - fetch opcode
* 4 clocks - fetch mod/rm
* 2 clocks - execute 2 clocks - fetch opcode 1
* 2 clocks - fetch opcode 2
* 4 clocks - fetch mod/rm
* 2 clocks - fetch opcode 1 2 clocks - execute
* 2 clocks - fetch opcode 2 etc
*
* Version: @(#)808x.c 1.0.2 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.
*/
/*SHR AX,1
4 clocks - fetch opcode
4 clocks - fetch mod/rm
2 clocks - execute 2 clocks - fetch opcode 1
2 clocks - fetch opcode 2
4 clocks - fetch mod/rm
2 clocks - fetch opcode 1 2 clocks - execute
2 clocks - fetch opcode 2 etc*/
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
//#include <unistd.h>
#include <wchar.h>
#include "../ibm.h"
#include "cpu.h"
#include "x86.h"
#include "../keyboard.h"
#include "../mem.h"
#include "../rom.h"
#include "../nmi.h"
#include "../pic.h"
#include "../timer.h"

View File

@@ -1,6 +1,10 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "x86_ops.h"
#include "../mem.h"
#include "x86_ops.h"
#include "codegen.h"
void (*codegen_timing_start)();

View File

@@ -1,3 +1,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "x86.h"

View File

@@ -1,9 +1,13 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "cpu.h"
#include "x86.h"
#include "x86_ops.h"
#include "x87.h"
#include "../mem.h"
#include "codegen.h"
#include "codegen_ops.h"
#include "codegen_timing_common.h"

View File

@@ -8,13 +8,16 @@
- FPU queue
- Out of order execution (beyond most simplistic approximation)
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "cpu.h"
#include "x86.h"
#include "x86_ops.h"
#include "x87.h"
#include "../mem.h"
#include "codegen.h"
#include "codegen_timing_common.h"

View File

@@ -1,6 +1,11 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "codegen_timing_common.h"
uint64_t opcode_deps[256] =
{
/* ADD ADD ADD ADD*/

View File

@@ -9,19 +9,21 @@
- PMMX decode queue
- MMX latencies
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "cpu.h"
#include "x86.h"
#include "x86_ops.h"
#include "x87.h"
#include "../mem.h"
#include "codegen.h"
#include "codegen_ops.h"
#include "codegen_timing_common.h"
/*Instruction has different execution time for 16 and 32 bit data. Does not pair */
#define CYCLES_HAS_MULTI (1 << 28)

View File

@@ -1,3 +1,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "cpu.h"
#include "x86.h"

View File

@@ -1,6 +1,10 @@
#ifdef __amd64__
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "cpu.h"

View File

@@ -1,13 +1,17 @@
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "cpu.h"
#include "x86.h"
#include "x86_flags.h"
#include "x86_ops.h"
#include "x87.h"
#include "../mem.h"
#include "386_common.h"

View File

@@ -8,15 +8,19 @@
*
* CPU type handler.
*
* Version: @(#)cpu.c 1.0.1 2017/06/03
* Version: @(#)cpu.c 1.0.2 2017/09/24
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* leilei,
* Miran Grca, <mgrca8@gmail.com>
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016-2017 leilei.
* 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.h"
#include "../device.h"

View File

@@ -8,17 +8,19 @@
*
* x86 CPU segment emulation.
*
* Version: @(#)x86seg.c 1.0.0 2017/05/30
* Version: @(#)x86seg.c 1.0.1 2017/09/24
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
* 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 <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "../nvr.h"

View File

@@ -1,3 +1,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#define fplog 0
#include <math.h>
#include "../ibm.h"