[V9990] Q&A Official Thread

Страница 2/19
1 | | 3 | 4 | 5 | 6 | 7

By JohnHassink

Ambassador (5408)

Аватар пользователя JohnHassink

01-03-2016, 21:01

Kai Magazine wrote:

since those 7 k are very much needed when coding in xbasic...

Absolutely! I almost had nightmares from the dreaded
Out Of Memory
I wish I could code so extremely efficient in BASIC like you.

By Manuel

Ascended (15697)

Аватар пользователя Manuel

01-03-2016, 23:24

But wasn't the problem of gbasic that it doesn't do the P-modes?

By JohnHassink

Ambassador (5408)

Аватар пользователя JohnHassink

01-03-2016, 23:33

@ Manuel: Such as NestorBASIC does?

By Manuel

Ascended (15697)

Аватар пользователя Manuel

01-03-2016, 23:36

I mean the P-modes of the GFX9000. P1 and P2 mode, with all the sprites and scrollable planes.

By Kai Magazine

Paragon (1303)

Аватар пользователя Kai Magazine

01-03-2016, 23:58

Manuel wrote:

But wasn't the problem of gbasic that it doesn't do the P-modes?

A few days ago I found a basic code which, by using OUT's, vpoke and vdp commands enables the p1 or p2 mode.
I have yet to test it (I have to write it down character by character...), but first I have to find the thread in which I first saw this code!

By Kai Magazine

Paragon (1303)

Аватар пользователя Kai Magazine

02-03-2016, 00:02

Now I remember I saved the code into a txt file.
As I said, I do not know if it really works, I have not tested it:

10 GSCREEN 5
20 GVDP(6)=0 : GVDP(7)=0
30 rem load this graphics
40 GSET PAGE 0,0:GBLOAD "FONT.ge5",s: gvdp(25)=1 ; or 2 is not view
50 H=7:L=&HFE00 
60 out &H64,0
70 out &H63,int(L and 255)
80 out &H63,((L and &Hff00)/256) and &Hff
90 out &H63,H
100 rem gvpoke is fast 
100 rem gvpoke &L7FE00,x
110 rem gvpoke &L7FE01,Y
120 rem gvpoke &L7FE02,Spr
130 rem gvpoke &L7fe03,0
140 rem or use OUT (gout is not necessary)
150 out &H60,y
160 out &H60,sprite
170 out &H60,x
180 out &H60,informazioni ( <0> )
190 end

By Kai Magazine

Paragon (1303)

Аватар пользователя Kai Magazine

02-03-2016, 00:08

This previous code seems to enable the p1 full color sprites on gscreen5.
If it works, I will try to control the dual planes with vdp commands:

SET SCROLL (Layer A)

You can now use the "SET SCROLL x1,y1,x2,y2" commands from XBASIC. But you can also use VDP registers in this way:

X
FOR X=0 TO 511 : VDP(19)=X AND 7 : VDP(20)=X \ 8 : NEXT X

Y
FOR Y = 0 TO 255 : VDP(17) = Y : NEXT Y

SET SCROLL (Layer B)

The VDP registers for PLANE B are:

X
FOR X=0 TO 511 : VDP(23)=X AND 7 : VDP(24)=X\8 : NEXT X

Y
FOR Y=0 TO 255 : VDP(21)=Y : NEXT Y

By Kai Magazine

Paragon (1303)

Аватар пользователя Kai Magazine

02-03-2016, 00:11

If vdp commands do not work with gbasic + turbobasic (maybe gvdp is necessary and turbobasic cannot handle gvdp) then I will try to find it's OUT command equivalent.

By tvalenca

Paladin (728)

Аватар пользователя tvalenca

02-03-2016, 05:20

Kai Magazine wrote:

I also see that, loading the full powerbasic on a turbo-r leaves 18k free of basic memory.
But loading gbasic and regular xbasic leaves 25k of free basic!
so it would be EVEN BETTER to be able to use gbasic + xbasic GFX9K instead of powerbasic since those 7 k are very much needed when coding in xbasic...

Well, actually not in my case, because I don't have interest in V9990 bitmap modes for now... I'm trying to work with P1 mode and its 2 planes and 16 sprites per scan line.

So, for now, i'm working with plain basic, back and forth to PowerBASIC to see how some functions work.

By hit9918

Prophet (2866)

Аватар пользователя hit9918

02-03-2016, 15:16

when in doubt, take a BASIC that is fast and do the 9990 with OUT.
The bitmap mode has no sprites, it needs going blitter.

Страница 2/19
1 | | 3 | 4 | 5 | 6 | 7