nanochess Posted March 5 Share Posted March 5 Hi all. I'm surprised and humbled by the success of CVBasic v0.1.0 (one hundred downloads in less than one week!), so here is a very much improved version of the compiler. I've added macOS and Linux support. To do this, I had to write my own Z80 assembler, and it is included in the package as gasm80. Changes in this version: * Added CONST statement (for example, CONST A = 5, or CONST #BIG = 5000) * Added ON GOTO / GOSUB statement. * Added ON FRAME GOSUB statement (to call subroutines in each video frame). * Added INCLUDE statement so you can make bigger programs. * Added PLAY/MUSIC statements, and a music player. * Added a new example music.bas to show how to use PLAY/MUSIC. * Optimizes more extensively the compiled expressions. * Support for Sega SG1000. I need to implement a way to bring graphical screens. I have the tool, but we need a nice way of doing it with BASIC-style statements. I'll keep working on this, and in the meantime: Enjoy it! cvbasic_v0.2.0.zip 7 1 Quote Link to comment Share on other sites More sharing options...
+5-11under Posted March 5 Share Posted March 5 Thanks Oscar! There's not much missing compared to IntyBASIC anymore. 1 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted March 5 Share Posted March 5 I'm sure this can be improved but made a cvmake.bat that builds a Coleco ROM from a .bas that's in the same directory as the rest of the CVBasic files. I've forgotten a ton of batch file techniques so the resultant ROM looks like: game.bas.rom I use the START command to open the game.bas.rom afterwards in whatever emulator is associated with Coleco ROMs. To be clear cvbasic and gasm80 need to be in the same directory as cvmake.bat. You must associate Coleco ROMs with your favorite emulator in Windows first. I would not be offended if someone makes this less hack-ey Usage: CVMAKE GAME.BAS cvbasic %1 output.asm gasm80 output.asm -o %1.rom start %1.rom 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted March 5 Share Posted March 5 Sorry to double post. But, before anyone else asks.. SG-1000 support doesn't make Sega Master System or Mega Drive support much easier. In particular I had a fever dream of using CVBasic to make z80 based Mega Drive games. But, although the MD has the Zilog Z80 and SN76489.. well, the closest video mode supported is the SMS VDP mode 4. So, if I took an SMS flash cart and put it on a power base converter the best that would happen is sound. https://segadoes.wordpress.com/2016/04/25/power-base-converter/ 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 5 Author Share Posted March 5 1 hour ago, Gemintronic said: Sorry to double post. But, before anyone else asks.. SG-1000 support doesn't make Sega Master System or Mega Drive support much easier. In particular I had a fever dream of using CVBasic to make z80 based Mega Drive games. But, although the MD has the Zilog Z80 and SN76489.. well, the closest video mode supported is the SMS VDP mode 4. So, if I took an SMS flash cart and put it on a power base converter the best that would happen is sound. https://segadoes.wordpress.com/2016/04/25/power-base-converter/ Not really, because the Sega Master System video mode 4 isn't compatible as needed. However, SG1000 support means the ROM could be played at least in original Sega Master System consoles. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted March 5 Share Posted March 5 (edited) 4 hours ago, 5-11under said: There's not much missing compared to IntyBASIC anymore. The release schedule is kind of similar too: IntyBASIC: v0.1: Jan 28, 2014 v0.2: Feb 3, 2014 (+6 days) v0.3: Feb 6, 2014 (+3 days) v0.4: Feb 11, 2014 (+5 days) v0.5: Feb 26, 2014 (+ 15 days) v0.6: Mar 2, 2014 (+4 days) CVBasic: v0.1: Feb 28, 2024 v0.2: Mar 5, 2024 (+6 days) v0.3: ?? (tentative March 8...) Edited March 5 by carlsson 1 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 6 Author Share Posted March 6 21 hours ago, carlsson said: CVBasic: v0.1: Feb 28, 2024 v0.2: Mar 5, 2024 (+6 days) v0.3: ?? (tentative March 8...) I would break your predictions because I just noticed CVBasic was released Feb, 29. 1 Quote Link to comment Share on other sites More sharing options...
1980gamer Posted March 6 Share Posted March 6 2 hours ago, nanochess said: I would break your predictions because I just noticed CVBasic was released Feb, 29. That just means you are working faster than expected! 1 Quote Link to comment Share on other sites More sharing options...
Mobsie Posted March 7 Share Posted March 7 Work perfect on Mac. 👍 1 Quote Link to comment Share on other sites More sharing options...
Révo Posted March 7 Share Posted March 7 Thank you so much for adding SG-1000 support, but I'm missing something about the difference to do between assembling for CV and assembling for SG. I've no problem assembling for CV but I don't know how to assemble for SG. Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 7 Author Share Posted March 7 6 hours ago, Révo said: Thank you so much for adding SG-1000 support, but I'm missing something about the difference to do between assembling for CV and assembling for SG. I've no problem assembling for CV but I don't know how to assemble for SG. You need to pass the option --sg1000 to CVBasic, assemble as normal, and the generated ROM will be mapped at $0000. In case of doubt generate a LST file with the gasm80 assembler (option -l output.lst). 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 8 Author Share Posted March 8 I just released TMSColor, the utility for converting tiles and sprites to CVBasic format. https://github.com/nanochess/TMSColor Don't worry if you don't know how to compile it because the executables will be in the CVBasic v0.3.0 release. I'm almost ready to release it, but I need to code some examples of the new features. 5 Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted March 8 Share Posted March 8 On 3/5/2024 at 4:49 PM, nanochess said: * Added ON FRAME GOSUB statement (to call subroutines in each video frame). * Support for Sega SG1000. Is it possible to do expressions like IF (FRAME AND 1) THEN… ? Would programs made for the SG1000 need to consider any particular differences or restrictions vs Colecovision? Your work is much appreciated Nanochess! I will probably start writing something once the 0.3 release comes out 🙂 Will functions be implemented eventually? 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 8 Author Share Posted March 8 5 hours ago, cmadruga said: Is it possible to do expressions like IF (FRAME AND 1) THEN… ? Would programs made for the SG1000 need to consider any particular differences or restrictions vs Colecovision? Your work is much appreciated Nanochess! I will probably start writing something once the 0.3 release comes out 🙂 Will functions be implemented eventually? Some things are inherited from IntyBASIC like the internal variable FRAME, so yes, you can do these type of expressions. Currently SG1000 is as capable as Colecovision, except there is no keypad in controllers. I would be glad to see some of your amazing work on Colecovision. Yes, there will be DEF FN, thanks for bringing it to my attention. 1 Quote Link to comment Share on other sites More sharing options...
Tornadoboy Posted March 8 Share Posted March 8 (edited) This is AWESOME! I've got all kinds of ideas for games but could never get into coding enough to learn it, but basic I think I can handle as I used to tinker with it on the TI 99/4A. This is getting ahead of myself but is it possible to send signals with it to the expansion port that could be used to control external hardware? I've had fantasies of making something to control lights, etc or a robot arm connected via that port. Edited March 8 by Tornadoboy 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted March 8 Author Share Posted March 8 16 minutes ago, Tornadoboy said: This is AWESOME! I've got all kinds of ideas for games but could never get into coding enough to learn it, but basic I think I can handle as I used to tinker with it on the TI 99/4A. This is getting ahead of myself but is it possible to send signals with it to the expansion port that could be used to control external hardware? I've had fantasies of making something to control lights, etc or a robot arm connected via that port. If you make the right expansion hardware then you can control it with the INP and OUT instructions. Or if it is memory-mapped then you can use PEEK/POKE. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.