1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-22 03:30:02 +00:00

use 0xf0 as break flag

This commit is contained in:
Stephen Crane 2014-12-16 17:16:56 +00:00
parent f8371e10df
commit ea3d18c7fe

View File

@ -80,7 +80,7 @@ unsigned PS2Driver::read2() {
tail = i; tail = i;
if (buffer[i] != 0xf0) if (buffer[i] != 0xf0)
return buffer[i]; return buffer[i];
return 0x0100 | read2(); return 0xf000 | read2();
} }
unsigned PS2Driver::peek() { unsigned PS2Driver::peek() {
@ -91,7 +91,7 @@ unsigned PS2Driver::peek() {
if (i == BUFFER_SIZE) i = 0; if (i == BUFFER_SIZE) i = 0;
if (buffer[i] == 0xf0) { if (buffer[i] == 0xf0) {
if (++i == BUFFER_SIZE) i = 0; if (++i == BUFFER_SIZE) i = 0;
return 0x0100 | buffer[i]; return 0xf000 | buffer[i];
} }
return buffer[i]; return buffer[i];
} }