Specifications
10-12 Programmer’s Guide Sega
Psy-Q Development System
Fileserver Functions
The target adapter also contains software to provide fileserver functions. These are
accessed via TrapA #$23 on the Master SH2. Note that most functions return -1 in
r0 when a failure occurs. A standard error code can be fetched by calling TrapA #$23
with r0 still containing -1. The file error code will be returned in r0.
TrapA #$23 calls The following functions are supported on the Master SH2:-
Initialise remote filing system:
This function resets the disk system of the host ready for a new session. All remote-
opened files are closed.
Passed: r0.l 0
Create file:
Passed: r0.l 1
r4.l Pointer to filename string (null terminated)
r5.l File mode (0=Normal)
Returns: r0.l File handle (-1 if failure)
Open file:
Passed: r0.l 2
r4.l Pointer to filename string (null terminated)
r5.l File mode (0=ReadOnly, 1=WriteOnly, 2=Read/Write)
Returns: r0.l File handle (-1 if failure)
Close File:
Passed: r0.l 3
r4.l File handle
Returns: r0.l -1 if failure