PROGRAMMER'S GUIDESimple CD simulator
BackForward
Simple CD simulator

2. Tool guide


■ Outline of debug support function

● Overview of debug support functions
By reading the file to be read from the CD from the memory file in the RAM on the target or the DOS file in the SCSI hard disk and simulating the CD-ROM, it supports efficient debugging.
If the same file name exists, the priority is higher in the order of SIMM, SCSI, CD, so I want to patch the program or data from the CD for the debugged file and the SCSI for the file being debugged and try the operation. In that case, loading the file from SIMM enables efficient debugging.

● Debug support function by CD library
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 
┃Application ┃ 
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 
┃ File system library (IOS9660 compatible) ┃ 
┃ ┃ 
┃ ┌──────────────────────╂┐ 
┃ ● Logical file access function │ ● Simple CD simulator ┃ │ 
┃ ● Immediate return type access function │ CD block alternative function ┃ │ 
┗━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┛│ 
┏━━━━━━━━━━━┓ │ ┏━━━━━━━━━━┓ │ 
┃CD communication interface ┃│┃SCSI driver ┃│ 
┗━━━━━━━━━━━┛ │ ┗━━━━━━━━━━┛ │ 
━ ━ ━ ━ ━ ━ ━ ━ ━ ━ │ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ │ ━
┏━━━━━━━━━━━┓ │ ┏━━━━━━━━━━┓ ┏━━━━━━━━┓│ 
┃CD block ┃│┃IBM PC HDD ┃┃SIMM ┃│ 
┃ ● CD file ┃ │ ┃ ● DOS file ┃ ┃ ● Memory file ┃ │ 
┗━━━━━━━━━━━┛ │ ┗━━━━━━━━━━┛ ┗━━━━━━━━┛│ 
│ │ 
└───────────────────────┘ 

CD file
This is a file recorded on a CD in ISO9660 format.
It can be read from a CD disc or a CD emulator through a CD block.

DOS file
It is a file recorded on the HDD in MS-DOS format.
It can be read from the simple simulator software of IBM PC using the SCSI driver.

Memory file
A file recorded in memory in the memory file format.
It can be read directly using the file system library.

● Prerequisites
CD file
The simple CD simulator cannot read CD files.
It is supported by the CD emulation system.

File with the same name
These three files can be accessed at the same time, but if there is a file with the same name,

  1. Memory file

  2. DOS file

  3. CD file

It is read preferentially in the order of.

Real-time emulation
The simple CD simulator does not perform real-time emulation.

■ Simple CD simulator / SIMM system

● Overview of SIMM system
The processing flow during debugging is as follows.

  1. Create a binary file that should be placed on the CD.

  2. Use [MFCAT.EXE] to combine multiple files to create a memory file.

  3. Load the memory file into the RAM on the target.

  4. Use the CD file system library to read a file from a memory file in RAM on the target, much like reading a file from a CD.

● How to create a memory file
┌─────┐ ┌──────┐ ┌─────┐ ┌─────┐
├─────┤ │ Compiler │ ├─────┤ ┌───────┐ ├─────┤
│ Source ├── → │ Assembler │ ── → │ Load │ ── → │ ROF2BIN │ ── → │ Binary │
│ │ │ Linker │ │ Module │ └───────┘ │ Module │
└─────┘ └──────┘ └─────┘└──┬──┘
┌──────────────────────────────────────┘ 
┌─────┐ │ ┌─────┐ 
├─────┤ │ ┌──────┐ ├─────┤ 
│ Binary │ ─ ┼ → │ MFCAT │ ── → │ Memory │ 
│ Module │ │ └──────┘ │ File │ 
└─────┘ │ └─────┘ 
│ 
┌─────┐ │ 
├─────┤ │ 
│ Binary ├─┘ 
│ Module │ 
└─────┘ 

  1. Compile, assemble, and link the source files to create a SYSROF-style load module.

  2. Convert to a binary module with ROF2BIN.

  3. As a CD-ROM file, create multiple files that you want to load from the memory file by repeating <Procedure> 1 and 2.

  4. Use MFCAT to combine multiple files to create a memory file.

● How to use memory files
The standard procedure from the start of ICE to the execution of the target program is shown below.

(1) Boot ROM

  1. Boot the BOOT ROM.

    : rs [RET]
    ** RESET IN BY E700!
    
    : g [RET]
    ** PC = 060027XX
    

  2. Press [Ctrl-C] when the logo is displayed.

    PC =
    PR =
    MACH =
    R0-7
    R8-15
    RUN-TIME =
    +++: BREAKE KEY
    

(2) Road

  1. Load the target program and memory file according to the format of the ICE file read command.

(3) Memory file settings

  1. Set the start address of the memory file so that the file system library knows that the memory file is loaded.

  2. Search the map file of the target program for the address of [_GFMC_base], and set the address where the memory file is loaded there.

(4) Execution of target program

  1. Execute from the start address of the target program.

■ Simple CD simulator / SCSI system

● Overview of SCSI system
The processing flow during debugging is as follows.

  1. Create a binary file that should be placed on the CD.

  2. Start by typing CDSIM.EXE from the MS-DOS prompt.

  3. Use the CD file system library to read files from a SCSI hard disk, much like reading files from a CD.

● Operations up to program execution
The standard procedure from the start of ICE to the execution of the target program is shown below.

(1) Boot ROM

  1. Boot the BOOT ROM.

    : rs [RET]
    ** RESET IN BY E700!
    
    : g [RET]
    ** PC = 060027XX
    

  2. Press [Ctrl-C] when the logo is displayed.

    PC =
    PR =
    MACH =
    R0-7
    R8-15
    RUN-TIME =
    +++: BREAKE KEY
    

(2) Start on the PC side

  1. Power on or reset your PC.
    The following message is displayed during startup.
    In particular, make sure that the message "SEGA SATURN XXXX" is output.

    AHA-1540 / 1542/1640 APSI Manager for DOS
    Version 3.XX
    
    	Omitted Host Adapter # 0 --SCSI IS 1 --LUN 0: SEGA SATURN XXXX
    
    	The following is omitted

(3) Target program load

  1. Loads the target program according to the format of the ICE file read command.
    If you also use the SIMM system at the same time, load and set the memory file at this time.

(4) Execution of target program

  1. Execute from the start address of the target program.

(5) Start [CDSIM.EXE]

  1. Launch [CDSIM.EXE] in the appropriate directory.


BackForward
PROGRAMMER'S GUIDESimple CD simulator
Copyright SEGA ENTERPRISES, LTD., 1997