It is currently Tue Jun 27, 2017 3:37 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Sat Jan 14, 2017 7:01 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
If I have an HDMA last longer than 224 lines, would it be safe on hardware or will it cause HDMA/DMA bugs?


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 7:50 am 
Offline

Joined: Sun Mar 27, 2016 7:56 pm
Posts: 125
HDMA stops once Vblank starts, and then will restart from the beginning once Vblank ends, so there shouldn't be any problems. Keep in mind that it still runs during forced blank, though.


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 9:28 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
Does that include forced blank at top of the screen? Or just the bottom or middle?


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 1:09 pm 
Offline

Joined: Sun Mar 27, 2016 7:56 pm
Posts: 125
Forced blank doesn't affect HDMA at all, essentially, so it'll continue to go for 224/239 lines depending on what resolution is set.


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 1:47 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
So does that mean if I have an HDMA on the first line, the system can crash if V-blank runs a tiny bit too long?


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 3:48 pm 
Offline

Joined: Sun Mar 27, 2016 7:56 pm
Posts: 125
Potentially, yes, if DMA ends around the time HDMA starts, just like without forced blank. I'm not sure whether or not the crash happens if HDMA doesn't actually transfer anything (that is, if it's been told to skip some lines).

In any case, if you want to make sure you avoid the DMA/HDMA crash during forced blanking, you should explicitly turn HDMA off. If that's at the start of your frame though, and you just want to turn HDMA off for those lines, keep in mind turning on HDMA mid-frame requires setting some extra HDMA registers manually.


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 5:23 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Subject keeps coming up, I sound like a broken record.


Attachments:
Untitled.png
Untitled.png [ 127.13 KiB | Viewed 663 times ]
Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 5:52 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
Then why did when I hacked Street Fighter 2 to reduce the letter boxing the HDMA scrolling moved up with it?


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 7:36 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Let's have a thread where each of us give one-liner responses, particularly about subjects that others partaking in the discussion have absolutely no familiarity with!


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 8:37 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
Yes, I understand that if the HDMA has already been started it will run through forced blank, but if there is forced blank before the HDMA starts, will the HDMA start by itself, or wait for a non-forced blank line to happen?


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 9:00 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18525
Location: NE Indiana, USA (NTSC)
My first guess is that the same code turns off forced blanking and performs the extra manual steps to set up HDMA mid-screen. That's the only way I can think of where sliding the top of the letterbox up slides both of them up.


Top
 Profile  
 
PostPosted: Sun Jan 15, 2017 7:57 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 590
Location: Sweden
koitsu wrote:
Subject keeps coming up, I sound like a broken record.

The document refers to S-CPU v1, it almost sounds like it was fixed in v2. Do anyone know if this behaviour applies to v2 or not?


Top
 Profile  
 
PostPosted: Sun Jan 15, 2017 10:37 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18525
Location: NE Indiana, USA (NTSC)
The DMA controller in S-CPU v1 exhibits undefined behavior when a DMA copy ends at the start of HDMA. This is fixed in S-CPU v2, which instead exhibits intended behavior. Do you plan to read RDNMI ($4210) and switch to an alternate, possibly slower code path for v1?


Top
 Profile  
 
PostPosted: Sun Jan 15, 2017 1:10 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2172
Something that I just realized was how much CPU time it takes to do HDMA window effects, because of how many scan lines there are.


Top
 Profile  
 
PostPosted: Sun Jan 15, 2017 2:16 pm 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 590
Location: Sweden
tepples wrote:
The DMA controller in S-CPU v1 exhibits undefined behavior when a DMA copy ends at the start of HDMA. This is fixed in S-CPU v2, which instead exhibits intended behavior. Do you plan to read RDNMI ($4210) and switch to an alternate, possibly slower code path for v1?

So it was fixed in v2, thanks. Yeah maybe I'll read RDNMI if I need to, but first and foremost I want to take notes of all known differences between the S-CPU and S-PPU versions that may matter when developing. I don't want my games to be unplayable on older systems if it can be avoided.

Plus these kind of differences interests me.
The only other quirk I heard of is that v1 crashes if all 8 DMA channels are used at the same time.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group