Search
lxdream.org :: lxdream/src/bootstrap.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/bootstrap.h
changeset 1:eea311cfd33e
next26:ad258e3daaa5
author nkeynes
date Sat Mar 13 00:03:32 2004 +0000 (15 years ago)
permissions -rw-r--r--
last change This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
file annotate diff log raw
nkeynes@1
     1
/*
nkeynes@1
     2
 * IP.BIN related code. Ref: http://mc.pp.se/dc/ip0000.bin.html
nkeynes@1
     3
 */
nkeynes@1
     4
#ifndef dc_ipbin_H
nkeynes@1
     5
#define dc_ipbin_H 1
nkeynes@1
     6
nkeynes@1
     7
#include <sys/types.h>
nkeynes@1
     8
nkeynes@1
     9
#ifdef __cplusplus
nkeynes@1
    10
extern "C" {
nkeynes@1
    11
#if 0
nkeynes@1
    12
}
nkeynes@1
    13
#endif
nkeynes@1
    14
#endif
nkeynes@1
    15
nkeynes@1
    16
#define BOOTSTRAP_LOAD_ADDR 0x8C008000
nkeynes@1
    17
#define BOOTSTRAP_SIZE 32768
nkeynes@1
    18
nkeynes@1
    19
typedef struct dc_bootstrap_head {
nkeynes@1
    20
    char hardware_id[16]; /* must be "SEGA SEGAKATANA " */ 
nkeynes@1
    21
    char maker_id[16];    /* ditto,  "SEGA ENTERPRISES" */
nkeynes@1
    22
    char crc[4];
nkeynes@1
    23
    char padding;         /* normally ascii space */
nkeynes@1
    24
    char gdrom_id[6];
nkeynes@1
    25
    char disc_no[5];
nkeynes@1
    26
    char regions[8];
nkeynes@1
    27
    char peripherals[8];
nkeynes@1
    28
    char product_id[10];
nkeynes@1
    29
    char product_ver[6];
nkeynes@1
    30
    char product_date[16];
nkeynes@1
    31
    char boot_file[16];
nkeynes@1
    32
    char vendor_id[16];
nkeynes@1
    33
    char product_name[128];
nkeynes@1
    34
} *dc_bootstrap_head_t;
nkeynes@1
    35
nkeynes@1
    36
/* Expansion units */
nkeynes@1
    37
#define DC_PERIPH_WINCE    0x0000001
nkeynes@1
    38
#define DC_PERIPH_VGABOX   0x0000010
nkeynes@1
    39
#define DC_PERIPH_OTHER    0x0000100
nkeynes@1
    40
#define DC_PERIPH_PURUPURU 0x0000200
nkeynes@1
    41
#define DC_PERIPH_MIKE     0x0000400
nkeynes@1
    42
#define DC_PERIPH_MEMCARD  0x0000800
nkeynes@1
    43
/* Basic requirements */
nkeynes@1
    44
#define DC_PERIPH_BASIC    0x0001000 /* Basic controls - start, a, b, arrows */
nkeynes@1
    45
#define DC_PERIPH_C_BUTTON 0x0002000
nkeynes@1
    46
#define DC_PERIPH_D_BUTTON 0x0004000
nkeynes@1
    47
#define DC_PERIPH_X_BUTTON 0x0008000
nkeynes@1
    48
#define DC_PERIPH_Y_BUTTON 0x0010000
nkeynes@1
    49
#define DC_PERIPH_Z_BUTTON 0x0020000
nkeynes@1
    50
#define DC_PERIPH_EXP_DIR  0x0040000 /* Expanded direction buttons */
nkeynes@1
    51
#define DC_PERIPH_ANALOG_R 0x0080000 /* Analog R trigger */
nkeynes@1
    52
#define DC_PERIPH_ANALOG_L 0x0100000 /* Analog L trigger */
nkeynes@1
    53
#define DC_PERIPH_ANALOG_H 0x0200000 /* Analog horizontal controller */
nkeynes@1
    54
#define DC_PERIPH_ANALOG_V 0x0400000 /* Analog vertical controller */
nkeynes@1
    55
#define DC_PERIPH_EXP_AH   0x0800000 /* Expanded analog horizontal (?) */
nkeynes@1
    56
#define DC_PERIPH_EXP_AV   0x1000000 /* Expanded analog vertical (?) */
nkeynes@1
    57
/* Optional peripherals */
nkeynes@1
    58
#define DC_PERIPH_GUN      0x2000000
nkeynes@1
    59
#define DC_PERIPH_KEYBOARD 0x4000000
nkeynes@1
    60
#define DC_PERIPH_MOUSE    0x8000000
nkeynes@1
    61
nkeynes@1
    62
void parse_ipbin(char *data);
nkeynes@1
    63
nkeynes@1
    64
#ifdef __cplusplus
nkeynes@1
    65
}
nkeynes@1
    66
#endif
nkeynes@1
    67
#endif
.