2017-06-04 21:55:19 +00:00
|
|
|
//
|
|
|
|
// CSZX8081.m
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/06/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-06-04 21:55:19 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "CSZX8081.h"
|
|
|
|
|
|
|
|
#include "ZX8081.hpp"
|
|
|
|
|
|
|
|
@implementation CSZX8081 {
|
2021-03-18 02:40:29 +00:00
|
|
|
Sinclair::ZX8081::Machine *_zx8081;
|
2018-02-13 02:46:21 +00:00
|
|
|
__weak CSMachine *_machine;
|
2017-06-04 21:55:19 +00:00
|
|
|
}
|
|
|
|
|
2018-02-13 02:46:21 +00:00
|
|
|
- (instancetype)initWithZX8081:(void *)zx8081 owner:(CSMachine *)machine {
|
|
|
|
self = [super init];
|
|
|
|
if(self) {
|
2021-03-18 02:40:29 +00:00
|
|
|
_zx8081 = (Sinclair::ZX8081::Machine *)zx8081;
|
2018-02-13 02:46:21 +00:00
|
|
|
_machine = machine;
|
|
|
|
}
|
|
|
|
return self;
|
2017-06-04 21:55:19 +00:00
|
|
|
}
|
|
|
|
|
2017-06-23 00:20:31 +00:00
|
|
|
#pragma mark - Options
|
|
|
|
|
2017-07-08 23:21:12 +00:00
|
|
|
- (void)setTapeIsPlaying:(BOOL)tapeIsPlaying {
|
2018-02-13 02:46:21 +00:00
|
|
|
@synchronized(_machine) {
|
|
|
|
_zx8081->set_tape_is_playing(tapeIsPlaying ? true : false);
|
2017-07-08 23:21:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-15 02:46:50 +00:00
|
|
|
- (BOOL)tapeIsPlaying {
|
|
|
|
@synchronized(_machine) {
|
|
|
|
return _zx8081->get_tape_is_playing();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-04 21:55:19 +00:00
|
|
|
@end
|