Jump to content
IGNORED

Colecovision Almost-like-magic BASIC compiler: CVBasic v0.7.0 (now with TI-99/4A support!)


Recommended Posts

Hi everyone!

 

CVBasic the integer BASIC cross-compiler for Colecovision gets even better.

 

Version 0.6.0 implemented support for 1 MB of ROM in CVBasic, and also targets Sord M5, Memotech MTX, and Vtech Creativision/Dick Smith's Wizzard.

 

And now this version adds support for Tatung Einstein, Casio PV2000, Hanimex/Soundic Pencil II, and *badum-tsss* Texas Instruments TI-99/4A. This one is a TMS9900-based machine, and the port is courtesy of @Tursi, including a separate TMS9900 support library.

 

As always, you can target the eleven systems just by changing a switch in compilation! Z80, 6502, and TMS9900! All this without changing a line of source code.

 

Try it just compiling the example programs and get them running on any of these systems! (bank-switching example only runs in selected platforms).

 

The TI-99/4A port requires the 32K expansion RAM, and the program is limited to 24K. For assembling your program, you need to invoke xas99 -R (download from xdt99 tools https://github.com/endlos99/xdt99) and use http://js99er.net or the Classic99 emulator (putting the OBJ file into a DSK folder).

 

Changes in v0.7.0:

 

* Added support for Tatung Einstein using the switch --einstein

* Added support for Casio PV2000 using the switch --pv2000

* Added support for Hanimex/Soundic Pencil II using the switch --pencil

* Added support for Texas Instruments TI-99/4A using the switch --ti994a

* Protected the AY-3-8910 mixer so you don't need to worry anymore of putting the correct bits 6-7.

 

Changes in v0.7.1:

 

* Added support for NABU PC using --nabu (with -cpm option)
* Added support for USR/CALL with up to 5 arguments (only Z80)
* Added DEFINE VRAM READ to read VRAM.
* Added new example brinquitos.bas
* Added new example vramcopy.bas
* Optimizes division by 16.
* More optimization.

* gasm80 now supports undocumented instructions of Z80 (SLL, HX, HY, LX, and LY) and 6502.

* gasm80 now can generate a symbol table usable by OpenMSX, use -s output.sym

* Solved bug where gasm80 for Windows wasn't properly updated to support Creativision.

 

Enjoy it!

 

CapturadePantalla2024-09-02ala(s)18_35_21.thumb.png.1d5fecacd2ad6ad588e8c96da251dd17.png

cvbasic_v0.7.0.zip

cvbasic_v0.7.1.zip

  • Like 13
  • Thanks 2

The TI99/4A support makes this a bit more interesting.

I wish we had something to go the other way.  Take TI XB and compile it to CV etc.

 

Even better would be the GEM / Compiled XB to CV.

 

Still a great tool for people to create something for these consoles and computers.

 

  • Like 1
1 hour ago, ZippyOasys said:

Will there be a way to make cartridge files for the TI99/4A target in the foreseeable future?

So far as I know @Tursi intends to add support for cartridge files in the near future.

 

 

  • Like 3
On 9/4/2024 at 1:02 AM, 1980gamer said:

I wish we had something to go the other way.  Take TI XB and compile it to CV etc.

 

Even better would be the GEM / Compiled XB to CV.

A source code converter might be doable, depending on how advanced things you can accomplish in Extended BASIC (or its sequels). To decompile something and output source code for a different dialect sounds like a big thing to ask. Can you already today decompile XB to source code?

Ok, again I jumped the fence.

 

GORILLA.BAS working in NABU PC (MAME emulation).

 

To try it download the latest CVBasic and compile it from the Git.

 

CapturadePantalla2024-09-08ala(s)21_25_48.thumb.png.8fd573629d1c34199c897fa4666fc5da.png

  • Like 5
14 minutes ago, Sektor said:

Great work! Both the .nabu and .com files work on NABU. Tested on hardware too.

monkeymoon01.png

monkeymoon02.png

Wow! Glad to know.

 

Thank you very much for testing! 😀

Nabu? I've never heard of that one, but lately I've been introduced to a LOT of obscure ColecoVision-y computers and game systems that I never knew existed.

4 hours ago, Jess Ragan said:

Nabu? I've never heard of that one, but lately I've been introduced to a LOT of obscure ColecoVision-y computers and game systems that I never knew existed.

Nabu was almost entirely localized to Ottawa, Canada. It connected to the cable TV network to download software ;)

 

  • Like 1

Hi Oscar, I've a feature request about sprites and interrupts. Now the code that updates sprites on ISR is always active. This, in special cases, can interfere with other actions, e.g. reading or writing the VRAM using serial accesses (with IMP($BE) for example).

You should allow the user to disable the sprite update subsystem with a command, e.g. SPRITE ON/OFF or SPRITE(OFF/ON)

You should also add a couple of functions to enable/disable interrupts. 

Something equivalent to

ASM call nmi_off

ASM call nmi_on

 

Edited by artrag
  • Like 1

Another feature request: would it be possible to use the constants defined in CVbasic also in the ASM included in the bas files ?

Now if i do

 

const Width  = 32

 

there is no way to use Width in the ASM  in the same file.

I would like to have something like what we have for variables, e.g. this

 

ASM ld hl,const_Width

 

  • Like 1

Brainstorming only....

The status register of the vdp hold the info about sprite collision in the previous frame and has to be read at isr to not interfere with vdp interrupts

Have you evaluated to store the sprite collision flag in a global variable available to the user?

Do you think it is not useful?

Would maybe better to provide an asm function that would test collisions among rectangles?

3 hours ago, artrag said:

Brainstorming only....

The status register of the vdp hold the info about sprite collision in the previous frame and has to be read at isr to not interfere with vdp interrupts

Have you evaluated to store the sprite collision flag in a global variable available to the user?

Do you think it is not useful?

Would maybe better to provide an asm function that would test collisions among rectangles?

It's pretty hard to tell which sprites is being collide using the status register since it last 5 bits is only for which sprites are effective when there's more than 4 sprites in a row. And it's sorta buggy when using undocumented screen mode 2.  I haven't been successful reading the status register using C to be honest. I always used rectangle box collision for the sprite objects in my project.  The z80 quick enough to do it.  At least for Atari 2600 and Intellivision, it have separate register for collision for it objects.

Feature request l:

Would it be possible to pass more than one parameter to ASM functions by CALL?
Now only one value is accepted and it is passed in HL.
It would be easy to pass the second value in BC , the 3rd in DE, a 4th in IX, a 5th in IY
In case they were bytes, they could go in C,E,IXL,IYL

On 10/8/2024 at 12:03 AM, artrag said:

Feature request l:

Would it be possible to pass more than one parameter to ASM functions by CALL?
Now only one value is accepted and it is passed in HL.
It would be easy to pass the second value in BC , the 3rd in DE, a 4th in IX, a 5th in IY
In case they were bytes, they could go in C,E,IXL,IYL

Already supported when I made USR, I forgot to make a note in the git.

 

Edit: Only for Z80 at the moment.

 

  • Like 1
On 9/23/2024 at 2:26 AM, artrag said:

Hi Oscar, I've a feature request about sprites and interrupts. Now the code that updates sprites on ISR is always active. This, in special cases, can interfere with other actions, e.g. reading or writing the VRAM using serial accesses (with IMP($BE) for example).

You should allow the user to disable the sprite update subsystem with a command, e.g. SPRITE ON/OFF or SPRITE(OFF/ON)

You should also add a couple of functions to enable/disable interrupts. 

Something equivalent to

ASM call nmi_off

ASM call nmi_on

 

In the newest version in the git, you can use DEFINE VRAM READ to read the VRAM so you don't need to disable the NMI.

 

How are things progressing with regard to the TI 99/4A? I guess that would be Tursi's department, but I'm really hoping we get some Command Module support in the near future. That's how I played TI games when I was a kid.

5 hours ago, Jess Ragan said:

How are things progressing with regard to the TI 99/4A? I guess that would be Tursi's department, but I'm really hoping we get some Command Module support in the near future. That's how I played TI games when I was a kid.

This new version 0.7.1 of CVBasic removes the disk file support for TI/99-4A and replaces it with cartridge support (also known as Command Modules) because it is far more common.

 

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