mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-03 08:05:40 +00:00
41740fb45e
At a substantial performance cost for now, but I'll worry about that once things are working.
43 lines
857 B
C++
43 lines
857 B
C++
//
|
|
// Video.hpp
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 03/05/2019.
|
|
// Copyright © 2019 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#ifndef Video_hpp
|
|
#define Video_hpp
|
|
|
|
#include "../../../Outputs/CRT/CRT.hpp"
|
|
#include "../../../ClockReceiver/ClockReceiver.hpp"
|
|
|
|
namespace Apple {
|
|
namespace Macintosh {
|
|
|
|
class Video {
|
|
public:
|
|
Video(uint16_t *ram);
|
|
void set_scan_target(Outputs::Display::ScanTarget *scan_target);
|
|
void run_for(HalfCycles duration);
|
|
void set_use_alternate_screen_buffer(bool use_alternate_screen_buffer);
|
|
|
|
// TODO: feedback on blanks and syncs.
|
|
bool vsync();
|
|
bool is_outputting();
|
|
|
|
private:
|
|
Outputs::CRT::CRT crt_;
|
|
|
|
HalfCycles frame_position_;
|
|
size_t video_address_ = 0;
|
|
uint16_t *ram_ = nullptr;
|
|
uint8_t *pixel_buffer_ = nullptr;
|
|
bool use_alternate_screen_buffer_ = false;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* Video_hpp */
|