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: Falcon: using ST palette in non-ST resolutions
Post by Klapauzius on 21.03.08 at 19:44:59
I'm trying to get the Videl to use the ST palette registers on a 320x240x4bp screen.
I've already toyed around with various settings in the $8266.w, $8260.w registers, but to no avail - the Videl seems to insist on using the Falcon palette registers.

Is it possible at all to use the ST palette on a non-ST compatible resolution?

TIA for help... :-)

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

Title: Re: Falcon: using ST palette in non-ST resolutions
Post by Klapauzius on 22.03.08 at 10:23:15
Thanks ggn. :-)

Actually, I have no probs setting a 320x240 resolution on the Falcon.
I just can't seem to be able to use the ST palette at $8240.w for this resolution. As soon as I enter a non ST compatible rez, the Falcon palette ($9800.w) is used.

Reason I ask is that I have an ST game that uses the lower border (Pang) and I want to fix it for the Falcon. It already works (kinda) on the Falcon with a 320x240 screen but the colours are of course completely off. Sure, it would be possible to fix this, but I would have to patch an awful lot of code and colour values to force it to use the Falcon palette.
So before starting with this, I thought I'd better ask for an alternate solution. :-)

Ok, I'll have a look at screenspain - wanted to do this for some time anyway. ;-)

Title: Re: Falcon: using ST palette in non-ST resolutions
Post by Klapauzius on 22.03.08 at 14:41:44
Checked Screenspain ..... and it actually does the trick!  8-)

The rasters are still all scrambled up etc., but at least I got a solid base to work from now.

Cool! :-)

Title: Re: Falcon: using ST palette in non-ST resolutions
Post by CJ on 22.03.08 at 17:27:01
Cool, I like Pang :)

So, Wings of Death next? :P

Title: Re: Falcon: using ST palette in non-ST resolutions
Post by karlm on 30.03.08 at 04:01:22
I asked this a while ago and while screenspain does the job, it doesn't explain -how- it works.  mikro (formerly from mystic bytes) actually wrote a videl guide that explains the chip and how to program it low level ...

I really must sit down and learn some 680x0 code .... but anyway:

http://ihrisko.org/~mikro/docs/mikro/videl.html

but I see Pang is already done so maybe I am too slow!? :)

cheers


karlm

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