CpcTerm Documentation (c)1996 Brice Rive

1_ What is it ?
2_ How do I use it ?
3_ How does it work ?
4_ Misc. info.

1_ What is it ?

CpcTerm is a program that lets you transfer data from your CPC to 
a Macintosh. It can transfer ROMs, full disks (including most known 
protections), and small binary files.
It is cheap to use (just a simple cable) and fast (transfer at 19200 bauds).

2_ How do I use it ?

You need:

	-A CPC
	I only tested it on an 6128 and a 464 but it should work fine on others 
	too.
	
	-A cable
	The cable goes between the printer port of the CPC and a serial port on 
	the Mac. It needs to connect the following pins:
	
		On The CPC:					On The Mac:
			Pin 2 (D0)					Pin 8 (RxD+)
			Pin 11 (Busy)				Pin 6 (TxD+)
			Pin 19 (Cnd)				Pin 4 (GnD)
			
		Note: If you look at the back of the computers, the pins are layed out
		as follows:
			CPC:					Mac:

			18 -> 1					8 7 6
			36 <- 19				5 4 3
									 2 1
	
	-The CpcTerm program
	You need to find a way to transfer it to your CPC:
		-Type it in with your little fingers.
		-Download it from a BBS.
		-Transfer it to 5"1/4 disk from a PC.
		-Send me $1000000 and a disk.
		-Pray hard.
		-Others ideas?
		
	It is a binary that needs to be loaded and executed at adress $4000. You will 
	probably need a little basic prog to do that (unless you set the binary 
	file load and exec adresses directly).
	Example:
		10 memory &4000
		20 load "cpcterm.bin",&4000
		30 call &4000
		
	-A communication program on your Mac that supports XMODEM CpcTerminal 1.1 
	I tried Microphone and Communicate.
	
	The settings for the serial port should be:
		19200 bauds / 8 bits / 2 Stop bits / Parity None

You need to set-up the cable and launch the communication software on the 
mac before you can do any transfer.

When you run CpcTerm on your CPC, you can:

	-Transfer one of the ROMs
		You are then prompted to specify which ROM you want to transfer (Lower 
		Upper, or Disk). The result is a 16K binary file.
		
	-See the disk catalog
	
	-Transfer a disk
		You need to specify the disk name and the scan type for the disk:
			-Short     = 42 tracks (3" or normal 5"1/4)
			-Long      = 59 tracks (256K 5"1/4)
			-Very Long = 80 tracks (360K 5"1/4)
		The result is a binary disk image file. The format is described below.
		You can interrupt the disk scan with ESC.
	
	-Transfer a smalll (<16K) binary file.
	
	-Quit

Format of the disk image file (DIF):
	The disk image file is made up of a 8192 bytes header that contains
	disk, tracks, and sectors descriptions, followed by the sectors data.
	The sectors data are clipped to 8192 per sector.

	Header format:
	
	Byte 0:		Format Version (currently Version 2)
	Byte 1:		Tracks number

	Track descriptions:
		Byte 0:		Sector number

		Sector descriptions:
			Byte 0:		Track ID
			Byte 1:		Head ID
			Byte 2:		Sector ID
			Byte 3:		Sector Size (0=128, 1=256, 2=512, ...)
			Byte 4:		Status register 0 (after a read)
			Byte 5:		Status register 1 (after a read)
			Byte 6:		Status register 2 (after a read)
						Bit 8 is used as a flag indicating if the sector
						is compressed (same value all over the sector).
			Byte 7:		Value for a compressed sector.			
			
	Note: If a sector is compressed, its data wont show in the sectors data 
	section of the image file.


4_ Misc. info.

-The disk image format might not work for certain advanced protections, so 
I might upgrade it to version 3 later.

-I originaly intended to implement Tape transfer too, but I don't have a use
 for that.
 
-For help, bugs, suggestions, etc., you can reach me at:
	brice@world-net.sct.fr

