You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Update UNF (still broken though ) :(
This commit is contained in:
@@ -73,7 +73,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Perform alignment on input 's' */
|
||||
//#define ALIGN(s, align) (((u32)(s) + ((align)-1)) & ~((align)-1))
|
||||
#define ALIGN(s, align) (((u32)(s) + ((align)-1)) & ~((align)-1))
|
||||
//commented out due to sm64 conflict
|
||||
|
||||
/***************************************
|
||||
|
||||
@@ -44,6 +44,7 @@ DECLARE_SEGMENT(framebuffers)
|
||||
extern u8 _goddardSegmentStart[];
|
||||
extern u8 _engineSegmentStart[];
|
||||
extern u8 _engineSegmentBssEnd[];
|
||||
extern u8 _mainSegmentEnd[];
|
||||
extern u8 _engineSegmentEnd[];
|
||||
extern u8 _framebuffersSegmentBssEnd[];
|
||||
|
||||
|
||||
@@ -315,7 +315,9 @@ void thread3_main(UNUSED void *arg) {
|
||||
setup_mesg_queues();
|
||||
alloc_pool();
|
||||
load_engine_code_segment();
|
||||
#ifndef UNF
|
||||
crash_screen_init();
|
||||
#endif
|
||||
|
||||
#ifdef UNF
|
||||
debug_printf("Super Mario 64\n");
|
||||
@@ -475,8 +477,14 @@ void thread1_idle(UNUSED void *arg) {
|
||||
}
|
||||
}
|
||||
|
||||
static void ClearRAM(void)
|
||||
{
|
||||
bzero(_mainSegmentEnd, (size_t)osMemSize - (size_t)OS_K0_TO_PHYSICAL(_mainSegmentEnd));
|
||||
}
|
||||
|
||||
void main_func(void) {
|
||||
osInitialize();
|
||||
ClearRAM();
|
||||
__osInitialize_common();
|
||||
|
||||
create_thread(&gIdleThread, 1, thread1_idle, NULL, gIdleThreadStack + 0x800, 100);
|
||||
osStartThread(&gIdleThread);
|
||||
|
||||
776
src/usb/debug.c
776
src/usb/debug.c
File diff suppressed because it is too large
Load Diff
@@ -7,17 +7,17 @@
|
||||
|
||||
// Settings
|
||||
#define DEBUG_MODE 1 // Enable/Disable debug mode
|
||||
#define DEBUG_INIT_MSG 0 // Print a message when debug mode has initialized
|
||||
#define USE_FAULTTHREAD 0 // Create a fault detection thread
|
||||
#define OVERWRITE_OSPRINT 0 // Replaces osSyncPrintf calls with debug_printf
|
||||
#define DEBUG_INIT_MSG 1 // Print a message when debug mode has initialized
|
||||
#define USE_FAULTTHREAD 1 // Create a fault detection thread (libultra only)
|
||||
#define OVERWRITE_OSPRINT 0 // Replaces osSyncPrintf calls with debug_printf (libultra only)
|
||||
#define MAX_COMMANDS 25 // The max amount of user defined commands possible
|
||||
|
||||
// Fault thread definitions
|
||||
// Fault thread definitions (libultra only)
|
||||
#define FAULT_THREAD_ID 13
|
||||
#define FAULT_THREAD_PRI 125
|
||||
#define FAULT_THREAD_STACK 0x2000
|
||||
|
||||
// USB thread definitions
|
||||
// USB thread definitions (libultra only)
|
||||
#define USB_THREAD_ID 14
|
||||
#define USB_THREAD_PRI 126
|
||||
#define USB_THREAD_STACK 0x2000
|
||||
@@ -49,15 +49,23 @@
|
||||
|
||||
|
||||
/*==============================
|
||||
debug_screenshot
|
||||
Sends the currently displayed framebuffer through USB.
|
||||
@param The size of each pixel of the framebuffer in bytes
|
||||
Typically 4 if 32-bit or 2 if 16-bit
|
||||
@param The width of the framebuffer
|
||||
@param The height of the framebuffer
|
||||
debug_dumpbinary
|
||||
Dumps a binary file through USB
|
||||
@param The file to dump
|
||||
@param The size of the file
|
||||
==============================*/
|
||||
|
||||
extern void debug_screenshot(int size, int w, int h);
|
||||
extern void debug_dumpbinary(void* file, int size);
|
||||
|
||||
|
||||
/*==============================
|
||||
debug_screenshot
|
||||
Sends the currently displayed framebuffer through USB.
|
||||
DOES NOT PAUSE DRAWING THREAD! Using outside the drawing
|
||||
thread may lead to a screenshot with visible tearing
|
||||
==============================*/
|
||||
|
||||
extern void debug_screenshot();
|
||||
|
||||
|
||||
/*==============================
|
||||
@@ -126,7 +134,7 @@
|
||||
|
||||
// Overwrite library functions with useless macros if debug mode is disabled
|
||||
#define debug_initialize()
|
||||
#define debug_printf(a, __VA_ARGS__)
|
||||
#define debug_printf(__VA_ARGS__)
|
||||
#define debug_screenshot(a, b, c)
|
||||
#define debug_assert(a)
|
||||
#define debug_pollcommands()
|
||||
|
||||
593
src/usb/usb.c
593
src/usb/usb.c
File diff suppressed because it is too large
Load Diff
@@ -4,11 +4,14 @@
|
||||
/*********************************
|
||||
DataType macros
|
||||
*********************************/
|
||||
|
||||
// UNCOMMENT THE #DEFINE IF USING LIBDRAGON
|
||||
//#define LIBDRAGON
|
||||
|
||||
// Settings
|
||||
#define USE_OSRAW 0 // Use if you're doing USB operations without the PI Manager
|
||||
#define DEBUG_ADDRESS_SIZE 1*1024*1024 // Max size of USB I/O. The bigger this value, the more ROM you lose!
|
||||
|
||||
#define USE_OSRAW 0 // Use if you're doing USB operations without the PI Manager (libultra only)
|
||||
#define DEBUG_ADDRESS_SIZE 8*1024*1024 // Max size of USB I/O. The bigger this value, the more ROM you lose!
|
||||
|
||||
// Cart definitions
|
||||
#define CART_NONE 0
|
||||
#define CART_64DRIVE 1
|
||||
@@ -27,7 +30,6 @@
|
||||
extern int usb_readblock;
|
||||
|
||||
|
||||
|
||||
/*********************************
|
||||
Convenience macros
|
||||
*********************************/
|
||||
@@ -78,7 +80,7 @@
|
||||
@return The data header, or 0
|
||||
==============================*/
|
||||
|
||||
extern u32 usb_poll();
|
||||
extern unsigned int usb_poll();
|
||||
|
||||
|
||||
/*==============================
|
||||
|
||||
Reference in New Issue
Block a user