1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-07 08:28:57 +00:00

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.

This commit is contained in:
Thomas Harte 2016-10-12 21:52:47 -04:00
parent 1f857c619b
commit 120b2d9e33
3 changed files with 18 additions and 5 deletions

View File

@ -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;
}
}

View File

@ -35,6 +35,7 @@ class VideoOutput {
// Registers
uint8_t _ink, _style, _paper;
bool _is_graphics_mode;
};
}

View File

@ -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;