You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
22 Commits
old/refact
...
fazana/dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fd19a0e08 | ||
|
|
dded44b418 | ||
|
|
a355d4ef70 | ||
|
|
56ccf244a6 | ||
|
|
39d7890459 | ||
|
|
c563fbc977 | ||
|
|
aef4cd3315 | ||
|
|
202b420b3d | ||
|
|
1f97716ca4 | ||
|
|
2d6538605c | ||
|
|
9a1ecd2463 | ||
|
|
aa8bdf890d | ||
|
|
2cc56a9f73 | ||
|
|
fc58e7b9ba | ||
|
|
b1d1c485c7 | ||
|
|
ba737367c7 | ||
|
|
e6867a7e33 | ||
|
|
25951363b7 | ||
|
|
797f9fa223 | ||
|
|
9d7d56989e | ||
|
|
f3e61a31aa | ||
|
|
3a558060ab |
@@ -4,6 +4,7 @@
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @Reonu
|
||||
* @thecozies
|
||||
* @Mr-Wiseguy
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
|
||||
@@ -33,7 +33,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
|
||||
**Lighting Engine by Wiseguy**
|
||||
- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch.
|
||||
- Lighting Engine is available on a separate branch ([base/lighting-engine-wip](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine-wip)). Instructions on how to use it are in the readme of that branch.
|
||||
- Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it.
|
||||
|
||||
**Puppycam**
|
||||
|
||||
1
VERSION.txt
Normal file
1
VERSION.txt
Normal file
@@ -0,0 +1 @@
|
||||
v2.0.1
|
||||
@@ -38,7 +38,7 @@
|
||||
* importing large custom content.
|
||||
*/
|
||||
|
||||
#define SEG_POOL_START _engineSegmentBssEnd // 0x0165000 in size
|
||||
#define SEG_POOL_START _framebuffersSegmentBssEnd // 0x0165000 in size
|
||||
#define POOL_SIZE RAM_END - SEG_POOL_START
|
||||
|
||||
#define MAP_PARSER_ADDRESS 0x80345678
|
||||
|
||||
26
sm64.ld
26
sm64.ld
@@ -102,6 +102,13 @@ SECTIONS
|
||||
END_SEG(boot)
|
||||
|
||||
. = (RAM_START + 0x400);
|
||||
BEGIN_NOLOAD(zbuffer)
|
||||
{
|
||||
BUILD_DIR/src/buffers/zbuffer.o(.bss*);
|
||||
}
|
||||
END_NOLOAD(zbuffer)
|
||||
|
||||
. = _zbufferSegmentBssEnd;
|
||||
BEGIN_NOLOAD(buffers)
|
||||
{
|
||||
BUILD_DIR/src/buffers/buffers.o(.bss*);
|
||||
@@ -279,28 +286,13 @@ SECTIONS
|
||||
. = ALIGN(0x40);
|
||||
}
|
||||
END_NOLOAD(engine)
|
||||
#ifndef USE_EXT_RAM
|
||||
. = 0x80200000;
|
||||
#else
|
||||
. = 0x80400000;
|
||||
#endif
|
||||
|
||||
. = _engineSegmentBssEnd;
|
||||
BEGIN_NOLOAD(framebuffers)
|
||||
{
|
||||
BUILD_DIR/src/buffers/framebuffers.o(.bss*);
|
||||
}
|
||||
END_NOLOAD(framebuffers)
|
||||
#ifndef USE_EXT_RAM
|
||||
. = 0x80300000;
|
||||
#else
|
||||
. = 0x80500000;
|
||||
#endif
|
||||
BEGIN_NOLOAD(zbuffer)
|
||||
{
|
||||
BUILD_DIR/src/buffers/zbuffer.o(.bss*);
|
||||
}
|
||||
END_NOLOAD(zbuffer)
|
||||
|
||||
. = _engineSegmentBssEnd;
|
||||
|
||||
__mainPoolStart = .;
|
||||
__mainPoolSize = (RAM_END - .);
|
||||
|
||||
@@ -139,11 +139,6 @@ void main_pool_init(void *start, void *end) {
|
||||
#endif
|
||||
}
|
||||
|
||||
extern u8 _framebuffersSegmentBssStart[];
|
||||
extern u8 _framebuffersSegmentBssEnd[];
|
||||
extern u8 _zbufferSegmentBssStart[];
|
||||
extern u8 _zbufferSegmentBssEnd[];
|
||||
|
||||
/**
|
||||
* Allocate a block of memory from the pool of given size, and from the
|
||||
* specified side of the pool (MEMORY_POOL_LEFT or MEMORY_POOL_RIGHT).
|
||||
@@ -158,12 +153,6 @@ void *main_pool_alloc(u32 size, u32 side) {
|
||||
sPoolFreeSpace -= size;
|
||||
if (side == MEMORY_POOL_LEFT) {
|
||||
newListHead = (struct MainPoolBlock *) ((u8 *) sPoolListHeadL + size);
|
||||
if ((u32)newListHead >= (u32)&_framebuffersSegmentBssStart && (u32)newListHead <= (u32)&_framebuffersSegmentBssEnd) {
|
||||
newListHead = (struct MainPoolBlock *)ALIGN16((u32)&_framebuffersSegmentBssEnd + 0x40);
|
||||
}
|
||||
if ((u32)newListHead >= (u32)&_zbufferSegmentBssStart && (u32)newListHead <= (u32)&_zbufferSegmentBssEnd) {
|
||||
newListHead = (struct MainPoolBlock *)ALIGN16((u32)&_zbufferSegmentBssEnd + 0x40);
|
||||
}
|
||||
sPoolListHeadL->next = newListHead;
|
||||
newListHead->prev = sPoolListHeadL;
|
||||
newListHead->next = NULL;
|
||||
|
||||
@@ -438,7 +438,6 @@ void render_game(void) {
|
||||
#if PUPPYPRINT_DEBUG
|
||||
profiler_update(graphTime, first);
|
||||
graphTime[perfIteration] -= (collisionTime[perfIteration] - colTime);
|
||||
// graphTime[perfIteration] -= profilerTime[perfIteration]; //! Graph time is inaccurate and wrongly reaches 0 sometimes
|
||||
puppyprint_render_profiler();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -726,6 +726,7 @@ void setup_game_memory(void) {
|
||||
void thread5_game_loop(UNUSED void *arg) {
|
||||
#if PUPPYPRINT_DEBUG
|
||||
OSTime lastTime = 0;
|
||||
OSTime first = 0;
|
||||
#endif
|
||||
|
||||
setup_game_memory();
|
||||
@@ -763,12 +764,10 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
continue;
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
while (TRUE) {
|
||||
lastTime = osGetTime();
|
||||
collisionTime[perfIteration] = 0;
|
||||
// graphTime[perfIteration] = 0;
|
||||
behaviourTime[perfIteration] = 0;
|
||||
dmaTime[perfIteration] = 0;
|
||||
lastTime = osGetTime();
|
||||
collisionTime[perfIteration] = 0;
|
||||
behaviourTime[perfIteration] = 0;
|
||||
dmaTime[perfIteration] = 0;
|
||||
#endif
|
||||
|
||||
// If any controllers are plugged in, start read the data for when
|
||||
@@ -780,9 +779,16 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
osContStartReadData(&gSIEventMesgQueue);
|
||||
}
|
||||
|
||||
|
||||
audio_game_loop_tick();
|
||||
select_gfx_pool();
|
||||
#if PUPPYPRINT_DEBUG
|
||||
first = osGetTime();
|
||||
read_controller_inputs(THREAD_5_GAME_LOOP);
|
||||
profiler_update(controllerTime, first);
|
||||
#else
|
||||
read_controller_inputs(THREAD_5_GAME_LOOP);
|
||||
#endif
|
||||
addr = level_script_execute(addr);
|
||||
#if !PUPPYPRINT_DEBUG && defined(VISUAL_DEBUG)
|
||||
debug_box_input();
|
||||
@@ -791,17 +797,6 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
profiler_update(scriptTime, lastTime);
|
||||
scriptTime[perfIteration] -= profilerTime[perfIteration];
|
||||
scriptTime[perfIteration] -= profilerTime2[perfIteration];
|
||||
if (benchmarkLoop > 0 && benchOption == 0) {
|
||||
benchmarkLoop--;
|
||||
benchMark[benchmarkLoop] = (osGetTime() - lastTime);
|
||||
if (benchmarkLoop == 0) {
|
||||
puppyprint_profiler_finished();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
puppyprint_profiler_process();
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,7 @@ extern s32 ramsizeSegment[33];
|
||||
extern s8 nameTable;
|
||||
extern s32 mempool;
|
||||
extern u8 benchOption;
|
||||
extern f32 textSize;
|
||||
|
||||
// General
|
||||
extern u32 cpuTime;
|
||||
@@ -79,6 +80,7 @@ extern u32 taskTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 cameraTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 profilerTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 profilerTime2[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 controllerTime[NUM_PERF_ITERATIONS + 1];
|
||||
// RSP
|
||||
extern u32 rspGenTime[NUM_PERF_ITERATIONS + 1];
|
||||
// RDP
|
||||
@@ -90,15 +92,17 @@ extern void profiler_update(u32 *time, OSTime time2);
|
||||
extern void puppyprint_profiler_process(void);
|
||||
extern void puppyprint_render_profiler(void);
|
||||
extern void puppyprint_profiler_finished(void);
|
||||
extern void print_set_envcolour(s32 r, s32 g, s32 b, s32 a);
|
||||
extern void print_set_envcolour(u8 r, u8 g, u8 b, u8 a);
|
||||
extern void prepare_blank_box(void);
|
||||
extern void finish_blank_box(void);
|
||||
extern void print_small_text(s32 x, s32 y, const char *str, s32 align, s32 amount, s32 font);
|
||||
extern void print_small_text(s32 x, s32 y, const char *str, s32 align, s32 amount, u8 font);
|
||||
extern void render_multi_image(Texture *image, s32 x, s32 y, s32 width, s32 height, s32 scaleX, s32 scaleY, s32 mode);
|
||||
extern s32 get_text_height(const char *str);
|
||||
extern s32 get_text_width(const char *str, s32 font);
|
||||
extern void prepare_blank_box(void);
|
||||
extern void finish_blank_box(void);
|
||||
extern void render_blank_box(s32 x1, s32 y1, s32 x2, s32 y2, s32 r, s32 g, s32 b, s32 a);
|
||||
extern void render_blank_box(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void render_blank_box_rounded(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void append_puppyprint_log(const char *str, ...);
|
||||
extern char consoleLogTable[LOG_BUFFER_SIZE][255];
|
||||
extern s32 puppyprint_strlen(const char *str);
|
||||
|
||||
@@ -353,33 +353,19 @@ void thread4_sound(UNUSED void *arg) {
|
||||
|
||||
osRecvMesg(&sSoundMesgQueue, &msg, OS_MESG_BLOCK);
|
||||
#if PUPPYPRINT_DEBUG
|
||||
while (TRUE) {
|
||||
lastTime = osGetTime();
|
||||
dmaAudioTime[perfIteration] = 0;
|
||||
#endif
|
||||
if (gResetTimer < 25) {
|
||||
struct SPTask *spTask;
|
||||
spTask = create_next_audio_frame_task();
|
||||
if (spTask != NULL) {
|
||||
dispatch_audio_sptask(spTask);
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
profiler_update(audioTime, lastTime);
|
||||
audioTime[perfIteration] -= dmaAudioTime[perfIteration];
|
||||
if (benchmarkLoop > 0 && benchOption == 1) {
|
||||
benchmarkLoop--;
|
||||
benchMark[benchmarkLoop] = osGetTime() - lastTime;
|
||||
if (benchmarkLoop == 0) {
|
||||
puppyprint_profiler_finished();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
lastTime = osGetTime();
|
||||
dmaAudioTime[perfIteration] = 0;
|
||||
#endif
|
||||
if (gResetTimer < 25) {
|
||||
struct SPTask *spTask;
|
||||
spTask = create_next_audio_frame_task();
|
||||
if (spTask != NULL) {
|
||||
dispatch_audio_sptask(spTask);
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
}
|
||||
profiler_update(audioTime, lastTime);
|
||||
audioTime[perfIteration] -= dmaAudioTime[perfIteration];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user