mirror of
https://github.com/TomHarte/CLK.git
synced 2024-08-16 16:28:59 +00:00
31 lines
648 B
Plaintext
31 lines
648 B
Plaintext
//
|
|
// CSElectron.m
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 04/01/2016.
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#import "CSElectron.h"
|
|
|
|
#import "Electron.hpp"
|
|
#import "CSMachine+Subclassing.h"
|
|
|
|
@implementation CSElectron {
|
|
Electron::Machine _electron;
|
|
}
|
|
|
|
- (void)doRunForNumberOfCycles:(int)numberOfCycles {
|
|
_electron.run_for_cycles(numberOfCycles);
|
|
}
|
|
|
|
- (void)setOSROM:(nonnull NSData *)rom {
|
|
_electron.set_rom(Electron::ROMTypeOS, rom.length, (const uint8_t *)rom.bytes);
|
|
}
|
|
|
|
- (void)setBASICROM:(nonnull NSData *)rom {
|
|
_electron.set_rom(Electron::ROMTypeBASIC, rom.length, (const uint8_t *)rom.bytes);
|
|
}
|
|
|
|
@end
|