Jump to content

Photo

BASIC Programming example with 800 variables

applications BASIC Programming 800 variables

2 replies to this topic

#1 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,746 posts

Posted Wed Jul 27, 2016 8:37 AM

This BASIC programming example uses 800 byte variables:

 

Attached File  JAMOUT.txt   8.85KB   69 downloads

 

http://atariage.com/...l-compositions/

 

The program is using three 255 byte arrays declared in Data statements to record sequencing input from the player.

 

Lots of variable space adds interesting possibilities and effects for games and enables applications software to be written for the VCS!

 

What kinds of applications would be interesting to see?

 

I'm currently working on a text editor with a 1200 byte buffer and a monitor program sharing the same codebase.

 

The website for the BASIC is here.

 



#2 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,833 posts

Posted Thu Jul 28, 2016 3:40 PM

I am commenting because I am at times ignorant and lazy.  So, take this feedback with a grain of salt.

 

If this requires extra RAM (SuperCharger or otherwise) then it's going to be tough to make into carts.  How many 8-bit variables do we get if this is a plain old 4k cart?  Can you make an example that is just a plain 4k cart instead of using SuperCharger (or otherwise) RAM?

 

UPDATE:  Forgot to mention I'm REAL excited to hear about a form of IDE for your BASIC.  That is what pushed me over the edge to use batari BASIC all those years ago.



#3 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • Topic Starter
  • 1,746 posts

Posted Fri Jul 29, 2016 12:53 PM

I am commenting because I am at times ignorant and lazy.  So, take this feedback with a grain of salt.

 

If this requires extra RAM (SuperCharger or otherwise) then it's going to be tough to make into carts.  How many 8-bit variables do we get if this is a plain old 4k cart?  Can you make an example that is just a plain 4k cart instead of using SuperCharger (or otherwise) RAM?

 

UPDATE:  Forgot to mention I'm REAL excited to hear about a form of IDE for your BASIC.  That is what pushed me over the edge to use batari BASIC all those years ago.

 

Interesting idea! :) A 4K ROM format would lose all of the array variables which also includes updatable graphics - it could still support a virtual world but the bits in the virtual world would become unchangeable ROM and revert back whenever you moved the camera/screen (you could still update the screenbuffer, that fits in 60 bytes of system RAM).

 

The blitter features (updating sprites and visible playfield relative to the camera position) would remain.

 

You would then have about 1.8K available for game code, which translates to about 7K of ASCII BASIC if you don't include the graphics and chiptunes definitions (memory is reserved for them).

 

The 6K SuperCharger format has the most enhanced graphics and colors because all of the memory is dynamic and the RUNTIME fits in the spare 2K BANK, giving BASIC a full 4K for code and variables like the BASIC's of the 70's and early 80's! :)

 

3142 bytes are available to BASIC which is actually a big edge over those early machines - because it's compiled, you can fit about 14K of BASIC source code.

 

The virtual world and object color attributes are preallocated RAM arrays that take up 300 bytes, and another 256 bytes are reserved for chiptunes.

 

There was also an older version that uses 256 bytes of CBS RAM for the dynamic virtual world and sprites, but it has only one 20 element nybble array available.







Also tagged with one or more of these keywords: applications, BASIC Programming, 800 variables

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users