Page 1 of 1

Saving and loading Commodore Basic programs

Posted: Tue Dec 16, 2003 7:18 pm
by brubart
How do you save and load Commodore Basic programs (not machine code, just Basic)? After typing in a program, I tried
Save "program",8,1 but the Basic program named "program" did not get saved anywhere. Thanks for your help.

Posted: Wed Dec 17, 2003 8:06 am
by Rebell

Save/load Basic program

Posted: Wed Dec 17, 2003 3:11 pm
by brubart
Thanks for your help, but I want to save a Commodore Basic program that I coded in the emulator, and later recall and run it. I do not want to save the state of a game. What is the filename extension for a Commodore Basic program? What is the Commodore command for saving a Basic program, then later loading it into memoryand running it? Thanks.

Posted: Fri Dec 19, 2003 12:29 am
by StevenRoy
First, you need a blank disk in the emulated drive. There is a menu option in CCS64 that'll let you create one. Try highlighting the Drive 8 option in the F9 menu and pressing F2 instead of Enter. That brings up the "Status" menu which not only lets you toggle some emulation options, but also create a new disk image. Create a D64 one. (G41 doesn't seem to work quite right... Either that or it just creates an unformatted disk which isn't what you want unless you don't mind formatting it manually.)

When I pressed Enter on the "Create Empty .D64" option, CCS64 3.0 seemed to lock up... It didn't. (I bet this bug will be fixed really soon.) Type a filename for the image and press Enter, and emulation will resume with the blank disk inserted.

At this point, you can save your BASIC program to the disk, just like on a real C64.

READY.
SAVE "filename",8

SAVING filename
READY.

By default, CCS64 automatically saves the current disk image when you switch disks or exit. (This is configurable, though. Check your options if you're not sure.) That means that next time you run CCS64, you'll be able to select the image you created and then load the file you saved, either automatically with the CCS64 interface or with the LOAD"filename",8 command.

(EDIT: I just tested this... Turns out that setting the "Disk Saving" option to "Ask at disk change" didn't work right when I exit using the menu bar. CCS64 3.0 exits before displaying the "Save disk image" prompt. and doesn't save the disk image. Set that option to "Continuously" to get around that problem.)

Save/load Basic program

Posted: Fri Dec 19, 2003 4:56 pm
by brubart
Thanks, Steve. I still can't save or load a basic program. I'm using V3.0 Beta 1.3. Here's what's happening.
1. I start CCS64.
2. I type <F9> to go to the setup screen.
3. Disk 8 is highlighted, and I type <F2> to go to the status menu.
4. I scroll down to Create Empty.D64 and press <Enter>.
5. The machine hangs up. Even 15 minutes later, it's still hanging.
I can't type a filename because no filename is requested.

My status menu screen looks like this:
Active Yes
Disk motor Off
LED light Off
Track 19
Head stack Off
Write protect Off
Emulate mode On

I can't change any of those items above except Write protect.

If I write a program in the emulator first, then go to F9, Active is "No".
"Create Empty .D64" still hangs up. Any ideas? Thanks for your help.

Brubart

Posted: Sat Dec 20, 2003 3:37 am
by StevenRoy
Perhaps I should clarify this part in my previous post:
CCS64 3.0 seemed to lock up... It didn't. (I bet this bug will be fixed really soon.) Type a filename for the image and press Enter, and emulation will resume with the blank disk inserted.
By that, I mean that it looks like a lockup, but it isn't. The prompt for the filename doesn't appear, but it is there (somewhere). You won't see anything happen while you type in a filename, but after you type in some letters and press enter, emulation will resume.

At least that's what happened with the version I have.

Saving and loading Commodore Basic programs

Posted: Tue Dec 23, 2003 3:33 pm
by brubart
Thanks, Steven. That worked great! You rock.

Brubart