2017-06-04 21:55:19 +00:00
|
|
|
//
|
|
|
|
// CSZX8081.m
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/06/2017.
|
|
|
|
// Copyright © 2017 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "CSZX8081.h"
|
|
|
|
|
|
|
|
#include "ZX8081.hpp"
|
|
|
|
|
|
|
|
@implementation CSZX8081 {
|
2018-02-13 02:46:21 +00:00
|
|
|
ZX8081::Machine *_zx8081;
|
|
|
|
__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) {
|
|
|
|
_zx8081 = (ZX8081::Machine *)zx8081;
|
|
|
|
_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
|