English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 04 October 2023, 14:58   #1
17BitRetro
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
17BitRetro is offline  
Old 19 October 2023, 20:26   #2
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 190
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
Rock'n Roll is offline  
Old 08 December 2023, 12:54   #3
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 190
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
What about fmode=$1,2 (32-bit fetch)?
Rock'n Roll is offline  
Old 12 December 2023, 18:31   #4
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 190
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)?
Rock'n Roll is offline  
Old 12 December 2023, 20:48   #5
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,050
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
a/b is online now  
Old 12 December 2023, 21:23   #6
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 190
perfect, now I have something to read.
Rock'n Roll is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:13.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12084 seconds with 13 queries