From: authentic@tip.nl (Rick)
Subject: Re: Multi-plane video modes
dave@powerbasic.com (Dave Navarro) wrote:
>In article , pb@excelsior.xs4all.nl.REMOVE-
>THIS says...
>> Help!
>>
>> Does anyone know at which memory segment/offset the various planes
>> are stored for screen 12? (And, if possible, other screens too?)
>They are all at A000h, but you have to switch each bank into that memory
>address individually through OUT calls. I'll see if I can find some source
>for you.
>--Dave
He Dave are you really trying to match up to the asshole message or
what ?? Trying to look up "hello world" too I guess ???
Rick[formerly basicguru hahahaha]
Here we are( I did not took the time to get the overhead
out):
DECLARE SUB load12 (doshandle%)
DECLARE SUB store12 (doshandle%)
DEFINT A-Z
DECLARE SUB interrupt ()
DECLARE SUB interruptx ()
DECLARE SUB setpal (colorvalue%, rgbvalues%())
DECLARE SUB getpal (colorvalue%, rgbvalues%())
DECLARE SUB waitretrace ()
DIM SHARED intx(60): DIM SHARED regs(10): CALL interrupt
CONST intnr = 0, ax = 1, bx = 2, cx = 3, dx = 4, bp = 5, si = 6, ds =
7
CONST di = 8, es = 9, flag = 10
SCREEN 12
FOR i = 0 TO 5
CIRCLE (50 + i * 10, 100 + i * 20), 50 + i * 5, 3 + i
NEXT
DIM rgb(256, 3)
'get pallette
FOR i = 0 TO 256
OUT &H3C7, i
rgb(i, 0) = INP(&H3C9)
rgb(i, 1) = INP(&H3C9)
rgb(i, 2) = INP(&H3C9)
NEXT
'Set all to black(or any other)
CALL waitretrace
FOR i = 0 TO 256
OUT &H3C8, i
OUT &H3C9, 5
OUT &H3C9, 5
OUT &H3C9, 5
NEXT
SLEEP 1:
DIM tmp(3)
'Fade up
FOR i = 0 TO 63
CALL waitretrace
FOR j = 0 TO 255 'without background
CALL getpal(j, tmp())
IF tmp(0) < rgb(j, 0) AND tmp(0) < 64 THEN tmp(0) = tmp(0) + 1
IF tmp(1) < rgb(j, 1) AND tmp(0) < 64 THEN tmp(1) = tmp(1) + 1
IF tmp(2) < rgb(j, 2) AND tmp(0) < 64 THEN tmp(2) = tmp(2) + 1
CALL setpal(j, tmp())
NEXT
CALL waitretrace
NEXT
SLEEP 1
'fade out
FOR i = 0 TO 63
CALL waitretrace
FOR j = 1 TO 255 'with background!
CALL getpal(j, tmp())
IF tmp(0) > 0 THEN tmp(0) = tmp(0) - 1
IF tmp(1) > 0 THEN tmp(1) = tmp(1) - 1
Continued with next message...
*** QwkNews (tm) v2.1
* [TN71] Internet Newsgroup: alt.lang.powerbasic
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|