diff --git a/zsnes/src/cpu/regs.inc b/zsnes/src/cpu/regs.inc index 79532396..cdf1a37d 100644 --- a/zsnes/src/cpu/regs.inc +++ b/zsnes/src/cpu/regs.inc @@ -948,6 +948,8 @@ reg213Cr: ; V counter data by external or software latch reg213Dr: + cmp byte[latchyr],2 ; hack for games that don't read 213F + je .noreset cmp byte[latchyr],1 je .highv mov al,byte[latchy] @@ -959,7 +961,11 @@ reg213Dr: or al,byte[latchy+1] mov byte[latchyr],0 ret - +.noreset + mov al,byte[latchy] + and al,0FEh + or al,byte[latchy+1] + ret ; PPU Status Flag & Version number (OBJ over flags) reg213Er: mov al,01h @@ -1426,7 +1432,7 @@ reg43XXr: ret regINVALID: ; Invalid Register - cmp cx,2050h + cmp cx,2100h jb .cleared mov al,ch cmp byte[SPC7110Enable],0 diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index eb65585f..78bb92f6 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -1451,6 +1451,7 @@ headerhack2: .mmx2head db 50,58,56,62,50,62,49,95,39,77,95,95,95,95,95,95,95,95,95,95 EXTSYM ewj2hack +EXTSYM latchyr NEWSYM headerhack mov byte[disablehdma],0 @@ -1464,6 +1465,19 @@ NEWSYM headerhack mov byte[ENVDisable],0 mov byte[MMXSRAMFix],0 + mov esi,[romdata] + add esi,07FC0h + cmp dword[esi],20434653h + jne .notkamenrider + cmp dword[esi+4],0D7DDD2B6h + jne .notkamenrider + cmp dword[esi+8],0B0DEC0B2h + jne .notkamenrider + cmp dword[esi+12],20202020h + jne .notkamenrider + mov byte[latchyr],2 +.notkamenrider + mov esi,[romdata] add esi,07FC0h cmp dword[esi],'EURO' @@ -1479,8 +1493,6 @@ NEWSYM headerhack mov ecx,65472 rep stosb ret - - .noteuropeanprimegoal mov esi,[romdata]