You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
33 Commits
develop/2.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f1f7f41be | ||
|
|
bf70500b4d | ||
|
|
27fedee76f | ||
|
|
a918785a92 | ||
|
|
10720ea056 | ||
|
|
8dc47095e2 | ||
|
|
9ef945296b | ||
|
|
e1c00d4bef | ||
|
|
aacf2c5e6d | ||
|
|
4500ffb579 | ||
|
|
a6782e6912 | ||
|
|
750ba10cb1 | ||
|
|
500507509b | ||
|
|
7381e35db4 | ||
|
|
6a3e7e7a87 | ||
|
|
9adb8c6de8 | ||
|
|
03ba81b5e3 | ||
|
|
98b6231216 | ||
|
|
252a900b91 | ||
|
|
92822c6412 | ||
|
|
0221d4ddf0 | ||
|
|
dcd58b2aad | ||
|
|
7ffa9a3bd7 | ||
|
|
dbba4871e1 | ||
|
|
520a6f3aed | ||
|
|
4d260f6885 | ||
|
|
aedae64e8b | ||
|
|
f3e1496d29 | ||
|
|
0005bbbd6a | ||
|
|
e494069b0a | ||
|
|
f852ff4359 | ||
|
|
2ae3426957 | ||
|
|
ca937d23ee |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2149,3 +2149,6 @@ lib/libs2d_engine.a
|
||||
|
||||
# :Zone_Identifier files
|
||||
*Zone.Identifier
|
||||
|
||||
# user-specific config file
|
||||
include/config/config_local.h
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @Reonu
|
||||
* @thecozies
|
||||
* @gheskett
|
||||
* @Reonu @gheskett @arthurtilly
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
|
||||
19
Makefile
19
Makefile
@@ -269,7 +269,7 @@ BUILD_DIR_BASE := build
|
||||
# BUILD_DIR is the location where all build artifacts are placed
|
||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
||||
|
||||
COMPRESS ?= rnc1
|
||||
COMPRESS ?= yay0
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -399,6 +399,9 @@ GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
||||
|
||||
# Ignore all .inc.c files
|
||||
C_FILES := $(filter-out %.inc.c,$(C_FILES))
|
||||
|
||||
# Sound files
|
||||
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
||||
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
|
||||
@@ -441,6 +444,8 @@ else ifneq ($(call find-command,mips-linux-gnu-ld),)
|
||||
CROSS := mips-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
|
||||
CROSS := mips64-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-none-elf-ld),)
|
||||
CROSS := mips64-none-elf-
|
||||
else ifneq ($(call find-command,mips-ld),)
|
||||
CROSS := mips-
|
||||
else
|
||||
@@ -548,7 +553,13 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
EMULATOR = mupen64plus
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
|
||||
else
|
||||
EMULATOR = parallel-launcher
|
||||
endif
|
||||
|
||||
EMU_FLAGS =
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
@@ -769,7 +780,7 @@ endif
|
||||
|
||||
$(BUILD_DIR)/%.table: %.aiff
|
||||
$(call print,Extracting codebook:,$<,$@)
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< $@
|
||||
|
||||
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
@@ -913,7 +924,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc -lrtc
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -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, 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
|
||||
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
|
||||
- **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
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.2.0
|
||||
v2.3.0
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "types.h"
|
||||
#include "game/ingame_menu.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/segment2.h"
|
||||
|
||||
#include "make_const_nonconst.h"
|
||||
|
||||
@@ -2475,6 +2474,7 @@ static const Vtx vertex_billboard_num[] = {
|
||||
// 0x0200EFF0 - 0x0200F038
|
||||
const Gfx dl_billboard_num_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD),
|
||||
@@ -2491,6 +2491,7 @@ const Gfx dl_billboard_num_end[] = {
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
@@ -2670,7 +2671,7 @@ ALIGNED8 static const Texture texture_shadow_quarter_square[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
UNUSED ALIGNED8 const Texture texture_radial_light[] = {
|
||||
UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
|
||||
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
|
||||
};
|
||||
|
||||
@@ -2969,8 +2970,7 @@ const Gfx dl_ia8_up_arrow_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#include "segment2/controllers.c.in"
|
||||
#include "segment2/rumble_pak.c.in"
|
||||
// 0x02014958 - 0x02014960
|
||||
|
||||
// 0x02014970 - 0x020149A8
|
||||
const Gfx dl_paintings_rippling_begin[] = {
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#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
|
||||
@@ -1,40 +0,0 @@
|
||||
#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,6 +121,8 @@ 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(),
|
||||
@@ -140,3 +142,27 @@ 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
|
||||
|
||||
@@ -2694,7 +2694,7 @@ const BehaviorScript bhvSushiShark[] = {
|
||||
|
||||
const BehaviorScript bhvJrbSlidingBox[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT),
|
||||
LOAD_COLLISION_DATA(jrb_seg7_collision_floating_box),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
@@ -5437,11 +5437,7 @@ const BehaviorScript bhvTTCPendulum[] = {
|
||||
|
||||
const BehaviorScript bhvTTCTreadmill[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
#ifdef PLATFORM_DISPLACEMENT_2
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_VELOCITY_PLATFORM)),
|
||||
#else
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
#endif
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT)),
|
||||
SET_FLOAT(oCollisionDistance, 750),
|
||||
CALL_NATIVE(bhv_ttc_treadmill_init),
|
||||
DELAY(1),
|
||||
|
||||
@@ -177,9 +177,15 @@ def main():
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
subprocess.check_call(
|
||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||
)
|
||||
tools = [ "n64graphics", "skyconv", "mio0", "aifc_decode" ]
|
||||
if os.name == 'nt':
|
||||
tools = [tool + ".exe" for tool in tools]
|
||||
make = "mingw32-make"
|
||||
else:
|
||||
make = "make"
|
||||
|
||||
cmd = [make, "-s", "-C", "tools/"] + tools
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||
# mio0 file still go together).
|
||||
|
||||
28
fast64.json
Normal file
28
fast64.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"autoLoad": true,
|
||||
"microcode": "F3DEX2/LX2",
|
||||
"rdpDefaults": {
|
||||
"geometryMode": {
|
||||
"zBuffer": true,
|
||||
"shade": true,
|
||||
"cullBack": true,
|
||||
"lighting": true,
|
||||
"shadeSmooth": true
|
||||
},
|
||||
"otherModeH": {
|
||||
"textureConvert": "G_TC_FILT",
|
||||
"textureFilter": "G_TF_BILERP",
|
||||
"perspectiveCorrection": "G_TP_PERSP",
|
||||
"pipelineMode": "G_PM_1PRIMITIVE"
|
||||
},
|
||||
"otherModeL": {},
|
||||
"other": {}
|
||||
},
|
||||
"sm64": {
|
||||
"refresh_version": "HackerSM64 2.3.0",
|
||||
"compression_format": "yay0",
|
||||
"force_extended_ram": false,
|
||||
"matstack_fix": true
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@
|
||||
#include "config/config_objects.h"
|
||||
#include "config/config_rom.h"
|
||||
|
||||
// Local config - include a gitignore'd config file that's specific to just the user (if the file exists)
|
||||
#if __has_include("config/config_local.h")
|
||||
#include "config/config_local.h"
|
||||
#endif
|
||||
|
||||
/* WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing */
|
||||
// WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing
|
||||
#include "config/config_safeguards.h"
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -136,14 +136,8 @@
|
||||
*/
|
||||
#define BUGFIX_DIALOG_TIME_STOP
|
||||
|
||||
/**
|
||||
* Enables Platform Displacement 2, an upgrade to the physics involving moving platforms and how Mario interacts with them.
|
||||
*/
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
|
||||
/**
|
||||
* Inertia defines; allow Mario to preserve his momemtum when leaving moving platforms.
|
||||
* These require Platform Displacement 2 to be enabled.
|
||||
*/
|
||||
#define MARIO_INERTIA_UPWARD
|
||||
// #define MARIO_INERTIA_LATERAL
|
||||
|
||||
@@ -19,45 +19,23 @@
|
||||
|
||||
/**
|
||||
* Enables Rumble Pak Support.
|
||||
* Currently not recommended, as it may cause random crashes.
|
||||
*/
|
||||
#define ENABLE_RUMBLE
|
||||
// #define ENABLE_RUMBLE (1 || VERSION_SH)
|
||||
|
||||
/**
|
||||
* 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 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.
|
||||
* NOTE: Default is 2, maximum is 4.
|
||||
* NOTE: This needs to be at least 2 for now for gamecube controller swap to work.
|
||||
*/
|
||||
#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
|
||||
#define MAX_NUM_PLAYERS 2
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@@ -70,3 +48,9 @@
|
||||
*/
|
||||
#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,15 +188,6 @@
|
||||
* 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 /* _LANGUAGE_C_PLUS_PLUS */
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -61,26 +61,23 @@ extern "C" {
|
||||
|
||||
/* Rumble PAK interface */
|
||||
|
||||
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);
|
||||
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
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
#endif
|
||||
|
||||
#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 /* _LANGUAGE_C_PLUS_PLUS */
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
@@ -50,28 +50,28 @@ extern "C" {
|
||||
* Structure for file system
|
||||
*/
|
||||
typedef struct {
|
||||
/*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*/
|
||||
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;
|
||||
|
||||
typedef struct {
|
||||
/*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*/
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
@@ -83,48 +83,45 @@ typedef struct {
|
||||
*/
|
||||
|
||||
/* File System size */
|
||||
#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 OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
|
||||
#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
|
||||
#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
|
||||
|
||||
/* File System flag */
|
||||
enum OSPfsFlag {
|
||||
PFS_READ,
|
||||
PFS_WRITE,
|
||||
PFS_CREATE,
|
||||
};
|
||||
|
||||
#define PFS_READ 0
|
||||
#define PFS_WRITE 1
|
||||
#define PFS_CREATE 2
|
||||
|
||||
/* File System status */
|
||||
#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
|
||||
#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
|
||||
|
||||
/* File System error number */
|
||||
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 */
|
||||
};
|
||||
|
||||
#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 */
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
@@ -168,10 +165,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 /* _LANGUAGE_C_PLUS_PLUS */
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_PFS_H_ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user