mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-25 17:29:40 +00:00
After all that, it seems likely that inputs just aren't inverted for the Vic.
This commit is contained in:
parent
656cd211d7
commit
693c8b2438
@ -78,8 +78,8 @@ class SerialPortVIA: public MOS::MOS6522<SerialPortVIA>, public MOS::MOS6522IRQD
|
|||||||
std::shared_ptr<::Commodore::Serial::Port> serialPort = _serialPort.lock();
|
std::shared_ptr<::Commodore::Serial::Port> serialPort = _serialPort.lock();
|
||||||
if(serialPort) {
|
if(serialPort) {
|
||||||
serialPort->set_output(::Commodore::Serial::Line::Data,
|
serialPort->set_output(::Commodore::Serial::Line::Data,
|
||||||
(::Commodore::Serial::LineLevel)!(_data_level_output
|
(::Commodore::Serial::LineLevel)(!_data_level_output
|
||||||
|| (_attention_level_input == _attention_acknowledge_level)));
|
&& (_attention_level_input != _attention_acknowledge_level)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -78,6 +78,13 @@ Machine::~Machine()
|
|||||||
|
|
||||||
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
||||||
{
|
{
|
||||||
|
static int logCount = 0;
|
||||||
|
if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500;
|
||||||
|
if(operation == CPU6502::BusOperation::ReadOpcode && logCount) {
|
||||||
|
logCount--;
|
||||||
|
printf("%04x\n", address);
|
||||||
|
}
|
||||||
|
|
||||||
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
||||||
uint16_t video_address = _mos6560->get_address();
|
uint16_t video_address = _mos6560->get_address();
|
||||||
uint8_t video_value = _videoMemoryMap[video_address >> 10] ? _videoMemoryMap[video_address >> 10][video_address & 0x3ff] : 0xff; // TODO
|
uint8_t video_value = _videoMemoryMap[video_address >> 10] ? _videoMemoryMap[video_address >> 10][video_address & 0x3ff] : 0xff; // TODO
|
||||||
|
@ -79,8 +79,8 @@ class UserPortVIA: public MOS::MOS6522<UserPortVIA>, public MOS::MOS6522IRQDeleg
|
|||||||
// printf("VIC Serial port line %d: %s\n", line, value ? "on" : "off");
|
// printf("VIC Serial port line %d: %s\n", line, value ? "on" : "off");
|
||||||
switch(line) {
|
switch(line) {
|
||||||
default: break;
|
default: break;
|
||||||
case ::Commodore::Serial::Line::Data: _portA = (_portA & ~0x02) | (value ? 0 : 0x02); break;
|
case ::Commodore::Serial::Line::Data: _portA = (_portA & ~0x02) | (value ? 0x02 : 0x00); break;
|
||||||
case ::Commodore::Serial::Line::Clock: _portA = (_portA & ~0x01) | (value ? 0 : 0x01); break;
|
case ::Commodore::Serial::Line::Clock: _portA = (_portA & ~0x01) | (value ? 0x01 : 0x00); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user