Hello,
i've a big basic only program - more than 30 in memory - and i like to rearange some stuff. But that is a crap with the normal basic editor.
Is there a way to do this with a better linux text editor and easy way to test the result with an emulator?
Do you have any ideas?
Best regards,
Axel
I did this in the past in a similar scenario. Luckily the CPC can save and load BASIC programs in ASCII format.
- Save the BASIC program as ASCII
- export it from the DSK to the local drive
- edit in a text editor
- import it back to the DSK
- load the ASCII program (CPC will convert it to Basic automatically)
But maybe there are better options.
I thought about this idea, too,
but the testing ... puuuhhh ... :)
SAVE"file.bas",a
WinAPE emulator Disc Editor ... Drag&drope to Windows.
https://www.cpcwiki.eu/forum/applications/locobasic-light-version-of-locomotive-basic/
JavaCPC would make it easy too to work on a regular text editor and then just paste the program on the emulator and then save it to a tape or disk image.
I tried with winape with wine - drag and drop don't work.
Hmmmm, didn't saw a feature like that in javacpc - i've to take a look ... :)
I use WinAPE:
- Load the program with normal LOAD"..." command
- Read BASIC to get the program on a editor window (File / Read BASIC in Assembler window)
- Modify the program
- Reset the emulation
- Copy & paste program in Auto-typing window (File / Auto type in main Window)
- Set emulation speed to 1000%
- Wait for it to finish (pretty fast in 1000%)
- Back to 100% speed
- Save the program on disk
More detailed flow
Bonus feature: With this you can also read "hacked" BASIC files modified to not show the content on LIST. Like many game loaders. Sometimes this requires to Read BASIC after RUN the program.
Quote from: McArti0 on 10:56, 31 January 25https://www.cpcwiki.eu/forum/applications/locobasic-light-version-of-locomotive-basic/
I'll write louder... CPCBasicTS
https://benchmarko.github.io/CPCBasicTS/?example=1st&implicitLines=true
Quote from: McArti0 on 14:46, 31 January 25Quote from: McArti0 on 10:56, 31 January 25https://www.cpcwiki.eu/forum/applications/locobasic-light-version-of-locomotive-basic/
I'll write louder... CPCBasicTS
https://benchmarko.github.io/CPCBasicTS/?example=1st&implicitLines=true
That's very nice, but running in an emulator may be useful to test the real speed of the application. I tried CPCBasicTS, setting to the minimum speed, and it still runs everything instantly.
It is really simple, I put this together in 5 minutes: https://git.usebox.net/pc-cpc-basic/about/
Once you have compiled iDSK (and have cpcec installed; but any emulator would do).
Edit game.bas (save with DOS end of lines), and then "make cpcec" to put the bas file in the DSK and run it in the emulator.
Visual Studio code and the extension Amstrad Basic Helper, working great.