2019-05-04 03:25:42 +00:00
|
|
|
//
|
|
|
|
// 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"
|
2019-05-05 02:27:58 +00:00
|
|
|
#include "../../../ClockReceiver/ClockReceiver.hpp"
|
2019-05-04 03:25:42 +00:00
|
|
|
|
|
|
|
namespace Apple {
|
|
|
|
namespace Macintosh {
|
|
|
|
|
|
|
|
class Video {
|
|
|
|
public:
|
|
|
|
Video(uint16_t *ram);
|
|
|
|
void set_scan_target(Outputs::Display::ScanTarget *scan_target);
|
2019-05-05 02:27:58 +00:00
|
|
|
void run_for(HalfCycles duration);
|
|
|
|
|
|
|
|
// TODO: feedback on blanks and syncs.
|
2019-05-04 03:25:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Outputs::CRT::CRT crt_;
|
2019-05-05 02:27:58 +00:00
|
|
|
|
|
|
|
HalfCycles frame_position_;
|
|
|
|
size_t video_address_;
|
|
|
|
uint16_t *ram_;
|
|
|
|
uint8_t *pixel_buffer_;
|
2019-05-04 03:25:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Video_hpp */
|