Prepare the structure for upcoming actual i8080 emulation (#16)
This commit is contained in:
20
src/cpu/8080.c
Normal file
20
src/cpu/8080.c
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 8080 CPU emulation.
|
||||
*
|
||||
* Authors: Cacodemon345
|
||||
*
|
||||
* Copyright 2022 Cacodemon345
|
||||
*/
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <86box/i8080.h>
|
||||
|
||||
/* Actually implement i8080 emulation. */
|
@@ -14,7 +14,7 @@
|
||||
#
|
||||
|
||||
add_library(cpu OBJECT cpu.c cpu_table.c fpu.c x86.c 808x.c 386.c 386_common.c
|
||||
386_dynarec.c x86seg.c x87.c x87_timings.c)
|
||||
386_dynarec.c x86seg.c x87.c x87_timings.c 8080.c)
|
||||
|
||||
if(AMD_K5)
|
||||
target_compile_definitions(cpu PRIVATE USE_AMD_K5)
|
||||
|
40
src/include/86box/i8080.h
Normal file
40
src/include/86box/i8080.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 8080 CPU emulation (header).
|
||||
*
|
||||
* Authors: Cacodemon345
|
||||
*
|
||||
* Copyright 2022 Cacodemon345
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct i8080
|
||||
{
|
||||
union {
|
||||
uint16_t af; /* Intended in case we also go for μPD9002 emulation, which also has a Z80 emulation mode. */
|
||||
uint8_t a, flags;
|
||||
};
|
||||
union
|
||||
{
|
||||
uint16_t bc;
|
||||
uint8_t b, c;
|
||||
};
|
||||
union
|
||||
{
|
||||
uint16_t de;
|
||||
uint8_t d, e;
|
||||
};
|
||||
union
|
||||
{
|
||||
uint16_t hl;
|
||||
uint8_t h, l;
|
||||
};
|
||||
uint16_t pc, sp;
|
||||
} i8080;
|
Reference in New Issue
Block a user