diff --git a/zsnes/src/cpu/dma.asm b/zsnes/src/cpu/dma.asm index c45e51ba..bba4dec1 100644 --- a/zsnes/src/cpu/dma.asm +++ b/zsnes/src/cpu/dma.asm @@ -23,7 +23,7 @@ EXTSYM memtablew8,regptr EXTSYM dmadata EXTSYM hdmatype EXTSYM nexthdma -EXTSYM curhdma,curypos,hdmadata,hdmadelay,hdmaearlstart +EXTSYM curhdma,curypos,hdmadata,hdmadelay,hdmaearlstart,nohdmaoff EXTSYM resolutn EXTSYM memtabler16 @@ -856,6 +856,10 @@ NEWSYM reg420Cw pop ebx ; call exechdma ; call exechdma + cmp byte[hdmaearlstart],2 + je .nohdma + cmp byte[nohdmaoff],1 + je .nohdma mov byte[hdmaoff],1 .nohdma mov byte[hdmarestart],0 diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index e571ebf6..802e2cac 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -1339,6 +1339,7 @@ NEWSYM ClearScreenSkip, db 0 NEWSYM hirqmode2, db 0 NEWSYM ENVDisable, db 0 NEWSYM MMXSRAMFix, db 0 +NEWSYM nohdmaoff, db 0 SECTION .text ; hacks : @@ -1462,6 +1463,7 @@ NEWSYM headerhack mov byte[hirqmode2],0 mov byte[ENVDisable],0 mov byte[MMXSRAMFix],0 + mov byte[nohdmaoff],0 mov esi,[romdata] add esi,07FC0h @@ -1604,6 +1606,17 @@ NEWSYM headerhack mov byte[MMXSRAMFix],1 .notmmx + mov esi,[romdata] + add esi,0FFC0h + cmp dword[esi],'Stre' + jne .notsf + cmp dword[esi+4],'et F' + jne .notsf + cmp dword[esi+8],'ight' + jne .notsf + mov byte[nohdmaoff],1 +.notsf + mov esi,[romdata] add esi,07FC0h cmp dword[esi],'STAR'