File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,9 @@ void main(char *argv[], int argc) {
289289 Read (fH , buffer , sizeof (buffer ));
290290
291291 // Don't overwrite MSX-DOS variables area
292- if (protect_system_vars && regs .im != 2 && segment == segments [3 ] && j >= 14 ) {
292+ if ((rom_selected_p0 || rom_selected_p1 || protect_system_vars ) && regs .im != 2
293+ && segment == segments [3 ]
294+ && j >= 14 ) {
293295 from = (unsigned char * )(0xC000 + j * sizeof (buffer ));
294296 #ifdef DEBUG_LSTATE
295297 printf ("A" );
@@ -308,7 +310,7 @@ void main(char *argv[], int argc) {
308310
309311 // If rom_selected_p0, we need to copy the
310312 // H.KEYI and H.TIMI hooks the game configured
311- if (segment == segments [3 ] && j == 15 ) {
313+ if (( rom_selected_p0 || protect_system_vars ) && segment == segments [3 ] && j == 15 ) {
312314 MemCopy ((unsigned char * )(to + H_TIMI % sizeof (buffer )), (unsigned char * )(buffer + H_TIMI % sizeof (buffer )), 3 );
313315 MemCopy ((unsigned char * )(to + H_KEYI % sizeof (buffer )), (unsigned char * )(buffer + H_KEYI % sizeof (buffer )), 3 );
314316 #ifdef DEBUG_LSTATE
You can’t perform that action at this time.
0 commit comments