๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Thomas Wopfner Sat, 11 Apr 1998 00:00
GET/PUT in QBasic 4.50
#637
Author: Thomas Wopfner
Date: Sat, 11 Apr 1998 00:00
20 lines
2050 bytes
Hi there! I have a huge problem with ModeX in QBasic 4.50: I need to
PUT a picture on the screen, but I don't have any clue how to do it! Who can
help me with this Problem? I need to PUT a picture which is stored in an
Array of the Type SINGLE. It would be great if anyone can explain me, how
GET/PUT in Qbasic works and how I can manage it to PUT in ModeX.

Thanx

--
m.wopfner@tirol.netwing.at
http://www.geocities.com/TimesSquare/Dungeon/8468
  ______           __
 /__     __\ __    |   |
      |   |  |   /  _ \    |  |
      | from S.W.D .|
      |__|__/       \__|
    T.W. from S.W.D.

PS: You don't need to answer in English if you speak German!
Re: GET/PUT in QBasic 4.50
#638
Author: Michael Rye S๏ฟฝrensen
Date: Mon, 13 Apr 1998 00:00
66 lines
3109 bytes
The get/put statement does not work in xmode, because in xmode you use a
different
addressing technique. You have to work out your own code to make it happen.
If you have build a 320x240 xmode the screen is divided into 4 plans and every
plan are therefor 80x240 of size. To change to the plan you whant to write to,
you use:

out &h3c4,2      'Index register
out &h3c5,val[plan]

where 'plan' is
plan 0 1 2 3
val   1 2 4 8

Now you need to set the pixel :

Def seg = &hA000
Poke (80 * Y + (X\4)),Color

I think I'm at your porblem now(what color to put?)

If you have stored a picture in a file and whant it on the screen, make a string
buffer that is 320 bytes long and read 320 bytes from the file (one line at the
time):

Def seg = &hA000

out &h3c4,2      'Index register

for y = 0 to 239
    for x = 0 to 319
        out &h3c5,val[x and 3]
        Poke (80 * y + (x\4)),asc(mid$(buffer$,x+1,1))
    next
next

Thats it.

If you need more code you can find some here
http://users.cybercity.dk/~bdc3729/

ms@cool.dk
-------------------------------------------------

Thomas Wopfner wrote:

> Hi there! I have a huge problem with ModeX in QBasic 4.50: I need to
> PUT a picture on the screen, but I don't have any clue how to do it! Who can
> help me with this Problem? I need to PUT a picture which is stored in an
> Array of the Type SINGLE. It would be great if anyone can explain me, how
> GET/PUT in Qbasic works and how I can manage it to PUT in ModeX.
>
> Thanx
>
> --
> m.wopfner@tirol.netwing.at
> http://www.geocities.com/TimesSquare/Dungeon/8468
>   ______           __
>  /__     __\ __    |   |
>       |   |  |   /  _ \    |  |
>       | from S.W.D .|
>       |__|__/       \__|
>     T.W. from S.W.D.
>
> PS: You don't need to answer in English if you speak German!
Re: GET/PUT in QBasic 4.50
#639
Author: Andrew Calderbank
Date: Sat, 18 Apr 1998 00:00
14 lines
1798 bytes
>Hi there! I have a huge problem with ModeX in QBasic 4.50: I need to
>PUT a picture on the screen, but I don't have any clue how to do it! Who can
>help me with this Problem? I need to PUT a picture which is stored in an
>Array of the Type SINGLE. It would be great if anyone can explain me, how
>GET/PUT in Qbasic works and how I can manage it to PUT in ModeX.
>
>Thanx
>
PUT (1,1), SINGLE
or you may need it to be
PUT (1,1), SINGLE, PSET
-- 
Andrew Calderbank
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads