diff options
Diffstat (limited to 'src/apple.h')
-rw-r--r-- | src/apple.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/apple.h b/src/apple.h index 036f48c..01452cf 100644 --- a/src/apple.h +++ b/src/apple.h @@ -1,3 +1,13 @@ +#ifndef APPLE +#define APPLE + + +#include"cpu/6502.h" +#include"cpu/addressing.h" +#include"cpu/core.h" +#include"cpu/instructions.h" +#include"cpu/table.h" + #define MEMORY_SIZE 4096 #define XAML 0x24 @@ -14,25 +24,12 @@ #define DSP 0xD012 #define DSP_CR 0xD013 +void AppleOn(); -void AppleOn(){ - Memory = calloc(MEMORY_SIZE, sizeof(byte)); - initInstructionTable(); -} - -void AppleReset(){ - acc = 0; X = 0; Y = 0; P = 0; S = 0; - idata.cycles = 0; idata.length = 0; idata.add = 0; idata.value = 0; - free(Memory); - Memory = calloc(MEMORY_SIZE, sizeof(byte)); -} - +void AppleReset(); -byte getMemory(address x){ - return Memory[x]; -} +byte getMemory(address x); -void setMemory(address x, byte y){ - Memory[x] = y; -} +void setMemory(address x, byte y); +#endif
\ No newline at end of file |