add msbasic
This commit is contained in:
1 parent
d37d434228
commit
c5a028c8c6
104 files changed
+25598
-13802
No files matched your search
@@ -1,33 +1,33 @@
|
||||
#ifndef CPU_H
|
||||
#define CPU_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint16_t ProgrammeCounter;
|
||||
uint8_t StackPointer;
|
||||
|
||||
uint8_t Accumulator;
|
||||
uint8_t X;
|
||||
uint8_t Y;
|
||||
|
||||
union {
|
||||
uint8_t FlagsByte;
|
||||
struct {
|
||||
uint8_t CarryFlag : 1;
|
||||
uint8_t ZeroFlag : 1;
|
||||
uint8_t InterruptDisable : 1;
|
||||
uint8_t DecimalMode : 1;
|
||||
uint8_t BreakCommand : 1;
|
||||
uint8_t UNUSED : 1;
|
||||
uint8_t OverflowFlag : 1;
|
||||
uint8_t NegativeFlag : 1;
|
||||
} Flags;
|
||||
};
|
||||
} CPU;
|
||||
|
||||
void initCPU(CPU *cpu);
|
||||
void resetCPU(CPU *cpu, uint8_t *rom);
|
||||
uint8_t runCycle(CPU *cpu, uint8_t *ram, uint8_t *rom);
|
||||
|
||||
#ifndef CPU_H
|
||||
#define CPU_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint16_t ProgrammeCounter;
|
||||
uint8_t StackPointer;
|
||||
|
||||
uint8_t Accumulator;
|
||||
uint8_t X;
|
||||
uint8_t Y;
|
||||
|
||||
union {
|
||||
uint8_t FlagsByte;
|
||||
struct {
|
||||
uint8_t CarryFlag : 1;
|
||||
uint8_t ZeroFlag : 1;
|
||||
uint8_t InterruptDisable : 1;
|
||||
uint8_t DecimalMode : 1;
|
||||
uint8_t BreakCommand : 1;
|
||||
uint8_t UNUSED : 1;
|
||||
uint8_t OverflowFlag : 1;
|
||||
uint8_t NegativeFlag : 1;
|
||||
} Flags;
|
||||
};
|
||||
} CPU;
|
||||
|
||||
void initCPU(CPU *cpu);
|
||||
void resetCPU(CPU *cpu, uint8_t *rom);
|
||||
uint8_t runCycle(CPU *cpu, uint8_t *ram, uint8_t *rom);
|
||||
|
||||
#endif // CPU_H
|
||||
Reference in new issue
Block a user