1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Corrected lingering hard-coded mask. So titles for memory configurations above 1kb now load.

This commit is contained in:
Thomas Harte 2017-06-11 21:27:46 -04:00
parent 06fe07932a
commit 302c2e94de

View File

@ -76,7 +76,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::MachineCycle &cycle) {
int next_byte = parser_.get_next_byte(tape_player_.get_tape()); int next_byte = parser_.get_next_byte(tape_player_.get_tape());
if(next_byte != -1) { if(next_byte != -1) {
uint16_t hl = get_value_of_register(CPU::Z80::Register::HL); uint16_t hl = get_value_of_register(CPU::Z80::Register::HL);
ram_[hl & 1023] = (uint8_t)next_byte; ram_[hl & ram_mask_] = (uint8_t)next_byte;
*cycle.value = 0x00; *cycle.value = 0x00;
set_value_of_register(CPU::Z80::Register::ProgramCounter, tape_return_address_ - 1); set_value_of_register(CPU::Z80::Register::ProgramCounter, tape_return_address_ - 1);
return 0; return 0;