Jump to content
funkheld

explanatory demo for the new pm commands in fastbasic.

Recommended Posts

Hi!

2 hours ago, funkheld said:

Hi good afternoon.
i am looking for an explanatory demo for the new pm commands in fastbasic.

Don't know if it is explanatory, bit at least is simpler than the "gameloop.bas" posted before: https://github.com/dmsc/fastbasic/blob/master/samples/int/pmtest.bas

 

Also, you can look at the manual, see at https://github.com/dmsc/fastbasic/blob/master/manual.md , search for PMGRAPHICS and PMHPOS.

 

Have Fun!

Share this post


Link to post
Share on other sites

Hi again

3 hours ago, funkheld said:

hello thanks for the info.

 

 

Here are two small P/M demonstration programs that i ported fro BASIC A+ to FastBasic, "toothbrush" and a simple game "eggs".

 

Have Fun!

 

BRUSH.FB EGGS.FB

  • Like 1

Share this post


Link to post
Share on other sites

@funkheld, attached is a FastBasic file that uses three players. I inserted a lot of comments for someone on FaceBook that is now using FastBasic. It is a portion of a benchmarking suite for comparing the different BASICs we now have (video will be on YouTube, one of these first days).

 

logo8c.fab

Share this post


Link to post
Share on other sites

Hi!

10 hours ago, 777ismyname said:

@funkheld, attached is a FastBasic file that uses three players. I inserted a lot of comments for someone on FaceBook that is now using FastBasic. It is a portion of a benchmarking suite for comparing the different BASICs we now have (video will be on YouTube, one of these first days).

 

logo8c.fab 5.83 kB · 8 downloads

 

Great, more simple examples are always welcomed.

 

You can replace "WHILE PEEK(764)=255" on line 153 with "WHILE NOT KEY()" - or as I prefer, use "REPEAT" there and replace the "WEND" with "UNTIL KEY()".

 

You could also use "SETCOLOR -4,0,CC:SETCOLOR -3,0,CC+3" and "SETCOLOR -2,0,CC+6:SETCOLOR -1,0,CC+9" in lines 252 and 253, instead of the POKEs, but I don't know if it is more legible that way, as it uses a trick on FastBasic that allows values >15 for the luminance to set the color.

 

Have Fun!

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, dmsc said:

Hi!

 

Great, more simple examples are always welcomed.

 

You can replace "WHILE PEEK(764)=255" on line 153 with "WHILE NOT KEY()" - or as I prefer, use "REPEAT" there and replace the "WEND" with "UNTIL KEY()".

 

You could also use "SETCOLOR -4,0,CC:SETCOLOR -3,0,CC+3" and "SETCOLOR -2,0,CC+6:SETCOLOR -1,0,CC+9" in lines 252 and 253, instead of the POKEs, but I don't know if it is more legible that way, as it uses a trick on FastBasic that allows values >15 for the luminance to set the color.

 

Have Fun!

 

:) You have scolded me on that before, Daniel ;) WHILE PEEK(764)=255 and the color POKEs are very handy to me (in this instance) because I've been deep into FastBasic, Turbo BASIC XL, Advan BASIC, Altirra Extended BASIC, and BASIC XL & XE, often with each running in a separate instance of Altirra. It reduces the need for bespoke code when hammering out quick stuff, as in the sample above; although that is admittedly picking the slightest of nits. To be more accurate, as well as pedantically correct - as should be for a sample in the given language - I will do as you suggest a little later this afternoon. You are especially correct about the SETCOLOR stuff, as it pertains to FastBasic. phaeron has made it so easy (in a good way!) to cut and paste, that I've become lazy about some of this stuff.

 

I do have lots of other FastBasic code samples :) Before posting them I will give them a cursory glance and fix them as necessary. My Atari stuff needs some serious virtual housekeeping and consolidating.

 

If you have a queue for feature requests, there is one that I'd be grateful for. If you could squeeze in an analog of the RTIME command from Advan (equivalent to POKE 18,0:POKE 19,0:POKE 20,0), that would be awesome and I'll buy you a pitcher of your favorite cold, ethanol containing beverage...if you ever make it to Asheville, North Carolina or me to Chile :) 

 

Big thanks and props to you, dmsc, for giving this to the community. It is awesome.

 

 

 

 

Edited by 777ismyname
  • Thanks 1

Share this post


Link to post
Share on other sites

The attached contains the corrections outlined by dmsc. This is an atr of FastBasic 4.1B3 with MathPack. Running the program with the MathPack installed makes a considerable difference. Oh yeah, pressing a key during the title screen will run the Sphere Demo. An edit to my post from yesterday: this uses four players, not three.

 

dmsc, I put the SETCOLOR -4/-3/-2/-1 in like you suggested, but commented it out with instructions. There was one variable added for the third value of each SETCOLOR command. I did not, however, change things up to have the color cycle as it did with the POKEs. In the current scenario the SETCOLORs cycles much, much too fast. I've got to head up the mountain for a few hours, but will rectify that this evening, as well as post another FastBasic PMG sample or two.

LOGO8D.atr

  • Like 1

Share this post


Link to post
Share on other sites

Hi!

7 hours ago, 777ismyname said:

:) You have scolded me on that before, Daniel ;) WHILE PEEK(764)=255 and the color POKEs are very handy to me (in this instance) because I've been deep into FastBasic, Turbo BASIC XL, Advan BASIC, Altirra Extended BASIC, and BASIC XL & XE, often with each running in a separate instance of Altirra. It reduces the need for bespoke code when hammering out quick stuff, as in the sample above; although that is admittedly picking the slightest of nits. To be more accurate, as well as pedantically correct - as should be for a sample in the given language - I will do as you suggest a little later this afternoon. You are especially correct about the SETCOLOR stuff, as it pertains to FastBasic. phaeron has made it so easy (in a good way!) to cut and paste, that I've become lazy about some of this stuff.

 

I do have lots of other FastBasic code samples :) Before posting them I will give them a cursory glance and fix them as necessary. My Atari stuff needs some serious virtual housekeeping and consolidating.

 

If you have a queue for feature requests, there is one that I'd be grateful for. If you could squeeze in an analog of the RTIME command from Advan (equivalent to POKE 18,0:POKE 19,0:POKE 20,0), that would be awesome and I'll buy you a pitcher of your favorite cold, ethanol containing beverage...if you ever make it to Asheville, North Carolina or me to Chile :) 

 

Doing " POKE 20,0 : DPOKE 18, 0 " is 15 bytes, doing only "DPOKE 19, 0" is 12 bytes. Do you need clearing location 18? Note that in FastBasic, TIME returns the same as " PEEK(19) * 256 + PEEK(20) ". 

 

It is a shame that locations 18, 19 and 20 are reversed from standard little-endian location, it they were low-byte-first I could implement "TIME = ***" as simply "DPOKE 19, ***".

 

Have Fun!

 

  • Like 2

Share this post


Link to post
Share on other sites

I don’t reckon location 18 is imperative. I had wondered if that was the case with TIME. After 36 years using 18, 19, and 20 has become second nature. In any case, the minute layer of abstraction by RTIME in Advan is cool 😎 As I’ve mentioned before, there is very much appreciation for you for what you’ve done with FastBasic. It is my favorite BASIC for these old machines.

 

Edit: And the rectifying of the file above that I mentioned earlier didn’t happen yet :) It will be later on Wednesday.

Edited by 777ismyname

Share this post


Link to post
Share on other sites

never cared for FastBASIC before, but the example code makes me curious - looks like a mix of BASIC, C, and Assembler. I think I will give it a serious try as soon I find some coding-time.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...