From 120b2d9e336b8b5e16af953fb2329c6775ea8abe Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 12 Oct 2016 21:52:47 -0400 Subject: [PATCH] Switched to using a diagnostic ROM for now, as it'll definitely boot without initially requiring either a 6522 or AY. Have some forms appearing which imply I'm not doing badly, at least up to not knowing where I'm supposed to get character pixels from. --- Machines/Oric/Video.cpp | 20 +++++++++++++++---- Machines/Oric/Video.hpp | 1 + .../Clock Signal/Machine/Wrappers/CSOric.mm | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp index 146d96f89..3a2a0d4b7 100644 --- a/Machines/Oric/Video.cpp +++ b/Machines/Oric/Video.cpp @@ -13,7 +13,8 @@ using namespace Oric; VideoOutput::VideoOutput(uint8_t *memory) : _ram(memory), _frame_counter(0), _counter(0), - _state(Sync), _cycles_in_state(0) + _state(Sync), _cycles_in_state(0), + _is_graphics_mode(false) { _crt.reset(new Outputs::CRT::CRT(64*6, 6, Outputs::CRT::DisplayType::PAL50, 1)); @@ -63,9 +64,20 @@ void VideoOutput::run_for_cycles(int number_of_cycles) _cycles_in_state++; if(new_state == Pixels) { - _pixel_target[0] = 0x70; - _pixel_target[1] = 0x14; - _pixel_target[2] = 0x23; + uint8_t pixels; + if(_is_graphics_mode) + { + // TODO + } + else + { + int address = 0xbb80 + (_counter >> 9) * 40 + h_counter; + uint8_t character = _ram[address]; + pixels = character;//_ram[character * 8 + ((_counter >> 6) & 7)]; + } + _pixel_target[0] = ((pixels & 0x01) ? 0xf : 0x0) | ((pixels & 0x02) ? 0xf0 : 0x00); + _pixel_target[1] = ((pixels & 0x04) ? 0xf : 0x0) | ((pixels & 0x08) ? 0xf0 : 0x00); + _pixel_target[2] = ((pixels & 0x10) ? 0xf : 0x0) | ((pixels & 0x20) ? 0xf0 : 0x00); _pixel_target += 3; } } diff --git a/Machines/Oric/Video.hpp b/Machines/Oric/Video.hpp index a16ed54bc..f7b8b2925 100644 --- a/Machines/Oric/Video.hpp +++ b/Machines/Oric/Video.hpp @@ -35,6 +35,7 @@ class VideoOutput { // Registers uint8_t _ink, _style, _paper; + bool _is_graphics_mode; }; } diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm index 6ce2be0de..ecdbd4d2b 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm @@ -23,7 +23,7 @@ self = [super init]; if(self) { - NSData *rom = [self rom:@"basic10"]; + NSData *rom = [self rom:@"test108j"]; if(rom) _oric.set_rom(rom.stdVector8); } return self;