27 January 2020, 13:50 | #1 |
Registered User
Join Date: Jan 2019
Location: Brisbane
Posts: 99
|
FMODE 0 to FMODE 1
Hey all
I am trying to move my game to AGA from ECS version, and would like to set the FMODE now higher than the Normal Fetch. I am trying just $01 for now... I am seeing visual error when setting $01, this is looking much like what would be a bad modulo.... All works well with Normal Fetch. I have ensured the following which I can find is required for FMODE $01 Bitmap data located on an 8 byte aligned memory address. Bitmap data bytes width is multiple of 8 bytes Also modulos are multiple of 8 bytes Cooper list is also located on 8 byte aligned memory address DDFSTART is #$30 DDFSTOP is #$D0 Not sure where else to look? Is there something I missed that is still needed. Changing FMODE back to 0 with all above changes, things are looking fine . |
27 January 2020, 13:58 | #2 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
You have to adjust the modulo depending on what fetch mode you are in, try setting your bitplane modulo but with -6 or -4.
There is a calculation but i dont have it to hand atm. |
27 January 2020, 14:36 | #3 | |
Registered User
Join Date: Jan 2019
Location: Brisbane
Posts: 99
|
Quote:
I realized that having original style horizontal scrolling running in FMODE 1 that would no longer be appropriate and could be causing issues? |
|
27 January 2020, 14:53 | #4 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
This is from memory, so it could be wrong but here goes: AFAIK the modulo for FMODE 4x is -8 and FMODE 2x is -4.
I remember having similar issues when I set up an FMODE 4x screen and it turned out that my bitplane data was incorrectly aligned. My first step would be to check if the individual bitplane pointers are all aligned to 4 bytes (for FMODE 2x, or 8 bytes if using FMODE 4x). In my case it turned out they were not because I added a scrolling offset to the bitplane pointers. Remember, when horizontally scrolling an FMODE 2x/4x screen you need to scroll for 32/64 pixels rather than just 16 and update the bitplane pointers by 4 or 8 bytes for the new offsets rather than just 2 bytes. Another error I made was not updating the Blitter modulo's (I had made my bitmap wider because of the new alignment, but I forgot to update the constants I used for the Blitter). Last but not least, I had the wrong DDFSTOP, which also caused issues that looked like wrong modulo values. Last edited by roondar; 27 January 2020 at 14:59. |
27 January 2020, 15:02 | #5 | |
Registered User
Join Date: Jan 2019
Location: Brisbane
Posts: 99
|
Quote:
You probably are on to it with the scroll offset . I am adjusting byte offsets on even (but multiple of 2) bytes.. So I will look in to that. For now I will just disable original scroll code completely and reset any offsets to 0. I had hoped old scroll code would continue to function "as is". Back to it tomorrow night. Thanks for the info chaps. |
|
27 January 2020, 15:56 | #6 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Set your DDFSTOP to $c8, this will fix your display problems too without having to mess with the modulos.
|
27 January 2020, 17:18 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
|
Yeah, you only waste DMA time (and possible trigger bitplane DMA to refresh slot conflicts = screen gets very corrupted) if you try to fix the display by adjusting modulo instead of using correct DDFSTOP.
|
27 January 2020, 17:56 | #8 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Quote:
I remember that my real Amiga alway crashed when I accidentally made these conditions (with code in chip or fake fast ram). Just for a even more real emulation and to make the programmer conscious if the glitches are due to other reasons |
|
28 January 2020, 12:01 | #9 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Huh... I need to go and change my DDFSTOP setting in AGA code then. I could've sworn I read the "you need to change modulo to -4/-8 for AGA FMODE 2x/4x" in several places and always assumed that was just the way it was.
Good to learn something new, so thanks for the info. |
28 January 2020, 13:16 | #10 | |
Registered User
Join Date: Jan 2019
Location: Brisbane
Posts: 99
|
Quote:
Headsup, Thanks Roondar, it was exactly this. In conjunction I had some padding being added at runtime to the bitplane pointers to avoid having to do small amounts of clipping on blits. Adding some validation to where I wrote the bitplane pointers picked it right up. All good now! Thanks for the learned tips. |
|
28 January 2020, 13:20 | #11 |
Registered User
Join Date: Jan 2019
Location: Brisbane
Posts: 99
|
Thank you for this advice, I have update DDFSTOP, but did still have to update Modulos. I don't quite understand these registers and how they work properly, so it's time to do some reading.
|
28 January 2020, 16:37 | #12 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
No problem, glad to be of assistance
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DMA Time Slot Allocation / FMODE=1 Overrun | ross | Coders. Asm / Hardware | 5 | 03 December 2017 17:06 |
FMODE=2 is useless? | Toni Wilen | Coders. Asm / Hardware | 8 | 01 May 2017 22:07 |
|
|