Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Dreamcast IP.BIN

From ReverseEngineering.wiki
Format
Platforms Platform:Sega Dreamcast
Magic "SEGA SEGAKATANA " at offset 0
On this wiki Facts · Code · Notes · Topics

Sega Dreamcast bootstrap (IP.BIN, 0x8000 bytes in the first 16 sectors of the high-density area of a GD-ROM or of a self-boot MIL-CD) with the text header "SEGA SEGAKATANA ", product data and the name of the boot executable (normally 1ST_READ.BIN), which the bootstrap loads from the file system.

Header (KallistiOS makeip field table)

Offset Size Field Default
0x00 16 hardware id SEGA SEGAKATANA
0x10 16 maker id SEGA ENTERPRISES
0x20 16 device info: 4 hex digits CRC, space, CD-ROMx/y (disc x of y) 0000 CD-ROM1/1
0x30 8 area symbols: J, U, E (bit 0, 1, 2 of the region mask) JUE
0x38 8 peripherals: 5 hex digits for supported controllers plus two boolean flags (WinCE, VGA) E000F10
0x40 10 product number T-00000
0x4A 6 version V1.000
0x50 16 release date YYYYMMDD today
0x60 16 boot filename 1ST_READ.BIN
0x70 16 software maker name
0x80 128 game title

The whole IP is 0x8000 bytes (the template of 16 sectors). The device info CRC is a CRC-16 with polynomial 0x1021 and initial value 0xFFFF over the 16 bytes at 0x40 (product number and version), written as four upper-case hex digits at 0x20.

The rest of IP.BIN holds the bootstrap code (Sega's, replaced in homebrew by a minimal reimplementation, IP.TMPL) and, optionally, the MR logo image (a compressed 'MR' bitmap) shown by the boot ROM.

1ST_READ.BIN

The bootstrap loads the file named at 0x60 from the ISO9660 root into RAM and jumps to it. For KallistiOS the executable is linked at 0x8C010000 (LOAD_OFFSET in the linker script), the traditional load address of 1ST_READ.BIN in the cacheable RAM mirror; Flycast's HLE boot loads it there too and puts the 16 IP.BIN sectors at 0x8C008000.

On a self-boot CD (MIL-CD) the file is stored scrambled; on a GD-ROM it is stored plain. The scramble is a seeded permutation of 32-byte slices inside 2 MiB, 1 MiB ... 32-byte chunks, with the seed taken from the file size; the exact algorithm, identical in KallistiOS utils/scramble/scramble.c and Flycast core/reios/descrambl.cpp, is in Fact:Dreamcast IP.BIN/behavior/1ST READ.BIN scrambling algorithm and the loading rules are in Fact:Dreamcast IP.BIN/behavior/When flycast descrambles the boot file. Flycast's view of the header (disc type text at 0x25, VGA and Windows CE flags at 0x3D and 0x3E) is in Fact:Dreamcast IP.BIN/struct/IP.BIN meta header (flycast).

The MR boot logo is stored inside IP.BIN at 0x3820 with a 320x90 / 128-colour / 8192-byte limit: Fact:Dreamcast IP.BIN/behavior/MR logo limits in makeip. GD-ROM dumps are described by a text track list, see Format:GDI; files saved to a VMU use Format:Dreamcast VMS.

Evidence and references

KallistiOS (KOS License, BSD style) utils/makeip: src/field.c (field table), src/global.h, src/crc.c (CRC), README.md; utils/ldscripts/shlelf.xc line 10. See Platform:Sega Dreamcast.

Code & repositories

  • https://github.com/flyinghead/flycast @ 6bb0fc3e18dac4b01694f488c7a71f5930e8a648 · license: GPL-2.0-only (declared by the contributor for the files used; GitHub reports GPL-2.0 for the repository)
    Dreamcast emulator (GPL-2.0): core/imgread disc image parsers, core/reios HLE boot and descrambler
    Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-17; Note: the latest release ships binaries; the wiki links only the source, never the binaries
  • https://github.com/KallistiOS/KallistiOS @ 8e704086ecd4990627b85fb4905770dfffe29c00 · license: BSD-3-Clause (declared by the contributor; GitHub's detector did not recognize a license file)
    KallistiOS: vmu_pkg.c/vmu_pkg.h VMS header, utils/scramble 1ST_READ.BIN scrambler, utils/makeip utils/makeip builds IP.BIN, with the header field table and CRC
    Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-16