SoLo2 wrote:
Hello!
I am new to the Amiga World! 
Testing a little assembler I
got to this code, that sets the
screen I will be using.
So, it seems like it _must_ be
reinitialized at each screen refresh,
true?
That means that it can be initialized
in the copper list, or otherwise in a
separate routine,
that writes directly to the registers.
Welcome to amiga.org!
Of course the hw registers don't _have_ to be reinitialised at each refresh - you can set them just once and they will stay that way until you change them.
It's just handy to have them in the copperlist.
The problem arises when changing
the "diwstrt" and "diwstop" registers.
If I try using horizontal (x) start and
end coordinates that are more to the
left, for example $xx51 and $xx91,
(this would start,stop at 079,145+256)
then the effective visible line shrinks
from 320 down to 272. The virtual line
seems to remain the correct 320, but
you see I set the modulo registers
($0108, $010a) to zero, to not have a
bigger, virtual line...
Why? who knows?
CopperList
dc.w $0100,$1200 ;bplcon0 set 1 plane, color
dc.w $0108,$0000 ;bpl1mod offset to next line
dc.w $010a,$0000 ;bpl2mod offset to next line
dc.w $008e,$3081 ;diwstrt start coords 048,129
dc.w $0090,$30c1 ;diwstop stop coords 304,449
; 320 (normal) visible line width
dc.w $0092,$0038 ;ddfstrt L margin normal (horz)
dc.w $0094,$00d0 ;ddfstop R margin normal (horz)
; to point to bitplane 1
dc.w $00e0 ;bitplane0 hi
hi0
dc.w $0000
dc.w $00e2 ;bitplane1 lo
lo0
dc.w $0000
dc.w $0182,$0ff0 ;color01
I am using excellent UAE-0.8.21
emulator under Linux. Great!
SoLo2
I really have no clue. Why are you messing with diwstrt and diwstop anyway? I never understood them and didn't really try to - just found values that worked and used those same values for ever - dc.w $8e,$2c81,$90,$2cc1 - centred for every (Pal) TV or monitor I tried.
Just thinking about this makes me remember how much fun Amiga coding used to be. I suddenly want to buy another A1200 and write a parallax starfield with a sine-scroller and glenz-vectors.
I never had anywhere near so much fun coding on XBox, GC, PS2, or DC. (PS1 was cool to code on also.)