CPCWiki forum

General Category => Programming => Topic started by: harzretro on 10:23, 31 January 25

Title: Easier editing Basic Programs
Post by: harzretro on 10:23, 31 January 25
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

Title: Re: Easier editing Basic Programs
Post by: eto on 10:42, 31 January 25
I did this in the past in a similar scenario. Luckily the CPC can save and load BASIC programs in ASCII format. 


But maybe there are better options. 
Title: Re: Easier editing Basic Programs
Post by: harzretro on 10:45, 31 January 25
I thought about this idea, too, 

but the testing ... puuuhhh ... :)


Title: Re: Easier editing Basic Programs
Post by: McArti0 on 10:45, 31 January 25
SAVE"file.bas",a
WinAPE emulator Disc Editor ... Drag&drope to Windows.
Title: Re: Easier editing Basic Programs
Post by: McArti0 on 10:56, 31 January 25
https://www.cpcwiki.eu/forum/applications/locobasic-light-version-of-locomotive-basic/
Title: Re: Easier editing Basic Programs
Post by: robcfg on 12:16, 31 January 25
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.
Title: Re: Easier editing Basic Programs
Post by: harzretro on 12:18, 31 January 25
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 ... :)
Title: Re: Easier editing Basic Programs
Post by: abalore on 14:08, 31 January 25
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.
Title: Re: Easier editing Basic Programs
Post by: McArti0 on 14:46, 31 January 25
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
Title: Re: Easier editing Basic Programs
Post by: abalore on 20:48, 31 January 25
Quote from: McArti0 on 14:46, 31 January 25
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

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.
Title: Re: Easier editing Basic Programs
Post by: reidrac on 09:56, 01 February 25
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.
Title: Re: Easier editing Basic Programs
Post by: genesis8 on 13:47, 01 February 25
Visual Studio code and the extension Amstrad Basic Helper, working great.
Powered by SMFPacks Menu Editor Mod