Sorry for replying that late.
I never created a NTSC display thus I did guess that your chosen values were correctly. Unfortunately, it turned out the weren't.
Please read the chapter for Playfields (hardware reference manual) again, then you know that an ordinary display window of size 320x200 (NTSC) or 320x256 (PAL) starts at 129;41. It ends for a NTSC display window (screen) at 449;241 (129+320;41+200) or for PAL at 449;297 (129+320;41+256).
If you choose overscan dimensions instead the starting point is 100;26 (DIWSTRT) and you cannot go lower this value due to the interrupts.
Next, any other value depends on DIWSTRT and DIWSTOP, hence DDFSTRT and DDFSTOP were also incorrect in your example and thus I believe that this caused the graphical corruptions, not the assembler, since Devpac supports sections which will be put to CHIP-RAM, as you know.
I modified your example to use default NTSC values.
Hope you don't see any more those graphical corruptions.
Regards
OUTPUT RAM:test
include hardware/custom.i
include graphics/gfxbase.i
include exec/exec_lib.i
include graphics/graphics_lib.i
SECTION Text,CODE
main:
move.l #scr,D0 ;Load address of our screen in d0
move.w D0,pl1l ;Load low scr addr in Copper list
swap D0 ;Swap address in d0
move.w D0,pl1h ;Load high scr addr in Copper list
move.l 4.w,A6 ;ExecBase
moveq #33,D0
lea GfxName(pc),A1
jsr _LVOOpenLibrary(A6) ;Open GFX library
lea _GfxBase(pc),A0
move.l D0,(A0)
beq.b out
* Remember current view
movea.l D0,A6
lea _OldCop(pc),A0
move.l gb_LOFlist(A6),(A0) ; Current copper list being used
lea _OldView(pc),A0
move.l gb_ActiView(A6),(A0) ; Current view being viewed
* Reset the view
suba.l A1,A1 ; NULL
jsr _LVOLoadView(A6) ; Reset whole display!
jsr _LVOWaitTOF(A6) ; Wait until system has done
jsr _LVOWaitTOF(A6) ; all changes
move.l #CopperList,$DFF080 ;Load Copper list in Copper
Loop: btst #6,$BFE001 ;Test left mouse button
bne.b Loop ;If not pressed keep in loop
endit:
* Reset to remembered state the view (bring back Intuition)
movea.l _GfxBase(pc),A6
lea $DFF000,A5
move.l gb_copinit(A6),cop1lc(A5)
move.w #0,copjmp1(A5)
move.w #$83E0,dmacon(A5)
movea.l _OldView(pc),A1
move.l _OldCop(pc),gb_LOFlist(A6)
jsr _LVOLoadView(A6)
movea.l A6,A1
movea.l 4.w,A6
jsr _LVOCloseLibrary(A6)
out:
rts
_GfxBase:
ds.l 1
_OldCop:
ds.l 1
_OldView:
ds.l 1
GfxName:
dc.b "graphics.library",0
SECTION Screen,DATA_C
* Settings for a plain NTSC display; screen: 320x200 pixels
CopperList:
dc.w diwstrt,$2981 ;Top left corner of the scr (129;41 NTSC *or* PAL!)
dc.w diwstop,$F1C1 ;Bottom right corner scr (449;241 NTSC - for PAL use:
* 449,297)
dc.w ddfstrt,$38 ;Data fetch start ($2981 & $FF / 2 - 8.5)
dc.w ddfstop,$D0 ;Data fetch stop ($38 + (320 / 2 - 8)
dc.w bplcon0,$1000 ;Set 1 bitplane lo-res scr
dc.w bplcon1,$0 ;No horizontal offset
dc.w color+0,$0 ;Black background color
dc.w color+2,$FFF ;White foreground color
dc.w bplpt+0 ;Bitplane low high word
pl1h:
dc.w 0
dc.w bplpt+2 ;Bitplane low word
pl1l:
dc.w 0
dc.w $FFFF,$FFFE ;End of copper list
scr:
dcb.b 320/8*200,$55 ; Block of n bytes filled with a pattern
END