Skip to content

Commit

Permalink
dynamic switching
Browse files Browse the repository at this point in the history
  • Loading branch information
louist103 committed Apr 1, 2024
1 parent 8fe7fa0 commit 3e46d7c
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 56 deletions.
1 change: 1 addition & 0 deletions include/libultraship/bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
#include "public/bridge/consolevariablebridge.h"
#include "public/bridge/crashhandlerbridge.h"
#include "public/bridge/gfxdebuggerbridge.h"
#include "public/bridge/gfxbridge.h"

#endif
14 changes: 14 additions & 0 deletions include/libultraship/libultra/gbi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2283,6 +2283,19 @@ typedef union {
_SHIFTL(G_LOAD_UCODE, 24, 8) | _SHIFTL((int)(uc_dsize)-1, 0, 16), (uintptr_t)(uc_start), \
}

#define gSPLoadUcode(pkt, uc_index) \
_DW({ \
Gfx* _g = (Gfx*)(pkt); \
_g->words.w0 = _SHIFTL(G_LOAD_UCODE, 24, 8) | _SHIFTL(uc_index, 0, 16); \
}) \

#define gSPLoadUcodeL(pkt, uc_index) \
_DW({ \
Gfx* _g = (Gfx*)(pkt); \
_g->words.w0 = _SHIFTL(G_LOAD_UCODE, 24, 8) | _SHIFTL(uc_index, 0, 16); \
}) \

#if 0
#define gSPLoadUcode(pkt, uc_start, uc_dstart) gSPLoadUcodeEx((pkt), (uc_start), (uc_dstart), SP_UCODE_DATA_SIZE)
#define gsSPLoadUcode(uc_start, uc_dstart) gsSPLoadUcodeEx((uc_start), (uc_dstart), SP_UCODE_DATA_SIZE)

Expand All @@ -2291,6 +2304,7 @@ typedef union {
#define gsSPLoadUcodeL(ucode) \
gsSPLoadUcode(OS_K0_TO_PHYSICAL(&(ucode##TextStart)), OS_K0_TO_PHYSICAL(&(ucode##DataStart)))
#endif
#endif

#ifdef F3DEX_GBI_2
/*
Expand Down
Loading

0 comments on commit 3e46d7c

Please sign in to comment.