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

Fixed parity: now calculated from the actual byte and works the other way around. The Vic now believes it is loading the actual program. So I guess bytes, headers and the lead-in is working.

This commit is contained in:
Thomas Harte 2016-08-16 21:41:09 -04:00
parent dfe9fb83ef
commit 1bca9aa2bb

View File

@ -146,7 +146,7 @@ void TapePRG::get_next_output_token()
_check_digit ^= _output_byte;
}
printf("%02x ", _output_byte);
printf(" %02x", _output_byte);
}
switch(bit_offset)
@ -159,11 +159,12 @@ void TapePRG::get_next_output_token()
break;
case 9:
{
uint8_t parity = _outputToken;
uint8_t parity = _output_byte;
parity ^= (parity >> 4);
parity ^= (parity >> 2);
parity ^= (parity >> 1);
_outputToken = (parity&1) ? One : Zero;
_outputToken = (parity&1) ? Zero : One;
printf("[%d]", parity&1);
}
break;
}