Jump to content
IGNORED

Colecovision Turbopowered BASIC compiler: CVBasic v0.6.0 (now with 6502 support!)


Recommended Posts

17 hours ago, Jess Ragan said:

A question. How much will I need to modify Whack 'Em Smack 'Em Byrons (and other games) to make them run on the CreatiVision? For MSX, I needed to switch sound channels. For SG-1000 and SpectraVision, it was practically nothing... it was as much a straight shot conversion as you could reasonably expect. Will changes need to be made to accommodate the CreatiVision? Beyond that, will the difference in clock speed affect the speed of the gameplay?

The 6502 is typically as fast as a Z80. However, this early iteration of CVBasic for 6502 isn't yet optimized, so it could be a little slow in comparison.

 

As the Creativision has almost exactly the same hardware (including 1K of RAM), any Colecovision game should be able to be ported just by using the --creativision switch.

 

The only difference is that the SN76489 is clocked at 2 mhz instead of 3.58 mhz. The music (PLAY/MUSIC) is automatically converted, but any sound effect could need adaptation.

 

 

  • Like 1

Oh yes, doesn't that allow for more bass notes (and fewer of the highest notes) without resorting to LFSR on the noise channel? While I converted my VIC-20 music player to CreatiVision, I never quite figured out the difference vs ColecoVision or any other system with a 3.58 MHz clocked PSG.

Edited by carlsson
On 8/12/2024 at 6:20 PM, carlsson said:

Oh yes, doesn't that allow for more bass notes (and fewer of the highest notes) without resorting to LFSR on the noise channel? While I converted my VIC-20 music player to CreatiVision, I never quite figured out the difference vs ColecoVision or any other system with a 3.58 MHz clocked PSG.

Yes, that's right. With Creativision SN76489 at 2 mhz. you can get very nice basses up to 62 hz.

 

For Colecovision SN76489 at 3.58 mhz. the limit is 109 hz.

 

Edit: the equation for tech-savvy programmers: min.hz = 3579545 / 32 / 1023 (this is for SN76489)

 

Edit 2: As I now have 3 frequency tables, I've made an utility to calculate the musical note frequencies required by the CVBasic library: https://github.com/nanochess/CVBasic/tree/master/utility

 

 

 

  • Like 1

 a little question,  i'm a little bit lost with all the target CVBasic support now 😀

 

 

As it supports now the creativision , does it support the VTECH Lazer 2001 ?   

 

and also  what about the Tantung Enstein?

 

I love the idea of bringing softwares to really obscure computer and console 40 years after they are out to market! 😀

  • Like 1

Laser 2001 more or less runs CreatiVision ROMs out of the box. A few of them may have some issues, not sure if it is regarding IRQ plus that keypad mapping is different.

 

Oscar wrote before that the Tatung Einstein lacks IRQ (or if it was NMI?) so things would need to be done differently. I think out of all the targets so far, that would be the absolute smallest. Possibly the Casio PV-2000 has a bigger following.

As far as I remember, all commercial VTech CreatiVision ROMs work fine on the Laser 2001. The only issue is with the ROMs requiring use of keyboard (eg BASIC and Music Maker and, to a certain extent, Tank Attack) because the CreatiVision keyboard is mapped differently from the Laser 2001. Also Pinball does a weird thing: the left and right buttons control the flippers inverted. Other than that, all ROMs run and boot fine.

On 8/14/2024 at 7:22 AM, youki said:

 a little question,  i'm a little bit lost with all the target CVBasic support now 😀

 

 

As it supports now the creativision , does it support the VTECH Lazer 2001 ?   

 

and also  what about the Tantung Enstein?

 

I love the idea of bringing softwares to really obscure computer and console 40 years after they are out to market! 😀

I couldn't leave you waiting. If you compile the unofficial v0.6.1 it supports Tatung Einstein :grin:

 

I should add a note about Laser 2001.

  • Like 2
  • Thanks 1
  • Haha 1

I actually like NanoBasic, but then again, let's say our friend nanochess decides to make a BASIC language for the NES, GameBoy, or perhaps Sega Master System? It would probably be significantly different in terms of language and compiler options, and so it would probably have a different name, and that would introduce some slight confusion. That's why I would go with TMSBasic, since it's much closer to what CVBasic currently offers.

 

Just my two cents.  :)

 

  • Like 1

As much as these names are pretty interesting, the boat sailed a lot of time ago, and there is even a book on the subject.

 

So I appreciate all the suggestions, but CVBasic will keep being CVBasic in honor of Colecovision. ;)

 

Edit: BTW, it just has been confirmed that the Creativision target works in real hardware without video glitchs :grin:

 

 

  • Like 2

Just corrected a bug in the cvbasic_6502_prologue.asm file for Creativision. Find attached the newest version in the first post.

 

Thanks to @Jess Ragan for reporting the bug.

 

  • Like 1
14 hours ago, nanochess said:

As much as these names are pretty interesting, the boat sailed a lot of time ago, and there is even a book on the subject.

What, you call that an argument? You just write a new book that uses the new language name, and in the preface, you say that the other book was written by your evil twin brother and should be ignored!  🤪

 

Edited by Pixelboy
  • Haha 2

I've had a lot of progress in optimizing the array access in CVBasic in order to make smaller the generated code size. In special the common idiom a(c) = a(c) + 1 or a(c) = a(c) + b.

 

In the following image, the 1st column shows the Z80 code for array access for v0.6.0, while the 2nd column shows the optimized Z80 code for v0.6.1.

 

The 3rd column shows the 6502 code for array access for v0.6.0, while the 4th column shows the optimized 6502 code for v0.6.1.

 

It can be seen how many more statements fit using less assembly code, and also games will be able to do more things in the same time.

 

CapturadePantalla2024-08-18ala(s)19_49_30.thumb.png.b2cf138804b5dd9a245bf2639ce0284d.png

  • Like 3
On 8/16/2024 at 3:34 AM, nanochess said:

I couldn't leave you waiting. If you compile the unofficial v0.6.1 it supports Tatung Einstein :grin:

 

I should add a note about Laser 2001.

 

Now,  i MUST do a game with your basic , i have no more excuse!!!😀

 

Speaking about books  ,  do you plan to release an updated version with all the new features you added since the last edition?  .  

  • Like 1

Maybe something like "Advanced game programming for Colecovision (and many other systems)".

I'd like to have a chapter on the TMS9918 basics, just o give all readers an overview on what their systems can do and cannot do and a chapter with the specific features of the different platforms, e.g. ROM size, supported controls, max RAM available, supported rom mappers (if any), PSG differences (AY8910, SN768 and their frequencies). In this way it would be simpler to explain the basic commands and their limitation on the specific platforms (eg. note range in the music player, max size of arrays in RAM etc..)

 

Just my two cents, but I would buy it in any case ;-) 

 

 

  • Like 3
11 hours ago, youki said:

 

Now,  i MUST do a game with your basic , i have no more excuse!!!😀

 

Speaking about books  ,  do you plan to release an updated version with all the new features you added since the last edition?  .  

 

I MUST SEE YOUR GAME!

 

There is no need at this point in time, only SIGNED and UNSIGNED are the new keywords and are seldom used, and of course the new VDP() syntax.

 

10 hours ago, artrag said:

Maybe something like "Advanced game programming for Colecovision (and many other systems)".

I'd like to have a chapter on the TMS9918 basics, just o give all readers an overview on what their systems can do and cannot do and a chapter with the specific features of the different platforms, e.g. ROM size, supported controls, max RAM available, supported rom mappers (if any), PSG differences (AY8910, SN768 and their frequencies). In this way it would be simpler to explain the basic commands and their limitation on the specific platforms (eg. note range in the music player, max size of arrays in RAM etc..)

 

Just my two cents, but I would buy it in any case ;-) 

 

 

Sometimes I think on it, probably more advanced programming techniques or video tricks.

 

Still I need to expand in the support for some platforms, for example accessing the whole keyboard in MSX.

 

  • Like 1

image.thumb.png.622be86da39585ec0aef1f36871a8e1c.png

image.thumb.png.51b83c97a8e7f432373d6e30e212c115.png

"I nay have killed Mr. Burns!"

(Groundskeeper Willie uncrosses his legs)

(police pull out their guns)

"We warned you about that!"

 

So, uh, I hate to keep rubbing Nanochess's magic lamp until the gold plating comes off, but the Creativision seems to have an issue with diagonals in my game. Evidently the system uses 16-direction input for its joysticks, which is probably part of the problem. As a result, Whack 'Em doesn't work properly in the FunnyMU emulator or on real hardware (confirmed by Scouter at MADrigal's Creativision forum). What other options do I have? Does CVBasic have support for the Creativision keypads, or will I need to use PEEKs to read them?

 

 

Just an update.. the TI99 port is operational, although I'm concerned about all the Creativision changes since that's what I based my port on! :lol: 

 

The basic examples work, but I made a bad assumption in the expression parsing so it's not quite ready yet, but close. Hopefully just another day of debugging. 

 

Not sure if I'll be able to merge the latest into my fork now, it's showing a lot of conflicts. I would have waited if I could have seen the future, but oh well! 😄

 

119b9dad78532f5f.png

  • Like 4
  • Thanks 2
18 minutes ago, Tursi said:

Just an update.. the TI99 port is operational, although I'm concerned about all the Creativision changes since that's what I based my port on! :lol: 

 

The basic examples work, but I made a bad assumption in the expression parsing so it's not quite ready yet, but close. Hopefully just another day of debugging. 

 

Not sure if I'll be able to merge the latest into my fork now, it's showing a lot of conflicts. I would have waited if I could have seen the future, but oh well! 😄

 

119b9dad78532f5f.png

Wow! Holy smokes! You're a genius! And you are faster than the roadrunner!

 

This would cover the last platform using the VDP processor!

 

Thanks for sharing!

  • Like 1

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