Compare commits

...

26 Commits

Author SHA1 Message Date
Reonu
32035cfb7f add more defines and change default sounds 2022-12-17 16:50:52 +01:00
Reonu
e100979877 disable error sound by default 2022-12-14 02:15:03 +01:00
Reonu
64225b7a19 added camera error define 2022-12-14 02:14:00 +01:00
Reonu
735c0ba438 add CAMERA_SOUND define 2022-12-13 23:41:29 +01:00
Arceveti
f04a3ab624 Make JRB mist and DDD objects act-specific. (#393)
* Add JRB_ACT_SPECIFIC_MIST and DDD_ACT_SPECIFIC_OBJECTS

* Disable the act-specific defines by default

* Make act-specific objects/mist non-optional

* Update JRB mist comment

* Act-specific whirlpools + fix act 6 objects

* Initialize gCurrActNum + revert formatting change

* Use -1 for ALL_ACTS

* Revert ALL_ACTS line
2022-12-10 15:25:53 -05:00
Gregory Heskett
d028d6ea7d Bugfix: Save & Quit crashes game (#548) 2022-12-08 10:41:50 -05:00
Reonu
22b3c9ba08 Fix 100 coin stars spawning inside ceilings + being able to spawn multiple 100 coin stars (#541)
* Going below 100 coins and getting 100 coins again will no longer result in multiple 100 coin stars spawning

* 100 coin stars can no longer clip into ceilings

* Renamed set_home_to_mario to spawned_star_set_target_above_mario since it's a more descriptive name of what it does
2022-12-06 18:44:16 +01:00
Arceveti
1098ea95ea Merge master/2.0.5 into 2.1.0 (#536)
* Imminent fixes for bugs found on master branch (#512)

* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

* Update version to 2.0.4 (#515)

* HackerSM64 2.0.5 (#517)

* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Update VERSION.txt (#534)

Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: axollyon <20480418+axollyon@users.noreply.github.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
2022-11-28 15:06:34 -05:00
Reonu
86841a3385 Add super slippery surface type (#422)
* Added super slippery surface·

* fix requested changes

* add comment for forcing mario to belly slide

* hi arthur

* society

* adress nitpick

Co-authored-by: aglab2 <aglab3@gmail.com>
2022-11-08 17:08:45 +01:00
Gregory Heskett
12b91fe73c Disable DISABLE_ALL (#528)
Because literally who is gonna make a hack without ever using any debug features?
2022-11-03 08:54:04 +01:00
Gregory Heskett
a42bd9bc2e Implemented native Gamecube controller support and corresponding emulator hint in ROM header (#505)
* Implemented native Gamecube controller support and corresponding emulator hint in ROM header

* Added X and Y buttons to VALID_BUTTONS in sm64.h

* Added workaround in controller type detection for mupen bug

* read GC controllers from port 2

* L to Z logic for GC controller uses a threshold

* Changed threshold for L trig to around 33%

Changed threshold based on feedback

* Added gGamecubeControllerPort

* fixed wrong check

* Bugfix: Game crashes when less than 2 controllers are connected

* Suppress compiler warnings

* Bugfix: button swapping still takes place on non-GC controllers

* Wrap port 2 stuff in console check

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* GC console check

* Funny emulator crash moment

* block comment moment

* Added centering for the gamecube controller, support reset command (#511)

* Added centering for the gamecube controller, support reset command

* Use struct 'ControllerCenters' for 'gGamecubeControllerCenters'

* Store gamecube controller centers per controller

* Clamp GC controller stick values to s8

* the

formatting changes

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Denis Kopyrin <aglab3@gmail.com>
2022-11-03 08:52:19 +01:00
Reonu
a784c180a8 Wrap boulder room check under vanilla specific level checks (#521) 2022-11-03 00:36:59 +01:00
Gregory Heskett
987f76190f Bugfix: RCP has gone loud because SOMEONE didn't look at their compiler output (#526) 2022-11-03 12:35:04 +13:00
Reonu
088dbbdd2b Make warp surfaces use the force parameter if set (#525) 2022-11-03 00:25:24 +01:00
arthurtilly
ab94fd7f63 Make objects not run their code if the room they are in isn't loaded. (#502) 2022-11-03 11:35:47 +13:00
Gregory Heskett
d7d0364682 Add define to disable pitch shifting of Mario sound effects (#522)
* Add define to disable pitch shifting of Mario sound effects

* Point new voice sequence macros to existing ones

* Remove pitch shifting sequence macros from peach sounds
2022-11-02 17:24:39 -05:00
Reonu
38d3c82860 Merge pull request #469 from someone2639/rcp_hung
add scheduler entry for when RCP locks up (addresses #344)
2022-11-02 20:14:48 +01:00
Denis Kopyrin
a7a637eb10 Disable cache emulation checks for VC (#509)
* Disable cache emulation checks for VC

* Get rid of unnecessary gIsVC initialization
2022-10-19 20:57:53 -05:00
Gregory Heskett
fc6a6055d9 Bugfix: WF stationary platforms given static collision despite being able to delete themselves (#510)
Resulted in a memory leak and stale object referencing that impacted Mario's positioning
2022-10-19 12:38:58 -04:00
Gregory Heskett
6291c77a18 Convert oBehParams to be unsigned, and fix GLOBAL_STAR_IDS to support more than 128 stars (#503) 2022-10-04 22:56:10 -05:00
Gregory Heskett
68f09d34ea Bugfix: Reset mario's room when switching areas (#504)
Mario's room sometimes is not reset when warping between different areas, generally when warping from one area with rooms to another without them. This can cause things like doors to not render properly.
2022-10-03 18:06:53 -05:00
Chasarr
0dd3ef7f50 Fix CROSS variable on multiple environments (#483)
The name of the compiler that CROSS is set to varies from system to
system. (gcc-mips-linux-gnu on Debian) This was not handled in
s2d_engine and calc_bss.sh
2022-09-30 17:54:07 -05:00
Gregory Heskett
da4b4db7ae Bugfix: Change instant warps to use ints instead of shorts (#500)
Additionally clean up some inconsistencies surrounding instant warps
2022-09-30 17:41:58 -05:00
thecozies
8c56afddba Added ability to automatically pull unfloader and build for unf debug (#462)
`make unf` added: build rom then pull the unfloader binary if needed, then load rom in debug mode
also, `make load` will pull unfloader as well!
2022-09-30 17:40:50 -05:00
someone2639
4ae3a431bc Use the error macro for rcp hang 2022-09-21 20:36:39 -04:00
someone2639
93fd414035 add scheduler entry for when RCP locks up 2022-07-26 20:56:17 -04:00
74 changed files with 1233 additions and 448 deletions

View File

@@ -31,7 +31,7 @@
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-x64"
"intelliSenseMode": "linux-gcc-x86"
}
],
"version": 4

View File

@@ -119,20 +119,10 @@ else ifeq ($(GRUCODE),super3d) # Super3D
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
endif
LIBRARIES := nustd hvqm2 z goddard
# TEXT ENGINES
# s2dex_text_engine - Text Engine by someone2639
TEXT_ENGINE := none
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
LIBRARIES += s2d_engine
DUMMY != make -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/
endif
# add more text engines here
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
$(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
#==============================================================================#
# Optimization flags #
@@ -210,6 +200,12 @@ endif
# 0 - does not
UNF ?= 0
$(eval $(call validate-option,UNF,0 1))
# if `unf` is a target, make sure that UNF is set
ifneq ($(filter unf,$(MAKECMDGOALS)),)
UNF = 1
endif
ifeq ($(UNF),1)
DEFINES += UNF=1
SRC_DIRS += src/usb
@@ -411,6 +407,18 @@ else
$(error Unable to detect a suitable MIPS toolchain installed)
endif
LIBRARIES := nustd hvqm2 z goddard
# Text engine
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
LIBRARIES += s2d_engine
DUMMY != $(MAKE) -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/ CROSS=$(CROSS)
endif
# add more text engines here
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
export LD_LIBRARY_PATH=./tools
AS := $(CROSS)as
@@ -502,8 +510,13 @@ endif
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
EMULATOR = mupen64plus
EMU_FLAGS =
LOADER = loader64
LOADER_FLAGS = -vwf
ifneq (,$(call find-command,wslview))
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
else
LOADER = ./$(TOOLS_DIR)/UNFLoader
endif
SHA1SUM = sha1sum
PRINT = printf
@@ -553,8 +566,18 @@ test-pj64: $(ROM)
wine ~/Desktop/new64/Project64.exe $<
# someone2639
load: $(ROM)
$(LOADER) $(LOADER_FLAGS) $<
# download and extract most recent unfloader build if needed
$(LOADER):
ifeq (,$(wildcard $(LOADER)))
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
endif
load: $(ROM) $(LOADER)
$(LOADER) -r $<
unf: $(ROM) $(LOADER)
$(LOADER) -d -r $<
libultra: $(BUILD_DIR)/libultra.a
@@ -850,8 +873,16 @@ $(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(Y
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -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
# Build ROM
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
# run with -n / --dry-run
$(ROM):
@$(PRINT) "$(BLUE)DRY RUNS ARE DISABLED$(NO_COL)\n"
else
# not running with -n / --dry-run
$(ROM): $(ELF)
$(call print,Building ROM:,$<,$@)
endif
ifeq ($(CONSOLE),n64)
$(V)$(OBJCOPY) --pad-to=0x101000 --gap-fill=0xFF $< $@ -O binary
else ifeq ($(CONSOLE),bb)

View File

@@ -14,7 +14,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **ArcticJaguar725**: Most audio configuration and layout changes, colored ia4 text, floombas, various bugfixes, and more
- **CowQuack**: Adjustable skybox sizes, area-specific skybox function
- **thecozies**: Water surface types, general maintenance, and time
- **MrComit**: General use object defines, JUMP_KICK_FIX, LEDGE_GRABS_CHECK_SLOPE_ANGLE
- **MrComit**: General use object defines, JUMP_KICK_FIX
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: Platform Displacement 2
@@ -61,7 +61,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Toggle to disable fall damage and the fall damage sound *
- Nonstop stars *
- Removed course-specific camera processing *
- You can increase the number of frames that you have to perform a firsty *
- Ability to set Mario's movement speed when hanging from a ceiling *
- Tighter hanging controls (Mario will face the direction of the analog stick directly while hanging from a ceiling) *
- reonucam3: custom camera by Reonu. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.

View File

@@ -1 +1 @@
v2.0.3
v2.0.5

View File

@@ -15,9 +15,14 @@
.word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */
.ascii INTERNAL_ROM_NAME /* Internal ROM name */
#if defined(USE_GAMECUBE_CONTROLLER)
/* Advanced homebrew ROM header bytes: https://n64brew.dev/wiki/ROM_Header#Advanced_Homebrew_ROM_Header */
.word 0x82000000
#else
.word 0x00000000 /* Unknown */
#endif
.word 0x0000004E /* Cartridge */
#if defined(EEP4K)
#if defined(EEP4K) && !defined(USE_GAMECUBE_CONTROLLER)
.ascii "SM" /* Cartridge ID */
#else
.ascii "ED" /* Cartridge ID */

View File

@@ -1679,9 +1679,9 @@ const BehaviorScript bhvWfSolidTowerPlatform[] = {
BEGIN(OBJ_LIST_SURFACE),
OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_COLLISION_DATA(wf_seg7_collision_platform),
CALL_NATIVE(load_object_static_model),
BEGIN_LOOP(),
CALL_NATIVE(bhv_wf_solid_tower_platform_loop),
CALL_NATIVE(load_object_collision_model),
END_LOOP(),
};
@@ -2626,6 +2626,7 @@ const BehaviorScript bhvExclamationBox[] = {
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
SET_FLOAT(oCollisionDistance, 300),
SET_HOME(),
CALL_NATIVE(bhv_init_room),
BEGIN_LOOP(),
CALL_NATIVE(bhv_exclamation_box_loop),
END_LOOP(),
@@ -3772,6 +3773,7 @@ const BehaviorScript bhvMessagePanel[] = {
DROP_TO_FLOOR(),
SET_HITBOX(/*Radius*/ 150, /*Height*/ 80),
SET_INT(oWoodenPostTotalMarioAngle, 0),
CALL_NATIVE(bhv_init_room),
CALL_NATIVE(load_object_static_model),
BEGIN_LOOP(),
SET_INT(oIntangibleTimer, 0),
@@ -5600,6 +5602,7 @@ const BehaviorScript bhvActivatedBackAndForthPlatform[] = {
const BehaviorScript bhvRecoveryHeart[] = {
BEGIN(OBJ_LIST_LEVEL),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
CALL_NATIVE(bhv_init_room),
BEGIN_LOOP(),
CALL_NATIVE(bhv_recovery_heart_loop),
END_LOOP(),

View File

@@ -14,6 +14,13 @@
*/
// #define JP_RED_COIN_SOUND
/**
* In vanilla, Mario's sounds are pitch shifted in real time in order to maintain a sense of consistency. This can be annoying when replacing Mario's sounds.
* This define will disable this behavior, making sound replacements easier to manage. Use of this is not recommended unless you're actually replacing Mario's sounds.
* When toggling this define, you will need to run `make clean` for it to apply.
*/
// #define DISABLE_MARIO_PITCH_SHIFTING
/**
* Increase audio heap size to allow for larger/more custom sequences/banks/sfx to be imported without causing issues (not supported for SH).
* Note that this is REQUIRED in order to use the extended 0C audio bank. Do not disable this if you're planning on using it.

View File

@@ -44,6 +44,16 @@
*/
#define PARALLEL_LAKITU_CAM
/**
* These defines decide whether the turning, error and zoom out/zoom in out sounds are enabled, and which sounds to play if enabled.
* The turning, zooming out and zooming in sounds have been replaced with less annoying ones.
* If you want the vanilla ones back, set them to SOUND_MENU_CAMERA_TURN, SOUND_MENU_CAMERA_ZOOM_OUT and SOUND_MENU_CAMERA_ZOOM_IN respectively.
*/
#define CAMERA_TURN_SOUND SOUND_MENU_MESSAGE_NEXT_PAGE
#define CAMERA_ZOOM_OUT_SOUND SOUND_MENU_MESSAGE_DISAPPEAR
#define CAMERA_ZOOM_IN_SOUND SOUND_MENU_MESSAGE_APPEAR
// #define CAMERA_ERROR_SOUND SOUND_MENU_CAMERA_BUZZ
/**
* Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified.
*/

View File

@@ -17,6 +17,7 @@
/**
* Allows all surfaces types to have force, (doesn't require setting force, just allows it to be optional).
* Also allows you to pass a warp node to warp floors (SURFACE_WARP, SURFACE_DEATH_PLANE, SURFACE_VERTICAL_WIND) via the second byte of the force parameter.
*/
#define ALL_SURFACES_HAVE_FORCE

View File

@@ -12,7 +12,7 @@
/**
* Disables all debug options (except PUPPYPRINT).
*/
#define DISABLE_ALL
// #define DISABLE_ALL
/**
* Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG.

View File

@@ -108,20 +108,15 @@
*/
#define HANGING_FIX
/**
* The last frame after hitting a wall that will be considered a firsty when wallkicking.
*/
#define FIRSTY_LAST_FRAME 1
/**
* The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
*/
#define WALL_KICK_DEGREES 45
/**
* This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch.
* Makes Mario unable to ledge grab steep slopes to prevent false ledge grabs.
*/
// #define LEDGE_GRABS_CHECK_SLOPE_ANGLE
// #define DONT_LEDGE_GRAB_STEEP_SLOPES
/**
* Disables BLJs and crushes SimpleFlips's dreams.

View File

@@ -28,3 +28,8 @@
*/
#define BORDER_HEIGHT_CONSOLE 0
#define BORDER_HEIGHT_EMULATOR 0
/**
* Informs supported emulators to default to gamecube controller inputs.
*/
// #define USE_GAMECUBE_CONTROLLER

View File

@@ -82,7 +82,7 @@ enum LevelActs {
ACT_4 = (1 << 3),
ACT_5 = (1 << 4),
ACT_6 = (1 << 5),
ALL_ACTS = (ACT_1 | ACT_2 | ACT_3 | ACT_4 | ACT_5 | ACT_6)
ALL_ACTS = (ACT_1 | ACT_2 | ACT_3 | ACT_4 | ACT_5 | ACT_6),
};
enum LevelCommandEvalOperation {
@@ -114,13 +114,6 @@ enum WarpCheckpointFlags {
WARP_CHECKPOINT = (1 << 7), // 0x80
};
enum LevelCommandCreateWhirlpoolCondition {
WHIRLPOOL_COND_ALWAYS,
WHIRLPOOL_COND_BOWSER2_NOT_BEATEN,
WHIRLPOOL_COND_BOWSER2_BEATEN,
WHIRLPOOL_COND_AT_LEAST_SECOND_STAR
};
// Head defines
enum GoddardScene {
REGULAR_FACE = 0x2,
@@ -361,7 +354,7 @@ enum GoddardScene {
CMD_W(model)
#define OBJECT(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh) \
OBJECT_WITH_ACTS(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, 0x1F)
OBJECT_WITH_ACTS(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, ALL_ACTS)
#define MARIO(model, behArg, beh) \
CMD_BBH(LEVEL_CMD_INIT_MARIO, 0x0C, model), \
@@ -377,9 +370,10 @@ enum GoddardScene {
CMD_BBBB(destArea, destNode, flags, 0x00)
#define INSTANT_WARP(index, destArea, displaceX, displaceY, displaceZ) \
CMD_BBBB(LEVEL_CMD_CREATE_INSTANT_WARP, 0x0C, index, destArea), \
CMD_HH(displaceX, displaceY), \
CMD_HH(displaceZ, 0x0000)
CMD_BBBB(LEVEL_CMD_CREATE_INSTANT_WARP, 0x10, index, destArea), \
CMD_W(displaceX), \
CMD_W(displaceY), \
CMD_W(displaceZ)
#define LOAD_AREA(area) \
CMD_BBBB(LEVEL_CMD_LOAD_AREA, 0x04, area, 0x00)
@@ -446,8 +440,8 @@ enum GoddardScene {
CMD_HH(unk6, unk8), \
CMD_HH(unk10, 0x0000)
#define WHIRLPOOL(index, condition, posX, posY, posZ, strength) \
CMD_BBBB(LEVEL_CMD_CREATE_WHIRLPOOL, 0x0C, index, condition), \
#define WHIRLPOOL(index, acts, posX, posY, posZ, strength) \
CMD_BBBB(LEVEL_CMD_CREATE_WHIRLPOOL, 0x0C, index, acts), \
CMD_HH(posX, posY), \
CMD_HH(posZ, strength)

View File

@@ -63,6 +63,18 @@ typedef struct {
u8 error;
} OSContPad;
// Custom extended controller pad struct that contains fields for gamecube controllers
typedef struct {
u16 button;
s8 stick_x; /* -80 <= stick_x <= 80 */
s8 stick_y; /* -80 <= stick_y <= 80 */
s8 c_stick_x;
s8 c_stick_y;
u8 l_trig;
u8 r_trig;
u8 errno;
} OSContPadEx;
typedef struct {
void *address; /* Ram pad Address: 11 bits */
u8 databuffer[32]; /* address of the data buffer */
@@ -103,6 +115,7 @@ typedef struct {
#define CONT_ABSOLUTE 0x0001
#define CONT_RELATIVE 0x0002
#define CONT_JOYPORT 0x0004
#define CONT_GCN 0x0008
#define CONT_EEPROM 0x8000
#define CONT_EEP16K 0x4000
#define CONT_TYPE_MASK 0x1f07
@@ -150,6 +163,25 @@ typedef struct {
#define L_CBUTTONS CONT_C
#define R_CBUTTONS CONT_F
#define D_CBUTTONS CONT_D
#define GCN_X_BUTTON 0x0040
#define GCN_Y_BUTTON 0x0080
/* Gamecube controller buttons */
#define CONT_GCN_GET_ORIGIN 0x2000
#define CONT_GCN_START 0x1000
#define CONT_GCN_Y 0x0800
#define CONT_GCN_X 0x0400
#define CONT_GCN_B 0x0200
#define CONT_GCN_A 0x0100
#define CONT_GCN_USE_ORIGIN 0x0080
#define CONT_GCN_L 0x0040
#define CONT_GCN_R 0x0020
#define CONT_GCN_Z 0x0010
#define CONT_GCN_UP 0x0008
#define CONT_GCN_DOWN 0x0004
#define CONT_GCN_RIGHT 0x0002
#define CONT_GCN_LEFT 0x0001
/* Controller error number */
@@ -162,6 +194,9 @@ typedef struct {
#define CONT_ERR_VOICE_WORD 14
#define CONT_ERR_VOICE_NO_RESPONSE 15
#define CONT_TYPE_N64 0
#define CONT_TYPE_GCN 1
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
@@ -178,6 +213,7 @@ typedef struct {
*
*/
extern u8 __osControllerTypes[MAXCONTROLLERS];
/**************************************************************************
*
@@ -191,11 +227,13 @@ extern s32 osContInit( OSMesgQueue *mq, u8 *bitpattern, OSContStatus *s
extern s32 osContReset( OSMesgQueue *mq, OSContStatus *status);
extern s32 osContStartQuery( OSMesgQueue *mq);
extern s32 osContStartReadData(OSMesgQueue *mq);
extern s32 osContStartReadDataEx(OSMesgQueue *mq);
#ifndef _HW_VERSION_1
extern s32 osContSetCh(u8 ch);
#endif
extern void osContGetQuery(OSContStatus *status);
extern void osContGetReadData(OSContPad *pad);
extern void osContGetReadDataEx(OSContPadEx *pad);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */

View File

@@ -62,12 +62,14 @@ 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);
#if 1
#define MOTOR_START 1
#define MOTOR_STOP 0
#define osMotorStart(x) __osMotorAccess((x), MOTOR_START)
#define osMotorStop(x) __osMotorAccess((x), MOTOR_STOP)
#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);

View File

@@ -55,6 +55,7 @@ enum ObjFlags {
OBJ_FLAG_OCCLUDE_SILHOUETTE = (1 << 20), // 0x00100000
OBJ_FLAG_OPACITY_FROM_CAMERA_DIST = (1 << 21), // 0x00200000
OBJ_FLAG_EMIT_LIGHT = (1 << 22), // 0x00400000
OBJ_FLAG_PROCESS_OUTSIDE_ROOM = (1 << 23), // 0x00800000
OBJ_FLAG_HITBOX_WAS_SET = (1 << 30), // 0x40000000
};

View File

@@ -153,7 +153,7 @@
#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D)
#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E)
#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F)
#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40)
#define /*0x188*/ oBehParams OBJECT_FIELD_U32(0x40)
#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41)
#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42)
#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43)
@@ -606,7 +606,7 @@
#define /*0x110*/ oIsFloomba OBJECT_FIELD_S32(0x22)
#ifdef INTRO_FLOOMBAS
#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_S32(0x49)
#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_U32(0x49)
#define /*0x1B0*/ oZoomPosZ OBJECT_FIELD_F32(0x4A)
#endif
#endif

View File

@@ -1,71 +0,0 @@
/*---------------------------------------------------------------------
Copyright (C) 1997, 1998 Nintendo.
File rtc.h
Coded by Shigeo Kimura. Oct 14, 1997.
Modified by Koji Mitsunari. Jan 22, 2001.
Comments Real Time Clock Library
---------------------------------------------------------------------*/
#ifndef _rtc_h_
#define _rtc_h_
/*-----------------------------------------------------------------------
* Macro & constant definitions
*-----------------------------------------------------------------------*/
/* Controller type */
#define CONT_TYPE_RTC 0x1000 /* from os.h */
#define RTC_WAIT 300
/* RTC status signed 32bits */
#define RTC_NG_NOTHING 0x8000
#define RTC_NG_WRITE 0x0100
#define RTC_NG_ADDR 0x0200
#define RTC_STATUS_BUSY 0x0080
#define RTC_STATUS_DDOWN 0x0002
#define RTC_STATUS_BDOWN 0x0001
/* RTC Error Code */
#define CONT_ERR_RTC_BUSY 16
#define CONT_ERR_RTC_BDOWN 17
#define CONT_ERR_RTC_DDOWN 18
#define CONT_ERR_RTC_BDDOWN 19
/* RTC bit status */
#define RTC_EALM 0x80
#define RTC_ALM 0x20
#define RTC_WPB1 0x02
#define RTC_WPB0 0x01
#define RTC_MOD 0x04
#define RTC_CHLD 0x02
#define RTC_ADJ 0x01
#define RTC_ADDR_FLAG 0
#define RTC_ADDR_RAM 1
#define RTC_ADDR_TIME 2
typedef struct{
u8 sec; /* second 0-59 */
u8 min; /* minute 0-59 */
u8 hour; /* hour 0-23 */
u8 day; /* day 1-31 */
u8 week; /* week 0-6(sun,mon,..,sat) */
u8 month; /* month 1-12 */
u16 year; /* year 1901-2099 */
} OSRTCTime;
/*-----------------------------------------------------------------------
* externs
*-----------------------------------------------------------------------*/
extern s32 osRTCInit( OSMesgQueue *mq);
extern s32 osRTCReadData( OSMesgQueue *mq, u8 *);
extern s32 osRTCWriteData( OSMesgQueue *mq, u8 *);
extern s32 osRTCGetTime( OSMesgQueue *mq, OSRTCTime *);
extern s32 osRTCSetTime( OSMesgQueue *mq, OSRTCTime *);
extern u32 osRTCGetIntervalTime(OSRTCTime *, OSRTCTime *);
extern s32 osRTCGetLaterTime(OSMesgQueue *mq, u32, OSRTCTime *);
extern s32 osRTCSetAlarm( OSMesgQueue *mq, u8, u8);
extern s32 osRTCGetAlarmStat(OSMesgQueue *mq, u8 *, u8 *, int *);
extern s32 osRTCProbe( OSMesgQueue *mq);
#endif /* _rtc_h_ */

View File

@@ -1,3 +1,5 @@
#include "config/config_audio.h"
// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
@@ -448,15 +450,6 @@
writeseq\@:
.endm
.macro layer_portamento a, b, c
.byte 0xc7, \a, \b
.if ((\a & 0x80) == 0)
var \c
.else
.byte \c
.endif
.endm
.macro chan_delay_long a
.byte 0xfd
var_long \a
@@ -564,6 +557,14 @@
.byte \c
.endm
.macro layer_note1_mario a, b, c
#ifndef DISABLE_MARIO_PITCH_SHIFTING
layer_note1 \a, \b, \c
#else
layer_note1 39, \b, \c
#endif
.endm
.macro layer_note2 a, b, c
.byte 0x80 + \a
.byte \b
@@ -585,6 +586,12 @@
.byte \a
.endm
.macro layer_transpose_mario a
#ifndef DISABLE_MARIO_PITCH_SHIFTING
layer_transpose \a
#endif
.endm
.macro layer_setshortnotedefaultplaypercentage a
.byte 0xc3
var \a
@@ -603,6 +610,21 @@
.byte \a
.endm
.macro layer_portamento a, b, c
.byte 0xc7, \a, \b
.if ((\a & 0x80) == 0)
var \c
.else
.byte \c
.endif
.endm
.macro layer_portamento_mario a, b, c
#ifndef DISABLE_MARIO_PITCH_SHIFTING
layer_portamento \a, \b, \c
#endif
.endm
.macro layer_disableportamento
.byte 0xc8
.endm

View File

@@ -717,7 +717,8 @@ enum MarioActionFlags {
#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 )
U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS | \
GCN_X_BUTTON | GCN_Y_BUTTON)
#define C_BUTTONS (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )

Some files were not shown because too many files have changed in this diff Show More