PROGRAMMER'S GUIDEFile system library
BackForward
File system library

Appendix A

Use of development support function


A.1 Procedure for using memory files

To use memory files, you need to do the following in the order listed:

● File data creation

Create a file that will be a memory file and convert it to a memory file. Conversion to a memory file is performed by MFCAT.EXE.

● Memory file load

Set the memory file to the memory area. This is done with ICE commands. Must be done each time the contents of the memory area are corrupted.

● Target program load

Load the program file under development to the target.

● Declaration of memory file usage

Set the memory start address in! Gfsd_mmc / GFMC_base before running GFS_Init. This will get SIMM directory information with GFS_Init. The initial value of! Gfsd_mmc / GFMC_base is 0, and SIMM directory information is not referenced in this state.

GFMC_base is defined as follows:

Sint8 * GFMC_base = 0;

The variable GFMC_base is defined in both sega_gfs.lib and segadgfs.lib.
GFMC_base in sega_gfs.lib exists only for compatibility with segadgfs.lib. It does not affect the behavior of the file system.

For MFCAT.EXE, refer to the manual of the CD tool.


A.2 Procedure for using DOS files

To use DOS files, you need to do the following in the order listed:

● Correspondence table file creation

Create a file that will be a DOS file, and create a correspondence table file between the file name on the CD-ROM and the file name on DOS.

● Boot

Make sure the DIP switch is configured for SCSI and boot the target.

● Target program load

After verifying that the IBM-PC recognizes the target as a SCSI device, break the target and load the target program.

● CDSIM.EXE execution

Run CDSIM.EXE on your IBM-PC.
For the correspondence table file and CDSIM.EXE, refer to the manual of the CD tool.


A.3 Precautions

The following are notes on using the development support function.

● Temporary access restriction method

If you normally access both memory and DOS files, to temporarily stop accessing DOS files, set the target DIP switch to non-SCSI and reboot.
Conversely, to access only DOS files, set! Gfsd_mmc / GFMC_base to 0.

● Recommended file name access

While using the debug file, it is recommended to use filename access as the file identifier may change due to changes in the file structure.

● Debug file directory information

The directory information of the debug file is set as follows.

 FAD
: File identifier on debug file
 File number
: 0
 Gap size
: 0
 Unit size
: 0

● Restrictions when using DOS files

For convenience of processing, the DOS file retrieval parameter can only transfer one sector at a time. Setting the retrieval parameter to a value other than 1 is invalid.

● Restrictions on available functions

If the transfer mode is GFS_TMODE_SCU or if SCU-DMA is started in the transfer function, only the following functions can be used until the transfer is completed.
Since A-Bus access is prohibited during SCU_DMA transfer, use of other functions is prohibited.


BackForward
PROGRAMMER'S GUIDEFile system library
Copyright SEGA ENTERPRISES, LTD., 1997