You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
230 Commits
arthurtill
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87c634b3cb | ||
|
|
3cae3580c1 | ||
|
|
64b2e2d855 | ||
|
|
05b5b91674 | ||
|
|
e53e6d25a0 | ||
|
|
3a24ce70cb | ||
|
|
93c2bd12d1 | ||
|
|
48f15f2fcc | ||
|
|
889d7aabdb | ||
|
|
83efeffeee | ||
|
|
8be4beddc4 | ||
|
|
0e2d170798 | ||
|
|
0a0950b471 | ||
|
|
19ce4c0834 | ||
|
|
5ba2c31d18 | ||
|
|
76d41a03b6 | ||
|
|
ee38bd51ca | ||
|
|
8f61244f57 | ||
|
|
64e07e086a | ||
|
|
32c16846b2 | ||
|
|
dc0b97a65f | ||
|
|
567fbf2957 | ||
|
|
6a5cf577c2 | ||
|
|
daa429fa32 | ||
|
|
dbcaba5815 | ||
|
|
2f80e3eb99 | ||
|
|
c06431b040 | ||
|
|
ac96010c70 | ||
|
|
baac7073fd | ||
|
|
c880c4fab5 | ||
|
|
fb5c68f14f | ||
|
|
1351c41196 | ||
|
|
b05b92e035 | ||
|
|
58c93a0c25 | ||
|
|
519747d1a4 | ||
|
|
c091960a9b | ||
|
|
371296f94a | ||
|
|
b19f24e605 | ||
|
|
55fd98b253 | ||
|
|
0cab016a0f | ||
|
|
a6aab07352 | ||
|
|
ffb663006f | ||
|
|
8583d10bd6 | ||
|
|
65eba3548a | ||
|
|
1798c72dd4 | ||
|
|
ad1c9e9c70 | ||
|
|
30865abfaf | ||
|
|
d12881298e | ||
|
|
0767c76425 | ||
|
|
59acce3da8 | ||
|
|
9ab67e6ebf | ||
|
|
deb53bc973 | ||
|
|
9089607f9e | ||
|
|
9e6d027620 | ||
|
|
86b0966e5d | ||
|
|
ba420d4028 | ||
|
|
6cc1975127 | ||
|
|
00e5dd6da0 | ||
|
|
b3a4eda167 | ||
|
|
4fb3c843cd | ||
|
|
42c52817c2 | ||
|
|
3c29d9806e | ||
|
|
bfebadc244 | ||
|
|
d3708ebd94 | ||
|
|
f1c2c94c93 | ||
|
|
ebb5253de8 | ||
|
|
8afd5122ea | ||
|
|
369ef6734c | ||
|
|
f93d47b7ba | ||
|
|
338eee167c | ||
|
|
5dc044590d | ||
|
|
4d79f57f68 | ||
|
|
7dfa6a90d4 | ||
|
|
0dbf0fbb32 | ||
|
|
126253f954 | ||
|
|
650654d033 | ||
|
|
6d3a2eeb2d | ||
|
|
47e0f25a15 | ||
|
|
d8b9bb73e6 | ||
|
|
1bf7a6cb47 | ||
|
|
ad90eba00a | ||
|
|
9b3e5f971e | ||
|
|
cb9ced8abe | ||
|
|
13a81ebdea | ||
|
|
9b903d42d5 | ||
|
|
4b3f9e8ec0 | ||
|
|
8b4cd14cb6 | ||
|
|
15e5a17fca | ||
|
|
ec880fb46b | ||
|
|
482405db67 | ||
|
|
8314034280 | ||
|
|
7e7813f2bc | ||
|
|
947fc5d2ea | ||
|
|
ed5f628486 | ||
|
|
1c8db3d9ae | ||
|
|
b531611f13 | ||
|
|
983612df1b | ||
|
|
73b7a61bde | ||
|
|
fc977ed3e0 | ||
|
|
8b861a2d3f | ||
|
|
cfd87e0ad5 | ||
|
|
6b95114c03 | ||
|
|
ec6bda79aa | ||
|
|
82f0da7d2e | ||
|
|
59dc86234d | ||
|
|
bba724e6f8 | ||
|
|
bc6c42e366 | ||
|
|
69055c9401 | ||
|
|
3ecadf796b | ||
|
|
9894152534 | ||
|
|
f1642d58af | ||
|
|
bfd3e59290 | ||
|
|
3220d74b0d | ||
|
|
b38bce56d7 | ||
|
|
1f5e7512b6 | ||
|
|
bb8a5f3987 | ||
|
|
8b1f359555 | ||
|
|
6a1f78d284 | ||
|
|
7f3d6ace49 | ||
|
|
4c853afb87 | ||
|
|
d3eed5d5f7 | ||
|
|
ea628dd113 | ||
|
|
fe02f58004 | ||
|
|
2d6bf908f7 | ||
|
|
e8fc703fd0 | ||
|
|
ea72987c43 | ||
|
|
92f3a7d2ba | ||
|
|
da66b48f7d | ||
|
|
f821dbfce5 | ||
|
|
e27e0d61f1 | ||
|
|
30ac33ae61 | ||
|
|
cef1be2d40 | ||
|
|
c509e8253d | ||
|
|
d8fb2f668c | ||
|
|
fd345e9908 | ||
|
|
7a94b73be2 | ||
|
|
8c56cd6654 | ||
|
|
93c5fea323 | ||
|
|
3fe898cc41 | ||
|
|
cf1d9f06e4 | ||
|
|
c06d960572 | ||
|
|
ec7d8c3eec | ||
|
|
9b83166ca7 | ||
|
|
4313cef92d | ||
|
|
1a2254fad7 | ||
|
|
c588c13c44 | ||
|
|
b1acbc234f | ||
|
|
7e8ecb0ebb | ||
|
|
43a6d84786 | ||
|
|
1ddd3aa2b8 | ||
|
|
b4bc5a9d1a | ||
|
|
17e05f89e1 | ||
|
|
2f967d5797 | ||
|
|
e46dff54f4 | ||
|
|
9540005838 | ||
|
|
84e5576e3d | ||
|
|
3afad8da04 | ||
|
|
995bc74e19 | ||
|
|
5a7b919729 | ||
|
|
2017928237 | ||
|
|
4567dd9a77 | ||
|
|
782a0afd9e | ||
|
|
1defcd176f | ||
|
|
7aceb9c08e | ||
|
|
ddf0642ef4 | ||
|
|
ec4c78298a | ||
|
|
cbd1054230 | ||
|
|
ba7fb77587 | ||
|
|
b88afce952 | ||
|
|
5666ffac16 | ||
|
|
08ad5a8908 | ||
|
|
116e249c91 | ||
|
|
54a3e39f75 | ||
|
|
d6b4e57166 | ||
|
|
5516d041ab | ||
|
|
8a371bfdbb | ||
|
|
a6ea957eac | ||
|
|
8a803d8455 | ||
|
|
71b064e847 | ||
|
|
addeae8680 | ||
|
|
d95933bde0 | ||
|
|
b2ce18639a | ||
|
|
23b58dc989 | ||
|
|
12ed8686ac | ||
|
|
dd2ee3508b | ||
|
|
ab9a19c509 | ||
|
|
9a0605fee4 | ||
|
|
500a629c6f | ||
|
|
59231305e6 | ||
|
|
0701b54570 | ||
|
|
ab31650de1 | ||
|
|
c7b80e9abd | ||
|
|
4b7d0daa47 | ||
|
|
764833a2bc | ||
|
|
b46061d6a2 | ||
|
|
f12bd61f05 | ||
|
|
a9ef064935 | ||
|
|
d6d9142425 | ||
|
|
5470095a78 | ||
|
|
6697e9498c | ||
|
|
975070f5a2 | ||
|
|
95c007f23b | ||
|
|
db050377e7 | ||
|
|
e60fa6261f | ||
|
|
0954af0cf4 | ||
|
|
d0e9c8f597 | ||
|
|
25b128db7c | ||
|
|
bf8f170b8c | ||
|
|
387c6c3954 | ||
|
|
0c5eadcb99 | ||
|
|
9af5a968dc | ||
|
|
aa730a6231 | ||
|
|
1157bbf582 | ||
|
|
6a14b81798 | ||
|
|
fb100373de | ||
|
|
7cf6573b0d | ||
|
|
038a4ecbff | ||
|
|
2615ddb8f0 | ||
|
|
1703041a61 | ||
|
|
0cf12b263a | ||
|
|
af81838da2 | ||
|
|
614788ba5a | ||
|
|
c0d15634e9 | ||
|
|
ff81ccb0a9 | ||
|
|
b5e22a1019 | ||
|
|
c17510cb4c | ||
|
|
3b2ea062d0 | ||
|
|
f273539077 | ||
|
|
6fec1b6fa6 | ||
|
|
efd0bf40c9 |
@@ -21,7 +21,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
|
||||
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
|
||||
- **JoshDuMan**: Decomp guy, general assistance
|
||||
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
|
||||
- **Arceveti**: Silhouette, various optimizations including shadows, implementation of better wall collision, better hanging, breath meter, 4 controller support, major input refactoring, controller reassignment, controller icons, alternate rumble graphics
|
||||
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
|
||||
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimisations, instant input patch, cake screen fix, segmented code support, and various optimizations/fixes
|
||||
- **Kaze**: Graph node optimisations, automatic optimal collision distance
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "types.h"
|
||||
#include "game/ingame_menu.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/segment2.h"
|
||||
|
||||
#include "make_const_nonconst.h"
|
||||
|
||||
@@ -2669,7 +2670,7 @@ ALIGNED8 static const Texture texture_shadow_quarter_square[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
|
||||
UNUSED ALIGNED8 const Texture texture_radial_light[] = {
|
||||
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
|
||||
};
|
||||
|
||||
@@ -2968,7 +2969,8 @@ const Gfx dl_ia8_up_arrow_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x02014958 - 0x02014960
|
||||
#include "segment2/controllers.c.in"
|
||||
#include "segment2/rumble_pak.c.in"
|
||||
|
||||
// 0x02014970 - 0x020149A8
|
||||
const Gfx dl_paintings_rippling_begin[] = {
|
||||
|
||||
55
bin/segment2/controllers.c.in
Normal file
55
bin/segment2/controllers.c.in
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifdef ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
ALIGNED8 const Texture texture_controller_port[] = {
|
||||
#include "textures/segment2/controller_port.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_unknown[] = {
|
||||
#include "textures/segment2/controller_unknown.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_normal[] = {
|
||||
#include "textures/segment2/controller_n64_normal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_mouse[] = {
|
||||
#include "textures/segment2/controller_n64_mouse.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_voice[] = {
|
||||
#include "textures/segment2/controller_n64_voice.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_keyboard[] = {
|
||||
#include "textures/segment2/controller_n64_keyboard.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gba[] = {
|
||||
#include "textures/segment2/controller_gba.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_normal[] = {
|
||||
#include "textures/segment2/controller_gcn_normal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_receiver[] = {
|
||||
#include "textures/segment2/controller_gcn_receiver.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_wavebird[] = {
|
||||
#include "textures/segment2/controller_gcn_wavebird.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_wheel[] = {
|
||||
#include "textures/segment2/controller_gcn_wheel.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_keyboard[] = {
|
||||
#include "textures/segment2/controller_gcn_keyboard.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_dancepad[] = {
|
||||
#include "textures/segment2/controller_gcn_dancepad.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#endif // ENABLE_STATUS_REPOLLING_GUI
|
||||
40
bin/segment2/rumble_pak.c.in
Normal file
40
bin/segment2/rumble_pak.c.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifdef ENABLE_RUMBLE
|
||||
|
||||
//! TODO: Move rumble pak graphic textures to src/menu/intro_geo.c once build order is fixed.
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_en[] = {
|
||||
#include "textures/segment2/rumble_pak_en.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if MULTILANG //! TODO: Use these after ASCII/multilang is merged.
|
||||
|
||||
#ifdef ENABLE_FRENCH
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_fr[] = {
|
||||
#include "textures/segment2/rumble_pak_fr.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_FRENCH
|
||||
|
||||
#ifdef ENABLE_GERMAN
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_de[] = {
|
||||
#include "textures/segment2/rumble_pak_de.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_GERMAN
|
||||
|
||||
#ifdef ENABLE_JAPANESE
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_jp[] = {
|
||||
#include "textures/segment2/rumble_pak_jp.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_JAPANESE
|
||||
|
||||
#if defined(ENABLE_SPANISH_SPAIN) || defined(ENABLE_SPANISH_LATIN_AMERICA)
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_es[] = {
|
||||
#include "textures/segment2/rumble_pak_es.rgba16.inc.c"
|
||||
};
|
||||
#endif // (ENABLE_SPANISH_SPAIN || ENABLE_SPANISH_LATIN_AMERICA)
|
||||
|
||||
#endif // MULTILANG
|
||||
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_controller[] = {
|
||||
#include "textures/segment2/rumble_pak_controller.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#endif // ENABLE_RUMBLE
|
||||
@@ -121,8 +121,6 @@ const Texture *const game_over_texture_table[] = {
|
||||
title_texture_game_over_0, title_texture_game_over_1, title_texture_game_over_2, title_texture_game_over_3,
|
||||
};
|
||||
|
||||
UNUSED static const u64 title_screen_bg_unused_0 = 0;
|
||||
|
||||
#ifdef GODDARD_EASTER_EGG
|
||||
const Gfx title_screen_bg_dl_face_easter_egg_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
@@ -142,27 +140,3 @@ const Gfx title_screen_bg_dl_face_easter_egg_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// Not part of segment2, but define still covers same use case
|
||||
#if (defined(COMPLETE_EN_US_SEGMENT2) && ENABLE_RUMBLE)
|
||||
ALIGNED8 static const Texture title_texture_rumble_pak[] = {
|
||||
#include "textures/title_screen_bg/title_screen_bg.06648.rgba16.inc.c"
|
||||
};
|
||||
|
||||
const Gfx title_screen_bg_dl_rumble_pak[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCycleType(G_CYC_COPY),
|
||||
gsDPSetTexturePersp(G_TP_NONE),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
|
||||
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 319, 239),
|
||||
gsDPLoadTextureTile(title_texture_rumble_pak, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 0, 0, 0, 79, 23, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 7, 5, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsSPTextureRectangle(220 << 2, 200 << 2, 299 << 2, 223 << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetTexturePersp(G_TP_PERSP),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/**
|
||||
* Enables Goddard (the Mario head).
|
||||
*/
|
||||
// #define KEEP_MARIO_HEAD
|
||||
#define KEEP_MARIO_HEAD
|
||||
|
||||
/**
|
||||
* Enables the Goddard easter egg from Shindou (has no effect if KEEP_MARIO_HEAD is disabled).
|
||||
|
||||
@@ -19,23 +19,45 @@
|
||||
|
||||
/**
|
||||
* Enables Rumble Pak Support.
|
||||
* Currently not recommended, as it may cause random crashes.
|
||||
*/
|
||||
// #define ENABLE_RUMBLE (1 || VERSION_SH)
|
||||
#define ENABLE_RUMBLE
|
||||
|
||||
/**
|
||||
* The maximum number of supported players/controllers. 1-4.
|
||||
* This will save performance if the player has extra unused controllers plugged in.
|
||||
* NOTE: Default is 2, maximum is 4.
|
||||
* NOTE: This needs to be at least 2 for now for gamecube controller swap to work.
|
||||
* NOTE: Default is 1, maximum is 4.
|
||||
* NOTE: If this is 1, the first controller with input after boot will become player 1. Otherwise, player numbers are automatically assigned via port order.
|
||||
* NOTE: It is highly recommended to enable ENABLE_STATUS_REPOLLING_GUI if this is greater than 1.
|
||||
*/
|
||||
#define MAX_NUM_PLAYERS 2
|
||||
#define MAX_NUM_PLAYERS 1
|
||||
|
||||
/**
|
||||
* Enables a GUI that, while opem, allows plugging/unplugging controllers and changing the controller order.
|
||||
* Triggered by unplugging any active controller.
|
||||
*/
|
||||
#define ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
/**
|
||||
* Allows the player to use the button combo defined in input.h to trigger status repolling at any time during gameplay.
|
||||
*/
|
||||
#define ENABLE_STATUS_REPOLLING_COMBO_IN_GAMEPLAY
|
||||
|
||||
/**
|
||||
* Highlights the currently pressed buttons on controllers in the status repolling GUI.
|
||||
*/
|
||||
#define CONTROLLERS_INPUT_DISPLAY
|
||||
|
||||
/**
|
||||
* Informs supported emulators to default to GameCube controller inputs.
|
||||
*/
|
||||
// #define EMU_DEFAULT_TO_GCN
|
||||
|
||||
/**
|
||||
* RCVI hack. Increases performance on emulator, and does nothing on console.
|
||||
* Might break on some emulators. Use at your own risk, and don't use it unless you actually need the extra performance.
|
||||
*/
|
||||
// #define RCVI_HACK
|
||||
|
||||
/**
|
||||
* Screen Size Defines.
|
||||
*/
|
||||
@@ -48,9 +70,3 @@
|
||||
*/
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
|
||||
/**
|
||||
* RCVI hack. Increases performance on emulator, and does nothing on console.
|
||||
* Might break on some emulators. Use at your own risk, and don't use it unless you actually need the extra performance.
|
||||
*/
|
||||
// #define RCVI_HACK
|
||||
|
||||
@@ -188,6 +188,15 @@
|
||||
* config_rom.h
|
||||
*/
|
||||
|
||||
#ifdef VERSION_SH
|
||||
#undef ENABLE_RUMBLE
|
||||
#define ENABLE_RUMBLE
|
||||
#endif // VERSION_SH
|
||||
|
||||
#ifndef ENABLE_STATUS_REPOLLING_GUI
|
||||
#undef CONTROLLERS_INPUT_DISPLAY
|
||||
#endif // !ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
#ifndef TARGET_N64
|
||||
#undef BORDER_HEIGHT_CONSOLE
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_motor.h,v $
|
||||
$Revision: 1.1.1.1 $
|
||||
$Date: 2002/05/02 03:28:25 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_MOTOR_H_
|
||||
#define _OS_MOTOR_H_
|
||||
#define _OS_MOTOR_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -61,23 +61,26 @@ extern "C" {
|
||||
|
||||
/* Rumble PAK interface */
|
||||
|
||||
extern s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
#if 1
|
||||
#define MOTOR_START 1
|
||||
#define MOTOR_STOP 0
|
||||
#define osMotorStart(x) __osMotorAccess((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccess((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess(OSPfs *pfs, s32 flag);
|
||||
#else
|
||||
extern s32 osMotorStop( OSPfs *pfs);
|
||||
extern s32 osMotorStart(OSPfs *pfs);
|
||||
#endif
|
||||
extern s32 osMotorInit( OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
extern s32 osMotorInitEx(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
#define MOTOR_MASK_N64 0b01
|
||||
#define MOTOR_MASK_GCN 0b11
|
||||
enum OSMotorOP {
|
||||
MOTOR_STOP,
|
||||
MOTOR_START,
|
||||
MOTOR_STOP_HARD, // GCN only.
|
||||
};
|
||||
#define osMotorStopHard(x) __osMotorAccessEx((x), MOTOR_STOP_HARD)
|
||||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess( OSPfs *pfs, s32 flag);
|
||||
extern s32 __osMotorAccessEx(OSPfs *pfs, s32 flag);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_MOTOR_H_ */
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
|
||||
$RCSfile: os_pfs.h,v $
|
||||
$Revision: 1.1.1.1 $
|
||||
$Date: 2002/05/02 03:28:25 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_PFS_H_
|
||||
#define _OS_PFS_H_
|
||||
#define _OS_PFS_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -50,28 +50,28 @@ extern "C" {
|
||||
* Structure for file system
|
||||
*/
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue *queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inode_start_page; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
/*0x00*/ int status;
|
||||
/*0x04*/ OSMesgQueue *queue;
|
||||
/*0x08*/ int channel;
|
||||
/*0x0C*/ u8 id[32];
|
||||
/*0x2C*/ u8 label[32];
|
||||
/*0x4C*/ int version;
|
||||
/*0x50*/ int dir_size;
|
||||
/*0x54*/ int inode_table; /* block location */
|
||||
/*0x58*/ int minode_table; /* mirrioring inode_table */
|
||||
/*0x5C*/ int dir_table; /* block location */
|
||||
/*0x60*/ int inode_start_page; /* page # */
|
||||
/*0x64*/ u8 banks;
|
||||
/*0x65*/ u8 activebank;
|
||||
} OSPfs; /*0x68*/
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
/*0x00*/ u32 file_size; /* bytes */
|
||||
/*0x04*/ u32 game_code;
|
||||
/*0x08*/ u16 company_code;
|
||||
/*0x0A*/ char ext_name[4];
|
||||
/*0x0E*/ char game_name[16];
|
||||
} OSPfsState; /*0x20*/
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
@@ -83,45 +83,48 @@ typedef struct {
|
||||
*/
|
||||
|
||||
/* File System size */
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8) // 0x0002
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 0xFF) // 0x0000
|
||||
|
||||
#define PFS_FILE_NAME_LEN 16
|
||||
#define PFS_FILE_EXT_LEN 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
#define PFS_FILE_NAME_LEN sizeof(((OSPfsState*)0)->game_name) // 16
|
||||
#define PFS_FILE_EXT_LEN sizeof(((OSPfsState*)0)->ext_name ) // 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
|
||||
/* File System flag */
|
||||
|
||||
#define PFS_READ 0
|
||||
#define PFS_WRITE 1
|
||||
#define PFS_CREATE 2
|
||||
enum OSPfsFlag {
|
||||
PFS_READ,
|
||||
PFS_WRITE,
|
||||
PFS_CREATE,
|
||||
};
|
||||
|
||||
/* File System status */
|
||||
#define PFS_INITIALIZED 0x1
|
||||
#define PFS_CORRUPTED 0x2 /* File system was corrupted */
|
||||
#define PFS_ID_BROKEN 0x4
|
||||
#define PFS_MOTOR_INITIALIZED 0x8
|
||||
#define PFS_GBPAK_INITIALIZED 0x10
|
||||
#define PFS_STATUS_NONE 0x00
|
||||
#define PFS_INITIALIZED (1 << 0) // 0x01
|
||||
#define PFS_CORRUPTED (1 << 1) // 0x02 /* File system was corrupted */
|
||||
#define PFS_ID_BROKEN (1 << 2) // 0x04
|
||||
#define PFS_MOTOR_INITIALIZED (1 << 3) // 0x08
|
||||
#define PFS_GBPAK_INITIALIZED (1 << 4) // 0x10
|
||||
|
||||
/* File System error number */
|
||||
|
||||
#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */
|
||||
#define PFS_ERR_NEW_PACK 2 /* ram pack has been changed to a */
|
||||
/* different one */
|
||||
#define PFS_ERR_INCONSISTENT 3 /* need to run Pfschecker */
|
||||
#define PFS_ERR_CONTRFAIL CONT_OVERRUN_ERROR
|
||||
#define PFS_ERR_INVALID 5 /* invalid parameter or file not exist*/
|
||||
#define PFS_ERR_BAD_DATA 6 /* the data read from pack are bad*/
|
||||
#define PFS_DATA_FULL 7 /* no free pages on ram pack */
|
||||
#define PFS_DIR_FULL 8 /* no free directories on ram pack*/
|
||||
#define PFS_ERR_EXIST 9 /* file exists */
|
||||
#define PFS_ERR_ID_FATAL 10 /* dead ram pack */
|
||||
#define PFS_ERR_DEVICE 11 /* wrong device type*/
|
||||
#define PFS_ERR_NO_GBCART 12 /* no gb cartridge (64GB-PAK) */
|
||||
#define PFS_ERR_NEW_GBCART 13 /* gb cartridge may be changed */
|
||||
enum OSPfsError {
|
||||
PFS_ERR_SUCCESS, /* no error */
|
||||
PFS_ERR_NOPACK, /* no memory card is plugged or */
|
||||
PFS_ERR_NEW_PACK, /* ram pack has been changed to a different one */
|
||||
PFS_ERR_INCONSISTENT, /* need to run Pfschecker */
|
||||
PFS_ERR_CONTRFAIL, /* CONT_OVERRUN_ERROR */
|
||||
PFS_ERR_INVALID, /* invalid parameter or file not exist */
|
||||
PFS_ERR_BAD_DATA, /* the data read from pack are bad */
|
||||
PFS_DATA_FULL, /* no free pages on ram pack */
|
||||
PFS_DIR_FULL, /* no free directories on ram pack */
|
||||
PFS_ERR_EXIST, /* file exists */
|
||||
PFS_ERR_ID_FATAL, /* dead ram pack */
|
||||
PFS_ERR_DEVICE, /* wrong device type */
|
||||
PFS_ERR_NO_GBCART, /* no gb cartridge (64GB-PAK) */
|
||||
PFS_ERR_NEW_GBCART, /* gb cartridge may be changed */
|
||||
};
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
@@ -165,10 +168,10 @@ extern s32 osPfsFreeBlocks( OSPfs *pfs, s32 *bytes_not_used);
|
||||
extern s32 osPfsNumFiles( OSPfs *pfs, s32 *max_files, s32 *files_used);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_PFS_H_ */
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_voice.h,v $
|
||||
$Revision: 1.1.1.2 $
|
||||
$Date: 2002/10/29 08:06:34 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_VOICE_H_
|
||||
#define _OS_VOICE_H_
|
||||
#define _OS_VOICE_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
@@ -24,23 +24,23 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
OSMesgQueue *__mq; /* SI Message Queue */
|
||||
int __channel; /* Controller Port # */
|
||||
s32 __mode;
|
||||
u8 cmd_status; /* Command Status */
|
||||
} OSVoiceHandle;
|
||||
typedef struct { /* Voice Recognition System */
|
||||
/*0x00*/ OSMesgQueue *__mq; /* SI Message Queue */
|
||||
/*0x04*/ int __channel; /* Controller Port # */
|
||||
/*0x08*/ s32 __mode;
|
||||
/*0x0C*/ u8 cmd_status; /* Command Status */
|
||||
} OSVoiceHandle; /*0x10*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
/*0x00*/ u16 warning;
|
||||
/*0x02*/ u16 answer_num; /* 0...5 */
|
||||
/*0x04*/ u16 voice_level;
|
||||
/*0x06*/ u16 voice_sn;
|
||||
/*0x08*/ u16 voice_time;
|
||||
/*0x0A*/ u16 answer[5];
|
||||
/*0x14*/ u16 distance[5];
|
||||
} OSVoiceData; /*0x20*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
u16 warning;
|
||||
u16 answer_num; /* 0...5 */
|
||||
u16 voice_level;
|
||||
u16 voice_sn;
|
||||
u16 voice_time;
|
||||
u16 answer[5];
|
||||
u16 distance[5];
|
||||
} OSVoiceData;
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
@@ -52,16 +52,18 @@ typedef struct { /* Voice Recognition System */
|
||||
|
||||
/* definition for Voice Recognition System */
|
||||
|
||||
#define VOICE_WARN_TOO_SMALL 0x0400
|
||||
#define VOICE_WARN_TOO_LARGE 0x0800
|
||||
#define VOICE_WARN_NOT_FIT 0x4000
|
||||
#define VOICE_WARN_TOO_NOISY 0x8000
|
||||
#define VOICE_WARN_TOO_SMALL (1 << 10) // 0x0400
|
||||
#define VOICE_WARN_TOO_LARGE (1 << 11) // 0x0800
|
||||
#define VOICE_WARN_NOT_FIT (1 << 14) // 0x4000
|
||||
#define VOICE_WARN_TOO_NOISY (1 << 15) // 0x8000
|
||||
|
||||
#define VOICE_STATUS_READY 0
|
||||
#define VOICE_STATUS_START 1
|
||||
#define VOICE_STATUS_CANCEL 3
|
||||
#define VOICE_STATUS_BUSY 5
|
||||
#define VOICE_STATUS_END 7
|
||||
enum OSVoiceStatus {
|
||||
VOICE_STATUS_READY = 0,
|
||||
VOICE_STATUS_START = 1,
|
||||
VOICE_STATUS_CANCEL = 3,
|
||||
VOICE_STATUS_BUSY = 5,
|
||||
VOICE_STATUS_END = 7,
|
||||
};
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
@@ -99,10 +101,10 @@ extern s32 osVoiceMaskDictionary( OSVoiceHandle *hd, u8 *maskpattern, int size);
|
||||
extern void osVoiceCountSyllables(u8 *word, u32 *syllable);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_VOICE_H_ */
|
||||
|
||||
@@ -134,24 +134,29 @@ The Indy development board use cartridge domain 1:
|
||||
* 1FC00000 +-------+-----------------+-----+
|
||||
*
|
||||
*/
|
||||
#define PIF_ROM_SIZE 0x07C0
|
||||
#define PIF_ROM_START 0x1FC00000
|
||||
#define PIF_ROM_END 0x1FC007BF
|
||||
#define PIF_RAM_START 0x1FC007C0
|
||||
#define PIF_RAM_END 0x1FC007FF
|
||||
#define PIF_ROM_END (PIF_ROM_START + PIF_ROM_SIZE - 1) /* 0x1FC007BF */
|
||||
|
||||
#define PIF_RAM_SIZE 0x0040
|
||||
#define PIF_RAM_START (PIF_ROM_END + 1 ) /* 0x1FC007C0 */
|
||||
#define PIF_RAM_END (PIF_RAM_START + PIF_RAM_SIZE - 1) /* 0x1FC007FF */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Controller channel
|
||||
* Controller channel
|
||||
* Each game controller channel has 4 error bits that are defined in bit 6-7 of
|
||||
* the Rx and Tx data size area bytes. Programmers need to clear these bits
|
||||
* when setting the Tx/Rx size area values for a channel
|
||||
*/
|
||||
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */
|
||||
#define CHNL_ERR_SUCCESS 0x00
|
||||
|
||||
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */
|
||||
#define CHNL_ERR_NORESP (0b1 << 7) /* 0x80: Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN (0b1 << 6) /* 0x40: Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME (0b1 << 7) /* 0x80: Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION (0b1 << 6) /* 0x40: Bit 6 (Tx): Collision error */
|
||||
|
||||
#define CHNL_ERR_MASK (0b11 << 6) /* 0xC0: Bit 6-7: channel errors */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_motor.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:15 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_MOTOR_H_
|
||||
#define _OS_MOTOR_H_
|
||||
#define _OS_MOTOR_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -61,25 +61,26 @@ extern "C" {
|
||||
|
||||
/* Rumble PAK interface */
|
||||
|
||||
extern s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
extern s32 osMotorInit( OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
extern s32 osMotorInitEx(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
#if 1
|
||||
#define MOTOR_START 1
|
||||
#define MOTOR_STOP 0
|
||||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess(OSPfs *pfs, s32 flag);
|
||||
#define MOTOR_MASK_N64 0b01
|
||||
#define MOTOR_MASK_GCN 0b11
|
||||
enum OSMotorOP {
|
||||
MOTOR_STOP,
|
||||
MOTOR_START,
|
||||
MOTOR_STOP_HARD, // GCN only.
|
||||
};
|
||||
#define osMotorStopHard(x) __osMotorAccessEx((x), MOTOR_STOP_HARD)
|
||||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess( OSPfs *pfs, s32 flag);
|
||||
extern s32 __osMotorAccessEx(OSPfs *pfs, s32 flag);
|
||||
#else
|
||||
extern s32 osMotorStop( OSPfs *pfs);
|
||||
extern s32 osMotorStart(OSPfs *pfs);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_MOTOR_H_ */
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
|
||||
$RCSfile: os_pfs.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:16 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_PFS_H_
|
||||
#define _OS_PFS_H_
|
||||
#define _OS_PFS_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -50,28 +50,28 @@ extern "C" {
|
||||
* Structure for file system
|
||||
*/
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue *queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inode_start_page; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
/*0x00*/ int status;
|
||||
/*0x04*/ OSMesgQueue *queue;
|
||||
/*0x08*/ int channel;
|
||||
/*0x0C*/ u8 id[32];
|
||||
/*0x2C*/ u8 label[32];
|
||||
/*0x4C*/ int version;
|
||||
/*0x50*/ int dir_size;
|
||||
/*0x54*/ int inode_table; /* block location */
|
||||
/*0x58*/ int minode_table; /* mirrioring inode_table */
|
||||
/*0x5C*/ int dir_table; /* block location */
|
||||
/*0x60*/ int inode_start_page; /* page # */
|
||||
/*0x64*/ u8 banks;
|
||||
/*0x65*/ u8 activebank;
|
||||
} OSPfs; /*0x68*/
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
/*0x00*/ u32 file_size; /* bytes */
|
||||
/*0x04*/ u32 game_code;
|
||||
/*0x08*/ u16 company_code;
|
||||
/*0x0A*/ char ext_name[4];
|
||||
/*0x0E*/ char game_name[16];
|
||||
} OSPfsState; /*0x20*/
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
@@ -83,45 +83,48 @@ typedef struct {
|
||||
*/
|
||||
|
||||
/* File System size */
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8) // 0x0002
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 0xFF) // 0x0000
|
||||
|
||||
#define PFS_FILE_NAME_LEN 16
|
||||
#define PFS_FILE_EXT_LEN 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
#define PFS_FILE_NAME_LEN sizeof(((OSPfsState*)0)->game_name) // 16
|
||||
#define PFS_FILE_EXT_LEN sizeof(((OSPfsState*)0)->ext_name ) // 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
|
||||
/* File System flag */
|
||||
|
||||
#define PFS_READ 0
|
||||
#define PFS_WRITE 1
|
||||
#define PFS_CREATE 2
|
||||
enum OSPfsFlag {
|
||||
PFS_READ,
|
||||
PFS_WRITE,
|
||||
PFS_CREATE,
|
||||
};
|
||||
|
||||
/* File System status */
|
||||
#define PFS_INITIALIZED 0x1
|
||||
#define PFS_CORRUPTED 0x2 /* File system was corrupted */
|
||||
#define PFS_ID_BROKEN 0x4
|
||||
#define PFS_MOTOR_INITIALIZED 0x8
|
||||
#define PFS_GBPAK_INITIALIZED 0x10
|
||||
#define PFS_STATUS_NONE 0x00
|
||||
#define PFS_INITIALIZED (1 << 0) // 0x01
|
||||
#define PFS_CORRUPTED (1 << 1) // 0x02 /* File system was corrupted */
|
||||
#define PFS_ID_BROKEN (1 << 2) // 0x04
|
||||
#define PFS_MOTOR_INITIALIZED (1 << 3) // 0x08
|
||||
#define PFS_GBPAK_INITIALIZED (1 << 4) // 0x10
|
||||
|
||||
/* File System error number */
|
||||
|
||||
#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */
|
||||
#define PFS_ERR_NEW_PACK 2 /* ram pack has been changed to a */
|
||||
/* different one */
|
||||
#define PFS_ERR_INCONSISTENT 3 /* need to run Pfschecker */
|
||||
#define PFS_ERR_CONTRFAIL CONT_OVERRUN_ERROR
|
||||
#define PFS_ERR_INVALID 5 /* invalid parameter or file not exist*/
|
||||
#define PFS_ERR_BAD_DATA 6 /* the data read from pack are bad*/
|
||||
#define PFS_DATA_FULL 7 /* no free pages on ram pack */
|
||||
#define PFS_DIR_FULL 8 /* no free directories on ram pack*/
|
||||
#define PFS_ERR_EXIST 9 /* file exists */
|
||||
#define PFS_ERR_ID_FATAL 10 /* dead ram pack */
|
||||
#define PFS_ERR_DEVICE 11 /* wrong device type*/
|
||||
#define PFS_ERR_NO_GBCART 12 /* no gb cartridge (64GB-PAK) */
|
||||
#define PFS_ERR_NEW_GBCART 13 /* gb cartridge may be changed */
|
||||
enum OSPfsError {
|
||||
PFS_ERR_SUCCESS, /* no error */
|
||||
PFS_ERR_NOPACK, /* no memory card is plugged or */
|
||||
PFS_ERR_NEW_PACK, /* ram pack has been changed to a different one */
|
||||
PFS_ERR_INCONSISTENT, /* need to run Pfschecker */
|
||||
PFS_ERR_CONTRFAIL, /* CONT_OVERRUN_ERROR */
|
||||
PFS_ERR_INVALID, /* invalid parameter or file not exist */
|
||||
PFS_ERR_BAD_DATA, /* the data read from pack are bad */
|
||||
PFS_DATA_FULL, /* no free pages on ram pack */
|
||||
PFS_DIR_FULL, /* no free directories on ram pack */
|
||||
PFS_ERR_EXIST, /* file exists */
|
||||
PFS_ERR_ID_FATAL, /* dead ram pack */
|
||||
PFS_ERR_DEVICE, /* wrong device type */
|
||||
PFS_ERR_NO_GBCART, /* no gb cartridge (64GB-PAK) */
|
||||
PFS_ERR_NEW_GBCART, /* gb cartridge may be changed */
|
||||
};
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
@@ -165,10 +168,10 @@ extern s32 osPfsFreeBlocks( OSPfs *pfs, s32 *bytes_not_used);
|
||||
extern s32 osPfsNumFiles( OSPfs *pfs, s32 *max_files, s32 *files_used);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_PFS_H_ */
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_voice.h,v $
|
||||
$Revision: 1.2 $
|
||||
$Date: 1999/07/13 08:36:42 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_VOICE_H_
|
||||
#define _OS_VOICE_H_
|
||||
#define _OS_VOICE_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
@@ -24,23 +24,23 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
OSMesgQueue *__mq; /* SI Message Queue */
|
||||
int __channel; /* Controller Port # */
|
||||
s32 __mode;
|
||||
u8 cmd_status; /* Command Status */
|
||||
} OSVoiceHandle;
|
||||
typedef struct { /* Voice Recognition System */
|
||||
/*0x00*/ OSMesgQueue *__mq; /* SI Message Queue */
|
||||
/*0x04*/ int __channel; /* Controller Port # */
|
||||
/*0x08*/ s32 __mode;
|
||||
/*0x0C*/ u8 cmd_status; /* Command Status */
|
||||
} OSVoiceHandle; /*0x10*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
/*0x00*/ u16 warning;
|
||||
/*0x02*/ u16 answer_num; /* 0...5 */
|
||||
/*0x04*/ u16 voice_level;
|
||||
/*0x06*/ u16 voice_sn;
|
||||
/*0x08*/ u16 voice_time;
|
||||
/*0x0A*/ u16 answer[5];
|
||||
/*0x14*/ u16 distance[5];
|
||||
} OSVoiceData; /*0x20*/
|
||||
|
||||
typedef struct { /* Voice Recognition System */
|
||||
u16 warning;
|
||||
u16 answer_num; /* 0...5 */
|
||||
u16 voice_level;
|
||||
u16 voice_sn;
|
||||
u16 voice_time;
|
||||
u16 answer[5];
|
||||
u16 distance[5];
|
||||
} OSVoiceData;
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
@@ -52,16 +52,18 @@ typedef struct { /* Voice Recognition System */
|
||||
|
||||
/* definition for Voice Recognition System */
|
||||
|
||||
#define VOICE_WARN_TOO_SMALL 0x0400
|
||||
#define VOICE_WARN_TOO_LARGE 0x0800
|
||||
#define VOICE_WARN_NOT_FIT 0x4000
|
||||
#define VOICE_WARN_TOO_NOISY 0x8000
|
||||
#define VOICE_WARN_TOO_SMALL (1 << 10) // 0x0400
|
||||
#define VOICE_WARN_TOO_LARGE (1 << 11) // 0x0800
|
||||
#define VOICE_WARN_NOT_FIT (1 << 14) // 0x4000
|
||||
#define VOICE_WARN_TOO_NOISY (1 << 15) // 0x8000
|
||||
|
||||
#define VOICE_STATUS_READY 0
|
||||
#define VOICE_STATUS_START 1
|
||||
#define VOICE_STATUS_CANCEL 3
|
||||
#define VOICE_STATUS_BUSY 5
|
||||
#define VOICE_STATUS_END 7
|
||||
enum OSVoiceStatus {
|
||||
VOICE_STATUS_READY = 0,
|
||||
VOICE_STATUS_START = 1,
|
||||
VOICE_STATUS_CANCEL = 3,
|
||||
VOICE_STATUS_BUSY = 5,
|
||||
VOICE_STATUS_END = 7,
|
||||
};
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
@@ -99,10 +101,10 @@ extern s32 osVoiceMaskDictionary( OSVoiceHandle *hd, u8 *maskpattern, int size);
|
||||
extern void osVoiceCountSyllables(u8 *word, u32 *syllable);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#endif /* !_OS_VOICE_H_ */
|
||||
|
||||
@@ -134,24 +134,29 @@ The Indy development board use cartridge domain 1:
|
||||
* 1FC00000 +-------+-----------------+-----+
|
||||
*
|
||||
*/
|
||||
#define PIF_ROM_SIZE 0x07C0
|
||||
#define PIF_ROM_START 0x1FC00000
|
||||
#define PIF_ROM_END 0x1FC007BF
|
||||
#define PIF_RAM_START 0x1FC007C0
|
||||
#define PIF_RAM_END 0x1FC007FF
|
||||
#define PIF_ROM_END (PIF_ROM_START + PIF_ROM_SIZE - 1) /* 0x1FC007BF */
|
||||
|
||||
#define PIF_RAM_SIZE 0x0040
|
||||
#define PIF_RAM_START (PIF_ROM_END + 1 ) /* 0x1FC007C0 */
|
||||
#define PIF_RAM_END (PIF_RAM_START + PIF_RAM_SIZE - 1) /* 0x1FC007FF */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Controller channel
|
||||
* Controller channel
|
||||
* Each game controller channel has 4 error bits that are defined in bit 6-7 of
|
||||
* the Rx and Tx data size area bytes. Programmers need to clear these bits
|
||||
* when setting the Tx/Rx size area values for a channel
|
||||
*/
|
||||
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */
|
||||
#define CHNL_ERR_SUCCESS 0x00
|
||||
|
||||
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */
|
||||
#define CHNL_ERR_NORESP (0b1 << 7) /* 0x80: Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN (0b1 << 6) /* 0x40: Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME (0b1 << 7) /* 0x80: Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION (0b1 << 6) /* 0x40: Bit 6 (Tx): Collision error */
|
||||
|
||||
#define CHNL_ERR_MASK (0b11 << 6) /* 0xC0: Bit 6-7: channel errors */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@@ -706,19 +706,20 @@ enum MarioActionFlags {
|
||||
// group 0x1C0: custom actions
|
||||
// 0x1C0 - 0x1FF
|
||||
|
||||
/*
|
||||
this input mask is unused by the controller,
|
||||
but END_DEMO is used internally to signal
|
||||
the demo to end. This button cannot
|
||||
be pressed normally by a controller.
|
||||
*/
|
||||
#define END_DEMO (1 << 7)
|
||||
|
||||
/**
|
||||
* This input mask is unused by the controller,
|
||||
* but END_DEMO is used internally to signal
|
||||
* the demo to end. This button cannot be
|
||||
* pressed normally by an N64 controller.
|
||||
*/
|
||||
#define INPUT_END_DEMO X_BUTTON
|
||||
|
||||
#define VALID_BUTTONS (A_BUTTON | B_BUTTON | Z_TRIG | START_BUTTON | \
|
||||
U_JPAD | D_JPAD | L_JPAD | R_JPAD | \
|
||||
L_TRIG | R_TRIG | \
|
||||
U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS | \
|
||||
GCN_X_BUTTON | GCN_Y_BUTTON)
|
||||
X_BUTTON | Y_BUTTON)
|
||||
|
||||
#define C_BUTTONS (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )
|
||||
|
||||
|
||||
@@ -24,6 +24,30 @@
|
||||
#define SCREEN_CENTER_X (SCREEN_WIDTH / 2)
|
||||
#define SCREEN_CENTER_Y (SCREEN_HEIGHT / 2)
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
/*0x00*/ u8 hi; // HI byte.
|
||||
/*0x01*/ u8 lo; // LO byte.
|
||||
}; /*0x02*/
|
||||
u16 raw;
|
||||
} HiLo16; /*0x02*/
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
/*0x00*/ u16 hi; // HI byte.
|
||||
/*0x01*/ u16 lo; // LO byte.
|
||||
}; /*0x02*/
|
||||
u32 raw;
|
||||
} HiLo32; /*0x02*/
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
/*0x00*/ u32 hi; // HI byte.
|
||||
/*0x01*/ u32 lo; // LO byte.
|
||||
}; /*0x02*/
|
||||
u64 raw;
|
||||
} HiLo64; /*0x02*/
|
||||
|
||||
struct Config {
|
||||
f32 audioFrequency;
|
||||
#ifdef WIDE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user