Fancy a BASIC compiler?

All aspects of programming on the Commander X16.
Doozer
Posts: 3
Joined: Fri Jan 13, 2023 12:58 am

Fancy a BASIC compiler?

Post by Doozer »

I am thinking of developing basic compiler with a library of routines for developing games.
With the speed of WDC chip and the FPGA, a compiled basic, rather than an interpreted one should be fast enough to create some reasonable games.
What do you guys think about the demand for something like this? It would be a fair bit of work and need a few people to work together, so not really worth it if there is not the demand.
TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

Re: Fancy a BASIC compiler?

Post by TomXP411 »

You might be pleased to know that there is a BASIC compiler known as XC=BASIC.

https://xc-basic.net/doku.php

Last I heard, Csaba is still looking for people to help further development. At the very least, you might want to check out what he's done and see if you're interested in his compiler.
Doozer
Posts: 3
Joined: Fri Jan 13, 2023 12:58 am

Re: Fancy a BASIC compiler?

Post by Doozer »

Cheers. Thanks for letting me know.
Doozer
Posts: 3
Joined: Fri Jan 13, 2023 12:58 am

Re: Fancy a BASIC compiler?

Post by Doozer »

I was thinking of something people could use on their Commander X16, rather than developing on a window or Mac. I figured people might want to spend time using the machine, but maybe I am wrong and they would prefer the productivity of working in their normal OS.
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Re: Fancy a BASIC compiler?

Post by Cyber »

Doozer wrote: Sun Jan 15, 2023 11:29 pm I was thinking of something people could use on their Commander X16, rather than developing on a window or Mac. I figured people might want to spend time using the machine, but maybe I am wrong and they would prefer the productivity of working in their normal OS.
You know, that depends on a person.
Some people like developing on external Windows/Linux/Mac machine and use X16 only to run the program.
Others like to develop on the same machine overcoming all the limitations that dev environment might have.
There are also people who are not fully satisfied working with emulator, and they wait for real hardware to develop on. )
delMar
Posts: 7
Joined: Sun Oct 10, 2021 8:06 pm

Re: Fancy a BASIC compiler?

Post by delMar »

Something comparable to Blitz64 or Blitz128 would be great.

In comparison, compiled Basic7 running with 2 MHz on the c128 equals interpreted Basic v2 running on the X16.

Compiled code on the X16 would probably equal interpreted code on the Mega65.

In my current project I‘m doing regular comparisons. You can check the details in this video at around 20 minutes: https://youtu.be/lW1jb-WHvqo
(Sorry for german-only audio. But subtitles work well)

Here https://github.com/c1570/Reblitz64 you can find a Browser version of Blitz64 which is more convenient.
It just re-implements the compiler. The runtime stays the same.
Something like this for the x16 would be awesome
User avatar
DragonGaulois
Posts: 16
Joined: Mon Jan 31, 2022 4:13 pm

Re: Fancy a BASIC compiler?

Post by DragonGaulois »

TomXP411 wrote: Fri Jan 13, 2023 3:31 am You might be pleased to know that there is a BASIC compiler known as XC=BASIC.

https://xc-basic.net/doku.php

Last I heard, Csaba is still looking for people to help further development. At the very least, you might want to check out what he's done and see if you're interested in his compiler.
that was quick, sad that i can't help since i'm a noob on programming
Ser Olmy
Posts: 39
Joined: Thu Aug 18, 2022 8:20 pm

Re: Fancy a BASIC compiler?

Post by Ser Olmy »

Doozer wrote: Sun Jan 15, 2023 11:29 pmI figured people might want to spend time using the machine, but maybe I am wrong and they would prefer the productivity of working in their normal OS.
Warning: Rant incoming. :)

Back in the 80s, I would have been thrilled to have access to a BASIC compiler on any 8-bit platform. If you were to release a compiler for the X16, I'd probably be interested in checking it out.

I have some not-so-fond memories from way back when of using a memory-resident BASIC compiler on a cassette-based system with slightly less than 32k RAM available. Those 32k had to accommodate the BASIC program, the compiler, AND the compiled code. And if the compiled program crashed, all unsaved changes were instantly lost.

Of course, it wouldn't be even nearly that bad with the X16, because at least you get fast saves and loads using an SD card. The problem is that nowadays I've become accustomed to working on systems running advanced IDEs that load and save my work almost instantly, has a good keyboard, supports remote access, has a plethora of version control tools available, lets me add huge amount of comments in the source code without it affecting the size of the object code, and is attached to at least one high-resolution screen.

I'm looking forward to doing some 6502 assembly language programming on the actual X16 hardware in a hopefully not-too-distant future. But BASIC? Well, as someone who used the C64 extensively throughout the 80s, but also owned and used a number of other 8-bit systems from the same era, let me say that in my (somewhat informed) opinion, Commodore BASIC is by far the worst BASIC implementation of them all: Not only is it unbelievably slow, but it's also severely lacking in the sound and graphics department. v2.0 was/is just awful in every way, and while the later revisions did add many useful commands, they weren't exactly feature-rich and still slow as molasses.

A BASIC compiler makes perfect sense if programming in BASIC is at least a somewhat enjoyable experience, and the only major issue is execution speed. I don't see how that's even remotely the case with CBM BASIC, and I honestly can't fathom what strength of rose-tinted glasses you'd have to be wearing in order to look back at BASIC programming sessions on the Commodore platform with feelings of nostalgia. I wouldn't wish it on my worst enemy. :)

If I'm going to be accessing the hardware directly using line upon line of POKEs and PEEKs anyway, I figure I might as well use LDA and STA and gain a huge speed boost in the process.

Rant over. Still looking forward to the OPs BASIC compiler. :)
Edmond D
Posts: 489
Joined: Thu Aug 19, 2021 1:42 am

Re: Fancy a BASIC compiler?

Post by Edmond D »

Ser Olmy wrote: Fri Jan 27, 2023 10:17 pm
Doozer wrote: Sun Jan 15, 2023 11:29 pmI figured people might want to spend time using the machine, but maybe I am wrong and they would prefer the productivity of working in their normal OS.
Warning: Rant incoming. :)

<snip>

I have some not-so-fond memories from way back when of using a memory-resident BASIC compiler on a cassette-based system with slightly less than 32k RAM available. Those 32k had to accommodate the BASIC program, the compiler, AND the compiled code. And if the compiled program crashed, all unsaved changes were instantly lost.

<snip>

A BASIC compiler makes perfect sense if programming in BASIC is at least a somewhat enjoyable experience, and the only major issue is execution speed. I don't see how that's even remotely the case with CBM BASIC, and I honestly can't fathom what strength of rose-tinted glasses you'd have to be wearing in order to look back at BASIC programming sessions on the Commodore platform with feelings of nostalgia. I wouldn't wish it on my worst enemy. :)

If I'm going to be accessing the hardware directly using line upon line of POKEs and PEEKs anyway, I figure I might as well use LDA and STA and gain a huge speed boost in the process.

Rant over. Still looking forward to the OPs BASIC compiler. :)
Well, you did start with a warning that you were going to rant, so I hope my reply isn't seen as a counter rant. I'm not trying to start a flame/platform war, just offer a different perspective. I'm not your worst enemy :-)

Yes, CBM BASIC 2.0 isn't the end-all be-all language and experience; similarly the X16 won't revolutionize the home computer industry. But I feel it will be fun! My nostalgia comes from the challenge of learning on a VIC-20 in the 80s when home computers first came out. It was a system to explore and attempt to master. I knew that what I did then and will do in the future with the X16 isn't going to change the world. But it will provide me with enjoyment. That's perhaps the nostalgia I'm looking for the X16 to provide.
BruceRMcF
Posts: 224
Joined: Sat Jan 07, 2023 10:33 pm

Re: Fancy a BASIC compiler?

Post by BruceRMcF »

Ser Olmy wrote: Fri Jan 27, 2023 10:17 pm
Doozer wrote: Sun Jan 15, 2023 11:29 pmI figured people might want to spend time using the machine, but maybe I am wrong and they would prefer the productivity of working in their normal OS.
Warning: Rant incoming. :)

... Of course, it wouldn't be even nearly that bad with the X16, because at least you get fast saves and loads using an SD card. The problem is that nowadays I've become accustomed to working on systems running advanced IDEs that load and save my work almost instantly, has a good keyboard, supports remote access, has a plethora of version control tools available, lets me add huge amount of comments in the source code without it affecting the size of the object code, and is attached to at least one high-resolution screen.
For some people, part of the appeal is working on a system without so many bells and whistles and cutting off the din of the connected online world for a while. After all, the fact that computer controlled routers exist does not eliminate the desire by some woodworkers to do some things with hand tools. It's one thing if you are doing professional development work, where you not only want to but also have a bit of a responsibility to use the most productive development toolkit you can. But for recreation, it's OK if some people enjoy the development equivalent of whittling or working scrimshaw{+}.
... I'm looking forward to doing some 6502 assembly language programming on the actual X16 hardware in a hopefully not-too-distant future. But BASIC? Well, as someone who used the C64 extensively throughout the 80s, but also owned and used a number of other 8-bit systems from the same era, let me say that in my (somewhat informed) opinion, Commodore BASIC is by far the worst BASIC implementation of them all: Not only is it unbelievably slow, but it's also severely lacking in the sound and graphics department. v2.0 was/is just awful in every way, and while the later revisions did add many useful commands, they weren't exactly feature-rich and still slow as molasses. ...
On the one hand, the graphic and sound extensions added to the X16 version of Basic means it's better than the C64 CMB Basic V2.0, and perhaps if someone develops a good a good Sprite Control API to attached to FN(), it would get even better. Certainly the the SD card makes it much handier to share and install useful FN() binary extensions than back in the day.

And there is still the power tools and hand tools thing. The people who want hosted development tools because they would rather be working with the 8bit system than just working the 8bit system are also the same people who will likely be more tolerant of the work needed to get around the limitations of the X16-enhanced version of CBM V2.0.

I am not interested in using Basic V2.0 as more than the power-on batch operations language, but I am very much interested in doing hosted development on the X16, and I don't have any trouble imagining someone with different preferences for language features, or a different backlog of source code they want to adapt, wanting to work in the X16 enhanced CBM V2.0 Basic with the interpreter as an iterative development tool and compiler to run the program at full speed. It sure sounds more appealing to me than doing cross hosted X16 development in a Small-C based compiler, yet there are people who seem to be happy as clams doing just that.


___________
{+ Bone scrimshaw, of course, not ivory scrimshaw, I'm not some heartless monster who wants elephants or walruses to go extinct.}
Post Reply