From af75f6200ee7e2be255a95deb90e71289c337569 Mon Sep 17 00:00:00 2001 From: Dirk Hoffmann Date: Sun, 21 Jul 2024 17:44:52 +0200 Subject: [PATCH] This is VirtualC64 5.0 --- Emulator/Components/C64.cpp | 1 + Emulator/Peripherals/Network/RS232.cpp | 4 ++-- Emulator/VirtualC64.h | 4 +++- Emulator/config.h | 6 +++--- GUI/MediaManager.swift | 2 -- GUI/Panels/Inspector/GuardTableView.swift | 2 +- Proxy/EmulatorProxy.h | 2 +- Proxy/EmulatorProxy.mm | 8 ++++---- VirtualC64.xcodeproj/project.pbxproj | 8 ++++---- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Emulator/Components/C64.cpp b/Emulator/Components/C64.cpp index d7b9b05c6..c930198a3 100644 --- a/Emulator/Components/C64.cpp +++ b/Emulator/Components/C64.cpp @@ -1258,6 +1258,7 @@ C64::loadRom(const MediaFile &file) break; default: + throw Error(ERROR_FILE_TYPE_MISMATCH); } } diff --git a/Emulator/Peripherals/Network/RS232.cpp b/Emulator/Peripherals/Network/RS232.cpp index 604c3f9d2..f44d861ea 100644 --- a/Emulator/Peripherals/Network/RS232.cpp +++ b/Emulator/Peripherals/Network/RS232.cpp @@ -181,7 +181,7 @@ RS232::readIncomingPrintableByte() while (1) { auto byte = readIncomingByte(); - if (byte == -1 || isprint(byte) || byte == '\n') return byte; + if (byte == -1 || isprint(byte) || byte == '\n' || byte == '\r') return byte; } } } @@ -194,7 +194,7 @@ RS232::readOutgoingPrintableByte() while (1) { auto byte = readOutgoingByte(); - if (byte == -1 || isprint(byte) || byte == '\n') return byte; + if (byte == -1 || isprint(byte) || byte == '\n' || byte == '\r') return byte; } } } diff --git a/Emulator/VirtualC64.h b/Emulator/VirtualC64.h index 1bfcec078..197817822 100644 --- a/Emulator/VirtualC64.h +++ b/Emulator/VirtualC64.h @@ -23,7 +23,7 @@ namespace vc64 { using peddle::Guard; // -// Public API +// Base class for all APIs // class API { @@ -38,6 +38,8 @@ class API { void suspend(); void resume(); +protected: + bool isUserThread() const; }; diff --git a/Emulator/config.h b/Emulator/config.h index 1e70b1f44..768be09c5 100644 --- a/Emulator/config.h +++ b/Emulator/config.h @@ -20,16 +20,16 @@ #define VER_MAJOR 5 #define VER_MINOR 0 #define VER_SUBMINOR 0 -#define VER_BETA 7 +#define VER_BETA 0 // Snapshot version number #define SNP_MAJOR 5 #define SNP_MINOR 0 #define SNP_SUBMINOR 0 -#define SNP_BETA 7 +#define SNP_BETA 0 // Uncomment these settings in a release build -// #define RELEASEBUILD +#define RELEASEBUILD // diff --git a/GUI/MediaManager.swift b/GUI/MediaManager.swift index b83bb6e3e..48fbef581 100644 --- a/GUI/MediaManager.swift +++ b/GUI/MediaManager.swift @@ -25,8 +25,6 @@ class MediaManager { var document: MyDocument! var emu: EmulatorProxy? { return document.emu } var controller: MyController { return document.parent } - - // Computed references var console: Console { return controller.renderer.console } // Shared list of recently inserted tapes diff --git a/GUI/Panels/Inspector/GuardTableView.swift b/GUI/Panels/Inspector/GuardTableView.swift index cfc47e9a3..58ace85b1 100644 --- a/GUI/Panels/Inspector/GuardTableView.swift +++ b/GUI/Panels/Inspector/GuardTableView.swift @@ -151,7 +151,7 @@ class BreakTableView: GuardTableView { inspector.fullRefresh() } - if (col == 0 || col == 1) { + if col == 0 || col == 1 { // Jump to breakpoint address inspector.fullRefresh() diff --git a/Proxy/EmulatorProxy.h b/Proxy/EmulatorProxy.h index e69c70d11..2e530f7b8 100644 --- a/Proxy/EmulatorProxy.h +++ b/Proxy/EmulatorProxy.h @@ -29,7 +29,6 @@ using namespace vc64; @class DriveProxy; @class ExpansionPortProxy; @class FileSystemProxy; -@class G64FileProxy; @class SerialPortProxy; @class JoystickProxy; @class KeyboardProxy; @@ -674,6 +673,7 @@ struct GuardInfo { + (FileType) typeOfUrl:(NSURL *)url; ++ (instancetype)make:(MediaFile *)file; + (instancetype)makeWithFile:(NSString *)path exception:(ExceptionWrapper *)ex; + (instancetype)makeWithFile:(NSString *)path type:(FileType)t exception:(ExceptionWrapper *)ex; + (instancetype)makeWithBuffer:(const void *)buf length:(NSInteger)len type:(FileType)t exception:(ExceptionWrapper *)ex; diff --git a/Proxy/EmulatorProxy.mm b/Proxy/EmulatorProxy.mm index fd9df9a2d..fd8a45c9c 100644 --- a/Proxy/EmulatorProxy.mm +++ b/Proxy/EmulatorProxy.mm @@ -1221,14 +1221,14 @@ - (MediaFile *)file return (MediaFile *)obj; } -+ (instancetype)make:(MediaFile *)file ++ (FileType)typeOfUrl:(NSURL *)url { - return file ? [[self alloc] initWith:file] : nil; + return MediaFile::type([url fileSystemRepresentation]); } -+ (FileType)typeOfUrl:(NSURL *)url ++ (instancetype)make:(MediaFile *)file { - return MediaFile::type([url fileSystemRepresentation]); + return file ? [[self alloc] initWith:file] : nil; } + (instancetype)makeWithFile:(NSString *)path diff --git a/VirtualC64.xcodeproj/project.pbxproj b/VirtualC64.xcodeproj/project.pbxproj index d4dd9df14..fedd79a71 100644 --- a/VirtualC64.xcodeproj/project.pbxproj +++ b/VirtualC64.xcodeproj/project.pbxproj @@ -2860,7 +2860,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 240628; + CURRENT_PROJECT_VERSION = 240721; DEAD_CODE_STRIPPING = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 3NG65ZLYW7; @@ -2881,7 +2881,7 @@ LIBRARY_SEARCH_PATHS = "$(inherited)"; LLVM_LTO = NO; MACOSX_DEPLOYMENT_TARGET = 13.3; - MARKETING_VERSION = 5.0b7; + MARKETING_VERSION = 5.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20"; OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks"; @@ -2905,7 +2905,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 240628; + CURRENT_PROJECT_VERSION = 240721; DEAD_CODE_STRIPPING = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 3NG65ZLYW7; @@ -2927,7 +2927,7 @@ LIBRARY_SEARCH_PATHS = "$(inherited)"; LLVM_LTO = YES_THIN; MACOSX_DEPLOYMENT_TARGET = 13.3; - MARKETING_VERSION = 5.0b7; + MARKETING_VERSION = 5.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20"; OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";