Jump to content
IGNORED

Colecovision wonder-tastic BASIC compiler: CVBasic v0.5.0 (now with bank-switching support!)


Recommended Posts

Thanks for the suggestions!

 

I'm glad you like the code generator, I put a ton of effort into it.

 

BTW, now there's the book on CVBasic: Programming Games for Colecovision (250 pages, paperback) available from lulu.com and I also have made a preview video.

  • Like 1
5 hours ago, nanochess said:

Thanks for the suggestions!

 

I'm glad you like the code generator, I put a ton of effort into it.

 

BTW, now there's the book on CVBasic: Programming Games for Colecovision (250 pages, paperback) available from lulu.com and I also have made a preview video.

Ordered yesterday 🤩

  • Thanks 1
16 minutes ago, drfloyd said:

Hi

 

Stupid question :

How to choose the color of a text ?
PRINT AT 0,3"HELLO WORLD"

 

It is white,

how to change, cannot find COLOR option ???

Currently the easiest way is using DEFINE COLOR, for example:

 

FOR c = 65 TO 90		' Alphabet A-Z
	DEFINE COLOR c, 1, color_for_letter
NEXT c

...

color_for_letter:
	DATA BYTE $60,$80,$A0,$20,$50,$D0,$E0,$F0	' Rainbow letters with transparent background (i.e. border color)

 

  • Like 1

Thanks

 

I don't know if i can do suggessions for future versions, i am a casual coder, and if it is receivable, but i try :

 

-  a real command RANDOMIZE SEED
- a color parameter for texts (PRINT AT 256,"HELLO",color nb)

- a real basic command for char display (TILE AT 256,tile nb), better : TILE AT 31,23,tile nb

- bidimentionnal DIM(x,y) 

 

I love CVBasic :)

  • Like 1
1 hour ago, drfloyd said:

a color parameter for texts (PRINT AT 256,"HELLO",color nb)

I think a better idea would be some kind of font correspondance table. Let's say you have a text font in different colors. You could have a FONT command that lets you assign letters to tiles in VRAM, something like this:

 

FONT font_blue

"A" = 230

"B" = 231

"C" = 232

etc.

END FONT

 

Then when you want to print something with that font, you just code:

 

PRINT AT 128, "HELLO WORLD" USING font_blue

 

That way you can have multiple fonts defined in VRAM simultaneously, and if the string is static (i.e. not a variable or a complex string expression) then the char bytes can be converted to the proper corresponding tile numbers at compile time, with no extra overhead at run time.

 

Just a suggestion for nanochess.  :)

 

  • Like 1
Posted (edited)

No, you need to configure the vdp registers by yourself using asm, but once you have mirrored the first tile set in the other two banks you can use PRINT and SCREEN commands as in the standard MODE 0

Edited by artrag
Posted (edited)
49 minutes ago, Jess Ragan said:

Not to be contrarian, but I created a font with two colors, white and gray, and I'm not sure how it would be affected by a font color command.

You're talking about letters and numbers that contain more than one color within each character tile? You're talking about a single font, and that's not what the proposed "FONT" command is for.

 

Imagine you're coding a text adventure, something like Zork. Most of your texts are white on a black background, but you'd like certain words to be displayed in red (like the name of an enemy you're facing, for example). This implies that you need to have both white text and red text defined in your pattern/color tables in VRAM. You'll probably want to follow the ASCII system for the white text (A=65, B=66, etc.), but where you do put the red characters? You can technically put the red characters anywhere you want that is not already occupied by the white characters, but then how do you tell the PRINT command to use the red charset instead of the white charset? That's what the FONT command would be for, as I described a few posts above.

 

Edited by Pixelboy
  • Like 1

I'm working at a multicart for CV (yes, another one.. 😁) but i'm a bit struggled in how reading a data from cartridge, i'm porting my previous SG-1000 program but in CV there is no MEMR/MEMW/IOR etc. signals on cartridge slot... 😑

I red that LotD used a mirrored ram for saving games, but i've not understand how it works and if it's replicable in CVbasic.

It's my first Coleco program so i surely missed something, and i also bought the great e-book but found nothing useful about... any help will be appreciated!

53 minutes ago, aotta said:

I'm working at a multicart for CV (yes, another one.. 😁) but i'm a bit struggled in how reading a data from cartridge, i'm porting my previous SG-1000 program but in CV there is no MEMR/MEMW/IOR etc. signals on cartridge slot... 😑

I red that LotD used a mirrored ram for saving games, but i've not understand how it works and if it's replicable in CVbasic.

It's my first Coleco program so i surely missed something, and i also bought the great e-book but found nothing useful about... any help will be appreciated!

This is rather off-topic, and warrants its own separate forum thread.

 

Posted (edited)
3 hours ago, Pixelboy said:

This is rather off-topic, and warrants its own separate forum thread.

 

I posted here since it could be a "future improvement" request for CVbasic , also if a bit particular, but i used CVbasic and Intybasic for making menus in my other multicart, so i simply asked to Nanochess if is it possible to manage ram/eprom writing is some ways.

It could also be useful for who's writing homebrew for phisical cartridge and not only emulators.

I don't think my question is off-topic.

Edited by aotta
2 hours ago, aotta said:

I posted here since it could be a "future improvement" request for CVbasic , also if a bit particular, but i used CVbasic and Intybasic for making menus in my other multicart, so i simply asked to Nanochess if is it possible to manage ram/eprom writing is some ways.

It could also be useful for who's writing homebrew for phisical cartridge and not only emulators.

I don't think my question is off-topic.

The Lord of the Dungeon mapping is done with 2K of RAM in the cartridge.

 

Writing to $e000-$e7ff, and reading from $e800-$efff.

 

However, there are no PCBs available in the wild for this, so I don't foresee implementing it in CVBasic.

 

If you need more RAM, the CVBasic --sgm option is particularly valuable as it gives you access to 24K of RAM, and there are around one thousand of Super Game Modules available.

 

CVBasic is designed thinking in the available PCB for cartridges. It supports perfectly the basic boards up to 32K, and the Megacart board up to 1024K. I don't think there are other boards available.

 

9 minutes ago, nanochess said:

The Lord of the Dungeon mapping is done with 2K of RAM in the cartridge.

 

Writing to $e000-$e7ff, and reading from $e800-$efff.

 

Thank you, i thought it was something like the USCF Chess for Inty, but with memaddr section it's more simple in Intybasic...

anyway i solved with a dirty trick my needs with some poke and i "emulated" a couple of variables in my multicart.

Again my compliments for your book, really interesting!  But the password is needed everytime??? 😂

1 hour ago, nanochess said:

The Lord of the Dungeon mapping is done with 2K of RAM in the cartridge.

 

Writing to $e000-$e7ff, and reading from $e800-$efff.

 

However, there are no PCBs available in the wild for this, so I don't foresee implementing it in CVBasic.

 

Sure there is. ;) Well, at least one at the moment. With non volatile RAM. Not the cheapest, but pretty easy to implement. It should be easy to program using the current version of CVBasic, too.

  • Like 1
1 hour ago, nanochess said:

CVBasic is designed thinking in the available PCB for cartridges. It supports perfectly the basic boards up to 32K, and the Megacart board up to 1024K. I don't think there are other boards available.

Activision PCB.  ;)

 

  • Like 1
2 minutes ago, ZippyOasys said:

 

Don't forget Atarisoft & Imagic PCBs

Pixelboy was referring to a board he was involved in, that has 64KB and EPROM. It fit Activision shells, so that's what he calls it.

Hi. I was having trouble with the instruments in music. I had to come to the realization that C4 is the lowest note for the bass, while all the others start at A2. Is this right, and if so, could you please put that in the manual?

  • Like 1
5 hours ago, atari2600land said:

Hi. I was having trouble with the instruments in music. I had to come to the realization that C4 is the lowest note for the bass, while all the others start at A2. Is this right, and if so, could you please put that in the manual?

Your observation is correct. Thanks!

 

The SN76489 has only 10 bits for frequency. I'll put a note in the manual for the next version.

 

 

Hi Oscar,  you need to make clear in the manual that currently 16 bit variables are only unsigned.

It can give some troubles not considering this feature.

You should definitely add support for SIGNED / UNSIGNED variables 

  • Like 1
3 hours ago, artrag said:

Hi Oscar,  you need to make clear in the manual that currently 16 bit variables are only unsigned.

It can give some troubles not considering this feature.

You should definitely add support for SIGNED / UNSIGNED variables 

Technically only the comparison operators are unsigned, and the 8-bit variables are zero-extended to 16-bit.

 

Adding the UNSIGNED keyword would not affect the program, in fact it would be more like documenting your program.

 

Adding the SIGNED keyword would generate the use of signed comparisons (technically very expensive in terms of instructions), and for 8-bit variables the expansion to signed 16-bit.

 

But definitely I'll consider it for the next version of CVBasic.

 

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