mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Resolved 6560 addressing.
This commit is contained in:
parent
f3b1d7de82
commit
1ed04fae1e
@ -88,7 +88,7 @@ void MOS6560::set_register(int address, uint8_t value)
|
||||
|
||||
case 0x5:
|
||||
_character_cell_start_address = (uint16_t)((value & 0x0f) << 10);
|
||||
_video_matrix_start_address = (uint16_t)((_video_matrix_start_address & 0x0400) | ((value & 0xf0) << 5));
|
||||
_video_matrix_start_address = (uint16_t)((_video_matrix_start_address & 0x0200) | ((value & 0xf0) << 6));
|
||||
break;
|
||||
|
||||
case 0xe:
|
||||
|
@ -27,8 +27,18 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
||||
|
||||
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
||||
uint16_t video_address = _mos6560->get_address();
|
||||
if(!(video_address&0x1000)) video_address += 0x8000;
|
||||
_mos6560->set_graphics_value(read_memory(video_address), _colorMemory[video_address & 0x03ff]);
|
||||
uint8_t video_value = 0xff; // TODO
|
||||
if(!(video_address&0x2000))
|
||||
{
|
||||
video_value = _characterROM[video_address & 0x0fff];
|
||||
}
|
||||
else
|
||||
{
|
||||
video_address &= 0x1fff;
|
||||
if(video_address < sizeof(_userBASICMemory)) video_value = _userBASICMemory[video_address];
|
||||
else if(video_address >= 0x1000 && video_address < 0x2000) video_value = _screenMemory[video_address&0x0fff];
|
||||
}
|
||||
_mos6560->set_graphics_value(video_value, _colorMemory[video_address & 0x03ff]);
|
||||
|
||||
// run the phase-2 part of the cycle, which is whatever the 6502 said it should be
|
||||
if(isReadOperation(operation))
|
||||
|
Loading…
x
Reference in New Issue
Block a user