D-Bug & Automation Forum
D-Bug & Automation Forum >> Coding >> Falcon: using ST palette in non-ST resolutions
http://d-bug.mooo.com/dbugforums/cgi-bin/yabb2/YaBB.pl?num=1206128700

Message started by Klapauzius on 21.03.08 at 19:44:59

Title: Re: Falcon: using ST palette in non-ST resolutions
Post by ggn on 22.03.08 at 09:34:38
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:

[code].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[/code]

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 ;))

D-Bug & Automation Forum » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2024. All Rights Reserved.