CPCWiki forum

General Category => Programming => Topic started by: Bytebreaker on 12:29, 04 March 16

Title: Saving and copying bin files between disks and tapes
Post by: Bytebreaker on 12:29, 04 March 16
Hello,


I have a tool called cpcxfs. This allows me to extract a bin file from one disk image and insert it into another disk image.
Is this also possible with tapes?


I want to convert my latest basic demo to tape. Normally, I load from disc, remove or change all Basic 1.1 related commands, and save directly to wav file with WinApe. But I also have bin files that need to be put exactly in place on the tape so an active program can load them.


The bin files are screen grabs. I could ofcourse redo the screen grabbing, but I don't want to see a "Press play and then any key" message included into the bin file after the save"pic.bin",b,&c000,4000 command.


How can I grab the screen content and copy it on tape without "Press Play then any key" message destroying my picture?
Title: Re: Saving and copying bin files between disks and tapes
Post by: Bryce on 12:47, 04 March 16
Use the command: Save "!Screen.bin",B,&C000,&4000

The ! tells the CPC to suppress the "Press Play then any key", the B tells it to save it as Binary. The addresses are the start and length of the memory area you want to save - In this case the screen.

Bryce.
Title: Re: Saving and copying bin files between disks and tapes
Post by: Fessor on 13:54, 04 March 16
|disc.in
|tape.out
speed write 1 (doubles the speed from 1000 baud to 2000 baud, reducing save and load-times)

And, as Bryce had written, the ! before the filename to supress messages from the tapemanager if you want use the Adress of the Screenmemory.


By manually composing the Tape you can also avoid this messages coming into your graphics by loading the Image to a different memory adress and then save from that adress as startingpoint.
memory &3fff
load"screen.bin",&4000
save"screen.bin",b,&4000,&4000

In your Basicfiles you had only to assure, that they are loaded to adress &c000 and you are loading the files with "!" before the filename
Title: Re: Saving and copying bin files between disks and tapes
Post by: arnoldemu on 14:05, 04 March 16
2cdt lets you create tapes and add files.

Unofficial Amstrad WWW Resource (http://www.cpctech.org.uk/)

Look in downloads.

I don't know if there is one to extract files although I seem to remember writing one a few years back, so if you need that I can dig it out.
Title: Re: Saving and copying bin files between disks and tapes
Post by: Bytebreaker on 14:53, 04 March 16
Great thank you so much.
Title: Re: Saving and copying bin files between disks and tapes
Post by: AMSDOS on 21:49, 04 March 16
Quote from: arnoldemu on 14:05, 04 March 16
2cdt lets you create tapes and add files.

Unofficial Amstrad WWW Resource (http://www.cpctech.org.uk/)

Look in downloads.

I don't know if there is one to extract files although I seem to remember writing one a few years back, so if you need that I can dig it out.


In Winape I just extract the file via Edit Disc Option to where I have 2cdt.


@Bytebreaker (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1668) 2cdt is a command line (DOS) program which can take those files (Binary/BASIC) to produce a CDT. You can use CPCXFS, but with Winape, you can use the Edit Disc Option to Extract the Files, but with 2cdt I use it from the Command Prompt, it may work from RUN if your Windows has it. The command prompt can look like this:


2cdt -n -r "LINE DEMO" "DISC.BAS" "Lines Demo in BASIC.cdt"


-n = New CDT
-r = Name of the File on Tape
The second filename is the name of the file to transfer to Tape & the last one is the name of the Tape.


Once I've done that, any additional files which need to go onto that tape, I just use the Up Arrow to bring that prompt up again, though this time remove the "-n" from the line, and what happens is the next file along will be added onto the Tape.


Just a Note when 2cdt is executed, the options prompt comes up for me, initially I thought I'd done something wrong because of that happening, though the file comes out just fine.


Also I'm not using the latest Winape, so i'm unsure if it can produce a CDT file, the earlier version I'm using can save a Tape in WAV format, so all that info I've provided maybe all possible to do in Winape now?

Title: Re: Saving and copying bin files between disks and tapes
Post by: arnoldemu on 10:22, 05 March 16
Quote from: AMSDOS on 21:49, 04 March 16

Just a Note when 2cdt is executed, the options prompt comes up for me, initially I thought I'd done something wrong because of that happening, though the file comes out just fine.
Yeah sorry that is a bug. I'll upload a fix soon along with some macosx build fixes.
Powered by SMFPacks Menu Editor Mod