revision 1095:a8b798030464
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1095:a8b798030464 |
parent | 1094:d2324eb67223 |
child | 1096:3f8f4c5b9ef4 |
author | nkeynes |
date | Sun Jan 31 18:28:24 2010 +1000 (14 years ago) |
Move bootstrap structure and defines into bootstrap.h
src/bootstrap.c | view | annotate | diff | log | ||
src/bootstrap.h | view | annotate | diff | log | ||
src/loader.c | view | annotate | diff | log |
1.1 --- a/src/bootstrap.c Mon Dec 21 08:23:54 2009 +10001.2 +++ b/src/bootstrap.c Sun Jan 31 18:28:24 2010 +10001.3 @@ -19,26 +19,6 @@1.4 #include "dream.h"1.5 #include "bootstrap.h"1.7 -/**1.8 - * Bootstrap header structure1.9 - */1.10 -typedef struct dc_bootstrap_head {1.11 - char hardware_id[16]; /* must be "SEGA SEGAKATANA " */1.12 - char maker_id[16]; /* ditto, "SEGA ENTERPRISES" */1.13 - char crc[4];1.14 - char padding; /* normally ascii space */1.15 - char gdrom_id[6];1.16 - char disc_no[5];1.17 - char regions[8];1.18 - char peripherals[8];1.19 - char product_id[10];1.20 - char product_ver[6];1.21 - char product_date[16];1.22 - char boot_file[16];1.23 - char vendor_id[16];1.24 - char product_name[128];1.25 -} *dc_bootstrap_head_t;1.26 -1.27 static uint32_t compute_crc16( dc_bootstrap_head_t h )1.28 {1.29 /* Note: Algorithm taken from http://mc.pp.se/dc/ip0000.bin.html */
2.1 --- a/src/bootstrap.h Mon Dec 21 08:23:54 2009 +10002.2 +++ b/src/bootstrap.h Sun Jan 31 18:28:24 2010 +10002.3 @@ -28,6 +28,31 @@2.4 extern "C" {2.5 #endif2.7 +#define BOOTSTRAP_LOAD_ADDR 0x8C0080002.8 +#define BOOTSTRAP_SIZE 327682.9 +#define BOOTSTRAP_MAGIC "SEGA SEGAKATANA SEGA ENTERPRISES"2.10 +2.11 +#define BINARY_LOAD_ADDR 0x8C0100002.12 +2.13 +/**2.14 + * Bootstrap header structure2.15 + */2.16 +typedef struct dc_bootstrap_head {2.17 + char magic[32];2.18 + char crc[4];2.19 + char padding; /* normally ascii space */2.20 + char gdrom_id[6];2.21 + char disc_no[5];2.22 + char regions[8];2.23 + char peripherals[8];2.24 + char product_id[10];2.25 + char product_ver[6];2.26 + char product_date[16];2.27 + char boot_file[16];2.28 + char vendor_id[16];2.29 + char product_name[128];2.30 +} *dc_bootstrap_head_t;2.31 +2.32 /**2.33 * Dump the bootstrap info to the output log for infomational/debugging2.34 * purposes.
3.1 --- a/src/loader.c Mon Dec 21 08:23:54 2009 +10003.2 +++ b/src/loader.c Sun Jan 31 18:28:24 2010 +10003.3 @@ -38,11 +38,6 @@3.4 { "bin", "SH4 Bin file" },3.5 { NULL, NULL } };3.7 -#define BOOTSTRAP_LOAD_ADDR 0x8C0080003.8 -#define BOOTSTRAP_SIZE 327683.9 -3.10 -#define BINARY_LOAD_ADDR 0x8C0100003.11 -3.12 #define CDI_V2 0x800000043.13 #define CDI_V3 0x80000005
.