diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 08acf0b6d..049d5b3d8 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -1487,13 +1487,13 @@ 4BB73EDC1B587CA500552FC2 /* Machines */ = { isa = PBXGroup; children = ( - 4B4DC81D1D2C2425003C5BF8 /* Commodore */, - 4B046DC31CFE651500E9E45E /* CRTMachine.hpp */, - 4B2E2D961C3A06EC00138695 /* Atari2600 */, - 4B2E2D9E1C3A070900138695 /* Electron */, 4B1E85731D170228001EF87D /* Typer.cpp */, - 4B1E85741D170228001EF87D /* Typer.hpp */, 4BA9C3CF1D8164A9002DDB61 /* ConfigurationTarget.hpp */, + 4B046DC31CFE651500E9E45E /* CRTMachine.hpp */, + 4B1E85741D170228001EF87D /* Typer.hpp */, + 4B2E2D961C3A06EC00138695 /* Atari2600 */, + 4B4DC81D1D2C2425003C5BF8 /* Commodore */, + 4B2E2D9E1C3A070900138695 /* Electron */, ); name = Machines; path = ../../Machines; diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h index c2e17fe61..42d0aaee0 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h @@ -30,11 +30,6 @@ typedef NS_ENUM(NSInteger, CSVic20MemorySize) - (void)setCharactersROM:(nonnull NSData *)rom; - (void)setDriveROM:(nonnull NSData *)rom; -- (BOOL)openPRGAtURL:(nonnull NSURL *)URL; -- (BOOL)openTAPAtURL:(nonnull NSURL *)URL; -- (BOOL)openG64AtURL:(nonnull NSURL *)URL; -- (BOOL)openD64AtURL:(nonnull NSURL *)URL; - @property (nonatomic, assign) BOOL useFastLoadingHack; @property (nonatomic, assign) BOOL shouldLoadAutomatically; @property (nonatomic, assign) CSVic20Region region; diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.mm b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.mm index 7198aafe7..41aed0e6b 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.mm +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.mm @@ -46,54 +46,6 @@ using namespace Commodore::Vic20; [self setROM:rom slot:Drive]; } -- (BOOL)openTAPAtURL:(NSURL *)URL { - @synchronized(self) { - try { - std::shared_ptr tape(new Storage::Tape::CommodoreTAP([URL fileSystemRepresentation])); - _vic20.set_tape(tape); - return YES; - } catch(...) { - return NO; - } - } -} - -- (BOOL)openG64AtURL:(NSURL *)URL { - return [self openDisk:^std::shared_ptr{ - return std::shared_ptr(new Storage::Disk::G64([URL fileSystemRepresentation])); - }]; -} - -- (BOOL)openD64AtURL:(NSURL *)URL { - return [self openDisk:^std::shared_ptr{ - return std::shared_ptr(new Storage::Disk::D64([URL fileSystemRepresentation])); - }]; -} - -- (BOOL)openDisk:(std::shared_ptr (^)())opener { - @synchronized(self) { - try { - std::shared_ptr disk = opener(); - _vic20.set_disk(disk); - return YES; - } catch(...) { - return NO; - } - } -} - -- (BOOL)openPRGAtURL:(NSURL *)URL { - NSData *prg = [NSData dataWithContentsOfURL:URL]; - @synchronized(self) { - try { - _vic20.set_prg(URL.fileSystemRepresentation, prg.length, (const uint8_t *)prg.bytes); - return YES; - } catch(...) { - return NO; - } - } -} - - (void)setKey:(uint16_t)key isPressed:(BOOL)isPressed { static NSDictionary *vicKeysByKeys = @{ @(VK_ANSI_1): @(Key::Key1), @(VK_ANSI_2): @(Key::Key2),