2017-05-15 12:18:57 +00:00
|
|
|
//
|
|
|
|
// TestMachine6502.h
|
|
|
|
// CLK
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 29/06/2015.
|
|
|
|
// Copyright © 2015 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2017-06-04 01:22:16 +00:00
|
|
|
#import "TestMachine.h"
|
2017-05-15 12:18:57 +00:00
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, CSTestMachine6502Register) {
|
|
|
|
CSTestMachine6502RegisterLastOperationAddress,
|
|
|
|
CSTestMachine6502RegisterProgramCounter,
|
|
|
|
CSTestMachine6502RegisterStackPointer,
|
|
|
|
CSTestMachine6502RegisterFlags,
|
|
|
|
CSTestMachine6502RegisterA,
|
|
|
|
CSTestMachine6502RegisterX,
|
|
|
|
CSTestMachine6502RegisterY,
|
|
|
|
};
|
|
|
|
|
2017-06-04 01:22:16 +00:00
|
|
|
@interface CSTestMachine6502 : CSTestMachine
|
2017-05-15 12:18:57 +00:00
|
|
|
|
|
|
|
- (void)setData:(NSData *)data atAddress:(uint16_t)startAddress;
|
|
|
|
- (void)runForNumberOfCycles:(int)cycles;
|
|
|
|
|
|
|
|
- (void)setValue:(uint8_t)value forAddress:(uint16_t)address;
|
|
|
|
- (uint8_t)valueForAddress:(uint16_t)address;
|
|
|
|
- (void)setValue:(uint16_t)value forRegister:(CSTestMachine6502Register)reg;
|
|
|
|
- (uint16_t)valueForRegister:(CSTestMachine6502Register)reg;
|
|
|
|
|
|
|
|
- (void)returnFromSubroutine;
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) BOOL isJammed;
|
|
|
|
@property (nonatomic, readonly) uint32_t timestamp;
|
|
|
|
@property (nonatomic, assign) BOOL irqLine;
|
|
|
|
@property (nonatomic, assign) BOOL nmiLine;
|
|
|
|
|
|
|
|
@end
|