Japanese
PROGRAMMER'S GUIDESimple CD simulator
BackForward
Simple CD simulator

2.Tool guide


■Debug support function overview

●Debug support function overview
It supports efficient debugging by reading files that should be read from a CD from a memory file in RAM on the target or a DOS file in a SCSI hard disk and simulating a CD-ROM.
If files with the same name exist, the priority order is SIMM, SCSI, and CD, so I would like to try patching the program and data from CD for debugged files and SCSI for files being debugged. In some cases, loading files from SIMM enables efficient debugging.

●Debug support function using CD library
 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓  
 ┃              Application               ┃  
 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛  
 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓  
 ┃          File system library           ┃  
 ┃       (compatible with IOS9660)        ┃  
 ┃                 ┌──────────────────────╂┐ 
 ┃●Logical file    │●CD block replacement ┃│ 
 ┃ access function │ function using a     ┃│ 
 ┃●Immediate return│ simple CD simulator  ┃│ 
 ┃ type access     │                      ┃│ 
 ┃ function        │                      ┃│ 
 ┗━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┛│ 
 ┏━━━━━━━━━━━━━┓   │┏━━━━━━━━━━┓           │ 
 ┃CD           ┃   │┃SCSI      ┃           │ 
 ┃communication┃   │┃driver    ┃           │ 
 ┃interface    ┃   │┃          ┃           │ 
 ┗━━━━━━━━━━━━━┛   │┗━━━━━━━━━━┛           │ 
━ ━ ━ ━ ━ ━ ━ ━ ━ ━│━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━│━
 ┏━━━━━━━━━━━┓     │┏━━━━━━━━━━┓ ┏━━━━━━━━┓│ 
 ┃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 the CD block.

DOS file
This is a file recorded on the HDD in MS-DOS format.
Using the SCSI driver, it can be read from the IBM PC's simple simulator software.

memory file
A file recorded in memory in 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 CD emulation system.

Same name file
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

They are read out preferentially in this order.

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

■Simple CD simulator/SIMM system

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

  1. Create a binary file to be placed on the CD.

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

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

  4. Use the CD file system library to read files from memory files in RAM on the target in the same way you read files 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 source files to create a SYSROF format load module.

  2. Convert to binary module with ROF2BIN.

  3. Repeat steps 1 and 2 to create multiple files that you want to load from the memory file as CD-ROM files.

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

●How to use memory files
The standard steps from ICE startup to execution of the target program are shown below.

(1) BOOT ROM startup

  1. Start the BOOT ROM.

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

  2. Press [Ctrl-C] when the logo appears.

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

(2) Load

  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 to make the file system library recognize that the memory file is loaded.

  2. Search the address of [_GFMC_base] from the map file of the target program and set there the address where the memory file was loaded.

(4) Target program execution

  1. Executes the target program from the start address.

■Simple CD simulator/SCSI system

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

  1. Create a binary file to be placed on the CD.

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

  3. Use the CD file system library to read files from a SCSI hard disk in the same way you read files from a CD.

●Operations up to program execution
The standard steps from ICE startup to execution of the target program are shown below.

(1) BOOT ROM startup

  1. Start the BOOT ROM.

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

  2. Press [Ctrl-C] when the logo appears.

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

(2) PC side startup

  1. Power on or reset your PC.
    The following message appears 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 omitted

(3)Target program load

  1. Load 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 configure the memory file at this time.

(4) Target program execution

  1. Executes the target program from the start address.

(5) Start [CDSIM.EXE]

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


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