From 4034a3272f2c9cfc9395803815fddea4747a8e83 Mon Sep 17 00:00:00 2001 From: z_demo_z <> Date: Thu, 13 Jun 2002 22:19:24 +0000 Subject: [PATCH] Line timing fix --- zsnes/src/cpu/regsw.inc | 6 ++++++ zsnes/src/init.asm | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/zsnes/src/cpu/regsw.inc b/zsnes/src/cpu/regsw.inc index 3643068a..ec47f180 100644 --- a/zsnes/src/cpu/regsw.inc +++ b/zsnes/src/cpu/regsw.inc @@ -1626,6 +1626,12 @@ reg4209w: reg420Aw: and al,01h mov [VIRQLoc+1],al + mov bx,[totlines] + sub bx,1 + cmp word[VIRQLoc],bx + jb .okvirqpos + mov word[VIRQLoc],07FFFh +.okvirqpos cmp byte[HIRQNextExe],1 je .nohirq ret diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index 6e2d4599..f4ee3d94 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -356,7 +356,7 @@ NEWSYM cycpb358, db 149 ; 155 NEWSYM cycpbl2, db 109 ; percentage left of CPU/SPC to run (3.58 = 175) NEWSYM cycpblt2, db 149 ; percentage of CPU/SPC to run NEWSYM writeon, db 0 ; Write enable/disable on snes rom memory -NEWSYM totlines, dw 262 ; total # of lines +NEWSYM totlines, dw 263 ; total # of lines NEWSYM soundon, db 0 ; Current sound enabled (1=enabled) NEWSYM zsmesg, db 'ZSNES Save State File V0.6',26 NEWSYM versn, db 60 ; version #/100 @@ -5563,14 +5563,14 @@ NEWSYM showinfo mov al,2 .nopal2 mov byte[romispal],0 - mov word[totlines],262 + mov word[totlines],263 mov dword[MsgCount],120 cmp al,1 jbe .nopal cmp al,0Fh je .nopal mov byte[romispal],1 - mov word[totlines],314 + mov word[totlines],313 mov dword[MsgCount],100 mov edx,.romtypep mov ah,9