Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnsonjh/exchange
exchange: Exchange is a (user space) UNIX port of CP/M-68K by Roger Ivie, useful for manipulating DRI (8" SSSD) or P112 (3.5" DSDD) format CP/M disk images
https://github.com/johnsonjh/exchange
cpm cpm-68000 cpm-68k disk-image exchange p112
Last synced: about 2 months ago
JSON representation
exchange: Exchange is a (user space) UNIX port of CP/M-68K by Roger Ivie, useful for manipulating DRI (8" SSSD) or P112 (3.5" DSDD) format CP/M disk images
- Host: GitHub
- URL: https://github.com/johnsonjh/exchange
- Owner: johnsonjh
- Created: 2021-03-29T21:00:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-12T15:33:38.000Z (over 2 years ago)
- Last Synced: 2024-10-11T02:47:12.912Z (2 months ago)
- Topics: cpm, cpm-68000, cpm-68k, disk-image, exchange, p112
- Language: C
- Homepage: https://github.com/johnsonjh/exchange
- Size: 69.3 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Exchange
Minimal CP/M for UNIX
### Overview
Greetings!
This is a utility that allows **CP/M** disk images to be manipulated under UNIX.
It supports disk images in either the standard _DRI_ 8" SSSD format or the
_P112_ 3.5" format. Disk images can be examined and files imported and exported
from them.### Sources
The source is a slightly hacked over copy of **CP/M-68K** which has been worked
over to allow compilation on UNIX using GCC, to wit:- A handful of typecasts have been dropped in.
- An assumption that an int is 16 bits has been fixed.
- An assumption that chars are signed has been fixed.
- The file `diverge.h` renames all of the globals to ensure they don't collide
with operating system globals.
- I changed the way the _BDOS_ communicates with the _BIOS_; see `biosdef.h`
- There are probably a couple of other minor changes I made that I've forgotten
(perhaps renaming a routine or two before I decided to make `diverge.h`).
- A **BIOS** that allows the program to be run under UNIX.I've also added a couple of built-in commands:
- _EXIT_ causes **CP/M-68K** to exit, returning to the host operating system.
- _IMPORT_ copies a file from the current directory of the host operating system
into the disk image.
- _EXPORT_ copies a file from the disk image into the current directory of the
host operating system._IMPORT_ and _EXPORT_ do not accept wildcards.
This is just a quick hack that turned out to be useful, not a snazzy disk image
manipulation program.### Building
To build the program, execute `make`.
This results in an executable called `exchange`.
The command-line syntax is: `exchange [-p112] file.img`, where:
- `-p112` This option tells the file to use the _P112_ 3.5" disk format for the
image. By default, the the standard _DRI_ 8" SSSD format is used.- `file.img` is the name of the disk image that should be used.
### Usage
In this example, I copy the file `BDOS.LST` from a _DRI_ 8" SSSD image
containing **CP/M-80** 1.4 sources (obtained from
[The Unofficial CP/M Web Site](http://cpm.z80.de/)) to _USER 1_ of the _P112_
boot disk image (obtained from
[The P112 Homepage](http://members.iinet.net.au/~daveb/p112/p112.html)):```text
% uname -a
Linux powerpc.no.domain 2.4.22-2f #1 Sun Nov 9 16:49:49 EST 2003 ppc
% ls
bdosPLM.img bootdisk.img exchange
%./exchange bdosPLM.imgA>dir
A: BDOSI SRC : BDOS PLM : BDOS OBJ : BDOS LST
A>export BDOS.LST
export BDOS .LST -> BDOS.LST
A>exit
% ls
BDOS.LST bdosPLM.img bootdisk.img exchange
%./exchange -p112 bootdisk.imgA>user 1
1A>dir
A: RECEIVE PAS : UUENCODE PAS : UUDECODE PAS : USER MAC : ROM UUE
A: ROM PAS : ROM COM
1A>import bdos.lst
import BDOS.LST -> BDOS .LST
1A>dir
A: RECEIVE PAS : UUENCODE PAS : UUDECODE PAS : USER MAC : ROM UUE
A: ROM PAS : ROM COM : BDOS LST
1A>exit
%
```### Conclusion
Enjoy!
- _Roger Ivie_ \