sm64/lib/rsp.s

237 lines
4.4 KiB
ArmAsm
Raw Normal View History

2021-07-12 23:17:54 -04:00
#include "macros.inc"
2019-09-01 15:50:50 -04:00
.set UCODE_SIZE, 0x800
.section .text
.balign 16
glabel rspF3DBootStart
2020-06-02 12:44:34 -04:00
.incbin "rsp/rspboot.bin"
.balign 16
2019-09-01 15:50:50 -04:00
glabel rspF3DBootEnd
.balign 16
2021-07-12 23:17:54 -04:00
#ifndef F3DEX_GBI_SHARED
2019-09-01 15:50:50 -04:00
glabel rspF3DStart /* Use regular Fast3D bins (default) */
2020-06-02 12:44:34 -04:00
.incbin "rsp/fast3d.bin"
2019-09-01 15:50:50 -04:00
glabel rspF3DEnd
2021-07-12 23:17:54 -04:00
#else /* Use one of the Fast3DEX series grucodes. */
2019-09-01 15:50:50 -04:00
glabel rspF3DStart
2021-07-12 23:17:54 -04:00
#ifdef F3DZEX_GBI_2
2020-12-03 14:26:38 -05:00
.incbin "lib/PR/f3dex2/F3DZEX_NoN.bin"
2021-07-12 23:17:54 -04:00
#elif defined(F3DEX_GBI)
2019-09-01 15:50:50 -04:00
.incbin "lib/PR/f3dex/F3DEX.bin"
2021-07-12 23:17:54 -04:00
#elif defined(F3DEX_GBI_2)
2020-12-03 14:26:38 -05:00
.incbin "lib/PR/f3dex2/F3DEX2.bin"
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
glabel rspF3DEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Audio Bins */
.balign 16
glabel rspAspMainStart
2020-06-02 12:44:34 -04:00
.incbin "rsp/audio.bin"
2019-09-01 15:50:50 -04:00
glabel rspAspMainEnd
/*
* LESS COMMON MICROCODES
* These are setup to be loaded by G_LOAD_UCODE
*/
/* Fast3DEX NoN Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX_NON_GBI
2019-09-01 15:50:50 -04:00
glabel rspF3DEXNoNStart
.balign 16
.incbin "lib/PR/f3dex/F3DEX_NoN.bin"
glabel rspF3DEXNoNEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_GBI
2019-09-01 15:50:50 -04:00
glabel rspF3DLXStart
.incbin "lib/PR/f3dex/F3DLX.bin"
glabel rspF3DLXEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX NoN Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_NON_GBI
2019-09-01 15:50:50 -04:00
glabel rspF3DLXNoNStart
.balign 16
.incbin "lib/PR/f3dex/F3DLX_NoN.bin"
glabel rspF3DLXNoNEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX Rej Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_REJ_GBI
2019-09-01 15:50:50 -04:00
glabel rspF3DLXRejStart
.balign 16
.incbin "lib/PR/f3dex/F3DLX_Rej.bin"
glabel rspF3DLXRejEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Line3DEX Text */
2021-07-12 23:17:54 -04:00
#ifdef L3DEX_GBI
2019-09-01 15:50:50 -04:00
glabel rspL3DEXStart
.balign 16
.incbin "lib/PR/f3dex/L3DEX.bin"
glabel rspL3DEXEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* S2DEX Text */
2021-07-12 23:17:54 -04:00
#ifdef S2DEX_GBI
2019-09-01 15:50:50 -04:00
glabel rspS2DEXStart
.balign 16
.incbin "lib/PR/s2dex/S2DEX.bin"
glabel rspS2DEXEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DEX2 series */
/* Fast3DEX2 NoN Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX2_NON_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DEX2NoNStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN.bin"
glabel rspF3DEX2NoNEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DEX2 Rej Text */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX2_REJ_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DEX2RejStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej.bin"
glabel rspF3DEX2RejEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Line3DEX2 Text */
2021-07-12 23:17:54 -04:00
#ifdef L3DEX2_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspL3DEX2Start
.incbin "lib/PR/f3dex2/L3DEX2.bin"
glabel rspL3DEX2End
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* S2DEX2 Text */
2021-07-12 23:17:54 -04:00
#ifdef S2DEX_GBI_2
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspS2DEXStart
.incbin "lib/PR/s2dex/S2DEX2.bin"
glabel rspS2DEXEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* DATA SECTION START */
.section .rodata
.balign 16
2021-07-12 23:17:54 -04:00
#ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */
2019-09-01 15:50:50 -04:00
glabel rspF3DDataStart
2020-06-02 12:44:34 -04:00
.incbin "rsp/fast3d_data.bin"
2019-09-01 15:50:50 -04:00
glabel rspF3DDataEnd
2021-07-12 23:17:54 -04:00
#else /* Using one of the Fast3DEX series grucodes */
2019-09-01 15:50:50 -04:00
glabel rspF3DDataStart
2021-07-12 23:17:54 -04:00
#ifdef F3DZEX_GBI_2
2020-12-03 14:26:38 -05:00
.incbin "lib/PR/f3dex2/F3DZEX_NoN_data.bin"
2021-10-14 15:25:30 -04:00
#elif defined(F3DEX_GBI)
2019-09-01 15:50:50 -04:00
.incbin "lib/PR/f3dex/F3DEX_data.bin"
2021-10-14 15:25:30 -04:00
#elif defined(F3DEX_GBI_2)
2020-12-03 14:26:38 -05:00
.incbin "lib/PR/f3dex2/F3DEX2_data.bin"
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
glabel rspF3DDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Audio Data */
.balign 16
glabel rspAspMainDataStart
2020-06-02 12:44:34 -04:00
.incbin "rsp/audio_data.bin"
2019-09-01 15:50:50 -04:00
glabel rspAspMainDataEnd
/* LESS COMMON MICROCODES */
/* Fast3DEX Series */
/* Fast3DEX NoN Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX_NON_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DEXNoNDataStart
.incbin "lib/PR/f3dex/F3DEX_NoN_data.bin"
glabel rspF3DEXNoNDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DLXDataStart
.incbin "lib/PR/f3dex/F3DLX_data.bin"
glabel rspF3DLXDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX NoN Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_NON_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DLXNoNDataStart
.incbin "lib/PR/f3dex/F3DLX_NoN_data.bin"
glabel rspF3DLXNoNDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DLX Rej Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DLX_REJ_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DLXRejDataStart
.incbin "lib/PR/f3dex/F3DLX_Rej_data.bin"
glabel rspF3DLXRejDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Line3DEX Data */
2021-07-12 23:17:54 -04:00
#ifdef L3DEX_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspL3DEXDataStart
.incbin "lib/PR/f3dex/L3DEX_data.bin"
glabel rspL3DEXDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* S2DEX Data */
2021-07-12 23:17:54 -04:00
#ifdef S2DEX_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspS2DEXDataStart
.incbin "lib/PR/s2dex/S2DEX_data.bin"
glabel rspS2DEXDataEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DEX2 Series */
/* Fast3DEX2 NoN Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX2_NON_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DEX2NoNStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN_data.bin"
glabel rspF3DEX2NoNEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Fast3DEX2 Rej Data */
2021-07-12 23:17:54 -04:00
#ifdef F3DEX2_REJ_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspF3DEX2RejStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej_data.bin"
glabel rspF3DEX2RejEnd
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* Line3DEX2 Data */
2021-07-12 23:17:54 -04:00
#ifdef L3DEX2_GBI
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspL3DEX2Start
.incbin "lib/PR/f3dex2/L3DEX2_data.bin"
glabel rspL3DEX2End
2021-07-12 23:17:54 -04:00
#endif
2019-09-01 15:50:50 -04:00
/* S2DEX2 Data */
2021-07-12 23:17:54 -04:00
#ifdef S2DEX_GBI_2
2019-09-01 15:50:50 -04:00
.balign 16
glabel rspS2DEXStart
.incbin "lib/PR/s2dex/S2DEX2_data.bin"
glabel rspS2DEXEnd
2021-07-12 23:17:54 -04:00
#endif