Japanese
PROGRAMMER'S GUIDEDISC format standard specifications
BackForward
DISC format standard specifications

boot system


■System area

The system area is the area located at the beginning of the CD-ROM.
System information and initial programs for starting applications are written in the system area.
These must be placed consecutively in the system area as IP (Initial Program).
IP consists of boot code and application initial program (AIP). The boot code includes IDs such as the game name and security codes. AIP includes codes such as each initial program.

Table 4.1 IP structure
 structure
 size
 remarks
 IP
 BOOT CODE
 SYSTEM ID
 100H
 Game name, product number, version, etc.
 SECURITY CODE
 D00H
 security code
 AREA CODE GROUP
 20H~100H
 area code group
 APLICATION INITIAL PROGRAM
 100H~71E0H
 Initial program, file system, etc.

(1000H to 8000H in total)

■SYSTEM ID

This is the data placed first in the system area.

Table 4.2 Structure of SYSTEM ID
 0
 1
 2
 3
 4
 5
 6
 7
 8
 9
 A
 B
 C
 D
 E
 F
 00H
 hardware identifier
 10H
 Manufacturer ID
 20H
 Item Number
 version
 30H
 Release date
 Device information
 40H
 Compatible area symbol
 space
 50H
 Compatible peripherals
 60H
 game name
 70H
 80H
 90H
 A0H
 B0H
 C0H
 D0H
 RESERVED
 E0H
 IP SIZE
 RESERVED
 STACK-M
 STACK-S
 F0H
 1st READ ADDRESS
 1st READ SIZE
 RESERVED
 RESERVED

■Explanation of SYSTEM ID (description principles)

●Available characters
All characters that can be used in the SYSTEM ID must be alphanumeric characters in ASCII code. However, depending on the item, the use of ". / - :" is allowed.
Also, unless otherwise specified, all letters can be used in uppercase or lowercase.

●Fill in
All entries must be left justified unless otherwise instructed. Do not put spaces in front.
Unless otherwise instructed, fill all empty spaces with ASCII code 20H.

●Definition of expression
The △ and spaces used in the explanation are ASCII code 20H.

●Other regulations
Always fill the RESERVED area with 00H.

■Explanation of each item


Table 4.2 Structure of SYSTEM ID

Hardware identifier (starting address: 00H)

definition
Fill in the unique ID for the hardware

Available characters
uppercase letters only

word count
16 characters

Filling regulations
Be sure to enter "SEGA△SEGASATURN△".


Table 4.2 Structure of SYSTEM ID

Manufacturer ID (starting address: 10H)

definition
Enter the manufacturer ID specified by SEGA

Available characters
alphanumeric characters only

word count
16 characters

Filling regulations

For SEGA brand:
“SEGA△ENTERPRISES” fixed at 16 characters
For licensees:
16 characters of "SEGA△TP△KAISHA-A"
KAISHA-A contains the unique company code given to each licensee.
example)
SEGA△TP△T-999△△△
Regulations:
Enter the manufacturer ID on the left and fill in any remaining spaces to make sure it is 16 characters long.


Table 4.2 Structure of SYSTEM ID

Product number (starting address: 20H)

definition
Enter the product number specified by SEGA.

Available characters
alphanumeric characters only

word count
10 characters

Filling regulations
Fill in the blanks with spaces.

Entry example
SEGA brand title: GS-9099△△△
Licensee title: T-99901G△△


Table 4.2 Structure of SYSTEM ID

Version (starting address: 2AH)

definition
Enter the application version.

Available characters
Uppercase "V", numbers, "." (period)

word count
6 characters

Filling regulations
It always starts with a "V", then a single digit number, then a ".", then a three digit number.
The final release will be V1.000.

Entry example
For sample disc → V0.801
For master disk → V1.000


Table 4.2 Structure of SYSTEM ID

Release date (starting address: 30H)

definition
Enter the date when the master disk (write-once disk) was created.

Available characters
numbers only

word count
8 characters

Filling regulations
The year must be 4 digits, and the month and day must be 2 digits.

Entry example
19940912 (for September 12, 1994)


Table 4.2 Structure of SYSTEM ID

Device information (starting address: 38H)

definition
Fill in your device information. For CDs, enter the number of the set.

Available characters
Alphanumeric characters and "/-"

word count
8 characters

Filling regulations
Fill in the blanks with spaces.

Entry example
1 CD set, 1st CD → CD-1/1△△
3 CD set, 2nd CD → CD-2/3△△


Table 4.2 Structure of SYSTEM ID

Corresponding area symbol (starting address: 40H)

definition
Enter the area symbol of the region where you want the application to run.

Available characters
Only uppercase alphabetic characters specified in the area symbol list below

word count
10 characters

Filling regulations
Multiple entries are possible. Fill in the area symbols together, and do not include spaces or commas between them. Fill in the blanks with spaces.

Area symbol list
J→Japan
T→Asia NTSC (Taiwan, Philippines, Korea)
U → North America (USA, Canada), Central and South America NTSC (Brazil)
E→Europe PAL, East Asia PAL, Central and South America PAL

Entry example
For applications that operate in Japan, Taiwan, and South Korea
(Does not work in other regions) → JTK△△△△△△△

Note
The area code corresponding to the area entered here needs to be included in the area code group. (See " 4.5 Area Code ")

supplementary explanation
Hardware has different information "area symbols" depending on the sales region. The application starts when the "area symbol", "area symbol within the corresponding area symbol", and "area code" match.


Table 4.2 Structure of SYSTEM ID

Compatible peripherals (starting address: 50H)

definition
Enter information for fully supported input peripherals.

Available characters
Only the alphanumeric characters specified in the character list below

word count
16 characters

Filling regulations
Multiple entries are possible. The order of the characters does not matter.
Fill in the characters closely, without spaces or commas between them. Fill in the blanks with spaces.

Character list
A→Mission stick
C → Battle cable
D → Modem (or Net Link)
E→Multi controller
F→FDD
G → Gun (Virtual Gun)
J → Sega Saturn standard pad
K→Keyboard
M→Shuttle mouse
P→MPEG
R→Data cartridge (twin advanced system)
S→Steering controller
T→Multi Terminal 6
W → Expansion ram cartridge
X→XBAND

Entry example
For applications that support standard joypads and mice
JM△△△△△△△△△△△△△△

supplement
In the future, as the number of peripherals increases, the number of characters will also increase.
For the definition of complete compatibility, please refer to the Pad Check item in "Software Creation Standards".


Table 4.2 Structure of SYSTEM ID

Game name (starting address: 60H)

definition
Enter the game name.

Available characters
The game name is alphanumeric only. Spaces are allowed in the game name.
When listing multiple titles, "/-:" can be used as a delimiter between titles.

word count
112 characters.

Filling regulations
If the name differs depending on the release area, multiple titles may be listed. There are no detailed rules for entering multiple entries, but please fill in so that the title can be identified by looking at this section. Fill in the empty parts with spaces.

Entry example
If there are multiple titles

Example 1)
TITLE1/TITLE2/TITLE3△△△△

Example 2)
J:TITLE1△△U:TITLE2△△△△△△


Table 4.2 Structure of SYSTEM ID

IP SIZE (starting address: E0H)

definition
Specify the IP (Initial Program) size (number of bytes).

size
4 bytes

regulations
Add AIP immediately after the boot code to make it into a single file, and specify the size of that file.
Parameters must be on longword boundaries (multiple of 4H).

range
1000H~8000H


Table 4.2 Structure of SYSTEM ID

STACK-M (Start address: E8H)

definition
Master-SH2 stack pointer address.
By default (specified as 0), 6001000H to 6001FFFH will be the stack area.

size
4 bytes

regulations
Parameters must be on longword boundaries (multiple of 4H).

range
600B000H~6100000H


Table 4.2 Structure of SYSTEM ID

STACK-S (starting address: ECH)

definition
Address of Slave-SH2 stack pointer.
By default (specified as 0), 6000E00H to 6000FFFH will be the stack area.

size
4 bytes

regulations
Parameters must be on longword boundaries (multiple of 4H).

range
600A200H~6100000H


Table 4.2 Structure of SYSTEM ID

1st READ ADDRESS (Start address: F0H)

definition
Transfer address of the read-ahead file (1st READ FILE).
A read-ahead file is a file that the boot system transfers to WORKRAM while the license Sega logo is displayed.

size
4 bytes

regulations
If 0H, no transfer is performed.
When transferring, if it is a CD, transfer the file with file identifier [2]. Parameters must be on longword boundaries (multiple of 4H).

range
200000H~300000H
(6002000H+IPSIZE)~6100000H

supplement
See section “4.7 Read-ahead file and application initial program”
The read-ahead file must be on the MODE1 track. Also, be sure to be on track 1.
The file with file identifier [2] becomes the first file in the root directory. If you name the file “1ST.BIN”, it will be sorted and placed at the top.


Table 4.2 Structure of SYSTEM ID

1st READ SIZE (Start address: F4H)

definition
Ignored for CDs.

size
4 bytes

regulations
Parameters must be on longword boundaries (multiple of 4H).


■Security code

Place it directly after the SYSTEM ID. The code will be provided by SEGA as object code, so please use it as is without making any changes. The contents are programs and data that display SEGA's license. If the application does not have the correct security code, it will not be recognized as a Sega Saturn CD and the game will not start.
Security code provided file name: In the directory after installing the software library disk


\SATURN\SEGALIB\LIB\SYS_SEC.OBJ
                    ‾‾‾‾‾‾‾‾‾‾‾

■Area code

Place it directly after the security code. The code will be provided by SEGA as object code, so please use it as is without making any changes.
There are four types of area codes depending on the hardware sales area, but it is necessary to enter the area code that corresponds to the "corresponding area symbol" of the SYSTEM ID. When listing multiple items, make sure that the "corresponding area symbol" and "area code" are entered in the same order.
The size of each area code is the same, so you can easily change it.
It is also possible to create a common disc by connecting multiple area codes. (Refer to " Appendix A Sample List ") Area code provided file name: In the directory after installing the software library disk


\SATURN\SEGALIB\LIB\SYS_ARE?.OBJ ;? is the same character as the corresponding area ; 4 types exist

Table 4.3 shows the relationship between hardware sales regions, area codes, and corresponding area symbols.

Table 4.3 Relationship between area code and area symbol
 Compatible area
 Hardware sales area
 Area code file name
 J
 Japan
 SYS_AREJ.OBJ
 T
 Asia NTSC region
 SYS_ARET.OBJ
 U
 North America, Central and South America NTSC region
 SYS_AREU.OBJ
 E
 Europe PAL, East Asia PAL, Latin America PAL
 SYS_AREE.OBJ

■Application initial program

By placing it immediately after the area code group, it will be executed immediately after the area code is executed. From then on, the program progresses under the control of the application.

■Read-ahead file and application initial program

Both are systems in which the BOOT ROM automatically transfers files from the CD-ROM. By using this, the application can transfer the specified file at startup without programming the application.

■1st READ FILE

The file (file identifier [2]) that the boot system reads while the license Sega logo is displayed (while the security code is running) is called the 1st READ FILE. The license Sega logo display will not end until this 1st READ FILE is finished reading. Therefore, the larger the size of the transferred file, the longer the license Sega logo screen will appear. (Minimum 2 seconds, maximum approximately 3.5 seconds)
When 1st READ ADDRESS is set, 1st READ FILE is only read and not automatically executed.
Although it is possible to not specify it, we recommend that you use it, as it allows you to use the time while the license Sega logo is displayed effectively.

■Application initial program

For example, by placing a file system in this program, you can easily access each file in subsequent CD accesses.
By making good use of both, it is possible to create highly efficient applications.

Figure 4.1 Concept from power on
  TV screen  :    BOOT-ROM ~ Application startup  
             :                                         
             :         (Power on)                      
             :       ┌──────┴──────┐                   
             :       │             │                   
┌────────────┐┌──────┴─────┐┌──────┴────────────┐          
│            ││            ││  SYSTEM ID check  │          
│            ││            ││         │         │          
│            ││            ││Security code check│          
│SEGA SATURN ││SEGA SATURN ││         │         │          
│    logo    ││    logo    ││ Area code check   │          
│            ││  Display   ││      │            │          
│            ││ processing ││  IP load ┌────────┴────┐
└──────┬─────┘└──────┬─────┘└──────┬───┤AIP is loaded│
       │             │             │   └─────────────┘
┌──────┴─────┐┌──────┴──────────┐┌─┴───────────────────┐
│            ││Security code    ││Read the file with   │
│            ││ execution       ││file identifier [2]  │
│            ││      │          ││and transfer it to   │
│Licensed by ││area code        ││the destination      │
│ Sega logo  ││execution        ││written in the 1st   │
│            ││      │          ││READ ADDRESS of      │
│            ││System           ││SYSTEM ID.           │
│            ││initialization   ││                     │
│            ││code execution   ││                     │
│            ││(SYS_INIT)       ││                     │
└──────┬─────┘└──────┬──────────┘└─┬───────────────────┘
       │             │             │               
┌──────┴─────┐┌──────┴─────────────┴────────────┐         
│            ││Application initial program (AIP)│     
│            ││execution (SMPSYS.C, etc.)       │         
│            │└──────┬─────────────┬────────────┘         
│Application │       │             │               
│            │┌──────┴─────────────┴────────────┐         
│            ││Execute the application program  │         
│            ││body (1stREAD file)              │         
└────────────┘└─────────────────────────────────┘         

■How to create IP

●SYS_ID.SRC
This is a sample assembler source program for creating SYSTEM ID. Please change it according to your application. (See “4.3 SYSTEM ID Description”)
Be sure to place it at the beginning of your program .

Above sample provided file name: In the directory after installing the software library disk


\SATURN\SEGASMP\SYS\SYS_ID.SRC

●SYS_SEC.OBJ
Security code object. (Refer to " ■Security Code ") Link and incorporate as is.

●SYS_ARE? .OBJ
Area code object. (Refer to " ■Area Code ") Link and incorporate as is.

●SYS_INIT.OBJ
An object for system initialization code. Link and embed as is.

or more files


SYS_ID.OBJ, SYS_SEC.OBJ, SYS_ARE? .OBJ, SYS_INIT.OBJ, ...

Create SYS_IP.BIN by linking in this order. Place this file in the system area of the CD.

■IP placement

IP size can be created from a minimum of 2 sectors to a maximum of 16 sectors.
If the required IP size is less than 8 sectors, it is possible to record multiple IPs to improve reliability. At this time, place each IP from the beginning of the sector.
This increases the chance of booting even if the first sector has a bad read.


BackForward
PROGRAMMER'S GUIDEDISC format standard specifications
Copyright SEGA ENTERPRISES, LTD., 1997