diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-27 18:51:50 +1100 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-27 18:51:50 +1100 |
commit | c6da616d018ecfc5a26686e88ab520b54b7fa6ed (patch) | |
tree | 033986d0f384461267836ff179e14b268a9cf015 /src/cpu | |
parent | 521edc94f65928d3ecbe94ecac132f8d3668be41 (diff) |
revamped build; minor pointless changes
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/core.h | 26 | ||||
-rw-r--r-- | src/cpu/table.c | 1 |
2 files changed, 18 insertions, 9 deletions
diff --git a/src/cpu/core.h b/src/cpu/core.h index 03d20d0..26a6bc5 100644 --- a/src/cpu/core.h +++ b/src/cpu/core.h @@ -1,12 +1,16 @@ #ifndef CPU_CORE_H #define CPU_CORE_H -typedef unsigned char - byte; -typedef unsigned short - address; +typedef +unsigned char +byte; -enum Addressing { +typedef +unsigned short +address; + +enum Addressing +{ eImmediate, eAccumulator, eZeroPage, @@ -21,15 +25,19 @@ enum Addressing { eIndirectAbsolute, eRelative }; +typedef +int +Addressing; -typedef int Addressing; - -typedef struct AddData{ +typedef +struct AddData +{ int cycles; int length; address add; byte value; -} AddData; +} +AddData; byte getMemory(address x); diff --git a/src/cpu/table.c b/src/cpu/table.c index 0f70889..fb419d2 100644 --- a/src/cpu/table.c +++ b/src/cpu/table.c @@ -16,6 +16,7 @@ void callInstructionTable(int i, address val){ uintptr_t a = getInstructionTableFunction(i); memcpy(&func, a, sizeof(uintptr_t)); Addressing* r = (InstructionTable + ((sizeof(uintptr_t)*256) + (sizeof(Addressing) * i))); + idata = fAddress(*r, val); func(*r, val); } |