News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Paulo Garcia

BASIC Editor outside emulator

Started by Paulo Garcia, 18:44, 11 August 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paulo Garcia

Hi


this is probably a very noob question and I swear I looked around and couldn't find an answer for it :)


Is there any option to use any text editor to create Locomotive BASIC programs and load them on an emulator. I'm learning about the Locomotive, but typing in the emulator is not very productive....


I wonder if the workflow would be:


1-Use any editor
2-Generate a disk image
3-Startup emulator loading the image
4-BAM!


Is this is correct? what would be the tools to accomplish the item 2?


Thanks



Devilmarkus

Hello Paolo,
sure, you can use a texteditor to edit BASIC programs.
You then can transfer them as ASCII file on a DSK (WinApe can do that, by pressing CTRL + F1, JavaCPC can do that on Windows PC by using integrated DSKUtil)
Or, if you cannot transfer the txt file on a DSK, just copy the text and paste it into the emulator using Autotype feature (Most emulators feature that)

Important: When you copy it to DSK as ASCII file, rename it to .BAS instead of .TXT!
Amsdos can read ASCII BASIC files, as well, as regular ones (but loading takes a bit longer)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Paulo Garcia

Hey, thanks for the tips..


I forgot to mention I am on Mac OSX. You say JavaCPC only has that feature on Windows, right?


Are you aware of a multiplatform disk tool? I can also try to wrap DSKUtil around Wine. Sometimes it works very well...


Cheers




Devilmarkus

JavaCPC works on most MACs... But the integrated DSKUtil uses CPCXFS, which is a Windows shell application...
But JavaCPC has Autotype ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

TFM

Oh, and you can save any BASIC program as ASCII file, so you can edit it in any text editor. Example:


save"program.txt",a


TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Paulo Garcia

So that means if I build cpcxfs for Mac you will add it to JavaCPC (Which I am already happily using) ???  :D


(*) I've found the source in this thread: cpcxfs - Not sure if it is the latest & greatest though


@TFM - Nice tip since I had type few small programs on the emulator already :)


Cheers

Devilmarkus

Sorry, as I dont know how to call MAC executables from Java...
(Maybe works the same, but as I cant test it: Better not)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Paulo Garcia

Thanks anyway. I've found iDSK which already compiles well on Mac, so I don't mind at all to add files first and then load them on the emulator as a second step.


Thanks

Executioner

Quote from: Devilmarkus on 21:02, 11 August 15
Sorry, as I dont know how to call MAC executables from Java...
(Maybe works the same, but as I cant test it: Better not)

Download Oracle VirtualBox and find a Mac OS X image to install on a VM, then you can test JavaCPC on that :)

arnoldemu

Quote from: Executioner on 22:10, 12 August 15
Download Oracle VirtualBox and find a Mac OS X image to install on a VM, then you can test JavaCPC on that :)
You make it sound simple, and it's not, unless you run the virtualbox on the mac ;)

You are effectively making a virtual hackintosh and depending on which osx you have and which virtualbox, and depending on which "version" of mac osx you download you'll find it hard to get going.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Executioner

maybe it's not easy, but I installed iDeneb ages ago over Oracle VM and it just works.

Devilmarkus

#11
Just installed Mac OS X (Yosemite) 64bit in VirtualBox...
Performance = old coffee machine...
Installing Netbeans + Java JDK 8, too, now...
But I don't think it will run well

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

cpcitor

Old thread I know.  :)

Quote from: Paulo Garcia on 18:44, 11 August 15
Is there any option to use any text editor to create Locomotive BASIC programs and load them on an emulator. I'm learning about the Locomotive, but typing in the emulator is not very productive....

I wonder if the workflow would be:

1-Use any editor
2-Generate a disk image

Is this is correct?

This is correct.
When creating color-flood-for-amstrad-cpc using cpc-dev-tool-chain I wanted to insert a small BASIC loader (not necessary for the game, mainly to show that it is possible to return from C to BASIC).

So I created a simple makefile rule to convert an ASCII file to proper linefeed convention (from platform-specific 10 Unix/Mac, 13 traditional Mac, 13+10 Windows) and a project-specific rule to insert that into disk or tape image. (character set conversion from utf-8 would be timely)

Quote from: Paulo Garcia on 18:44, 11 August 15
what would be the tools to accomplish the item 2?

cpc-dev-tool-chain could be adjusted to support your workflow out-of-the-box. I created a wish/enhancement issue More flexible tape/disk targets/layout · Issue #12 · cpcitor/cpc-dev-tool-chain

Quote from: Paulo Garcia on 18:44, 11 August 15
3-Startup emulator loading the image
4-BAM!

Regarding your step 4 I have a solution: https://www.smbc-comics.com/comic/2011-02-17#smbc_doom



Ref: cpcitor/color-flood-for-amstrad-cpc: A puzzle game for 2 to 4 player. Written in portable C as an experiment: can a program with non-trivial algorithmic logic be compiled and run on an 8-bit platform? Answer: yes..
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

Powered by SMFPacks Menu Editor Mod