1
//============================================================================
3
// MM MM 6666 555555 0000 2222
4
// MMMM MMMM 66 66 55 00 00 22 22
5
// MM MMM MM 66 55 00 00 22
6
// MM M MM 66666 55555 00 00 22222 -- "A 6502 Microprocessor Emulator"
7
// MM MM 66 66 55 00 00 22
8
// MM MM 66 66 55 55 00 00 22
9
// MM MM 6666 5555 0000 222222
11
// Copyright (c) 1995-1998 by Bradford W. Mott
13
// See the file "license" for information on usage and redistribution of
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
// $Id: M6502Hi.hxx,v 1.2 1998/07/15 20:48:20 bwmott Exp $
17
//============================================================================
28
This class provides a high compatibility 6502 microprocessor emulator.
29
The memory accesses and cycle counts it generates are valid at the
30
sub-instruction level and "false" reads are generated (such as the ones
31
produced by the Indirect,X addressing when it crosses a page boundary).
32
This provides provides better compatibility for hardware that has side
33
effects and for games which are very time sensitive.
35
@author Bradford W. Mott
36
@version $Id: M6502Hi.hxx,v 1.2 1998/07/15 20:48:20 bwmott Exp $
38
class M6502High : public M6502
42
Create a new high compatibility 6502 microprocessor with the
43
specified cycle multiplier.
45
@param systemCyclesPerProcessorCycle The cycle multiplier
47
M6502High(uInt32 systemCyclesPerProcessorCycle);
56
Execute instructions until the specified number of instructions
57
is executed, someone stops execution, or an error occurs. Answers
58
true iff execution stops normally.
60
@param number Indicates the number of instructions to execute
61
@return true iff execution stops normally
63
virtual bool execute(uInt32 number);
67
Get the number of memory accesses to distinct memory locations
69
@return The number of memory accesses to distinct memory locations
71
uInt32 distinctAccesses() const
73
return myNumberOfDistinctAccesses;
78
Called after an interrupt has be requested using irq() or nmi()
80
void interruptHandler();
84
Get the byte at the specified address and update the cycle
87
@return The byte at the specified address
89
inline uInt8 peek(uInt16 address);
92
Change the byte at the specified address to the given value and
93
update the cycle count
95
@param address The address where the value should be stored
96
@param value The value to be stored at the address
98
inline void poke(uInt16 address, uInt8 value);
101
// Indicates the numer of distinct memory accesses
102
uInt32 myNumberOfDistinctAccesses;
104
// Indicates the last address which was accessed
105
uInt16 myLastAddress;