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

Boot system


■ System area

The system area is the first area on the CD-ROM.
System information and initial programs for starting applications are written in the system area.
These must be arranged continuously in the system area as IP (Initial Program).
The IP consists of the boot code and the application initials program (AIP). The boot code includes an ID such as the game name and a security code. The AIP contains the code for each initial program and so on.

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-8000H in total)

■ SYSTEM ID

This is the first data to be placed in the system area.

Table 4.2 SYSTEM ID structure
 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
 Corresponding area symbol
 space
 50H
 Corresponding peripheral
 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 principle)

● Available characters
All characters that can be used in the SYSTEM ID are ASCII code alphanumeric characters. However, depending on the item, the use of ". /-:" Is permitted.
In addition, all uppercase and lowercase letters can be used unless otherwise specified.

● Fill in
Fill in all left-justified unless instructed to do so. Do not put a space in front.
Unless otherwise instructed, fill all vacant parts with ASCII code 20H.

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

● Other regulations
Be sure to fill the RESERVED area with 00H.

■ Explanation of each item


Table 4.2 SYSTEM ID structure

Hardware identifier (start address: 00H)

Definition
Enter a unique ID for your hardware

Available characters
Uppercase letters only

word count
16 characters

Entry rules
Be sure to enter "SEGA △ SEGA SATURN △".


Table 4.2 SYSTEM ID structure

Manufacturer ID (start address: 10H)

Definition
Enter the manufacturer ID specified by SEGA

Available characters
Alphanumeric characters only

word count
16 characters

Entry rules

For SEGA brands:
16 characters fixed for "SEGA △ ENTERPRISES"
For licensees:
16 characters of "SEGA △ TP △ KAIHA-A"
Enter the unique company code given to each licensee in KAISHA-A.
example)
SEGA △ TP △ T-999 △△△
Regulations:
Enter the manufacturer ID left-justified, and fill in the remainder with spaces to make sure it is 16 characters.


Table 4.2 SYSTEM ID structure

Item number (starting address: 20H)

Definition
Enter the item number specified by SEGA.

Available characters
Alphanumeric characters only

word count
10 characters

Entry rules
Fill the space with space.

Entry example
SEGA Brand Title: GS-9099 △△△
Licensee Title: T-99901G △△


Table 4.2 SYSTEM ID structure

Version (start address: 2AH)

Definition
Enter the application version.

Available characters
Uppercase "V", number, "." (Period)

word count
6 characters

Entry rules
Always start with a "V", then a one-digit number, then a ".", And 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 SYSTEM ID structure

Release date (start address: 30H)

Definition
Enter the date when the master disc (write once disc) was created.

Available characters
Numbers only

word count
8 characters

Entry rules
Make sure that the year is 4 digits and the month and day are 2 digits.

Entry example
19940912 (for September 12, 1994)


Table 4.2 SYSTEM ID structure

Device information (start address: 38H)

Definition
Fill in the device information. In the case of a CD, enter the number of the set.

Available characters
Alphanumeric characters and "/-"

word count
8 characters

Entry rules
Fill the space with space.

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


Table 4.2 SYSTEM ID structure

Corresponding area symbol (start address: 40H)

Definition
Enter the area symbol of the area where you want the application to work.

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

word count
10 characters

Entry rules
Multiple entries are possible. Fill in the area symbols and area symbols together, with no spaces or commas in between. Fill the space with space.

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

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

caution
It is necessary to put the area code corresponding to the area entered here in the area code group. (See 4.5 Area Codes)

supplementary explanation
Hardware has information "area symbols" that differ depending on the sales area. The application starts when the "area symbol", the "area symbol in the corresponding area symbol", and the "area code" match.


Table 4.2 SYSTEM ID structure

Corresponding peripheral (start address: 50H)

Definition
Fully compatible Input Fill in peripheral information.

Available characters
Only alphanumeric characters specified in the character list below

word count
16 characters

Entry rules
Multiple entries are possible. The order of the characters does not matter.
Fill in the characters and characters together, with no spaces or commas in between. Fill the space with space.

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
The number of peripherals will increase and the number of characters will increase in the future.
For the definition of full support, refer to the pad check item in "Software Creation Standards".


Table 4.2 SYSTEM ID structure

Game name (start address: 60H)

Definition
Enter the game name.

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

word count
112 characters.

Entry rules
If the name is different depending on the sales area, you may list multiple titles. There are no detailed rules for entering multiple entries, but enter them so that the title can be identified by looking at this part. Fill the empty space with space.

Entry example
When there are multiple titles

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

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


Table 4.2 SYSTEM ID structure

IP SIZE (starting address: E0H)

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

size
4 bytes

Regulations
Add AIP just after the boot code to make one file and specify the size of that file.
The parameter must be a longword boundary (a multiple of 4H).

range
1000H ~ 8000H


Table 4.2 SYSTEM ID structure

STACK-M (start address: E8H)

Definition
Master-SH2 stack pointer address.
By default (specify 0), 6001000H to 6001FFFH is the stack area.

size
4 bytes

Regulations
The parameter must be a longword boundary (a multiple of 4H).

range
600B000H ~ 6100000H


Table 4.2 SYSTEM ID structure

STACK-S (start address: ECH)

Definition
Slave-SH2 stack pointer address.
By default (specify 0), 6000E00H to 6000FFFH is the stack area.

size
4 bytes

Regulations
The parameter must be a longword boundary (a multiple of 4H).

range
600A200H ~ 6100000H


Table 4.2 SYSTEM ID structure

1st READ ADDRESS (start address: F0H)

Definition
Forwarding address of the look-ahead file (1st READ FILE).
A look-ahead file is a file that the boot system transfers to WORKRAM while the License Sega logo is displayed.

size
4 bytes

Regulations
In the case of 0H, no transfer is performed.
When transferring, if it is a CD, transfer the file with the file identifier [2]. The parameter must be a longword boundary (a multiple of 4H).

range
200,000H to 300,000H
(6002000H + IPSIZE) ~ 6100000H

supplement
Refer to the section "4.7 Look-ahead files and application initial programs" The look-ahead file must be on the MODE1 track. Also, it must be track 1.
The file with the file identifier [2] is the first file in the root directory. If the file name is set to "1ST.BIN" etc., it will be sorted and will be at the beginning.


Table 4.2 SYSTEM ID structure

1st READ SIZE (start address: F4H)

Definition
Ignored for CDs.

size
4 bytes

Regulations
The parameter must be (a multiple of 4H) at the longword boundary.


■ Security code

Place it immediately after the SYSTEM ID. The code is provided by SEGA as an object code, so please use it as it is without making any changes. The contents are the program and data that displays the SEGA license. Applications that do not have the correct security code will not be recognized as a Sega Saturn CD and will not be able to launch the game.
Security code provided file name: Software library In the directory after disk installation


\ SATURN \ SEGALIB \ LIB \ SYS_SEC.OBJ
                    ~~~~~~~~~~~

■ Area code

Place it just behind the security code. The code is provided by SEGA as an object code, so please use it as it is without making any changes.
There are four types of area codes for each hardware sales area, but it is necessary to enter the area code corresponding to the "corresponding area symbol" of the SYSTEM ID. When listing more than one, 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 it can be easily changed.
Also, by connecting multiple area codes, it is possible to make a common disc. ( Refer to "Appendix A Various Sample Lists ") 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 ~~~~~~~~~~~~; There are 4 types

Table 4.3 shows the relationship between the hardware sales area, area code, and corresponding area symbol.

Table 4.3 Relationship between area code and area symbol
 Correspondence area
 Hardware sales area
 Area code file name
 J
 Japan
 SYS_AREJ.OBJ
 T
 Asia NTSC region
 SYS_ARET.OBJ
 U
 North America, Latin 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. After that, the program proceeds under the control of the application.

■ Look-ahead file and application initial program

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

■ 1st READ FILE

The file (file identifier is [2]) read by the boot system while the license SEGA logo is displayed (security code is being executed) is called the 1st READ FILE (look-ahead file). The license SEGA logo display does not end until this 1st READ FILE has been read. Therefore, the larger the size of the transfer file, the longer the license SEGA logo screen will take. (Minimum 2 seconds, maximum about 3.5 seconds)
If 1st READ ADDRESS is set, the 1st READ FILE will only be read and will not be executed automatically.
It is possible not to specify it, but it is recommended to use it because the time when the license SEGA logo is displayed can be used effectively.

■ Application initial program

For example, by placing a file system in this program, subsequent access to the CD can be easily performed on a file-by-file basis.
By making good use of both, it is possible to create efficient applications.

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

■ How to create an IP

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

File name provided by the above sample: 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 it is.

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

● SYS_INIT.OBJ
An object of system initialization code. Link and incorporate as it is.

The above files


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

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

■ IP placement

The IP size can be created in the range of a minimum of 2 sectors and a maximum of 16 sectors.
If the required IP size is 8 sectors or less, it is possible to record multiple IPs to improve reliability. At this time, place each IP from the beginning of the sector.
This will increase the chances of booting even if the first sector has a read failure.


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