Generally, you can use a tool called "screenspain" (available from
www.dhs.nu) to setup a custom resolution, and it can spit out a source file with all the variables you need to shove on the videl.
Here's a part of my standard startup code (coincidentally "borrowed" from Evil/DHS' demo engine
) which sets up the videl for 320x200 for rgb and vga:
.f030_vidsetup: move.w #$59,-(SP) ;check monitortype (falcon)
trap #14 ;
addq.l #2,SP ;
cmp.w #1,D0 ;if 1 = rgb
beq.s .rgb ;
cmp.w #3,D0 ;if 3 = tv
beq.s .rgb ;otherwise assume vga (ignore mono..)
.vga60: move.l #$170012,$FFFF8282.w ;falcon 60Hz vga
move.l #$01020E,$FFFF8286.w ;
move.l #$0D0012,$FFFF828A.w ;
move.l #$041903FF,$FFFF82A2.w ;
move.l #$3F008D,$FFFF82A6.w ;
move.l #$03AD0415,$FFFF82AA.w ;
move.w #$0200,$FFFF820A.w ;
move.w #$0186,$FFFF82C0.w ;
clr.w $FFFF8266.w ;
clr.b $FFFF8260.w ;
move.w #$05,$FFFF82C2.w ;
move.w #$50,$FFFF8210.w ;
bra.s .fvideo_done
.rgb: move.l #$300027,$FFFF8282.w ;falcon 50Hz rgb
move.l #$070229,$FFFF8286.w ;
move.l #$1E002A,$FFFF828A.w ;
move.l #$02710265,$FFFF82A2.w ;
move.l #$2F0081,$FFFF82A6.w ;
move.l #$0211026B,$FFFF82AA.w ;
move.w #$0200,$FFFF820A.w ;
move.w #$0185,$FFFF82C0.w ;
clr.w $FFFF8266.w ;
clr.b $FFFF8260.w ;
clr.w $FFFF82C2.w ;
move.w #$50,$FFFF8210.w ;
.fvideo_done: rts
But, like I wrote above, play around with screenspain if you specifically need 320x240. IIRC if you can setup the resolution you want from the desktop, you then load screenspain and create the videl variables from that resolution!
Oh, and if someone could explain exactly how this thing works, please be our guest! (German is
not our forte
)