I'm planning to edit the BAS file of a game to modify it. My goal is to create a very similar game, a homebrew game from the mid 80s that has been lost forever.
I know I can edit BAS files from the Amstrad CPC or an emulator, and I know you can extract any file from a DKS with some tools. But I don't have too much time to do research, so I decided to ask here.
If anyone has edited BAS files before, what is the fastest way to do it so you can also test it? I assume doing it directly on the CPC or emulator is not the best way... Thanks in advance!
If you save a bas file with ,a at the end, the it becomes an ascii file which still works on the Amstrad side.
On winape you navigate to File:Drive A:Edit disc
Then drag your file on your desktop.
Notepad++ is a good tool.
If I remember correctly, you can copy the basic text from your editor and paste it on JavaCPC.
Load your file under WinAPE, and press F3 to show up the Code editor.
Select File from the menu, then Read BASIC.
That is cool, I never recognized this feature before! :)
You can edit locomotive basic in Visual Studio Code and run it inside with the extension Amstrad Basic Helper by cebe74.
It's using CPCBasic by Marco Vieth (javascript code to run locomotive basic), there is a github page, but latest version is CPCBasicTS using TypeScript instead of javascript?
Quote from: genesis8 on 10:45, 13 November 23You can edit locomotive basic in Visual Studio Code and run it inside with the extension Amstrad Basic Helper by cebe74.
It's using CPCBasic by Marco Vieth (javascript code to run locomotive basic), there is a github page, but latest version is CPCBasicTS using TypeScript instead of javascript?
CPCBasic is a great and ultimate solution, no need to pass into an emulator (even if it's easy, CPCBasic is easier!)
Is CPCBasic able to run all the hardware based parts ? Graphics, Sound etc?
IIRC also JavaCPC offers some BASIC features...
I wrote an article here about copying BASIC programs in an editable form between Winape and the host machine.
You can use print to file to export code from the emulator as a text file, and Autotype to get code in again.
Once you have a text file, you can use any code or text editor.
https://www.sean.co.uk/books/amstrad/export_basic_code_as_text_emulator.shtm
Quote from: Jean-Marie on 03:10, 12 November 23Load your file under WinAPE, and press F3 to show up the Code editor.
Select File from the menu, then Read BASIC.
Due to a bug in WinApe, there is a problem using your method. If the file contains some symbols of the formula
SYMBOL 237,&X10001100 WinApe changes the bytes to
SYMBOL 237,&X00110001
SAVE"FILE.BAS",a
and copy from WinAPE disc editor to Windows explorer. Modify in notepad as ascii txt and back to the WinAPE disc editor.
Open FILE.BAS in https://crocods.org/web/ emulator
if you're using Winape, go to Settings,Other and set the printer to File and assign a txt output file, then when you load any .BAS on the emulator just type "list#8" and it will save the listing in the txt.
When you want to test it, you just press on Winape CRTL+F5 and paste it
Quote from: SerErris on 22:31, 16 November 23Is CPCBasic able to run all the hardware based parts ? Graphics, Sound etc?
Sorry for the late answer, yes, you can check : https://www.genesis8bit.fr/archives/index.php?news_id=2159 (https://www.genesis8bit.fr/archives/index.php?news_id=2159)
And of course the examples of Marco Vieth : https://benchmarko.github.io/CPCBasicApps/ (https://benchmarko.github.io/CPCBasicApps/)
Github : https://github.com/benchmarko/CPCBasicTS/ (https://github.com/benchmarko/CPCBasicTS/)
@Johnny Olsen , you can test your luck with
Caprice Forever, it has the same function :
Thanks guys. I know what I have to do. It was just meant as a warning about the bug in WinApe.