1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-16 22:28:57 +00:00
CLK/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm

42 lines
727 B
Plaintext

//
// CSOric.m
// Clock Signal
//
// Created by Thomas Harte on 11/10/2016.
// Copyright © 2016 Thomas Harte. All rights reserved.
//
#import "CSOric.h"
#include "Oric.hpp"
#include "StaticAnalyser.hpp"
#import "CSMachine+Subclassing.h"
#import "NSData+StdVector.h"
#import "NSBundle+DataResource.h"
@implementation CSOric {
Oric::Machine _oric;
}
- (instancetype)init {
self = [super init];
if(self)
{
NSData *rom = [self rom:@"test108j"];
if(rom) _oric.set_rom(rom.stdVector8);
}
return self;
}
- (NSData *)rom:(NSString *)name
{
return [[NSBundle mainBundle] dataForResource:name withExtension:@"rom" subdirectory:@"ROMImages/Oric"];
}
- (CRTMachine::Machine * const)machine {
return &_oric;
}
@end