Doc setup_game_memory, label syms, add osSyncPrintf support, match funcs (#444)

* Doc setup_game_memory and label syms

* match func_800132F4

* match func label defines

* fix some fake ptrs

* match more code

* Matches

* Add osSyncPrintf support and matches

* Add func equiv to draw_square and add comment to is_debug
This commit is contained in:
MegaMech
2023-10-06 00:19:09 -06:00
committed by GitHub
parent 274fc21ffa
commit 2b74bbbcef
50 changed files with 971 additions and 3667 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef HARDCODED_SEGMENTS_H
#define HARDCODED_SEGMENTS_H
/**
* Only used in the linker.
**/
#define SEG_START 0x80000000
#define SEG_MAIN 0x80000400
#ifdef AVOID_UB
// addr need to be manually updated when game is shifted
#define SEG_ENDING_SEQUENCES 0x80280000
#define SEG_RACING 0x8028DF00
#define SEG_802BA370 0x802BA370
#else
#define SEG_ENDING_SEQUENCES 0x80280000
#define SEG_RACING 0x8028DF00
#define SEG_FRAMEBUFFERS 0x802BA290
#define SEG_802BA370 0x802BA370 // 0x802BA370
#define SEG_AUDIO 0x803AF780
#endif // AVOID_UB
#endif /* HARDCODED_SEGMENTS_H */
+3 -3
View File
@@ -140,7 +140,7 @@ extern s32 D_80183F28[];
extern s32 D_8018BFA8[];
extern s32 D_8018C030[];
#define D_8018C1B0_SIZE 0x80
#define D_8018C1B0_SIZE 128
#define NUM_MOLES 0x1F
#define NUM_SNOWFLAKES 0x32
/**
@@ -156,7 +156,7 @@ extern s32 D_80183E38;
// Used for cycling through snowflakes in func_80078790
extern s16 D_8018D174;
#define D_8018C3F0_SIZE 0x80
#define D_8018C3F0_SIZE 128
/**
* List of object list indices used for:
* Bats in Banshee's Boardwalk (but only 1 player mode?)
@@ -167,7 +167,7 @@ extern s32 D_80183E4C;
// Controls number of come object type placed into D_8018C3F0 on Frappe Snowland. So, maybe snowmen/snowflakes?
extern s32 D_8018D3BC;
#define D_8018C630_SIZE 0x80
#define D_8018C630_SIZE 128
extern s32 D_8018C630[];
// Next free spot in D_8018C630?
extern s32 D_80183E5C;
-14
View File
@@ -1,14 +0,0 @@
#ifndef SEGMENT_SYMBOLS_H
#define SEGMENT_SYMBOLS_H
extern u8 _mainSegNoloadEnd[];
extern u8 _endingSequencesSegmentStart[];
extern u8 _endingSequencesSegmentRomStart[];
extern u8 _endingSequencesSegmentRomEnd[];
extern u8 _racingSegmentStart[];
extern u8 _racingSegmentRomStart[];
extern u8 _racingSegmentRomEnd[];
#endif
+44 -4
View File
@@ -1,12 +1,52 @@
#ifndef SEGMENTS_H
#define SEGMENTS_H
extern u8 _mainSegNoloadEnd[];
extern u8 _endingSequencesSegmentStart[];
extern u8 _endingSequencesSegmentRomStart[];
extern u8 _endingSequencesSegmentRomEnd[];
extern u8 _racingSegmentStart[];
extern u8 _racingSegmentRomStart[];
extern u8 _racingSegmentRomEnd[];
extern u8 _data_802BA370SegmentStart[];
/**
* mk64 has three segments:
* main 0x80000400
* ending 0x80280000 size 0xDF00
* race 0x8028DF00 size 0x2C470
**/
#define SEG_START 0x80000000
#define SEG_MAIN 0x80000400
#define SEG_ENDING_SEQUENCES 0x80280000
#define SEG_RACING 0x8028DF00
#define ENDING_SEQUENCE_SIZE 0xDF00
#define RACING_SEQUENCE_SIZE 0x2C470
#ifdef AVOID_UB
#define MEMORY_POOL_END (&_mainSegNoloadEnd[0] + 0xAB630)
#else
#define MEMORY_POOL_END 0x80242F00
#endif // AVOID_UB
#ifdef AVOID_UB
#define SEG_ENDING_SEQUENCES &_endingSequencesSegmentStart
#define SEG_RACING &_racingSegmentStart
#define SEG_802BA370 &_data_802BA370SegmentStart
#else
#define SEG_ENDING_SEQUENCES 0x80280000
#define SEG_RACING 0x8028DF00
#define SEG_802BA370 0x802BA370 //0x802BA370
#endif // AVOID_UB
#define SEG_FRAMEBUFFERS 0x802BA290
#define SEG_802BA370 0x802BA370
#define SEG_AUDIO 0x803AF780
#endif
#endif /* SEGMENTS_H */
+6 -4
View File
@@ -3,10 +3,12 @@
#include "common_structs.h"
#define NUM_1P_PASSENGER_CARS 5
#define NUM_2P_PASSENGER_CARS 2
#define NUM_PASSENGER_CAR_ENTRIES 5
#define NUM_1P_PASSENGER_CARS 4
#define NUM_2P_PASSENGER_CARS 1
#define NUM_PASSENGER_CAR_ENTRIES 5 // Max 16
#define NUM_TENDERS 1
#define NUM_TRAINS 2
#define LOCOMOTIVE_ONLY 0
#define NUM_PADDLE_WHEEL_BOATS 1
@@ -62,7 +64,7 @@ typedef struct {
/* 0x02 */ // s16 compilerPadding;
/* 0x04 */ Vec3f position;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ s16 wayPointIndex;
/* 0x1C */ u16 wayPointIndex;
/* 0x1E */ s16 actorIndex;
/* 0x20 */ f32 someMultiplier; //
/* 0x24 */ f32 someMultiplierTheSequel; //