Jump to content
IGNORED

Colecovision BASIC compiler: CVBasic v0.1.0


nanochess

Recommended Posts

Hi all.

 

Today (Feb/27/2024) I started working on a BASIC compiler for Colecovision. So far I've managed to get ready a core set of statements and features with a non-optimized expression compiler.

 

I expect to release an alpha version as soon as I develop the statements for controller handling, displaying numbers, sound, and make some example games. Also I need to write the manual. I'm patterning it after my pretty successful IntyBASIC compiler, but of course, the Z80 is a different beast.

 

I'm so happy with the current result that I wanted to share a screenshot of the development.

 

It was named boingBASIC for a few days, but then I decided with help of friends that CVBasic was better.

 

Two days later (Feb/29/2024) I managed to get out CVBasic v0.1.0, currently only available for Windows.

 

Enjoy it! 😁

 

Edit: Now there is CVBasic v0.2.0, available here --> https://forums.atariage.com/topic/362604-colecovision-tastic-basic-compiler-cvbasic-v020/

Edit: And now there is CVBasic v0.3.0, available here --> https://forums.atariage.com/topic/362875-colecovision-crunchytasty-basic-compiler-cvbasic-v030-now-with-tmscolor/

 

CapturadePantalla2024-02-27ala(s)22_37_31.thumb.png.3f50fa034465a236133503cbadc9a65d.png

 

CapturadePantalla2024-02-29ala(s)12_42_54.thumb.png.4324f67f6f092d3eabdeb2a574afaa86.png

 

CapturadePantalla2024-02-29ala(s)22_36_15.thumb.png.246c66d8bea04f9a290141ad790c1cd6.png

 

example.bas example.asm game.rom

cvbasic_v0.1.0.zip

  • Like 16
  • Thanks 2
Link to comment
Share on other sites

This is excellent news! I do have a few questions though:

 

1) I know this new compiler is very early in its development, but do you have plans to offer a tile/sprite editor, or a sound/music editor? If it's not something you've thought a lot about so far, perhaps you could collaborate with people on AtariAge who have already made such editors (mostly for data import/export functionalities)?

 

2) While the programming language is a central part of the project, another very important part is the debugger. Do you plan to add a proper debugger (with breakpoints, RAM usage monitor, interrupt monitor and time-to-next-VBLANK monitor) into CoolCV? One thing that is difficult with programming for the ColecoVision is that you don't have any real control over when the VBLANK NMI happens, and if your code tries to do too many operations between VBLANKs, this results in graphic corruption, and perhaps even complete runtime crashes.

 

3) Your sample Basic code doesn't seem to have any provisions for specifying the compiling setup (i.e. does the game use bankswitching (32K, MegaCart, Activision PCB), does it require the Super Game Module, is it supposed to support (or ignore) interrupts from the Roller Controller, that kind of thing).

 

4) Will you be offering built-in functions with the language? For example, a standard function to detect the SGM, or a function to clear VRAM at boot/reset, or a function to initialize the sound chip into "silent" mode, so programmers won't need to code their own routines?

 

 

Those are just questions off the top of my head, I'm sure I could come up with more.  :P

 

Edited by Pixelboy
  • Like 1
Link to comment
Share on other sites

2 hours ago, Pixelboy said:

This is excellent news! I do have a few questions though:

 

1) I know this new compiler is very early in its development, but do you have plans to offer a tile/sprite editor, or a sound/music editor? If it's not something you've thought a lot about so far, perhaps you could collaborate with people on AtariAge who have already made such editors (mostly for data import/export functionalities)?

As with IntyBASIC, the BITMAP statement helps to draw directly in code. But probably I'll include TMSCOLOR for processing BMP files.

2 hours ago, Pixelboy said:

 

2) While the programming language is a central part of the project, another very important part is the debugger. Do you plan to add a proper debugger (with breakpoints, RAM usage monitor, interrupt monitor and time-to-next-VBLANK monitor) into CoolCV? One thing that is difficult with programming for the ColecoVision is that you don't have any real control over when the VBLANK NMI happens, and if your code tries to do too many operations between VBLANKs, this results in graphic corruption, and perhaps even complete runtime crashes.

It would be in CoolCV. I actually wanted to implement a debugger in CoolCV but I was sidetracked by Real-Life(tm)

2 hours ago, Pixelboy said:

 

3) Your sample Basic code doesn't seem to have any provisions for specifying the compiling setup (i.e. does the game use bankswitching (32K, MegaCart, Activision PCB), does it require the Super Game Module, is it supposed to support (or ignore) interrupts from the Roller Controller, that kind of thing).

At a certain point probably it will support bank-switching but first I'll focus in making nice games in 32K and reasonable optimization of the generated code.

2 hours ago, Pixelboy said:

 

4) Will you be offering built-in functions with the language? For example, a standard function to detect the SGM, or a function to clear VRAM at boot/reset, or a function to initialize the sound chip into "silent" mode, so programmers won't need to code their own routines?

It will boot up with everything properly initialized. And yes, I expect to include advanced functions when the core works in my expectations.

2 hours ago, Pixelboy said:

 

 

Those are just questions off the top of my head, I'm sure I could come up with more.  :P

 

Anytime 😁

  • Like 1
Link to comment
Share on other sites

11 hours ago, Jess Ragan said:

Hot damn. Yes, I would like this very much. What's the ETA on its completion? (I guess I should keep my expectations in check, as you seem to be working on a dozen projects at any given moment.)

I hope to release an alpha version in one week.

 

  • Like 2
Link to comment
Share on other sites

Almost there. I've added a lot of BASIC statements to the compiler, and I ported my game Viboritas in order to determine essential functions for game development.

 

I'm only missing sound in the compiler for a nice alpha release. Arrays can wait :grin:

 

CapturadePantalla2024-02-29ala(s)12_42_54.thumb.png.ee5e96c16233cd640f434cbaf232c0a5.png

 

 

 

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

Just uploaded CVBasic v0.1.0, see the first post.

 

It includes the executable for the compiler, the manual, the prologue/epilogue files, and several examples including two minigames: Viboritas, and Space Attack.

 

 

 

  • Like 5
Link to comment
Share on other sites

Thanks Oscar,

I did a quick program, just a bouncing animated bug.  I need to play with is some more, but I wanted to give it a try.  I need to slow down the animation of the bug and speed up the bug traveling across the screen.  So far it seems fun!

 

BUG.BAS bug.rom

  • Like 1
Link to comment
Share on other sites

20 minutes ago, evg2000 said:

Thanks Oscar,

I did a quick program, just a bouncing animated bug.  I need to play with is some more, but I wanted to give it a try.  I need to slow down the animation of the bug and speed up the bug traveling across the screen.  So far it seems fun!

 

BUG.BAS 2.26 kB · 1 download bug.rom 1.31 kB · 0 downloads

Cool! I would suggest to replace GOSUB PAUSE with the WAIT statement.

 

The example.bas file included with CVBasic shows how to make a figure to bounce in the screen.

 

 

 

Link to comment
Share on other sites

I used the gosub pause to:
I wanted to try the gosub :) , is this the closest we will have to a function/method?
I wanted to be able to do multiple waits without having to inline them.

Will we be able to chain multiple .bas files through the assembly process?

 

Link to comment
Share on other sites

17 minutes ago, evg2000 said:

I used the gosub pause to:
I wanted to try the gosub :) , is this the closest we will have to a function/method?
I wanted to be able to do multiple waits without having to inline them.

Will we be able to chain multiple .bas files through the assembly process?

 

Ok. You can put WAIT inside your subroutine (PROCEDURE)

 

Yes, it is the only type of function. If you need to pass arguments, you need to use global variables, and same for the result.

 

I forgot completely about INCLUDE. I hope a next version will have INCLUDE so you can have larger CVBasic programs neatly organized.

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, nanochess said:

I forgot completely about INCLUDE. I hope a next version will have INCLUDE so you can have larger CVBasic programs neatly organized.

Probably want to add either RAW or RLE/Pletter/bitbuster decompressor library to import graphics from source code since there are several program that generate graphics tiles.  Some output in C like Amy's tool ICVGM. I like making tile graphics using that tool and follows graphic mode 2 format.  The Mode 1 version of ICVGM 2.02 is great to make graphic mode 1 games.  Make sure to limit the INCLUDE to 50 for some reason.  ;-)

  • Like 1
Link to comment
Share on other sites

34 minutes ago, evg2000 said:

sorry, noobie to cv programming. what is a .VGM?

 

Not an expert answer.  It's a music file format used for playing back classic console tunes.  I use it currently for sega genesis music in my genesis games.  But, Coleco compatible .VGM files may not fly on a Genesis.  My hunch is that you still have to compose songs for a specific platform.

  • Like 2
Link to comment
Share on other sites

As freaky as this may sound, ChatGPT might be able to get most people started.  All it has to learn is the syntax and logic, then it will be able to explain it too.  We'll see!  Can't wait!

Edited by Kamshaft
  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...