IP.BIN

From dreamcast.wiki
Revision as of 23:06, 9 January 2020 by Unknown user (talk)
Jump to navigation Jump to search

Basic Overview

  • Loaded and ran from Disc (GD-ROM, CD-ROM)
  • Contains basic meta information for a disc
  • Draws the Sega License Screen
  • Possibly holds an MR Image
  • Has space to run Code that is typically used in setting up the basic hardware then launching the binary on disc

General Header Information

Overview of Each piece of the IP.BIN listing file offset and memory location when loaded [1]

Offset Size Load address Contents
0x0000-00FF 0x00FF : 256 Bytes 8C008000-8C0080FF Meta information
0x0100-02FF 0x01FF : 512 Bytes 8C008100-8C0082FF Table of contents
0x0300-36FF 0x33FF : 13312 Bytes 8C008300-8C00B6FF SEGA license screen code
0x3700-37FF 0x00FF : 256 Bytes 8C00B700-8C00B7FF Area protection symbols
0x3800-5FFF 0x47FF : 18432 Bytes 8C00B800-8C00DFFF Bootstrap 1
0x6000-7FFF 8C00E000-8C00FFFF Bootstrap 2 (Not Required #Bootstraps)

Execution Flow Overview

bleh

Deeper Look into User Code

All IP.BIN files from Sega are generally made with the IP Maker software and follow the same basic layout codewise. Bootstrap 1 is very small and is responsible for setting some minor hardware registers then jumps immediately to Bootstrap 2. This second Bootstrap actually does the bulk of the work and handles setting up the stack, VBR, disables cpu caching and then handles the jump to 1ST_READ.BIN which is loaded to address 0x8C010000.

Bootstraps

This is the area in the IP.BIN that is completely unregulated and can be used however someone would like.

Bootstrap 1

This piece of code is generally very small, under 32 bytes and sets hardware registers.

  • a custom MR Image can also live within this section at offset 0x3820, Address 0x8C00B820 and will be displayed on the license screen.

Bootstrap 2

This is Generally where all the base setup code is kept so our binary has a known, and clean execution environment in which it starts. In Warez releases this is the area that is responsible for a very sneaky trick. The 1ST_READ.BIN binary is kept as is on the disc, but then when scramble loaded by the bios (See Dreamcast_Boot_Process for further)) it will be unusable, so code was written to unscramble, the now ruined binary, in-place. The second part of this trick also reinitializes the GD-ROM drive and passes the HOLLY bios check so that the game may access the data on the disc and execute normally.

Other uses

  • neoIP is a complete open source replacement for these bootstraps and is currently able to load: homebrew, official Katana and WINCE binaries from either a GD-ROM or CD-ROM developed by HaydenKow
  • IP.BIN Replacement This as far as I know is the first LEGAL ip.bin replacement for the dc, however it is pretty much untested. Developed by LiENUS

References

  1. [1], Dreamcast Programming: IP.BIN, Marcus Comstedt