2016-06-18 13:28:46 +00:00
|
|
|
//
|
|
|
|
// MOS6522Bridge.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 18/06/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-06-18 13:28:46 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2019-07-08 02:13:36 +00:00
|
|
|
typedef NS_ENUM(NSInteger, MOS6522BridgePort) {
|
|
|
|
MOS6522BridgePortA = 0, MOS6522BridgePortB = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, MOS6522BridgeLine) {
|
|
|
|
MOS6522BridgeLineOne = 0, MOS6522BridgeLineTwo = 1
|
|
|
|
};
|
|
|
|
|
2016-06-18 13:28:46 +00:00
|
|
|
@interface MOS6522Bridge : NSObject
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) BOOL irqLine;
|
2016-06-18 20:40:01 +00:00
|
|
|
@property (nonatomic) uint8_t portBInput;
|
|
|
|
@property (nonatomic) uint8_t portAInput;
|
2016-06-18 13:28:46 +00:00
|
|
|
|
|
|
|
- (void)setValue:(uint8_t)value forRegister:(NSUInteger)registerNumber;
|
|
|
|
- (uint8_t)valueForRegister:(NSUInteger)registerNumber;
|
2019-07-08 02:13:36 +00:00
|
|
|
- (BOOL)valueForControlLine:(MOS6522BridgeLine)line port:(MOS6522BridgePort)port;
|
2016-06-18 13:28:46 +00:00
|
|
|
|
|
|
|
- (void)runForHalfCycles:(NSUInteger)numberOfHalfCycles;
|
|
|
|
|
|
|
|
@end
|