mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-10 12:29:01 +00:00
Corrects order of initialisation for the Typer and Oric video.
This commit is contained in:
parent
5b6ea35d96
commit
d60692b6fd
@ -21,12 +21,9 @@ namespace {
|
|||||||
|
|
||||||
VideoOutput::VideoOutput(uint8_t *memory) :
|
VideoOutput::VideoOutput(uint8_t *memory) :
|
||||||
ram_(memory),
|
ram_(memory),
|
||||||
frame_counter_(0), counter_(0),
|
crt_(new Outputs::CRT::CRT(64*6, 6, Outputs::CRT::DisplayType::PAL50, 2)),
|
||||||
is_graphics_mode_(false),
|
|
||||||
character_set_base_address_(0xb400),
|
|
||||||
v_sync_start_position_(PAL50VSyncStartPosition), v_sync_end_position_(PAL50VSyncEndPosition),
|
v_sync_start_position_(PAL50VSyncStartPosition), v_sync_end_position_(PAL50VSyncEndPosition),
|
||||||
counter_period_(PAL50Period), next_frame_is_sixty_hertz_(false),
|
counter_period_(PAL50Period) {
|
||||||
crt_(new Outputs::CRT::CRT(64*6, 6, Outputs::CRT::DisplayType::PAL50, 2)) {
|
|
||||||
crt_->set_rgb_sampling_function(
|
crt_->set_rgb_sampling_function(
|
||||||
"vec3 rgb_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate)"
|
"vec3 rgb_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate)"
|
||||||
"{"
|
"{"
|
||||||
|
@ -27,7 +27,7 @@ class VideoOutput {
|
|||||||
std::shared_ptr<Outputs::CRT::CRT> crt_;
|
std::shared_ptr<Outputs::CRT::CRT> crt_;
|
||||||
|
|
||||||
// Counters and limits
|
// Counters and limits
|
||||||
int counter_, frame_counter_;
|
int counter_ = 0, frame_counter_ = 0;
|
||||||
int v_sync_start_position_, v_sync_end_position_, counter_period_;
|
int v_sync_start_position_, v_sync_end_position_, counter_period_;
|
||||||
|
|
||||||
// Output target and device
|
// Output target and device
|
||||||
@ -38,11 +38,11 @@ class VideoOutput {
|
|||||||
// Registers
|
// Registers
|
||||||
uint8_t ink_, paper_;
|
uint8_t ink_, paper_;
|
||||||
|
|
||||||
int character_set_base_address_;
|
int character_set_base_address_ = 0xb400;
|
||||||
inline void set_character_set_base_address();
|
inline void set_character_set_base_address();
|
||||||
|
|
||||||
bool is_graphics_mode_;
|
bool is_graphics_mode_ = false;
|
||||||
bool next_frame_is_sixty_hertz_;
|
bool next_frame_is_sixty_hertz_ = false;
|
||||||
bool use_alternative_character_set_;
|
bool use_alternative_character_set_;
|
||||||
bool use_double_height_characters_;
|
bool use_double_height_characters_;
|
||||||
bool blink_text_;
|
bool blink_text_;
|
||||||
|
@ -14,11 +14,9 @@
|
|||||||
using namespace Utility;
|
using namespace Utility;
|
||||||
|
|
||||||
Typer::Typer(const char *string, HalfCycles delay, HalfCycles frequency, std::unique_ptr<CharacterMapper> character_mapper, Delegate *delegate) :
|
Typer::Typer(const char *string, HalfCycles delay, HalfCycles frequency, std::unique_ptr<CharacterMapper> character_mapper, Delegate *delegate) :
|
||||||
counter_(-delay),
|
|
||||||
frequency_(frequency),
|
frequency_(frequency),
|
||||||
string_pointer_(0),
|
counter_(-delay),
|
||||||
delegate_(delegate),
|
delegate_(delegate),
|
||||||
phase_(0),
|
|
||||||
character_mapper_(std::move(character_mapper)) {
|
character_mapper_(std::move(character_mapper)) {
|
||||||
size_t string_size = strlen(string) + 3;
|
size_t string_size = strlen(string) + 3;
|
||||||
string_ = (char *)malloc(string_size);
|
string_ = (char *)malloc(string_size);
|
||||||
|
@ -63,11 +63,11 @@ class Typer {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
char *string_;
|
char *string_;
|
||||||
size_t string_pointer_;
|
size_t string_pointer_ = 0;
|
||||||
|
|
||||||
HalfCycles frequency_;
|
HalfCycles frequency_;
|
||||||
HalfCycles counter_;
|
HalfCycles counter_;
|
||||||
int phase_;
|
int phase_ = 0;
|
||||||
|
|
||||||
Delegate *delegate_;
|
Delegate *delegate_;
|
||||||
std::unique_ptr<CharacterMapper> character_mapper_;
|
std::unique_ptr<CharacterMapper> character_mapper_;
|
||||||
|
Loading…
Reference in New Issue
Block a user