Boot process: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 6: | Line 6: | ||
# IP.BIN jumps to 1ST_READ.BIN and excutes the loaded program  | # IP.BIN jumps to 1ST_READ.BIN and excutes the loaded program  | ||
<br>  | <br>  | ||
As a form of copy protection, the 1ST_READ.BIN file is generally scrambled according to an obfuscated formula, and the Dreamcast   | As a form of copy protection, the 1ST_READ.BIN file is generally scrambled according to an obfuscated formula, and the Dreamcast scramble loads this binary from disc 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.<br>  | ||
<br>  | <br>  | ||
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.<br>  | 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.<br>  | ||
Revision as of 02:02, 10 January 2020
In general, the boot process is something like this:
- Dreamcast runs BootROM code and either lands at the BIOS page or tries reading a disc
 - IP.BIN is loaded to 0x8c008000
 - 1ST_READ.BIN (or whatever file is named directly in IP.BIN) is loaded to 0x8c010000
 - SH4 jumps to IP.BIN's entry point and starts executing code
 - 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 scramble loads this binary from disc 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 so 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.