Bitmap screen and Omega Race

Basic and Machine Language

Moderator: Moderators

funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

hello, good day.
there is an error in the trse.

what can you do for it?

greeting
Attachments
error.jpg
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

tis is one plot in basic:
----------------------------------------
10200 rem plot
10230 gosub 10400
10240 poke ad,peek(ad) or ma
10250 return
10400 ad=4352
10410 ay=int(y/16)*336+(y and 15)
10420 ad=ad+16*int(x/8)+ay
10430 ma=2^(7-(x and 7))
10440 return
----------------------------------------
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

I did that in vforth.

greeting
Attachments
sinplot.jpg
User avatar
AndyH
Vic 20 Afficionado
Posts: 380
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Bitmap screen and Omega Race

Post by AndyH »

That vforth looks interesting.
funkheld wrote: Mon Nov 25, 2019 9:40 am hello, good day.
there is an error in the trse.

what can you do for it?

greeting
You might not have the latest version '<<' was added recently, so it is possible it is that. If you a adventurous, the very, very latest is on GitHub.
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 380
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Bitmap screen and Omega Race

Post by AndyH »

The new commands (that will be available in the new year) adds some useful methods. If you wanted to plot that wave you could use

Code: Select all

	vbmSetDisplayMode();
	vbmClear(0);
	
	vbmDrawDot(x,y);
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

please show me the newest version running under window, ihne i have to make a new trse.

greeting
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

hello thanks.
is ok with trse.

I'm glad that now also the vic20 is considered in the future.

greeting
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

if that can be implemented on the fast on plot in trse, that would be fine.
----------------------------------------
10200 rem plot
10230 gosub 10400
10240 poke ad,peek(ad) or ma
10250 return
10400 ad=4352
10410 ay=int(y/16)*336+(y and 15)
10420 ad=ad+16*int(x/8)+ay
10430 ma=2^(7-(x and 7))
10440 return
----------------------------------------

and :
RightBitShift/LeftBitShift .. expand 16 bits then you can work in the graphics mode at vic20 synonymous.
 

greeting
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

I compiled this program with target: 8191 and could start it with sys8192.

this not funktion (grafik vic20)
------------------------------------
poke(^36867,0,151);
poke(^36866,0,21);
poke(^36869,0,204);
poke(^36864,0,14);
-------------------------------------

this is the start in the asm : -
-----------------------------------------------
ORG $01

schiebechar
jmp block41
charset dc.b $018, $018, $03c, $07e, $0ff, $018, $024, $042
dc.b $0ff, $081, $081, $081, $081, $081, $081, $0ff
......
.......

-----------------------------------------------


thanks
greeting

Code: Select all

program schiebechar;

var
charset : array[16] of byte = ( 24,24,60,126,255,24,36,66,255,129,129,129,129,129,129,255 );

a, b : byte;
zpcharz: pointer;
zpscr: pointer;
zpcol: pointer;

begin
  ClearScreen(white, screen_col_loc);
    
  zpcharz:=5120;
  
  zpscr:=4096;
  zpcol:=37888;
  
  poke(^37139,0,0);
  poke(^37154,0,127);
  poke(^36869,0,205);
  poke(^36867,0,151);
    
	for b:=0 to 16 do
	begin
		zpcharz[b]:=charset[b];
	end;

  a:=5;
  zpscr[0]:=0;
  zpcol[0]:=5;
		 
end.
Attachments
start.jpg
User avatar
AndyH
Vic 20 Afficionado
Posts: 380
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Bitmap screen and Omega Race

Post by AndyH »

Ctrl + R will start the program in vice and there is a basic stub that will do the sys call for you, unless you turn that off in the project settings.

Also, after definescreen() you will have access to a built in zero page pointer called ScreenMemory which you can use to manipulate the screen (or colour) memory to save allocating an additional zero page pointer.

Not sure how you got org $01 in the ASM? If you can upload the project I can take a closer look.
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

hello thanks.

$1FFF start ist ok .
8191 not.

then sys8192 ok ;

greeting
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

what is that.
please explain that to me once:

Thank you.
greeting
----------------------------------------------
Also, after definescreen() you will have access to a built in zero page pointer called ScreenMemory which you can use to manipulate the screen (or colour) memory to save allocating an additional zero page pointer.
----------------------------------------------
User avatar
AndyH
Vic 20 Afficionado
Posts: 380
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Bitmap screen and Omega Race

Post by AndyH »

funkheld wrote: Tue Nov 26, 2019 11:41 am what is that.
please explain that to me once:

Thank you.
greeting
----------------------------------------------
Also, after definescreen() you will have access to a built in zero page pointer called ScreenMemory which you can use to manipulate the screen (or colour) memory to save allocating an additional zero page pointer.
----------------------------------------------
try

definescreen(); // initialises a free ZP pointer called screenmemory - many methods use it

screenmemory := $1000; // you can use it also!
screenmemory[0] := 1;
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

hello thanks.

greeting.
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: Bitmap screen and Omega Race

Post by funkheld »

another question.
I want to copy code to a disk and I'm loading memory into the program again.
how does that go with trse please?
Thank you.
greeting
Post Reply