$Id: README,v 1.2 1999/03/28 05:33:13 andrewk Exp $

Discussion of the file layout
=============================

main.c
|
+-rom.c			rom abstraction
| |
| +-caetla.c
| |
| +-ezoray.c
|
+-pio.c			exe abstraction
| |
| +- bfd.c
| |
| +- cpe.c
| |
| +- psx.c
|
+-card.c		memory card interface. uses rom.c
|
+-error.c
|
+-vram.c		vram abstraction
| |
| +-tim.c
| |
| +-ppm.c, png.c, ...
. 
.

Discussion of the various command line switches:
================================================

Option parsing is done with GNU getopt_long(3). There is always a long and
a short version for a switch. See the man page for getopt_long(3) for more
information (In this README is <n>=number, <s>=string).

--pc=<n>,-P
	Override the PC. Default is taken from an executable.

--gp=<n>,-G
	Override the PC. Default is taken from an executable.

--sp=<n>,-S
	Override the SP. Default is taken from an executable.

--tcb=<n>,-t
	Set number of tasks. Default is 4.

--event=<n>,-e
	Set number of events. Default is 16.

--go,-g
	Run a program with this environment. Default is no run.

--call=<n>,-c
	Execute at specified address. Default is none.

--console,-o
	Attach console and file server to the remote program. Default is none.

--address=<n>,-a
	Set address for binary up/download. Default is undefined.

--length=<n>,-n
	Set number of bytes for binary download. Default is undefined.

--upload,-u
--download,-d
	Set transfer direction for binaries. Default is --upload, if an --address
	is specified.

--port=<n>,-p
	Set I/O port to use. Default is 0x320.

--realtime,-r
	Use another scheduler to get more CPU cycles. On a multiprocessor system
	this locks up one CPU for this process.

--quiet,-q
	Suppress output.

--help,-h
	Show an option summary.

--verbose=n,-v
	Increase verbosity level. Default is 1, 0 equals to --quiet. To get more
	output set it to >= 2.

--version,-V
	Print out program version.

--info,-i
	Print out various informations, also to the given file.

--slot=<n>,-s
	Specify memory card slot. Default is 1, possible is 1..2

--backup,-B [file ...]
	Backup memory card contents to file. Uses --slot.

--restore,-R file [...]
	Restore memory card from file. Uses --slot.

--list,-l
	List memory card in --slot.

--format,-F
	Format memory card. Security request must be answered.

--delete,-D file [...]
	Delete memory card file entry.

--kanji,-k
	Force kanji (japanese shift-jis encoded) printf. This is the default if
	the environment variable TERM=kterm is found.

!!
!! --raw=<s>,-0		options are obsolete. now filename extension is used to
!! --tim=<s>,-1		specify OUTPUT format. input format is choosen by auto-
!! --ppm=<s>,-2		detection, if possible.
!! --rgb=<s>,-3
!! --png=<s>,-4
!! --bmp=<s>,-5
!!
	Picture mode. Supported is upload and download. Default is DOWNLOAD to
	the specified format. Use --upload to upload into VRAM.

--left=<n>,-X
--top=<n>,-Y
--width=<n>,-W
--height=<n>,-H
	Specify VRAM location to be used for upload/download. In upload mode WxH
	is only relevant to raw data (--raw).

--script=<s>,-@
	'piocons' can only be used for single files. For more files you can
	specify a script. See below for more information.

--exec=<s>,-x
	Executes a file on the PSX through the PSX filesystem. The given string
	should be a valid PSX filename like "cdrom:\PSX.EXE;1".

--reset,-z
	Resets the PSX to main menu.

--libps,-L
	Patch "libps.exe" to convert access "cdrom:\foo\var" to access
	"/foo/var" of file server.

--yaroze,-y
	Patch NetYaroze executable file to execute correctly.

--chroot=x,-T
	Set chroot path for file server.

Discussion of the scripting language
====================================

! CONCEPTUAL ! ANY SUGGESTIONS ?

1) 'system.cnf'

You can use PSX' "system.cnf" as your script file. This equals to the call
'piocons --stack=801FFF00 --tcb=4 --event=16 --exec=... --console'

Example:
------------------------------------
BOOT  = cdrom:\DTL_S30.35;1
STACK = 801FFF00
TCB   = 4
EVENT = 16
------------------------------------


2) 'auto'
The yaroze style script "language" is not supported.


3) script language

; comment

port 320
pc 00000000
gp 00000000
sp 00000000
tcb 4
event 16

upload <filename>						; for executables
upload <filename> <address>				; for binary data

download <filename> <address> <length>

vram filename.fmt x y width height		; download vram
vram filename.fmt x y					; upload vram to x y

CONSOLE
GO
