Search
lxdream.org :: lxdream/src/bootstrap.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/bootstrap.h
changeset 1099:566cdeb157ec
prev1095:a8b798030464
next1100:50e702af9373
author nkeynes
date Wed Feb 10 18:16:19 2010 +1000 (14 years ago)
permissions -rw-r--r--
last change First draft of basic ISO9660 filesystem reader
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_SIZE 32768
    33 #define BOOTSTRAP_MAGIC "SEGA SEGAKATANA SEGA ENTERPRISES"
    34 #define BOOTSTRAP_MAGIC_SIZE 32
    36 #define BINARY_LOAD_ADDR 0x8C010000
    38 /**
    39  * Bootstrap header structure
    40  */
    41 typedef struct dc_bootstrap_head {
    42     char magic[32];
    43     char crc[4];
    44     char padding;         /* normally ascii space */
    45     char gdrom_id[6];
    46     char disc_no[5];
    47     char regions[8];
    48     char peripherals[8];
    49     char product_id[10];
    50     char product_ver[6];
    51     char product_date[16];
    52     char boot_file[16];
    53     char vendor_id[16];
    54     char product_name[128];
    55 } *dc_bootstrap_head_t;
    57 /**
    58  * Dump the bootstrap info to the output log for infomational/debugging
    59  * purposes.
    60  */
    61 void bootstrap_dump(void *data, gboolean detail);
    63 void bootprogram_scramble( unsigned char *dest, unsigned char *src, size_t length );
    64 void bootprogram_unscramble( unsigned char *dest, unsigned char *src, size_t length );
    65 #ifdef __cplusplus
    66 }
    67 #endif
    69 #endif /* !lxdream_bootstrap_H */
.