mirror of
https://github.com/cmosher01/Epple-II.git
synced 2024-06-11 20:29:28 +00:00
add compiler option (#define) for using 6502 emulator or simulator
This commit is contained in:
parent
eb2cc561d6
commit
90d9fbd9c5
|
@ -47,9 +47,12 @@ Apple2::Apple2(KeypressQueue& keypresses, PaddleButtonStates& paddleButtonStates
|
||||||
addressBus(ram,rom,kbd,videoMode,paddles,paddleButtonStates,speaker,cassette,slts),
|
addressBus(ram,rom,kbd,videoMode,paddles,paddleButtonStates,speaker,cassette,slts),
|
||||||
picgen(tv,videoMode,this->revision),
|
picgen(tv,videoMode,this->revision),
|
||||||
video(videoMode,addressBus,picgen,textRows),
|
video(videoMode,addressBus,picgen,textRows),
|
||||||
|
#ifdef USE_EMU
|
||||||
transistors("transistors"),
|
transistors("transistors"),
|
||||||
cpu(transistors,addressBus),
|
cpu(transistors,addressBus),
|
||||||
// cpu(addressBus),
|
#else
|
||||||
|
cpu(addressBus),
|
||||||
|
#endif
|
||||||
powerUpReset(*this),
|
powerUpReset(*this),
|
||||||
revision(1)
|
revision(1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
class Emulator;
|
class Emulator;
|
||||||
class ScreenImage;
|
class ScreenImage;
|
||||||
|
|
||||||
|
//#define USE_EMU 1
|
||||||
|
#undef USE_EMU
|
||||||
|
|
||||||
class Apple2 : public Timable
|
class Apple2 : public Timable
|
||||||
{
|
{
|
||||||
Slots slts;
|
Slots slts;
|
||||||
|
@ -53,9 +56,12 @@ class Apple2 : public Timable
|
||||||
PictureGenerator picgen;
|
PictureGenerator picgen;
|
||||||
TextCharacters textRows;
|
TextCharacters textRows;
|
||||||
Video video;
|
Video video;
|
||||||
// CPU cpu;
|
#ifdef USE_EMU
|
||||||
std::ifstream transistors;
|
std::ifstream transistors;
|
||||||
Emu6502 cpu;
|
Emu6502 cpu;
|
||||||
|
#else
|
||||||
|
CPU cpu;
|
||||||
|
#endif
|
||||||
PowerUpReset powerUpReset;
|
PowerUpReset powerUpReset;
|
||||||
int revision;
|
int revision;
|
||||||
|
|
||||||
|
|
|
@ -44,5 +44,9 @@ void PowerUpReset::tick()
|
||||||
|
|
||||||
void PowerUpReset::powerOn()
|
void PowerUpReset::powerOn()
|
||||||
{
|
{
|
||||||
|
#ifdef USE_EMU
|
||||||
|
this->pendingTicks = 99; // TODO REMOVE THIS
|
||||||
|
#else
|
||||||
this->pendingTicks = (int)(E2Const::AVG_CPU_HZ*.3); // U.A.II, p. 7-15
|
this->pendingTicks = (int)(E2Const::AVG_CPU_HZ*.3); // U.A.II, p. 7-15
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user