From 3b52ab0d3708038681c5f65bfa7941d1c7433e89 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 30 Oct 2016 20:15:47 -0400 Subject: [PATCH 1/2] Cut some dead state. --- Machines/Oric/Video.cpp | 1 - Machines/Oric/Video.hpp | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp index ff7c22798..ea14c006d 100644 --- a/Machines/Oric/Video.cpp +++ b/Machines/Oric/Video.cpp @@ -22,7 +22,6 @@ namespace { VideoOutput::VideoOutput(uint8_t *memory) : _ram(memory), _frame_counter(0), _counter(0), - _state(Sync), _cycles_in_state(0), _is_graphics_mode(false), _character_set_base_address(0xb400), _phase(0), diff --git a/Machines/Oric/Video.hpp b/Machines/Oric/Video.hpp index 1a562347b..ec41a919a 100644 --- a/Machines/Oric/Video.hpp +++ b/Machines/Oric/Video.hpp @@ -27,11 +27,7 @@ class VideoOutput { int _counter, _frame_counter; int _v_sync_start_position, _v_sync_end_position, _counter_period; - // Output state - enum State { - Blank, Sync, Pixels, ColourBurst - } _state; - unsigned int _cycles_in_state; + // Output target uint8_t *_pixel_target; // Registers From b04ba4195108d2701a6e601406f8d8348b322f8f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 30 Oct 2016 20:16:22 -0400 Subject: [PATCH 2/2] Moved code out of header. --- Machines/Oric/Video.cpp | 6 ++++++ Machines/Oric/Video.hpp | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp index ea14c006d..5176aeee0 100644 --- a/Machines/Oric/Video.cpp +++ b/Machines/Oric/Video.cpp @@ -210,3 +210,9 @@ void VideoOutput::run_for_cycles(int number_of_cycles) number_of_cycles -= cycles_run_for; } } + +void VideoOutput::set_character_set_base_address() +{ + if(_is_graphics_mode) _character_set_base_address = _use_alternative_character_set ? 0x9c00 : 0x9800; + else _character_set_base_address = _use_alternative_character_set ? 0xb800 : 0xb400; +} diff --git a/Machines/Oric/Video.hpp b/Machines/Oric/Video.hpp index ec41a919a..28d8661ec 100644 --- a/Machines/Oric/Video.hpp +++ b/Machines/Oric/Video.hpp @@ -34,11 +34,7 @@ class VideoOutput { uint8_t _ink, _paper; int _character_set_base_address; - inline void set_character_set_base_address() - { - if(_is_graphics_mode) _character_set_base_address = _use_alternative_character_set ? 0x9c00 : 0x9800; - else _character_set_base_address = _use_alternative_character_set ? 0xb800 : 0xb400; - } + inline void set_character_set_base_address(); bool _is_graphics_mode; bool _next_frame_is_sixty_hertz;