c2d/README.md

120 lines
3.3 KiB
Markdown
Raw Normal View History

2014-11-24 17:44:16 +00:00
### Description
2014-11-26 16:14:47 +00:00
`c2d` is a small utility that will read Apple II binary and monitor text files and output a DOS ordered diskette image that will boot your code quickly.
2014-11-24 17:44:16 +00:00
> Based on work by:
2017-04-02 16:59:16 +00:00
>
2014-11-24 18:20:29 +00:00
> Weishaar, Tom. *Running without filenames*. Open-Apple Jan. 1985 Vol. 1, No. 0: p. 7 (<http://apple2online.com/web_documents/Open%20Apple%20Vol1No00.pdf>)
2014-11-24 17:44:16 +00:00
### Features
* Platforms tested:
* 32-bit/64-bit x86 OS/X.
* 32-bit x86 Windows/MinGW.
### Download
```
git clone https://github.com/datajerk/c2d.git
```
*or*
Download <https://github.com/datajerk/c2d/archive/master.zip> and extract.
### Build Notes
2017-04-02 17:01:46 +00:00
Unix/Linux:
make
*or*
2017-04-09 03:16:48 +00:00
OS/X, Linux, Cygwin:
2014-11-24 17:44:16 +00:00
2017-04-09 03:16:48 +00:00
gcc -Wall -Wno-missing-braces -I. -O3 -o c2d c2d.c -lm
gcc -Wall -O3 -o bin/text2page text2page.c -lm
gcc -Wall -O3 -o bin/page2text page2text.c -lm
2014-11-24 17:44:16 +00:00
Windows/MinGW:
PATH=C:\MinGW\bin;%PATH%
2017-04-09 03:16:48 +00:00
gcc -Wall -Wno-missing-braces -static -I. -O3 -o c2d c2d.c -lm
gcc -Wall -O3 --static -o bin/text2page text2page.c -lm
gcc -Wall -O3 --static -o bin/page2text page2text.c -lm
2017-04-09 03:16:48 +00:00
2014-11-24 17:44:16 +00:00
2017-04-09 03:16:48 +00:00
### c2d Usage/Examples
2014-11-24 17:44:16 +00:00
```
usage: c2d [-vh?]
2017-04-23 02:36:47 +00:00
c2d [-bum] [-r row] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk
2014-11-24 17:44:16 +00:00
-h|? this help
-m jump to monitor after booting
-s XXXX jump to XXXX after booting
-t filename, where filename is a 1K $400-$7FF text page splash screen
The splash screen will display while the binary is loading
-u do not patch screen holes
2017-04-23 02:13:22 +00:00
-b animated loading bar (experimental)
2017-04-23 02:36:47 +00:00
-r override row default of 19 with 'row'
2014-11-24 17:44:16 +00:00
-v print version number and exit
2017-04-09 03:16:48 +00:00
Input without a .mon extension is assumed to be a binary with a 4 byte header.
2014-11-24 17:44:16 +00:00
If the header is missing then you must append ,load_address to the binary input
filename, e.g. filename,800. The load address will be read as hex.
input with a .mon extension expected input format:
0800: A2 FF 9A 20 8C 02 20 4F
0808: 03 4C 00 FF 20 9E 02 A9
Examples:
c2d hello hello.dsk
c2d hello.mon hello.dsk
c2d hello,800 hello.dsk
c2d -m test,300 test.dsk
2017-04-02 16:59:16 +00:00
c2d -s 7300 alpha4,400 alpha4.dsk
2017-04-09 03:16:48 +00:00
c2d -t gameserverclient.textpage gameserverclient,800 gameserverclient.dsk
```
### text2page Example
2017-04-23 02:16:01 +00:00
Input is expected to be ASCII text (LF or CRLF line terminated). Only the first 40 characters/line and the first 24 lines are read. See `gameserverclient.text` and `barloader.text` examples.
2017-04-09 03:16:48 +00:00
```
text2page <gameserverclient.text >gameserverclient.textpage
2014-11-24 17:44:16 +00:00
```
### page2text Example
Input is expected to be an Apple II binary from $400-$7FF. Exactly 1024 bytes. See `gameserverclient.textpage` example.
2017-04-16 20:13:53 +00:00
> Text output lines are newline (LF) terminated. Windows users may need to convert LF to CRLF (editor dependent).
```
page2text <gameserverclient.textpage >gameserverclient.text
```
2017-04-02 17:08:03 +00:00
### Bugs
Yes. No input checking. Big Endian untested.
2014-11-24 17:44:16 +00:00
### The Ugly Stuff
2017-04-23 02:37:59 +00:00
c2d, Code to Disk, Version 0.55
2014-11-24 17:44:16 +00:00
2017-04-02 01:09:16 +00:00
(c) 2012,2017 All Rights Reserved, Egan Ford (egan@sense.net)
2014-11-24 17:44:16 +00:00
2017-04-02 01:09:16 +00:00
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
2014-11-24 17:44:16 +00:00
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
2017-04-02 16:59:16 +00:00
License: Do what you like, remember to credit all sources when using.
2014-11-24 17:44:16 +00:00