From 8968f471650d25c9df68347644e0e5c0ecdbda6e Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Fri, 8 Dec 2023 11:48:26 +1100 Subject: minor commit --- src/apple.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/apple.c') diff --git a/src/apple.c b/src/apple.c index 6ff8a61..e69cbf8 100644 --- a/src/apple.c +++ b/src/apple.c @@ -1,7 +1,7 @@ #include"apple.h" // The Incredible Wozmon! -byte ROM[256] = { +const byte ROM[256] = { 0xd8, 0x58, 0xa0, 0x7f, 0x8c, 0x12, 0xd0, 0xa9, 0xa7, 0x8d, 0x11, 0xd0, 0x8d, 0x13, 0xd0, 0xc9, 0xdf, 0xf0, 0x13, 0xc9, 0x9b, 0xf0, 0x03, 0xc8, @@ -10,25 +10,25 @@ byte ROM[256] = { 0xf6, 0xad, 0x11, 0xd0, 0x10, 0xfb, 0xad, 0x10, 0xd0, 0x99, 0x00, 0x02, 0x20, 0xef, 0xff, 0xc9, 0x8d, 0xd0, 0xd4, 0xa0, 0xff, 0xa9, 0x00, 0xaa, - 0x0a, 0x85, 0x2b, 0xc8, 0xb9, 0x00, 0x02, 0xc9, //0x40 -> + 0x0a, 0x85, 0x2b, 0xc8, 0xb9, 0x00, 0x02, 0xc9, 0x8d, 0xf0, 0xd4, 0xc9, 0xae, 0x90, 0xf4, 0xf0, 0xf0, 0xc9, 0xba, 0xf0, 0xeb, 0xc9, 0xd2, 0xf0, 0x3b, 0x86, 0x28, 0x86, 0x29, 0x84, 0x2a, 0xb9, 0x00, 0x02, 0x49, 0xb0, 0xc9, 0x0a, 0x90, 0x06, 0x69, 0x88, 0xc9, 0xfa, 0x90, 0x11, 0x0a, 0x0a, - 0x0a, 0x0a, 0xa2, 0x04, 0x0a, 0x26, 0x28, 0x26, // 0x70-> + 0x0a, 0x0a, 0xa2, 0x04, 0x0a, 0x26, 0x28, 0x26, 0x29, 0xca, 0xd0, 0xf8, 0xc8, 0xd0, 0xe0, 0xc4, 0x2a, 0xf0, 0x97, 0x24, 0x2b, 0x50, 0x10, 0xa5, 0x28, 0x81, 0x26, 0xe6, 0x26, 0xd0, 0xb5, 0xe6, 0x27, 0x4c, 0x44, 0xff, 0x6c, 0x24, 0x00, 0x30, 0x2b, 0xa2, 0x02, 0xb5, 0x27, 0x95, 0x25, 0x95, - 0x23, 0xca, 0xd0, 0xf7, 0xd0, 0x14, 0xa9, 0x8d, // 0xA0-> + 0x23, 0xca, 0xd0, 0xf7, 0xd0, 0x14, 0xa9, 0x8d, 0x20, 0xef, 0xff, 0xa5, 0x25, 0x20, 0xdc, 0xff, 0xa5, 0x24, 0x20, 0xdc, 0xff, 0xa9, 0xba, 0x20, 0xef, 0xff, 0xa9, 0xa0, 0x20, 0xef, 0xff, 0xa1, 0x24, 0x20, 0xdc, 0xff, 0x86, 0x2b, 0xa5, 0x24, 0xc5, 0x28, 0xa5, 0x25, 0xe5, 0x29, 0xb0, 0xc1, - 0xe6, 0x24, 0xd0, 0x02, 0xe6, 0x25, 0xa5, 0x24, // 0xD0-> + 0xe6, 0x24, 0xd0, 0x02, 0xe6, 0x25, 0xa5, 0x24, 0x29, 0x07, 0x10, 0xc8, 0x48, 0x4a, 0x4a, 0x4a, 0x4a, 0x20, 0xe5, 0xff, 0x68, 0x29, 0x0f, 0x09, 0xb0, 0xc9, 0xba, 0x90, 0x02, 0x69, 0x06, 0x2c, @@ -38,7 +38,6 @@ byte ROM[256] = { void AppleOn() { Memory = calloc(MEMORY_SIZE, sizeof(byte)); - //ROM = calloc(256, sizeof(byte)); InitInstructionTable(); PC = 0xFF00; } @@ -47,13 +46,11 @@ void AppleReset(){ acc = 0; X = 0; Y = 0; P = 0; S = 0; state.cycles = 0; state.length = 0; state.address = 0; state.value = 0; PC = 0xFF00; - free(Memory); - Memory = calloc(MEMORY_SIZE, sizeof(byte)); + //free(Memory); + //Memory = calloc(MEMORY_SIZE, sizeof(byte)); } -//byte KBD_CR_val; - byte GetMemory(address x){ switch(x) { @@ -82,8 +79,6 @@ byte GetMemory(address x){ void SetMemory(address x, byte y){ switch(x) { - //case KBD_CR: - //KBD_CR_val = x; case DSP: if (y & 0x80) DisplayInput(y); -- cgit v1.2.3