Fixes for DMA, so we can have the recent improvements without breaking tons of other game. (SSF2, SFA2, FFMQ, TOP, CT, YI, Probably others). [pagefault]
This commit is contained in:
@@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
EXTSYM memtabler8,regptw,snesmap2,snesmmap,memtablew8,regptr,memtabler16
|
EXTSYM memtabler8,regptw,snesmap2,snesmmap,memtablew8,regptr,memtabler16
|
||||||
EXTSYM dmadata,hdmatype,nexthdma,resolutn
|
EXTSYM dmadata,hdmatype,nexthdma,resolutn
|
||||||
EXTSYM curhdma,curypos,disablehdma,hdmadata,hdmadelay
|
EXTSYM curhdma,curypos,disablehdma,hdmadata,hdmadelay,hdmastartsc,hdmarestart
|
||||||
|
EXTSYM nohdmaframe
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; Transfer DMA Inits & Transfers DMA
|
; Transfer DMA Inits & Transfers DMA
|
||||||
@@ -778,23 +779,16 @@ section .data
|
|||||||
dw 0,1,2,3
|
dw 0,1,2,3
|
||||||
.addrnumt db 1,2,2,4,4,4,4,4
|
.addrnumt db 1,2,2,4,4,4,4,4
|
||||||
|
|
||||||
section .bss
|
|
||||||
|
|
||||||
NEWSYM hdmastartsc, resb 1
|
|
||||||
NEWSYM hdmarestart, resb 1
|
|
||||||
|
|
||||||
section .text
|
section .text
|
||||||
|
|
||||||
NEWSYM reg420Cw
|
NEWSYM reg420Cw
|
||||||
|
|
||||||
mov [curhdma],al
|
mov [curhdma],al
|
||||||
mov bx,[resolutn]
|
mov bx,[resolutn]
|
||||||
cmp word[curypos],bx
|
cmp word[curypos],bx
|
||||||
jae near .nohdma
|
jae near .nohdma
|
||||||
|
mov al,[curhdma]
|
||||||
cmp byte[disablehdma],0
|
cmp byte[disablehdma],0
|
||||||
jne near .nohdma
|
jne near .nohdma
|
||||||
; jmp starthdma
|
|
||||||
mov al,[curhdma]
|
|
||||||
mov [nexthdma],al
|
mov [nexthdma],al
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je near .nohdma
|
je near .nohdma
|
||||||
@@ -859,8 +853,6 @@ NEWSYM reg420Cw
|
|||||||
jz .notransh
|
jz .notransh
|
||||||
call setuphdma
|
call setuphdma
|
||||||
.notransh
|
.notransh
|
||||||
mov bl,1
|
|
||||||
mov [hdmadelay],bl
|
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop edi
|
pop edi
|
||||||
@@ -869,6 +861,11 @@ NEWSYM reg420Cw
|
|||||||
; call exechdma
|
; call exechdma
|
||||||
; call exechdma
|
; call exechdma
|
||||||
.nohdma
|
.nohdma
|
||||||
|
cmp byte[nohdmaframe],1
|
||||||
|
jne .notframe
|
||||||
|
inc byte[hdmadelay]
|
||||||
|
.notframe
|
||||||
|
|
||||||
mov byte[hdmarestart],0
|
mov byte[hdmarestart],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
@@ -1553,6 +1553,9 @@ NEWSYM cpuover
|
|||||||
mov ax,[resolutn]
|
mov ax,[resolutn]
|
||||||
cmp word[curypos],ax
|
cmp word[curypos],ax
|
||||||
jnb .nodrawline
|
jnb .nodrawline
|
||||||
|
cmp byte[hdmadelay],1
|
||||||
|
jne .virqstuff
|
||||||
|
.virqstuff
|
||||||
cmp byte[hdmadelay],0
|
cmp byte[hdmadelay],0
|
||||||
je .dohdma2
|
je .dohdma2
|
||||||
dec byte[hdmadelay]
|
dec byte[hdmadelay]
|
||||||
|
|||||||
@@ -406,9 +406,12 @@ NEWSYM poamaddrs, dw 0
|
|||||||
NEWSYM ioportval, db 255
|
NEWSYM ioportval, db 255
|
||||||
NEWSYM iohvlatch, db 0
|
NEWSYM iohvlatch, db 0
|
||||||
NEWSYM ppustatus, db 0
|
NEWSYM ppustatus, db 0
|
||||||
|
NEWSYM hdmastartsc, db 0
|
||||||
|
NEWSYM hdmarestart, db 0
|
||||||
|
NEWSYM hdmadelay, db 0
|
||||||
|
NEWSYM nohdmaframe, db 0 ; no hdma for current frame
|
||||||
|
|
||||||
|
NEWSYM tempdat, times 474 db 0 ; expandable area
|
||||||
NEWSYM tempdat, times 477 db 0 ; expandable area
|
|
||||||
|
|
||||||
num2writeppureg equ $-sndrot
|
num2writeppureg equ $-sndrot
|
||||||
; pharos equ hack *sigh*
|
; pharos equ hack *sigh*
|
||||||
@@ -479,6 +482,10 @@ NEWSYM ClearRegs
|
|||||||
mov word[bg3objptr],0
|
mov word[bg3objptr],0
|
||||||
mov word[bg4objptr],0
|
mov word[bg4objptr],0
|
||||||
mov byte[ioportval],0FFh
|
mov byte[ioportval],0FFh
|
||||||
|
mov byte[hdmastartsc],0
|
||||||
|
mov byte[hdmarestart],0
|
||||||
|
mov byte[nohdmaframe],0
|
||||||
|
mov byte[hdmadelay],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
reg2100r:
|
reg2100r:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ EXTSYM initsfxregsw,reg420Bw,reg420Cw,regptw,initSA1regsw,SDD1Reset
|
|||||||
EXTSYM SPC7110Reset,RTCReset2,debstop,NextLineCache,vidmemch2,vidmemch4
|
EXTSYM SPC7110Reset,RTCReset2,debstop,NextLineCache,vidmemch2,vidmemch4
|
||||||
EXTSYM vidmemch8,vrama,nmirept,sndwrit,SPCRAM,HIRQCycNext,HIRQNextExe,HIRQSkip
|
EXTSYM vidmemch8,vrama,nmirept,sndwrit,SPCRAM,HIRQCycNext,HIRQNextExe,HIRQSkip
|
||||||
EXTSYM cycpb268,cycpb358,cycpbl,cycpblt,opexec268,opexec268cph,opexec358
|
EXTSYM cycpb268,cycpb358,cycpbl,cycpblt,opexec268,opexec268cph,opexec358
|
||||||
EXTSYM opexec358cph,hdmarestart,printhex8
|
EXTSYM opexec358cph,printhex8
|
||||||
|
|
||||||
SECTION .bss
|
SECTION .bss
|
||||||
NEWSYM testgfxv1, resb 1
|
NEWSYM testgfxv1, resb 1
|
||||||
@@ -1675,10 +1675,17 @@ reg43x9w:
|
|||||||
|
|
||||||
; Number of lines for HDMA transfer
|
; Number of lines for HDMA transfer
|
||||||
reg43XAw:
|
reg43XAw:
|
||||||
|
mov byte[nohdmaframe],0
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bx,cx
|
mov bx,cx
|
||||||
sub bx,4300h
|
sub bx,4300h
|
||||||
mov [dmadata+ebx],al
|
mov [dmadata+ebx],al
|
||||||
|
mov bx,[resolutn]
|
||||||
|
cmp word[curypos],bx
|
||||||
|
jb .nodma
|
||||||
|
mov byte[nohdmaframe],1
|
||||||
|
inc byte[hdmadelay]
|
||||||
|
.nodma
|
||||||
ret
|
ret
|
||||||
|
|
||||||
regINVALIDw: ; Invalid Register
|
regINVALIDw: ; Invalid Register
|
||||||
|
|||||||
@@ -996,7 +996,6 @@ SECTION .data
|
|||||||
NEWSYM disablehdma, db 0
|
NEWSYM disablehdma, db 0
|
||||||
NEWSYM disableeffects, db 0
|
NEWSYM disableeffects, db 0
|
||||||
NEWSYM hdmaearlstart, db 0
|
NEWSYM hdmaearlstart, db 0
|
||||||
NEWSYM hdmadelay, db 0
|
|
||||||
NEWSYM disable65816sh, db 0
|
NEWSYM disable65816sh, db 0
|
||||||
NEWSYM disablespcclr, db 0
|
NEWSYM disablespcclr, db 0
|
||||||
NEWSYM virqnodisable, db 0
|
NEWSYM virqnodisable, db 0
|
||||||
|
|||||||
Reference in New Issue
Block a user