diff --git a/A2Mac.xcodeproj/xcuserdata/trudnai.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/A2Mac.xcodeproj/xcuserdata/trudnai.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index 3488c1a..bc42f26 100644
--- a/A2Mac.xcodeproj/xcuserdata/trudnai.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/A2Mac.xcodeproj/xcuserdata/trudnai.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -435,8 +435,8 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "341"
endingLineNumber = "341"
- landmarkName = "unknown"
- landmarkType = "0">
+ landmarkName = "ViewController"
+ landmarkType = "3">
+ landmarkName = "HexDump()"
+ landmarkType = "7">
+ landmarkName = "Power(_:)"
+ landmarkType = "7">
+ landmarkName = "Power(_:)"
+ landmarkType = "7">
+ landmarkName = "charConvStrFlashOn"
+ landmarkType = "24">
+ landmarkName = "viewDidLoad()"
+ landmarkType = "7">
+ landmarkName = "Update()"
+ landmarkType = "7">
+ landmarkName = "keyDown(with:)"
+ landmarkType = "7">
+ landmarkName = "Update()"
+ landmarkType = "7">
= 0xC000 ) && ( addr < 0xC100 ) ) {
- return ioWrite( addr, src );
- }
-
- // DO NOT MAKE IT NICER! faster this way!
- *(RAM_PG_WR_TBL[ addr >> 8 ] + (addr & 0xFF)) = src;
-// RAM[addr] = src;
+ memwrite(addr, src);
}
/**
diff --git a/src/dev/disk/disk.c b/src/dev/disk/disk.c
index b6c3888..e1fad51 100644
--- a/src/dev/disk/disk.c
+++ b/src/dev/disk/disk.c
@@ -17,7 +17,7 @@ disk_t disk = {
0, // clk_since_last_read
};
-const int diskAccelerator_frames = 5;
+const int diskAccelerator_frames = 3;
int diskAccelerator_count = 10;
int diskAccelerator_speed = 25; // less than actual CPU speed means no acceleration
//const unsigned long long clk_6502_per_frm_diskAccelerator = 25 * M / fps; // disk acceleration bumps up CPU clock to 25 MHz
diff --git a/src/dev/mem/mmio.h b/src/dev/mem/mmio.h
index 00ff13d..1b2bc28 100644
--- a/src/dev/mem/mmio.h
+++ b/src/dev/mem/mmio.h
@@ -28,7 +28,7 @@ videoMode_t videoMode = { 1 }; // 40 col text, page 1
uint8_t Apple2_Dummy_Page[ 1 * PG ]; // Dummy Page to discard data
-uint8_t Apple2_Dummy_RAM[ 4 * KB ]; // Dummy RAM to discard data
+uint8_t Apple2_Dummy_RAM[ 64 * KB ]; // Dummy RAM to discard data
uint8_t Apple2_16K_ROM[ 16 * KB ] = {0}; // ROM C0, C8, D0, D8, E0, E8, F0, F8
@@ -44,7 +44,7 @@ uint8_t * const MEM = Apple2_64K_MEM; // Pointer to the Shadow Memory
uint8_t * const RDLOMEM = Apple2_64K_MEM; // Pointer to the Shadow Memory Map so we can use this from Swift
uint8_t * const WRLOMEM = Apple2_64K_MEM; // Pointer to the Shadow Memory Map so we can use this from Swift
uint8_t * const RDHIMEM = Apple2_64K_MEM; // Pointer to the Shadow Memory Map so we can use this from Swift
-uint8_t * const WRHIMEM = Apple2_64K_MEM; // Pointer to the Shadow Memory Map so we can use this from Swift
+uint8_t * const WRHIMEM = Apple2_Dummy_RAM; // Pointer to the Shadow Memory Map so we can use this from Swift
@@ -941,7 +941,7 @@ INLINE uint16_t memread16( uint16_t addr ) {
INLINE uint8_t memread( uint16_t addr ) {
if (addr >= 0xC000) {
- if (addr <= 0xC0FF) {
+ if (addr < 0xC100) {
return ioRead(addr);
}
@@ -974,20 +974,38 @@ INLINE uint8_t memread( uint16_t addr ) {
/**
Naive implementation of RAM write to address
**/
-static void memwrite( uint16_t addr, uint8_t byte ) {
-// if ( addr >= 0xD000 ) {
-// // ROM
-// return;
-// }
-// if ( addr >= 0xC000 ) {
-// return mmioWrite(addr);
+
+INLINE void memwrite8_low( uint16_t addr, uint8_t data ) {
+ WRLOMEM[addr] = data;
+}
+INLINE void memwrite8_high( uint16_t addr, uint8_t data ) {
+ WRHIMEM[addr] = data;
+}
+INLINE void memwrite( uint16_t addr, uint8_t data ) {
+ if (addr >= 0xC000) {
+ if (addr < 0xC100) {
+ ioWrite(addr, data);
+ }
+ else {
+// *(RAM_PG_WR_TBL[ addr >> 8 ] + (addr & 0xFF)) = data;
+ memwrite8_high(addr, data);
+ }
+ }
+ else {
+ memwrite8_low(addr, data);
+ }
+
+// // I/O or ROM or RAM EXP
+// if ( ( addr >= 0xC000 ) && ( addr < 0xC100 ) ) {
+// return ioWrite( addr, src );
// }
//
-
- RAM[ addr ] = byte;
+// // DO NOT MAKE IT NICER! faster this way!
+// *(RAM_PG_WR_TBL[ addr >> 8 ] + (addr & 0xFF)) = src;
+//// RAM[addr] = src;
+//
}
-
/**
Fetching 1 byte from memory address pc (program counter)
increase pc by one