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