2015-07-16 23:56:02 +00:00
|
|
|
//
|
|
|
|
// Atari2600.hpp
|
2015-07-26 19:25:11 +00:00
|
|
|
// CLK
|
2015-07-16 23:56:02 +00:00
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 14/07/2015.
|
|
|
|
// Copyright © 2015 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Atari2600_cpp
|
|
|
|
#define Atari2600_cpp
|
|
|
|
|
2015-08-19 00:33:24 +00:00
|
|
|
#include "Atari2600Inputs.h"
|
2015-07-16 23:56:02 +00:00
|
|
|
|
|
|
|
namespace Atari2600 {
|
|
|
|
|
2017-08-16 18:52:40 +00:00
|
|
|
/*!
|
|
|
|
Models an Atari 2600.
|
|
|
|
*/
|
2018-03-09 20:19:02 +00:00
|
|
|
class Machine {
|
2015-07-16 23:56:02 +00:00
|
|
|
public:
|
2017-08-16 18:52:40 +00:00
|
|
|
virtual ~Machine();
|
2015-07-22 22:15:18 +00:00
|
|
|
|
2017-08-16 18:52:40 +00:00
|
|
|
/// Creates and returns an Atari 2600 on the heap.
|
|
|
|
static Machine *Atari2600();
|
2017-02-20 02:20:37 +00:00
|
|
|
|
2017-08-16 18:52:40 +00:00
|
|
|
/// Sets the switch @c input to @c state.
|
|
|
|
virtual void set_switch_is_enabled(Atari2600Switch input, bool state) = 0;
|
2017-02-20 02:20:37 +00:00
|
|
|
|
2018-02-15 02:46:50 +00:00
|
|
|
/// Gets the state of switch @c input.
|
|
|
|
virtual bool get_switch_is_enabled(Atari2600Switch input) = 0;
|
|
|
|
|
2017-08-16 18:52:40 +00:00
|
|
|
// Presses or releases the reset button.
|
|
|
|
virtual void set_reset_switch(bool state) = 0;
|
2015-07-16 23:56:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Atari2600_cpp */
|