27 October 2018, 12:01 | #41 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
If you zoom in on my last attached jpg (post #36) you can notice that the 'central' line of the 'breaked' sprite is missing.
These values are loaded in xPOS/xCTL by DMA.. (EDIT: see a successive message why this behaviour) This is an example of code that (partially) works only by chance (or better, works much similar to what's expected but not for the right reason ). At the end, yes, a line based change for sprites between DMA/stop/manual modes can be properly 'handled', but you need to be really aware of the 'full picture'. If you use code similar to what I've done on post #26 you can enjoy a 'mixed' mode perfectly working. Surely I will soon forget, but at least I know where to look for valid references. Actually there another detail for a better understand (EDIT: discussed later) but from now thanks to all involved! As usual especially to the encyclopedic Toni and his patience. Last edited by ross; 28 October 2018 at 08:27. Reason: rephrased |
27 October 2018, 13:35 | #42 | |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
Quote:
It's giving the impression you can stop DMA by writing 0 to SPRxCTL, but that's been shown not to be the case. I also notice a slight lack of rigour, but I believe this doesn't hide any unexpected surprises (e.g. 3. has priority over 4. if both conditions are satisfied). |
|
27 October 2018, 16:46 | #43 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Quote:
|
||
27 October 2018, 17:49 | #44 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
No, I wrote 0 to SPRxCTL about ten pixels down a sprite and did not touch SPRxPOS. Hence the start position can't have matched the line.
I should probably attach a small program to support my claim, but I don't have a proper setup to create projects in assembly. I can make a quick demonstration in AMOS though if that's good enough. |
27 October 2018, 18:08 | #45 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
It's sure a one minute job to do. |
|
27 October 2018, 18:18 | #46 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
Ok, take your previous program and wait for the middle line of sprite 2, with a horizontal position right after the sprite DMA slots (pixel 128?). Write 0 to SPR2CTL.
|
27 October 2018, 18:40 | #47 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
Only one BPL active to better view DMA activity. Copper: Code:
dc.l $f027fffe ;right after DMA dc.l $01520000 ;2CTL=0 |
|
27 October 2018, 18:55 | #48 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
Thank you ross
So the picture shows that writing to xCTL disarmed the sprite because a line is missing. But DMA is still active because it continues drawing the following lines. |
27 October 2018, 19:08 | #49 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
This is practically the same case that made me comment in post #39. I've interpreted post #40 as: next line is a normal DMA line so a xDATA/B is done because DMA is still active "and all the comparisons are active all the time". I've supposed too much? |
|
27 October 2018, 19:10 | #50 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Usual answer: example binary (that works without any external dependencies. If it does: adf that includes everything needed) required that does nothing else than the test case. Programming language is irrelevant.
|
27 October 2018, 19:12 | #51 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
It's attached in my post, no dependencies (pure asm, the usual crap).
|
27 October 2018, 19:15 | #52 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
|
27 October 2018, 19:21 | #53 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
Yes, it displays exactly the behaviour I was referring to.
|
27 October 2018, 19:22 | #54 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
27 October 2018, 19:31 | #55 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
I missed one extra condition: SPRxCTL write disables DMA state only if it was DMA access to SPRxCTL. Manual writes do not affect DMA state.
|
27 October 2018, 19:33 | #56 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
EDIT: in truth not everything, one last detail is missing Thanks Toni Last edited by ross; 28 October 2018 at 09:00. |
|
27 October 2018, 20:02 | #57 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 90
|
I still fail to see how the current set of rules explains that DMA could be stopped by writing the current line value to SPRxCTL.
It was clear from post #26 that DMA did not load any value into xCTL after you armed the sprite with your own data, because this data was displayed on the next line. Now, since DMA didn't load xCTL, DMA should still be active. But it isn't (contradiction ). Maybe Toni should have a look at the code in post #26 as well |
27 October 2018, 20:22 | #58 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
I can suppose only that for condition if (current vpos == sprite end) sprite DMA slots are used to load SPRxPOS and SPRxCTL system is tricked to think that DMA has done its job.. |
|
27 October 2018, 20:58 | #59 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Yes, same answer again, y-coordinate comparisons are active all the time so they don't care when or who changed the register.
SPRxCTL special trigger condition is a bit unexpected but it probably was needed to handle some special case. |
27 October 2018, 21:29 | #60 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
So, the preceding phrase need to be:
if (current vpos == sprite end) sprite DMA slots are used to load SPRxPOS and SPRxCTL, special DMA idle case Right? EDIT: word *special* used because we have TRUE condition from two cases: - a preceding value in SPRxCTL(EVx)==line so a DMA fetch for new SPRxPOS/CTL is done (a DMA write access, condition for sprite DMA idle state); - a COPPER/CPU poke on SPRxCTL on this very same line that retroactively force a TRUE condition (setting EVx==line), the special case for a DMA idle state. It's not so different from my post #39 Last edited by ross; 28 October 2018 at 09:02. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mani Pulite sprite problems (A500 mode) | andreas | support.WinUAE | 17 | 22 January 2015 14:41 |
Start automatic.. | Nightmare4k | support.FS-UAE | 8 | 08 November 2014 16:53 |
Automatic Savestates | Another World | request.UAE Wishlist | 12 | 17 January 2009 19:55 |
'Warp Mode' broken in 'windowed mode' | NoX1911 | support.WinUAE | 3 | 26 May 2007 01:05 |
REQ: Automatic resolution change ; automatic resolution detection | Borg_Number_One | request.UAE Wishlist | 3 | 21 August 2004 14:16 |
|
|