Boot process: Difference between revisions

From dreamcast.wiki
Jump to navigation Jump to search
(Created page with "In general, the boot process is something like this:<br> <br> # Dreamcast runs BootROM code and either lands at the BIOS page or tries reading a disc # IP.BIN is loaded to 0x8...")
 
No edit summary
Line 1: Line 1:
In general, the boot process is something like this:<br>
In general, the boot process is something like this:<br>
<br>
# Dreamcast runs BootROM code and either lands at the BIOS page or tries reading a disc
# Dreamcast runs BootROM code and either lands at the BIOS page or tries reading a disc
# IP.BIN is loaded to 0x8c008000
# IP.BIN is loaded to 0x8c008000

Revision as of 00:02, 10 January 2020

In general, the boot process is something like this:

  1. Dreamcast runs BootROM code and either lands at the BIOS page or tries reading a disc
  2. IP.BIN is loaded to 0x8c008000
  3. 1ST_READ.BIN (or whatever file is named directly in IP.BIN) is loaded to 0x8c010000
  4. SH4 jumps to IP.BIN's entry point and starts executing code
  5. IP.BIN jumps to 1ST_READ.BIN and excutes the loaded program


As a form of copy protection, the 1ST_READ.BIN file is generally scrambled according to an obfuscated formula, and the Dreamcast unscrambles it when loading 1ST_READ.BIN into memory. Loading an unscrambled binary ends up having the effect of scrambling the binary and destroying the program.

Using a file loader such as DCLOAD-IP or DCLOAD-SERIAL bypasses this entirely and allows enterprising developers to load programs directly onto the the console.

Other details:

  • 0x8c000000 is the base of the system's 16MB of RAM, accessed in privileged mode due to the SH4's 29-bit addressing method
  • Dreamcast system calls and bios font are stored in the region 0x8c000000 - 0x8c004000
  • The region 0x8c004000 - 0x8c008000 is used by multi-disc games to store persistent information across disc changes. This region is also used by persistent programs such as DCLOAD-IP/DCLOAD-SERIAL such that terminating programs can return to those loaders.
  • 0x8c008000 - 0x8c010000, which is used by IP.BIN, doesn't really matter beyond initial loading unless a program absolutely needs to refer to IP.BIN. The DCLOAD-IP/DCLOAD-SERIAL loaders overwrite most of IP.BIN after they've been loaded, for example, as they don't need any of it.