A bit more clang-format

This commit is contained in:
Jasmine Iwanek
2022-11-19 08:49:04 -05:00
parent b04dd8cc8b
commit 3fe4f75108
223 changed files with 8047 additions and 7456 deletions

View File

@@ -15,32 +15,36 @@
#include <stdint.h>
typedef struct i8080
{
union {
typedef struct i8080 {
union {
uint16_t af; /* Intended in case we also go for μPD9002 emulation, which also has a Z80 emulation mode. */
struct { uint8_t a, flags; };
struct {
uint8_t a, flags;
};
};
union
{
union {
uint16_t bc;
struct { uint8_t b, c; };
struct {
uint8_t b, c;
};
};
union
{
union {
uint16_t de;
struct { uint8_t d, e; };
struct {
uint8_t d, e;
};
};
union
{
union {
uint16_t hl;
struct { uint8_t h, l; };
struct {
uint8_t h, l;
};
};
uint16_t pc, sp;
uint16_t oldpc, ei;
uint32_t pmembase, dmembase; /* Base from where i8080 starts. */
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
uint16_t* cpu_flags;
uint16_t pc, sp;
uint16_t oldpc, ei;
uint32_t pmembase, dmembase; /* Base from where i8080 starts. */
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
uint16_t *cpu_flags;
void (*writemembyte)(uint32_t, uint8_t);
uint8_t (*readmembyte)(uint32_t);
void (*startclock)(void);
@@ -49,8 +53,8 @@ typedef struct i8080
uint8_t (*fetchinstruction)(void *);
} i8080;
#define C_FLAG_I8080 (1 << 0)
#define P_FLAG_I8080 (1 << 2)
#define C_FLAG_I8080 (1 << 0)
#define P_FLAG_I8080 (1 << 2)
#define AC_FLAG_I8080 (1 << 4)
#define Z_FLAG_I8080 (1 << 6)
#define S_FLAG_I8080 (1 << 7)
#define Z_FLAG_I8080 (1 << 6)
#define S_FLAG_I8080 (1 << 7)