I’m certainly ok with it being included as a project.
I don’t know about the code’s status either, but the game has been available for decades online with the source code freely accessible. ![]()
I’m certainly ok with it being included as a project.
I don’t know about the code’s status either, but the game has been available for decades online with the source code freely accessible. ![]()
An another parallel point: snippets are really nice addition for beginners. But maybe we could make them as fast as possible for BASIC. Some examples:
Can we provide some ‘faster’ implementations in parallel of easy to understand ones?
The purpose of the snippets addition was not to offer really useful snippets from the go, but to showcase the ability to do so.
So, anyone who could offer such snippets would be welcome to do so and I’ll incorporate them very easily!
This is really great, and good to see it being developed - it will make it far easier to write CPC stuff on the go and that should result in more CPC entries for the 10 liners compos
(although you will have to add token counting per line for this mode of development, it’s not just 255 characters, there’s a token limit too IIRC).
Would be great to integrate one of the BASIC compilers but I know that there are compatibility issues with full basic coverage. IIRC there was one recently written and talked about here (have been stupidly busy this year
)
And then Locomotive BASIC 2 / 2.1 support with labels and subroutines and so on (for the CPC that would have to be used with a compiler only I guess, or (for labels) line number substitution on export)
I’ve got a few features I’m working on, seems every time I implement something I think of something else! So thanks for the great ideas to push the next release further back ![]()
Yeah, that’s very easy to do, on both counts, and I’ll take a look at stuff like 10-liner compo rules to see if there’s something useful there (in terms of limitations etc).
yeah, that’s a tough one unless there’s already a Wasm-assembled compiler out there already? Because porting one is definitely outside my skill level. True, I could Claude my way through something, but I lack the knowledge to properly test it afterwards.
Huh. Haven’t ever touched that. Is there really interest for it?
Thanks again for your comments =)
Maybe it would be good in the IDE to support labels for GOSUB and GOTO at least, even if at dsk generation these are replaced with the actual line numbers at the time.
100 .start_loop: PRINT “Processing data…”
…
200 IF A = 0 THEN GOTO .start_loop
Obviously this starts making a source file that different from the runnable ascii dsk basic file, so if you want the IDE source on the disk then that’s another file to save I guess (filename.src maybe).
I tried it, but take care of something: there is a bad " at the end of listing that seems to provoke some issues with the copy / paste. I have modified my parser so it accepts it… But not sure that is a good way to do it.
I have pushed a version of CPCBasicator in repository that goes to the end of source without error. Now I need to compare with official tokenized version taken from emulator and test if runtime is ok or not.
The copy paste of the full source in WinApe seems to produce some errors (I have the line 5880 - 5890 truncated)… Maybe there is a need to do it in chunks.
This is an interesting idea, but I think that implementing it would move this in another direction. Once we’re doing stuff like that, is it BASIC and more?
What we could do is introduce some tools like bookmarking for routines etc, but I don’t think many would use it…?
I just played around with it and it works nicely. One thing I recognized is that if I press ESC that I can’t stop the current BASIC program for e.g. debugging as the whole emulator will close. Is that something that can be changed?
Hmm, not sure exactly what you mean? Pressing esc doesn’t really shut down the emulator? Something else?
Esc should be a BREAK to stop the basic program. But here it stops the emulator.
That’s why I used WinApe to get SULTAN tokenized, because with autorun in Locopad and Esc exiting, I cannot load and save it to make the tokenized version.
![]()
That was so stupid.
Yeah, I’ll fix it, of course.
Ok, fixed and replaced with shift+ESC. Sorry about that, it was pretty silly on my part.
Hello everyone!
I’m happy to announce LocoPad v1.5 with a few exciting features ![]()
LocoPad Goes AI!!! :
Locomotive BASIC 2 Language Support:
SUB, END SUB, FUNCTION, END FUNCTION, RECORD, END RECORD, DECLARE, FIXED, CONST, LABEL, SHARED, SELECT CASE, CASE, END SELECT, END IF, EXIT FOR, EXIT WHILE, and inline ASM.@ (@LABEL, @DATA, @var), record field dot notation (person.name$), bracket dimensions [ ].ABASC Z80 Compiler Suite (@Fragarco ) :
-O0 to -O3), memory start/data addresses, and 128-byte AMSDOS binary header wrapping..asm)..BIN executables and bootable 40-track .DSK floppy images with auto-boot loaders (DISC.BAS).Native Bytecode Tokenizer & Instant Boot (@SagaDS**)** :
&0170).BASIC Minifier & Crunch Suite :
REM, ') with automatic forward branching retargeting (GOTO, GOSUB, THEN, ELSE, RESTORE) without code renumbering.A–Z, A0–Z9).BASIC 10-Liners Compo Assistant :
${chars}c · ${tokens}B).Error 24).Floppy Disk (.DSK) & Cassette Tape (.CDT) Tools:
.BAS detokenizer back to editable ASCII.Companion Studios:
.SCR screen dumps.SOUND / DATA export.%, !, $, ()), tracking assignments/reads, detecting single-use typos, and providing clickable code jump tags.Ctrl+G jump by editor line or BASIC line number with live preview.Workspace Management & Themes:
Various bugs fixed (such as ESC closing the emulator instead of BREAKing the program running)
tools/abasc/ powering native Z80 machine code generation.I’ve now ran out of ideas for features. Please test it and let me know what you think!
Apologies, AI wasn’t working because of CF issues, had to bust the cache to make it load properly.
Thanks Gryzor for this milestone. It’s a huge one.
Some points:
It is not clear how to add the generated screen artwork inside the project.
‘Add to project’ creates the 1KB scr file in DSK with the loader inside (not the graphism)… If I download the scr file, how should I add it to project?
I like the minifier interface, clear and easy to understand. Small possible improvement (but big development like always): pack DATA statements into less lines (have to keep track of RESTORE statements first to not mess things).
On other hands, here are my first test issues (I used SULTAN.BAS as a base):
Minifier has an issue with Data Strings with double quotes. Check the words data after variable minifying. All word are transformed in A0-Z9: huge bug to correct.
Also, I noticed that some lines that finished with a GOSUB/GOTO are marked as ‘do not pack next line’… Why? I understand for IF THEN ELSE and Lines that are used as a target for a GOTO / GOSUB, RESUME, but not for this case.
‘Variables’ reports hexa values &A000 as variable A000.
Also it does not take into account defint / defreal / defstr: in SULTAN there is a DEFINT a-z so A (line 80) should be seen as Integer. By default all variables are Float if I remember well.
REMAIN() and SQ() are considered as array but they are Basic functions.
Some strings that are used on same line so are reported as single used.
It seems that SULTAN declares its dim variables with bracket???(line 170) I didn’t know it was possible. Variables don’t see them.
Linter is not really Locomotive BASIC aware, no?
CLS issue, TAG issue, PRINT issue, next.f issue (I know this one
). It seems that ‘:’ is treated as a label identifier for this linter.
One editor does not have a search feature? Using Ctrl+F3 inside CodeMirror 8 doesn’t seem to search things, as I don’t know this editor, it’s maybe ‘normal’. I switched to the other one ![]()
Thanks so much for this feedback! Greatly appreciated ![]()
It’s obvious where the problem lies with most of these issues so I’ll try to fix them today and will get back to you. The scr content is a code regression, I already have this working.
Will get back to you soon (crossing fingers, that is)
I’m probably blind - how can I add a binary to my project? I have a RSX which I want to include in my BASIC program and I can’t find a way to add the BIN to the project.
That’s a design oversight on my part, but:
Haven’t used it extensively, but it works.