filename | src/bootstrap.h |
changeset | 1100:50e702af9373 |
prev | 1099:566cdeb157ec |
next | 1109:700c5ab26a63 |
author | nkeynes |
date | Mon Feb 15 17:27:14 2010 +1000 (10 years ago) |
permissions | -rw-r--r-- |
last change | Hook up the fake bios boot Use fakebios if invoked with -b, or if there's no boot rom loaded |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * CD Bootstrap header parsing. Mostly for informational purposes.
5 *
6 * Copyright (c) 2005 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 /*
20 * IP.BIN related code. Ref: http://mc.pp.se/dc/ip0000.bin.html
21 */
22 #ifndef lxdream_bootstrap_H
23 #define lxdream_bootstrap_H 1
25 #include "lxdream.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 #define BOOTSTRAP_LOAD_ADDR 0x8C008000
32 #define BOOTSTRAP_ENTRY_ADDR 0x8c008300
33 #define BOOTSTRAP_SIZE 32768
34 #define BOOTSTRAP_MAGIC "SEGA SEGAKATANA SEGA ENTERPRISES"
35 #define BOOTSTRAP_MAGIC_SIZE 32
37 #define BINARY_LOAD_ADDR 0x8C010000
39 /**
40 * Bootstrap header structure
41 */
42 typedef struct dc_bootstrap_head {
43 char magic[32];
44 char crc[4];
45 char padding; /* normally ascii space */
46 char gdrom_id[6];
47 char disc_no[5];
48 char regions[8];
49 char peripherals[8];
50 char product_id[10];
51 char product_ver[6];
52 char product_date[16];
53 char boot_file[16];
54 char vendor_id[16];
55 char product_name[128];
56 } *dc_bootstrap_head_t;
58 /**
59 * Dump the bootstrap info to the output log for infomational/debugging
60 * purposes.
61 */
62 void bootstrap_dump(void *data, gboolean detail);
64 void bootprogram_scramble( unsigned char *dest, unsigned char *src, size_t length );
65 void bootprogram_unscramble( unsigned char *dest, unsigned char *src, size_t length );
66 #ifdef __cplusplus
67 }
68 #endif
70 #endif /* !lxdream_bootstrap_H */
.