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.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2015 Thomas Harte. All rights reserved.
|
2015-07-16 23:56:02 +00:00
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2015-07-16 23:56:02 +00:00
|
|
|
|
2019-11-09 20:31:41 +00:00
|
|
|
#include "../../../Configurable/Configurable.hpp"
|
|
|
|
#include "../../../Analyser/Static/StaticAnalyser.hpp"
|
|
|
|
#include "../../ROMMachine.hpp"
|
2018-07-11 00:00:46 +00:00
|
|
|
|
2015-08-19 00:33:24 +00:00
|
|
|
#include "Atari2600Inputs.h"
|
2015-07-16 23:56:02 +00:00
|
|
|
|
2024-01-13 03:03:19 +00:00
|
|
|
#include <memory>
|
|
|
|
|
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:
|
2024-02-17 02:47:23 +00:00
|
|
|
virtual ~Machine() = default;
|
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.
|
2024-01-13 03:03:19 +00:00
|
|
|
static std::unique_ptr<Machine> Atari2600(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher);
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|