1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Some major hackiness gives the first line of expected text repeating endlessly (as the end of columns is never reached, as that's back to thinking it's 0x7f); I also don't yet know which actor is supposed to do the '+0x8000' (which probably shouldn't be that but might be a pin on the 6560 indicating what sort of value is being fetched, that effects chip select for the various bits of memory?)

This commit is contained in:
Thomas Harte 2016-06-06 07:47:30 -04:00
parent 64539a2b24
commit 89c87c3e81

View File

@ -188,7 +188,8 @@ uint16_t MOS6560::get_address()
*/
if(_column_counter&1)
{
return _character_cell_start_address + (_character_code*8) + (_row_counter&7);
// TODO: don't add 0x8000. That's a hack.
return 0x8000 + (_character_cell_start_address + (_character_code*8) + (_row_counter&7));
}
else
{
@ -203,6 +204,10 @@ uint16_t MOS6560::get_address()
void MOS6560::set_graphics_value(uint8_t value, uint8_t colour_value)
{
// TODO: this isn't correct, as _character_value will be
// accessed second, then output will roll over. Probably it's
// correct (given the delays upstream) to output all 8 on an &1
// and to adjust the signalling to the CRT above?
if(_this_state == State::Pixels)
{
if(_column_counter&1)
@ -211,10 +216,10 @@ void MOS6560::set_graphics_value(uint8_t value, uint8_t colour_value)
if(pixel_pointer)
{
pixel_pointer[0] = ((value >> 7)&1) * 15;
pixel_pointer[1] = ((value >> 6)&1) * 15;
pixel_pointer[2] = ((value >> 5)&1) * 15;
pixel_pointer[3] = ((value >> 4)&1) * 15;
pixel_pointer[0] = ((_character_value >> 7)&1) * 15;
pixel_pointer[1] = ((_character_value >> 6)&1) * 15;
pixel_pointer[2] = ((_character_value >> 5)&1) * 15;
pixel_pointer[3] = ((_character_value >> 4)&1) * 15;
pixel_pointer += 4;
}
}
@ -222,10 +227,10 @@ void MOS6560::set_graphics_value(uint8_t value, uint8_t colour_value)
{
if(pixel_pointer)
{
pixel_pointer[0] = ((value >> 3)&1) * 15;
pixel_pointer[1] = ((value >> 2)&1) * 15;
pixel_pointer[2] = ((value >> 1)&1) * 15;
pixel_pointer[3] = ((value >> 0)&1) * 15;
pixel_pointer[0] = ((_character_value >> 3)&1) * 15;
pixel_pointer[1] = ((_character_value >> 2)&1) * 15;
pixel_pointer[2] = ((_character_value >> 1)&1) * 15;
pixel_pointer[3] = ((_character_value >> 0)&1) * 15;
pixel_pointer += 4;
}