Hello, Guest the thread was called8.4k times and contains 203 replays

last post from hjalfi at the

BBC BASIC for the MEGA65?

  • BBC BASIC is an absolutely superb language – fabulously well structured and flexible – and if a good port were made of it for the MEGA65 it'd turn it into a programmer's dream machine.

    I know BBC BASIC from my days with the Archimedes and now with RISC OS on the Raspberry. It's a really great BASIC.


    But BBC BASIC would be no reason for me to buy a MEGA65. If I want to program BBC BASIC, then I switch on my Raspberry with RISC OS (for less than 100 EUR) and I can use the most modern variant of BBC BASIC.


    But to be able to use BASIC 10, I need a C65 or MEGA65. I would prefer a completed and "modernized" BASIC 10, expanded "in the style of Commodore".


    A Commodore computer without Commodore BASIC is simply not a Commodore. And that's how I see the MEGA65, even if it doesn't come from Commodore, of course. ;)


    If a new programming language for the MEGA65 at all, then I would probably rather break away from BASIC and implement a different, really modern programming language.

  • Well, I feel again and again the same rounds of "fights" on things like this :) I think, it's not problem at all (in fact, it's good) to have options, if someone has a great port of BBC basic to MEGA65 with all usable features of MEGA65 accessible, etc etc. The key here, what is often subject of "fights" that "what the default should be". I think for the C65 feeling, and in general Commodore, it must be BASIC 10 (even if it's a well expanded bug fixed etc version in the future). Still, people can use OpenROM, BBC basic, or even forth (somebody suggested ...) or whatever you can even imagine, it just helps to have more options!


    The only reason "against" BASIC 10 is the license, so maybe there is some value to have OpenROM by default if the C65 ROM is not accessible or anything like that (since at least OpenROM aims for some more compatibility with at least C64 ...) but truly it's just matter more of license problem which is may not even a problem with MEGA65 with the "license deal" too much (but it is with Xemu for example that it cannot be made default out-of-box, user still needs to add C65 ROM ...).

  • I think for the C65 feeling, and in general Commodore, it must be BASIC 10 (even if it's a well expanded bug fixed etc version in the future).

    I agree! :thumbup:


    BASIC 10 is of course the default language. Don't forget the millions of existing BASIC 10 programs that would then no longer run without BASIC 10 in ROM. :D

    I don't think anyone's been advocating anything else, have they? Certainly I haven't. There's really no doubt that BBC BASIC is a superior BASIC to Commodore BASIC 10, but that doesn't mean it'd be a good idea to replace Commodore BASIC as the default. On the contrary, that'd make the MEGA65 a very different machine. It'd be a great alternative and would provide many benefits, but it shouldn't usurp the machine's own default language.

  • Bad basic or not - turning on the Mega65 should feel like home, including scars and warts like Basic10. :D


    And for me it (with the C64 being my first machine back in the day) it feels exactly like that. Had a totally different experience with the Spectrum Next - great machine, but not my thing.


    It’s always good to have options like BBC Basic, although to attract younger people, some form of the Python language would be needed.

  • The key here, what is often subject of "fights" that "what the default should be".

    Yep... but the funny thing is, I never once suggested making something other than C65 mode + BASIC10 the "default". I can't shake the feeling that the mere suggestion of (additionally!!!) putting something advanced in there is being perceived as sacrilege by some folks.


    Oh well, I wasted far too much time on this already, time to get programming again... :)

  • The key here, what is often subject of "fights" that "what the default should be".

    Yep... but the funny thing is, I never once suggested making something other than C65 mode + BASIC10 the "default". I can't shake the feeling that the mere suggestion of (additionally!!!) putting something advanced in there is being perceived as sacrilege by some folks.


    Oh well, I wasted far too much time on this already, time to get programming again... :)

    I just meant it general (sorry about the possible misunderstanding here), that I read so often about these topic (not from you) that default should be anything other.

  • At the moment the MEGA65 ROM continues in two seperate but still working together attempts.

    First the last known ROM version for the C65 (911210) should be completed as far as possible to make it the final ROM version with BASIC10.

    on the other hand, there is OpenRom, this creates a complete new experience and is open source. Inside OpenRom i could imagine a powerfull programming language.

    It could be a modernised version or BBC.


    but i am against a tweaking of both versions into one. that doesn't feel right.

  • but i am against a tweaking of both versions into one. that doesn't feel right.

    Again, I don't think anyone's actually suggested that, have they?

    Even if they have, I don't think it'd even be possible, let alone make sense. They're too different. You'd essentially need to completely rewrite one BASIC to turn it into the other before that could happen!


    Also, as I noted before, BBC BASIC is already pretty flexible in terms of being able to offer (at least potential) cross-platform support. It could be made to support the MEGA65's features without dramatically altering its syntax, but if it proved necessary to substantially rewrite it to support those new features, then it wouldn't really be BBC BASIC anymore, and it'd lose some of its advantages of portability.


    Anyway, I'm merely supporting the suggestion that having BBC BASIC as an alternative language would be a nice idea. It'd be great if it could be built in as an optional alternative (as that would give it the maximum flexibility), but I'm absolutely not advocating either replacing Commodore BASIC with it or making it the default. If that were done, it would no longer really be a Commodore machine, and the backwards compatibility provided by Commodore BASIC is clearly essential.

  • And for me (with the C64 being my first machine back in the day) it feels exactly like that. Had a totally different experience with the Spectrum Next - great machine, but not my thing.

    I always feel slightly sad when I read something like that, simply because it comes across as a missed opportunity. (I don't mean this as a criticism of bubbob42; it's just a general observation.)


    I spent two summers in, I think, 1979/80 having my first introduction to computers on a Commodore PET 2001 – which I absolutely loved – that was borrowed from my uncle's work. But then I actually grew up on Sinclair and Acorn machines (ZX81, Spectrum, BBC Model B, Spectrum 128, BBC Master 128) – all of which were wonderful. Every platform was very different and each had its individual strengths and weaknesses, and I loved all of them in different ways.


    So, for me, the Spectrum Next and MEGA65 are an absolute delight. My level of technical knowledge varies between the platforms, but I've written programs (in at least BASIC) on all of them and know at least something about all three. So I'd just like to say: appreciate each machine for what it is! There's room for all of them, and there's potential – especially with today's powerful technology and reprogrammable FPGAs etc. – to use multiple systems on a single machine and thus make life even more interesting. (E.g. the Spectrum Next has alternative cores that allow it to become an Acorn Atom, BBC Model B or BBC Master… among many others.)

    So let's not dismiss anything as "not my thing", as there's always a great opportunity to learn to appreciate something new. Maybe the feelings of nostalgia are hard to recapture on a foreign system – I'm lucky because I can get those feelings from all three platforms I've mentioned – but even without the nostalgia factor, other old computers are still fascinating to learn about with the benefit of hindsight (not to mention seeing their versions of software that you enjoyed on your 'own' systems).


    By the way, for all the Commodore owners who say the Spectrum was rubbish… don't believe them! It simply isn't true; the Spectrum was a fantastic machine (my personal favourite 8-bit overall). All the 'successful' platforms from the 80s had their good and bad points, so accept the different machines for what they are and enjoy them. I couldn't be happier that the 8-bit Sinclair and Commodore machines have been enjoying a bit of a revival in recent years. I just wish it would happen for Acorn, too! People should appreciate them all for the wonderful things they are. Besides, the more retro machines you get to know, the better you appreciate them all.


    End of long, boring aside…!

  • Thanks! :) I did quite a few things in BBC BASIC myself (I have a RISC PC and a BBC Master here... and for example my Daleks game for RISC OS is written entirely in BBC BASIC... ;-)) ... which is why I'm absolutely certain it would be a much more fitting companion for the M65 than BASIC10.

    In the last few weeks I have studied BASIC 10 and current BASIC variants more intensively and I have come to this opinion in the meantime:


    For the C65 and the C65 mode BASIC 10 is the BASIC, which was thought and made for it by Commodore. I see this mainly from a historical point of view and this should be kept in the C65 ROM. Maximum that one carries out some "cosmetic subtleties". But on the whole BASIC 10 is just the way it is and it "belongs" in the C65 ROM. Period. :)


    But now there is the MEGA65 in the MEGA65 mode with its many new modern extensions (graphics, memory, speed, ...) and there I am meanwhile also the opinion that also a BASIC belongs into the ROM, which one would like to use also today gladly for programming (learning).


    With all the trimmings, which you have also started to implement in your ELEVEN on this level: Longer variable names, labels instead of line numbers, etc. And if I only think about what would be possible: real integer variables, procedures (also recursive), inline assembler, local variables etc..


    It doesn't hardly make sense trying to "pimp" the BASIC 10 somehow. That is in the core hopelessly outdated :alt: and does not do justice to the possibilities, which the MEGA65 offers in contrast to the 30 year old C65 at that time.


    Here I would find it actually also the better variant to implement a more current BASIC. To overturn and leave behind all compatibilities to the approx. 15 existing BASIC 10 programs :) and to raise this completely anew.


    Whereby I would tend not only for copyright and/or license reasons to a complete new BASIC design (name it MEGA BASIC or so) than to try to convert e.g. the BBC BASIC. Then one would be really completely free, how and what one wants to implement. The "only" problem is, that would take a veryyyyyy long time. ;)


    So again briefly my current point of view to the topic BASIC summarized:


    For the C65 (mode) alone for historical reasons I would leave the BASIC 10 also further in the ROM. That was simply so at that time.


    For the MEGA65 (mode) I am a big friend of a "MEGA-BASIC" with all bells and whistles and comfort, which does justice to the great possibilities of the MEGA65. There I see no reason to hold on to "historical". You still have that in the C65-ROM if you want to use.


    PS: Delivery of the new BASIC by 31.07.2021 would be great! :D

  • Hi Snoopy ,


    So again briefly my current point of view to the topic BASIC summarized:


    For the C65 (mode) alone for historical reasons I would leave the BASIC 10 also further in the ROM. That was simply so at that time.


    For the MEGA65 (mode) I am a big friend of a "MEGA-BASIC" with all bells and whistles and comfort, which does justice to the great possibilities of the MEGA65. There I see no reason to hold on to "historical". You still have that in the C65-ROM if you want to use.


    We think exactly the same way you do.

    Our goal was from the beginning to complete Commodores prototype into a final stage.


    So at the moment there is In the background ALOT of work ongoing to complete the original C65 BASIC10.

    We don't replace it or just patch it, we completely finish it. unfortunately due to copyright reasons, we can't distribute this version freely. We are using the original source files, picking up where Commodore wrapped-up, re-writing certain routines completely, enhancing, i.e. the built in monitor, fixing the Banks and a lot more .....

    A huge thanks goes here to Bit Shifter , who tackles this mammoth task.

    (our current ROM version runs BASIC 10 up to 30% faster just by optimizing the code)

    We believe, this would have been what Commodore would have done, if they would have been able to access 30 years of Retro experience ;-) and for us starting with the Source files is the only valid approach in tackling this task.

    (Here is a picture of a recent ROM (iirc our latest version is 920114 atm.)


    On the other hand we have FeralChild s brillant OpenRom which is totally open source. So for a ROM version like this we can imagine to have a complete new/modern BASIC built in to make access to a Retro system alot more user friendly and to get rid of the copyright problem with such an OS to operate Retro hardware.


    PS: As always, if you're interested to dig a bit into the ROM and the source files, let us know ;-)
    We are always happy for feedback, especially valuable feedback as yours, since you do have a lot of experience with the original ROMs already and this could help us to stay as close to the Original as possible, while still completing it.


    PS: Delivery of the new BASIC by 31.07.2021 would be great! :D

    We would love to comply, but we won't promise anything yet :-D

  • Snoopy Many of the features you want are actually planned for Open ROMs MEGA65 native mode BASIC. But I do not intend to drop line numbers - I would like to stay reasonably compatible with BASIC 2.0 even in M65 native mode. Yes, we can have longer variable names, we can drop/change some minor/problematic BASIC 2.0 features (like undeclared array size defaulting to 10), but I would prefer to retain the spirit of the 8-bit BASIC.


    Also keep in mind that GOSUB <linenumber> will always be much faster than GOSUB <label>. Yes, we have a 40 MHz CPU, but this is not fast enough to completely give up optimizations.


    Nevertheless, if you would like to improve the Open ROMs BASIC - I do not plan any significant work on it in the near future, for now I am going to focus on other areas (M65 screen editor, CP/M mode, etc.)

  • Also keep in mind that GOSUB <linenumber> will always be much faster than GOSUB <label>.

    Why? Just generate a linked list of labels upon RUN, and GOSUB <label> will be much faster than GOSUB <linenumber>.

  • Also keep in mind that GOSUB <linenumber> will always be much faster than GOSUB <label>.

    While using GOSUB a line number is only a label too. As Mac Bacon wrote, a generated label link list at the start will be much more faster for the correct jump to the subroutine than searching through the whole program for the right line number every time.

  • unfortunately due to copyright reasons, we can't distribute this version freely

    Let me pick out this point.


    That's one of the "craziest" issue with a new BASIC. You spent weeks, months, maybe years in enhancing the BASIC 10 and although all your work with it, you can not distribute such a ROM because of the Commodore stuff in it. :S


    Okay at least there is the possibility to publish a patch for the original C65 ROM.


    That is a real good reason to let the BASIC 10 behind. The only thing missing then is that Clonato could get the rights to this ROM because "Commodore inside" and so on ... :wand