04 October 2023, 14:58 | #1 |
Registered User
Join Date: Mar 2021
Location: London
Posts: 11
|
Screen Position with Scrolling, Sprites and 4X
Hi all,
I'm attempting to put an AGA game together. I've settled with a 256 wide, dual playfield (16x16cols) screen, with 8 Sprites and FMode 4x @50hz. It's working out OK, plenty of raster time left, nice and smooth scrolling etc.. but one thing that really bugs me is the shift to the right with the whole display. Reading the forums here I've played around with recreating a PAL screen mode (with BEAMCON0, HSSTRT...etc) and have managed to adjust the position with a shift back to the left on my old TV / A1200 ...but it doesn't align when using OSSC, and needs different settings for WinUAE. .. and is mega slow in FS-UAE.. which makes me think that this isn't the way to do it. There might be a trick I'm missing, or I'm running into HW limitations and should just accept the shift without the BEAMCON0 settings, or drop the FMode back. Any comments appreciated. My AGA chipset knowledge is lacking! DDFSTRT=$38, DDFSTOP=$A0, DIWSTRT=$2CC1, DIWSTOP=$1CC1 |
19 October 2023, 20:26 | #2 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 212
|
Hmm?
DDFSTRT=$38, DDFSTOP=$A0, DIWSTRT=$2CC1, DIWSTOP=$1CC1 ; => DDFSTRT=$58, DDFSTOP=$D0 width=256, height=240 try this: DDFSTRT=$48, DDFSTOP=$C0, DIWSTRT=$2CA1, DIWSTOP=$1CA1 DDFSTRT=$40, DDFSTOP=$B8, DIWSTRT=$2C91, DIWSTOP=$1C91 |
08 December 2023, 12:54 | #3 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 212
|
How to calculate the correct ddfstrt, ddfstop values for fmode 1,2,3 (2x, 2x, 4x) for any screenposition and resolution?
I read anywhere: Code:
fmode=0 (normal 16-bit fetch) dc.w ddfstrt,$0038 dc.w ddfstop,$00d0 fmode=$3 (64-bit fetch) dc.w ddfstrt,$0038 dc.w ddfstop,$00a0 |
12 December 2023, 18:31 | #4 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 212
|
I search for a general mathematical formula to calculate the ddf-values especially for FMODE based on DIWSTRT/DIWSTOP, like this:
DIWSTRT=$2c81 DIWSTOP=$2cc1 OCS/ECS lowres: DDFSTRT=(DIWSTRT-(16px)-1)/2 DDFSTRT=($81-(16)-1)/2=56=$38 hires: DDFSTRT=(DIWSTRT-(8px)-1)/2 DDFSTRT=($81-(8)-1)/2=60=$3C AGA lowres: DDFSTOP=((DIWSTOP-(fetch_width)-1)/2)-8 DDFSTOP=(($1c1-(1x16px)-1)/2)-8 =208=$d0 ; 1x (fetch=0) 16Bit ; same value for 2x (fetch=1,2) 32Bit DDFSTOP=$c8 ; 4x (fetch=3) 64Bit ; 8px earlier possible hires: DDFSTOP=((DIWSTOP-(fetch_width)-1)/2)-4 DDFSTOP=(($1c1-(1x16px)-1)/2)-4 =212=$d4 ; 1x (fetch=0) 16Bit ; same value for 2x (fetch=1,2) 32Bit DDFSTOP=$cc ; 4x (fetch=3) 64Bit ; 8px earlier possible My testresult is, only for a fetch=3 the DDFSTOP value can be set 8 pixels earlier. remark: all DDF-results are to align like this: lowres: DDFSTRT & $FFF8 hires: DDFSTRT & $FFFC Maybe someone can check and confirm this or and can give more information about general DDFSTRT/DDFSTOP calculation (with FMODE)? |
12 December 2023, 20:48 | #5 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,091
|
OCS/ECS/AGA DMA fetch calcs with C code in this thread, and if you prefer optimized asm it's on the last page:
https://eab.abime.net/showthread.php?t=111329 |
12 December 2023, 21:23 | #6 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 212
|
perfect, now I have something to read.
|
13 July 2024, 01:01 | #7 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,755
|
Quote:
AGA with all sprites and 4x requires a shift to the right. On top of this, TVs typically have an 8-13px built in shift to the right. If you program the HW, it's best to have a CRT monitor as reference. All else will be vendor specific. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smooth H-scrolling platform game in AMOS, screen copy vs screen offset? | Damiga | Coders. AMOS | 32 | 24 October 2023 19:00 |
Horizontal Scrolling with 4x Fetch and all sprites | mcgeezer | Coders. Asm / Hardware | 10 | 04 December 2018 23:58 |
Parallax scrolling layer with sprites possible? | phx | Coders. Asm / Hardware | 21 | 12 July 2015 18:15 |
WHDLOAD and Overscan Screen Position | ancalimon | support.Apps | 1 | 04 January 2012 13:35 |
Small sprites on a big screen | alkis21 | Nostalgia & memories | 21 | 26 August 2002 08:45 |
|
|