English Amiga Board


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

 
 
Thread Tools
Old 04 July 2013, 22:12   #1
PiCiJi
Registered User
 
Join Date: Sep 2003
Location: germany
Age: 42
Posts: 265
relation between diwstrt and ddfstart

I have some problems understanding the relation between diwstrt and ddfstart.

diwstart defines the screen area in use. The outside part is displayed in background color.

ddfstart defines the scanline position where bitplane data fetch is started.

Is the fetched data displayed directly at beginning of the screen area defined by diwstart or is ddfstart directly related to a screen position doesn't matter if it is hidden or not by diwstart?
PiCiJi is offline  
Old 06 July 2013, 19:15   #2
PiCiJi
Registered User
 
Join Date: Sep 2003
Location: germany
Age: 42
Posts: 265
I have read the whole playfield chapter again. I am sure the bitplane fetch is related to screen position.

typical: 320 pixel
diw: 0x81 <-> 0xc1 (0x1c1)
ddf: 0x38 <-> D0(D7)

max: 368 pixel (overscan for old monitor, no border)
diw: 0x61 <-> 0xd1 (0x1d1)
ddf: 0x28 <-> D8(E7)

draw times first pixel (5 color clocks after 8 clock block fetch)
hpos: 0x45 -> first left pixel draw pos for typical 320 pixel display
hpos: 0x35 -> first left pixel draw pos for maximum overscan (no border)

if monitor display is adjusted to show all 368 pixel a 320 pixel display should not be shown centered. (32 pixel left border, 16 pixel right border) ?
The first 2 possible 8 clock fetches, means ddf: 0x18, 0x20 should be pretty useless ? ... maybe a ddf 0x20 for h-scroll

Last edited by PiCiJi; 06 July 2013 at 19:27.
PiCiJi is offline  
Old 06 July 2013, 19:50   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,630
Yes, DDF and DIW are totally independent. DDF = DMA position (note that DDFSTRT is not restricted to divisible by 8 values, other values do work but can cause bitplane delays to work strangely), DIW = display window position.

I don't remember how far leftmost overscan is positioned.

EDIT: Forgot to add: Note that DDFSTOP = "one more complete bitplane cycle diagram left to fetch" -> last DMA "standard" fetch position is 0xDF, not 0xD7.
Toni Wilen is offline  
Old 06 July 2013, 21:14   #4
PiCiJi
Registered User
 
Join Date: Sep 2003
Location: germany
Age: 42
Posts: 265
Thanks

Quote:
Originally Posted by Toni Wilen
last DMA "standard" fetch position is 0xDF, not 0xD7
yes a typo.
PiCiJi is offline  
Old 08 July 2013, 19:28   #5
Photon
Moderator

Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,931
The easiest way to understand it is to go from the standard values and modify them. DDFSTRT=$38 -> DIWSTRT $81. For each 16px you add/subtract from DIWSTRT, add/subtract 8 from DDFSTRT. That ensures that your copperlist will work 100% in all modes on all machines.

DIW is just the clipping rectangle for the actually by DMA fetched bitplane-data from memory. It can be larger or smaller than the DDF DMA start/stop.

Here are some cross-model overscan tests.
Photon is offline  
Old 16 July 2013, 00:16   #6
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,808
To give a small example. Here you chose the display width (DISPW), height (DISPH) and the start of the display window (HSTART, VSTART). The rest is calculated:

Code:
; display dimensions
DISPW           equ     320
DISPH           equ     240

; display window in raster coordinates (HSTART must be odd)
HSTART          equ     129
VSTART          equ     36
VEND            equ     VSTART+DISPH

; normal display data fetch start/stop (without scrolling)
DFETCHSTART     equ     HSTART/2-8
DFETCHSTOP      equ     DFETCHSTART+8*((DISPW/16)-1)
When you want to do horizontal soft-scrolling you have to fetch one more word, before the display starts. Example setup (a6 = $dff000):
Code:
        move.w  #DFETCHSTART-(16/2),DDFSTRT(a6)
        move.w  #DFETCHSTOP,DDFSTOP(a6)
        move.w  #(VSTART&$ff)<<8|(HSTART&$ff),DIWSTRT(a6)
        move.w  #(VEND&$ff)<<8|((HSTART+DISPW)&$ff),DIWSTOP(a6)
phx is offline  
Old 25 August 2013, 20:21   #7
PiCiJi
Registered User
 
Join Date: Sep 2003
Location: germany
Age: 42
Posts: 265
Quote:
Originally Posted by Photon
DIW is just the clipping rectangle for the actually by DMA fetched bitplane-data from memory. It can be larger or smaller than the DDF DMA start/stop.
Yes I know that DIW is independent from DDF for left/right clipping. I would suppose it behaves the same for top/bottom clipping?

So reducing the display height doesn't disable DDF fetch for non displayed lines (outside of clip) automatically ? You have to disable bit plane fetch for the outside area by yourself if you want more work cycles for cpu?
PiCiJi is offline  
Old 25 August 2013, 20:32   #8
Photon
Moderator

Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,931
No, DMA is off until the top vertical line has been reached, and is turned off after the last vertical line has been displayed. You should set it to the very top and bottom "border blank" of your screen, and if you need to turn bitplanes off for a vertical section in the middle of the screen, use BPLCON0.
Photon is offline  
Old 26 August 2013, 20:56   #9
PiCiJi
Registered User
 
Join Date: Sep 2003
Location: germany
Age: 42
Posts: 265
Quote:
Originally Posted by Photon
No, DMA is off until the top vertical line has been reached, and is turned off after the last vertical line has been displayed. You should set it to the very top and bottom "border blank" of your screen, and if you need to turn bitplanes off for a vertical section in the middle of the screen, use BPLCON0
good to know. Could be interesting what happens by changing the vertical DIW midline and disable the currently rendered line.
PiCiJi is offline  
Old 26 August 2013, 21:19   #10
Photon
Moderator

Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,931
My prediction is that nothing will happen to the display window top and bottom and that bitplanes won't be turned off until DDFSTOP. Not that I've ever tried it, it's just fun to know if you got the right idea. Try turning the bitplane DMA completely off also, maybe that will reset things and make the DIW latches receptive again.
Photon 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
Tidying up the GUI with relation to display settings antonvaltaz request.UAE Wishlist 30 20 November 2010 10:47

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 02:59.


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