mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Made basic attempt at 16-line character mode.
This commit is contained in:
parent
19b2f46488
commit
ed76e36b18
@ -83,7 +83,7 @@ void MOS6560::set_register(int address, uint8_t value)
|
||||
|
||||
case 0x3:
|
||||
_number_of_rows = (value >> 1)&0x3f;
|
||||
_wide_characters = !!(value&0x01);
|
||||
_tall_characters = !!(value&0x01);
|
||||
break;
|
||||
|
||||
case 0x5:
|
||||
@ -151,7 +151,7 @@ uint16_t MOS6560::get_address()
|
||||
if(_row_counter >= 0)
|
||||
{
|
||||
_row_counter++;
|
||||
if(_row_counter == _number_of_rows*8) _row_counter = -1;
|
||||
if(_row_counter == _number_of_rows*(_tall_characters ? 16 : 8)) _row_counter = -1;
|
||||
}
|
||||
else if(_vertical_counter == _first_row_location * 2)
|
||||
{
|
||||
@ -166,7 +166,7 @@ uint16_t MOS6560::get_address()
|
||||
if(_column_counter == _number_of_columns*2)
|
||||
{
|
||||
_column_counter = -1;
|
||||
if((_row_counter&7) == 7)
|
||||
if((_row_counter&(_tall_characters ? 15 : 7)) == (_tall_characters ? 15 : 7))
|
||||
{
|
||||
_video_matrix_line_address_counter = _video_matrix_address_counter;
|
||||
}
|
||||
@ -226,7 +226,7 @@ uint16_t MOS6560::get_address()
|
||||
*/
|
||||
if(_column_counter&1)
|
||||
{
|
||||
return _character_cell_start_address + (_character_code*8) + (_row_counter&7);
|
||||
return _character_cell_start_address + (_character_code*(_tall_characters ? 16 : 8)) + (_row_counter&(_tall_characters ? 15 : 7));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class MOS6560 {
|
||||
private:
|
||||
std::unique_ptr<Outputs::CRT::CRT> _crt;
|
||||
|
||||
bool _interlaced, _wide_characters;
|
||||
bool _interlaced, _tall_characters;
|
||||
uint8_t _first_column_location, _first_row_location;
|
||||
uint8_t _number_of_columns, _number_of_rows;
|
||||
uint16_t _character_cell_start_address, _video_matrix_start_address;
|
||||
|
Loading…
Reference in New Issue
Block a user