24 February 2021, 02:07 | #1 |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
AGA FMODE & BPLCON1 Scrolling
Morning!
I've since moved onto getting some sort of hardware scrolling working with some tile data, and I've got something moving: Obviously I have some background restore and offset issues with the player but that's easy to fix so we'll ignore that for now. If anyone's following the other threads, another addition is I've also added two more layers of parallax with the two rows of clouds sprites at the top. As you can see, I have some sort of raster time analysis going on with the colour bars which for this top example is running about a half of the way down the screen. This is FMODE 1, with all 8 sprites (in attached mode) which are multiplexed vertically into 4 strips, covering the whole screen using SSCAN2. Now because I've read several times that you can't use FMODE 4 with all 8 sprites, and hardware scroll I thought I'd try it anyway: The raster lines have halved when I switch to this mode, and it all still works. So my question for tonight is, how is this possible if after all of the discussions I've seen here, you can't do this. Or, is it because I'm only using a 288x256 window with a 320x256 screen buffer? Either way, there's a definite decrease in raster time being spent. Initial copper setup looks like this: Code:
dc.w FMODE,$800f ; - 288x256 scroll 16 pixels either side dc.w DIWSTRT,$2c91 dc.w DIWSTOP,$2cb1 dc.w DDFSTRT,$38 dc.w DDFSTOP,$b8 |
24 February 2021, 09:47 | #2 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
With DDFSTRT=$38 you don't lose sprites, but then try to scroll the screen 63 pixels with BPLCON1..
You will understand that you would be forced to use a view to much on the righ of the screen. |
24 February 2021, 09:55 | #3 | |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Quote:
On that note, I'm good to proceed with just using the old full pixel scroll with this setup... and nothing will go bang and there'll be no nasty surprises down the line? |
|
24 February 2021, 10:05 | #4 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Quote:
With FMODE=3 you have a fetch of 64 pixels at a time and you need to use 64 values in BPLCON1 for the usual lo-res fine pixel scroll. Then you need to change the value of the bitplane pointers and you can only do it in 8-byte increments (because you have to be aligned with the fetch). |
|
24 February 2021, 10:19 | #5 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,643
|
Quote:
|
|
24 February 2021, 11:08 | #6 |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Right, I think I understand the 64 pixels beforehand logic, and the 8 byte for the bitplane pointer adjustment... but that just makes me more confused as to why this seems to be working and scrolling around as expected.
What I’m doing is a legit solution? If so then I’m gonna leave it because of the extra free time I’m getting. If it’s wrong, then why does it appear to work as I expect it to? |
24 February 2021, 11:26 | #7 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Quote:
Edit: I changed this to be a reply to your post, I hadn't seen it when I wrote this but it happens to be perfectly in sync with your question *) in your case it's actually 48 pixels because you show only 288px wide, it's the 64 pixels after the fetch that will have issues. Last edited by roondar; 24 February 2021 at 11:33. |
|
24 February 2021, 12:01 | #8 | |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Quote:
Are you suggesting that once I fully scroll my bitplanes across the left side of the screen I should start seeing issues with the bitplane data? This above has been scrolled all the way across and looks and scroll fine? Or will things start to get hairy when I scroll back the other way? *sigh* Maybe it's time I took another break from my ASM nightmare and got back to some of my other high-level projects. The only thing which I can compare writing this stuff to in terms of massive delight when it goes right and huge disappointment and dejection when it doesn't is learning how to play the guitar. You must stick to it and push through the hard times I guess. |
|
24 February 2021, 12:07 | #9 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Quote:
Basically there should be values of BPLCON1 where you get the wrong result when scrolling (plus GFX in the leftmost part of the screen). However, I don't quite know what the issues should look like as I've not tried this. Nor do I know if FS-UAE correctly emulates this. But I do know this is a real problem (the HW should not be able to display the data as it's not fully fetched yet). Perhaps others can give additional insights here. |
|
24 February 2021, 12:41 | #10 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
|
24 February 2021, 12:56 | #11 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Ah, of course!
It's just that the bitplanes are delayed by x pixels when using BPLCON1, this hasn't changed from OCS/ECS. Only the maximum delay has. So if you delay by 64 pixels and have a DDFSTRT of $38, you'd get 48 empty pixels (actually 64, but the display width here = 288 pixels so the first 16 are cut off regardless). |
30 April 2022, 21:30 | #12 | |
Registered User
Join Date: Nov 2018
Location: Germany
Posts: 42
|
Quote:
- Set the DDFSTRT values to allow display DMA fetch the extra 64 pixels and 8 sprites - Enable variable beam counters, program a screen mode which replicates PAL/NTSC timing - Program horizontal sync to start/end 64 pixels later as expected, shifting the screen 64 pixels to the left |
|
12 May 2022, 21:47 | #13 |
Registered User
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
|
Coding scrolling on AGA can be a nightmare ... but yes, once it works it feels like it was worth the many bad hours and days ... almost :-)
Whatever you do, test on real hardware as FS-UAE does not always handle AGA-scrolling right. There are issues with subpixel scrolling and with datafetch in 2x and 4x-fetchmodes: FS-UAE is fine with bitplane-pointers at addresses dividable by 2 or 4, whereas real hardware is not and will output repeated bitmap patterns. |
17 May 2022, 13:51 | #14 | |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Quote:
I think it's fixed in the latest version of WinUAE and the beta version (4) of FS-UAE, but yes, it was a bit of a downer when I ran it on my A4000. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Jurrasic Park AGA (WHDLoad) - slow scrolling | PopoCop | support.Games | 4 | 08 September 2020 12:56 |
BPLCON1 - finescrolling in AGA-mode not working? | buzzybee | support.FS-UAE | 2 | 03 June 2020 21:16 |
BPLCON1 Scroll Left & Right | DanielAllsopp | Coders. Asm / Hardware | 6 | 13 February 2020 15:01 |
Indivision 1200 AGA MK2cr scrolling question | schneidas | support.Hardware | 46 | 16 January 2018 20:20 |
TV's with proper scrolling with RGB or Indivision ECS/AGA MK1 | Yulquen74 | support.Hardware | 5 | 06 February 2017 18:10 |
|
|