2016-06-05 01:43:50 +00:00
|
|
|
//
|
|
|
|
// Vic20.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/06/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Vic20_hpp
|
|
|
|
#define Vic20_hpp
|
|
|
|
|
2016-09-08 09:32:17 +00:00
|
|
|
#include "../../ConfigurationTarget.hpp"
|
2016-07-10 16:57:17 +00:00
|
|
|
#include "../../CRTMachine.hpp"
|
2017-10-15 02:36:31 +00:00
|
|
|
#include "../../KeyboardMachine.hpp"
|
|
|
|
#include "../../JoystickMachine.hpp"
|
2016-07-10 16:57:17 +00:00
|
|
|
|
2017-08-16 20:05:30 +00:00
|
|
|
#include <cstdint>
|
2016-06-05 01:43:50 +00:00
|
|
|
|
2016-07-05 17:28:27 +00:00
|
|
|
namespace Commodore {
|
2016-06-05 01:43:50 +00:00
|
|
|
namespace Vic20 {
|
|
|
|
|
2016-06-05 13:06:59 +00:00
|
|
|
enum ROMSlot {
|
2016-07-05 20:39:18 +00:00
|
|
|
Kernel,
|
|
|
|
BASIC,
|
|
|
|
Characters,
|
|
|
|
Drive
|
2016-06-05 13:06:59 +00:00
|
|
|
};
|
|
|
|
|
2016-08-13 21:21:25 +00:00
|
|
|
enum MemorySize {
|
|
|
|
Default,
|
|
|
|
ThreeKB,
|
|
|
|
ThirtyTwoKB
|
|
|
|
};
|
|
|
|
|
2016-08-14 17:33:20 +00:00
|
|
|
enum Region {
|
|
|
|
NTSC,
|
|
|
|
PAL
|
|
|
|
};
|
|
|
|
|
2016-06-19 17:10:52 +00:00
|
|
|
class Machine:
|
|
|
|
public CRTMachine::Machine,
|
2017-09-05 00:56:00 +00:00
|
|
|
public ConfigurationTarget::Machine,
|
2017-10-15 02:36:31 +00:00
|
|
|
public KeyboardMachine::Machine,
|
|
|
|
public JoystickMachine::Machine {
|
2016-06-05 02:00:50 +00:00
|
|
|
public:
|
2017-08-16 20:05:30 +00:00
|
|
|
virtual ~Machine();
|
2016-12-03 18:30:27 +00:00
|
|
|
|
2017-08-16 20:23:33 +00:00
|
|
|
/// Creates and returns a Vic-20.
|
2017-08-16 20:05:30 +00:00
|
|
|
static Machine *Vic20();
|
2016-06-05 20:00:35 +00:00
|
|
|
|
2017-08-16 20:23:33 +00:00
|
|
|
/// Sets the contents of the rom in @c slot to the buffer @c data of length @c length.
|
2017-08-16 20:05:30 +00:00
|
|
|
virtual void set_rom(ROMSlot slot, size_t length, const uint8_t *data) = 0;
|
2017-08-16 20:23:33 +00:00
|
|
|
// TODO: take a std::vector<uint8_t> to collapse length and data.
|
2016-08-14 17:33:20 +00:00
|
|
|
|
2017-08-16 20:23:33 +00:00
|
|
|
/// Sets the memory size of this Vic-20.
|
2017-08-16 20:05:30 +00:00
|
|
|
virtual void set_memory_size(MemorySize size) = 0;
|
2017-08-16 20:23:33 +00:00
|
|
|
|
|
|
|
/// Sets the region of this Vic-20.
|
2017-08-16 20:05:30 +00:00
|
|
|
virtual void set_region(Region region) = 0;
|
2016-07-05 20:39:18 +00:00
|
|
|
|
2017-08-16 20:23:33 +00:00
|
|
|
/// Enables or disables turbo-speed tape loading.
|
2017-08-16 20:05:30 +00:00
|
|
|
virtual void set_use_fast_tape_hack(bool activate) = 0;
|
2016-06-05 01:43:50 +00:00
|
|
|
};
|
|
|
|
|
2016-07-05 17:28:27 +00:00
|
|
|
}
|
2016-06-05 01:43:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Vic20_hpp */
|