controller.h
2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef _CONTROLLER_H_
#define _CONTROLLER_H_
/**************************************************************************
* *
* Copyright (C) 1995, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: controller.h,v $
$Revision: 1.1.1.1 $
$Date: 2002/05/02 03:28:43 $
*---------------------------------------------------------------------*/
#define PIFRAMSIZE 16
/*
#define __osGetId osPfsRepairId
*/
typedef struct {
u32 ramarray[PIFRAMSIZE-1]; /* RAM */
u32 pifstatus;
} OSPifRam;
/* command type */
#define CONT_REQUEST 0
#define CONT_READ 1
#define CONT_RAM_READ 2
#define CONT_RAM_WRITE 3
#define CONT_EEPROM_READ 4
#define CONT_EEPROM_WRITE 5
#define CONT_VOICE_READ36 9
#define CONT_VOICE_WRITE20 0xa
#define CONT_VOICE_READ2 0xb
#define CONT_VOICE_WRITE4 0xc
#define CONT_VOICE_SWRITE 0xd
#define CONT_SETCH 254
#define CONT_RESET 255
#define CONT_ETC CONT_SETCH
#define CON_ERR_MASK 0xc0
#ifndef _HW_VERSION_1
#define CONT_FORMAT 1
#define CHANNEL_RESET 0xfd
#define FORMAT_END 0xfe
#endif
/* request/reset format */
typedef struct {
u8 dummy; /* for word aliening */
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 typeh;
u8 typel;
u8 status;
u8 dummy1; /* for word aliening */
} __OSContRequesFormat;
/* request/reset format */
typedef struct {
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 typeh;
u8 typel;
u8 status;
} __OSContRequesFormatShort;
#include "controller_pfs.h"
#include "controller_eeprom.h"
#include "controller_gbpak.h"
#include "controller_voice.h"
#include "controller_cont.h"
#include "controller_si.h"
#endif /* _CONTROLLER_H_ */