From 2b37c398091684eca20d6829ce98e56903e91ebb Mon Sep 17 00:00:00 2001 From: z_demo_z <> Date: Wed, 15 Aug 2001 17:11:53 +0000 Subject: [PATCH] games fix --- zsnes/src/cpu/65816d.inc | 2 +- zsnes/src/cpu/65816db.inc | 2 +- zsnes/src/cpu/65816dc.inc | 2 +- zsnes/src/cpu/regs.inc | 10 +++++++--- zsnes/src/cpu/regsw.inc | 8 ++++++++ 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/zsnes/src/cpu/65816d.inc b/zsnes/src/cpu/65816d.inc index 884b9579..c8cb2128 100644 --- a/zsnes/src/cpu/65816d.inc +++ b/zsnes/src/cpu/65816d.inc @@ -1306,7 +1306,7 @@ COPemulmode %endmacro %macro RTIMacro 0 - mov byte[doirqnext],0 +; mov byte[doirqnext],0 cmp byte[nmistatus],3 jne .nodis658162 test byte[curexecstate],01h diff --git a/zsnes/src/cpu/65816db.inc b/zsnes/src/cpu/65816db.inc index cd0df811..f05711db 100644 --- a/zsnes/src/cpu/65816db.inc +++ b/zsnes/src/cpu/65816db.inc @@ -1305,7 +1305,7 @@ COPemulmode %endmacro %macro RTIMacro 0 - mov byte[doirqnext],0 +; mov byte[doirqnext],0 cmp byte[nmistatus],3 jne .nodis658162 test byte[curexecstate],01h diff --git a/zsnes/src/cpu/65816dc.inc b/zsnes/src/cpu/65816dc.inc index 126c5bc9..84dd687b 100644 --- a/zsnes/src/cpu/65816dc.inc +++ b/zsnes/src/cpu/65816dc.inc @@ -1319,7 +1319,7 @@ COPemulmode %endmacro %macro RTIMacro 0 - mov byte[doirqnext],0 +; mov byte[doirqnext],0 cmp byte[nmistatus],3 jne near .nodis658162 test byte[curexecstate],01h diff --git a/zsnes/src/cpu/regs.inc b/zsnes/src/cpu/regs.inc index 1a5df324..444c9991 100644 --- a/zsnes/src/cpu/regs.inc +++ b/zsnes/src/cpu/regs.inc @@ -317,8 +317,8 @@ NEWSYM divres, dw 0 ; quotent of divc/divb NEWSYM multres, dw 0 ; result of multa * multb/remainder of divc/divb NEWSYM latchx, dw 0 ; latched x value NEWSYM latchy, dw 0 ; latched y value -NEWSYM latchxr, db 1 ; low or high byte read for x value -NEWSYM latchyr, db 1 ; low or high byte read for y value +NEWSYM latchxr, db 0 ; low or high byte read for x value +NEWSYM latchyr, db 0 ; low or high byte read for y value NEWSYM frskipper, db 0 ; used to control frame skipping NEWSYM winl1, db 0 ; window 1 left position NEWSYM winr1, db 0 ; window 1 right position @@ -673,6 +673,8 @@ reg213Cr: ret .highv mov al,byte[latchx+1] + and al,1 + or al,byte[latchx] mov byte[latchxr],0 ret @@ -684,7 +686,9 @@ reg213Dr: mov byte[latchyr],1 ret .highv - mov al,byte[latchy+1] + mov al,byte[latchy] + and al,0FEh + or al,byte[latchy+1] mov byte[latchyr],0 ret diff --git a/zsnes/src/cpu/regsw.inc b/zsnes/src/cpu/regsw.inc index d7bf2f7c..f06bb7cd 100644 --- a/zsnes/src/cpu/regsw.inc +++ b/zsnes/src/cpu/regsw.inc @@ -1585,6 +1585,10 @@ reg4208w: reg4209w: mov [VIRQLoc],al ; mov bx,[curypos] + cmp word [VIRQLoc],106h + jne .not106 + mov word [VIRQLoc],107h +.not106 cmp byte[HIRQNextExe],1 je .nohirq ret @@ -1602,6 +1606,10 @@ reg4209w: reg420Aw: and al,01h mov [VIRQLoc+1],al + cmp word [VIRQLoc],106h + jne .not106 + mov word [VIRQLoc],107h +.not106 cmp byte[HIRQNextExe],1 je .nohirq ret