2020-11-01 00:39:32 +00:00
|
|
|
//
|
|
|
|
// Video.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 31/10/2020.
|
|
|
|
// Copyright © 2020 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Apple_IIgs_Video_hpp
|
|
|
|
#define Apple_IIgs_Video_hpp
|
|
|
|
|
|
|
|
#include "../AppleII/VideoSwitches.hpp"
|
2020-11-05 22:56:20 +00:00
|
|
|
#include "../../../ClockReceiver/ClockReceiver.hpp"
|
2020-11-01 00:39:32 +00:00
|
|
|
|
|
|
|
namespace Apple {
|
|
|
|
namespace IIgs {
|
|
|
|
namespace Video {
|
|
|
|
|
|
|
|
class VideoBase: public Apple::II::VideoSwitches<Cycles> {
|
|
|
|
public:
|
|
|
|
VideoBase();
|
|
|
|
|
2020-11-05 22:56:20 +00:00
|
|
|
void run_for(Cycles);
|
|
|
|
bool get_is_vertical_blank();
|
|
|
|
|
|
|
|
void set_new_video(uint8_t);
|
|
|
|
uint8_t get_new_video();
|
|
|
|
|
|
|
|
void clear_interrupts(uint8_t);
|
|
|
|
uint8_t get_interrupt_register();
|
|
|
|
void set_interrupt_register(uint8_t);
|
|
|
|
|
|
|
|
void notify_clock_tick();
|
|
|
|
|
2020-11-01 00:39:32 +00:00
|
|
|
private:
|
|
|
|
void did_set_annunciator_3(bool) override;
|
|
|
|
void did_set_alternative_character_set(bool) override;
|
2020-11-05 22:56:20 +00:00
|
|
|
|
|
|
|
uint8_t new_video_ = 0x01;
|
|
|
|
uint8_t interrupts_ = 0x00;
|
|
|
|
void set_interrupts(uint8_t);
|
|
|
|
|
|
|
|
int cycles_into_frame_ = 0;
|
2020-11-01 00:39:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class Video: public VideoBase {
|
|
|
|
public:
|
|
|
|
using VideoBase::VideoBase;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Video_hpp */
|