mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-29 15:33:02 -04:00
Restructure files
* Create chraicommands.c * Move include to src/include * Use .o files next to each .c file
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
#define bool u8
|
||||
|
||||
#define ACTION_SCAN 0x01
|
||||
#define ACTION_UNDER_COVER 0x02
|
||||
#define ACTION_GRENADE_STOP 0x03
|
||||
|
||||
@@ -0,0 +1,448 @@
|
||||
#ifndef _IN_CHR_CHRAICOMMANDS_H
|
||||
#define _IN_CHR_CHRAICOMMANDS_H
|
||||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
/*0x0000*/ bool aiGoToNext(void);
|
||||
/*0x0001*/ bool aiGoToFirst(void);
|
||||
/*0x0002*/ bool aiLabel(void);
|
||||
/*0x0003*/ bool aiYield(void);
|
||||
/*0x0004*/ bool aiEndList(void);
|
||||
/*0x0005*/ bool aiSetList(void);
|
||||
/*0x0006*/ bool aiSetReturnList(void);
|
||||
/*0x0007*/ bool ai0007(void);
|
||||
/*0x0008*/ bool aiReturn(void);
|
||||
/*0x0009*/ bool aiStop(void);
|
||||
/*0x000a*/ bool aiKneel(void);
|
||||
/*0x000b*/ bool ai000b(void);
|
||||
/*0x000c*/ bool ai000c(void);
|
||||
/*0x000d*/ bool ai000d(void);
|
||||
/*0x000e*/ bool ai000e(void);
|
||||
/*0x000f*/ bool ai000f(void);
|
||||
/*0x0010*/ bool ai0010(void);
|
||||
/*0x0011*/ bool ai0011(void);
|
||||
/*0x0012*/ bool ai0012(void);
|
||||
/*0x0013*/ bool ai0013(void);
|
||||
/*0x0014*/ bool ai0014(void);
|
||||
/*0x0015*/ bool ai0015(void);
|
||||
/*0x0016*/ bool ai0016(void);
|
||||
/*0x0017*/ bool ai0017(void);
|
||||
/*0x0018*/ bool ai0018(void);
|
||||
/*0x0019*/ bool ai0019(void);
|
||||
/*0x001a*/ bool ai001a(void);
|
||||
/*0x001b*/ bool ai001b(void);
|
||||
/*0x001c*/ bool ai001c(void);
|
||||
/*0x001d*/ bool ai001d(void);
|
||||
/*0x001e*/ bool ai001e(void);
|
||||
/*0x001f*/ bool ai001f(void);
|
||||
/*0x0020*/ bool ai0020(void);
|
||||
/*0x0021*/ bool ai0021(void);
|
||||
/*0x0022*/ bool ai0022(void);
|
||||
/*0x0023*/ bool ai0023(void);
|
||||
/*0x0024*/ bool ai0024(void);
|
||||
/*0x0025*/ bool ai0025(void);
|
||||
/*0x0026*/ bool ai0026(void);
|
||||
/*0x0027*/ bool ai0027(void);
|
||||
/*0x0028*/ bool ai0028(void);
|
||||
/*0x0029*/ bool ai0029(void);
|
||||
/*0x002a*/ bool ai002a(void);
|
||||
/*0x002b*/ bool ai002b(void);
|
||||
/*0x002c*/ bool ai002c(void);
|
||||
/*0x002d*/ bool ai002d(void);
|
||||
/*0x002e*/ bool ai002e(void);
|
||||
/*0x002f*/ bool ai002f(void);
|
||||
/*0x0030*/ bool ai0030(void);
|
||||
/*0x0031*/ bool ai0031(void);
|
||||
/*0x0032*/ bool ai0032(void);
|
||||
/*0x0033*/ bool ai0033(void);
|
||||
/*0x0034*/ bool ai0034(void);
|
||||
/*0x0035*/ bool ai0035(void);
|
||||
/*0x0036*/ bool ai0036(void);
|
||||
/*0x0037*/ bool ai0037(void);
|
||||
/*0x0038*/ bool ai0038(void);
|
||||
/*0x0039*/ bool ai0039(void);
|
||||
/*0x003a*/ bool ai003a(void);
|
||||
/*0x003b*/ bool ai003b(void);
|
||||
/*0x003c*/ bool ai003c(void);
|
||||
/*0x003d*/ bool ai003d(void);
|
||||
/*0x003e*/ bool ai003e(void);
|
||||
/*0x003f*/ bool ai003f(void);
|
||||
/*0x0040*/ bool ai0040(void);
|
||||
/*0x0041*/ bool ai0041(void);
|
||||
/*0x0042*/ bool ai0042(void);
|
||||
/*0x0043*/ bool ai0043(void);
|
||||
/*0x0044*/ bool ai0044(void);
|
||||
/*0x0045*/ bool ai0045(void);
|
||||
/*0x0046*/ bool ai0046(void);
|
||||
/*0x0047*/ bool ai0047(void);
|
||||
/*0x0048*/ bool ai0048(void);
|
||||
/*0x0049*/ bool ai0049(void);
|
||||
/*0x004a*/ bool ai004a(void);
|
||||
/*0x004b*/ bool ai004b(void);
|
||||
/*0x004c*/ bool ai004c(void);
|
||||
/*0x004d*/ bool ai004d(void);
|
||||
/*0x004e*/ bool ai004e(void);
|
||||
/*0x004f*/ bool ai004f(void);
|
||||
/*0x0050*/ bool ai0050(void);
|
||||
/*0x0051*/ bool ai0051(void);
|
||||
/*0x0052*/ bool ai0052(void);
|
||||
/*0x0053*/ bool ai0053(void);
|
||||
/*0x0054*/ bool ai0054(void);
|
||||
/*0x0055*/ bool ai0055(void);
|
||||
/*0x0056*/ bool ai0056(void);
|
||||
/*0x0057*/ bool ai0057(void);
|
||||
/*0x0058*/ bool ai0058(void);
|
||||
/*0x0059*/ bool ai0059(void);
|
||||
/*0x005a*/ bool ai005a(void);
|
||||
/*0x005b*/ bool ai005b(void);
|
||||
/*0x005c*/ bool ai005c(void);
|
||||
/*0x005d*/ bool ai005d(void);
|
||||
/*0x005e*/ bool ai005e(void);
|
||||
/*0x005f*/ bool ai005f(void);
|
||||
/*0x0060*/ bool ai0060(void);
|
||||
/*0x0061*/ bool ai0061(void);
|
||||
/*0x0062*/ bool ai0062(void);
|
||||
/*0x0063*/ bool ai0063(void);
|
||||
/*0x0065*/ bool ai0065(void);
|
||||
/*0x0066*/ bool ai0066(void);
|
||||
/*0x0067*/ bool ai0067(void);
|
||||
/*0x0068*/ bool ai0068(void);
|
||||
/*0x0069*/ bool ai0069(void);
|
||||
/*0x006a*/ bool ai006a(void);
|
||||
/*0x006b*/ bool ai006b(void);
|
||||
/*0x006c*/ bool ai006c(void);
|
||||
/*0x006d*/ bool ai006d(void);
|
||||
/*0x006e*/ bool ai006e(void);
|
||||
/*0x006f*/ bool ai006f(void);
|
||||
/*0x0070*/ bool ai0070(void);
|
||||
/*0x0071*/ bool ai0071(void);
|
||||
/*0x0072*/ bool ai0072(void);
|
||||
/*0x0073*/ bool ai0073(void);
|
||||
/*0x0074*/ bool ai0074(void);
|
||||
/*0x0075*/ bool ai0075(void);
|
||||
/*0x0076*/ bool ai0076(void);
|
||||
/*0x0077*/ bool ai0077(void);
|
||||
/*0x0078*/ bool ai0078(void);
|
||||
/*0x0079*/ bool ai0079(void);
|
||||
/*0x007a*/ bool ai007a(void);
|
||||
/*0x007b*/ bool ai007b(void);
|
||||
/*0x007c*/ bool ai007c(void);
|
||||
/*0x007d*/ bool ai007d(void);
|
||||
/*0x007e*/ bool ai007e(void);
|
||||
/*0x007f*/ bool ai007f(void);
|
||||
/*0x0080*/ bool ai0080(void);
|
||||
/*0x0081*/ bool ai0081(void);
|
||||
/*0x0082*/ bool ai0082(void);
|
||||
/*0x0083*/ bool ai0083(void);
|
||||
/*0x0084*/ bool ai0084(void);
|
||||
/*0x0085*/ bool ai0085(void);
|
||||
/*0x0086*/ bool ai0086(void);
|
||||
/*0x0087*/ bool ai0087(void);
|
||||
/*0x0088*/ bool ai0088(void);
|
||||
/*0x0089*/ bool ai0089(void);
|
||||
/*0x008a*/ bool ai008a(void);
|
||||
/*0x008b*/ bool ai008b(void);
|
||||
/*0x008c*/ bool ai008c(void);
|
||||
/*0x008d*/ bool ai008d(void);
|
||||
/*0x008e*/ bool ai008e(void);
|
||||
/*0x008f*/ bool ai008f(void);
|
||||
/*0x0090*/ bool ai0090(void);
|
||||
/*0x0091*/ bool ai0091(void);
|
||||
/*0x0092*/ bool ai0092(void);
|
||||
/*0x0093*/ bool ai0093(void);
|
||||
/*0x0094*/ bool ai0094(void);
|
||||
/*0x0095*/ bool ai0095(void);
|
||||
/*0x0096*/ bool ai0096(void);
|
||||
/*0x0097*/ bool ai0097(void);
|
||||
/*0x0098*/ bool ai0098(void);
|
||||
/*0x0099*/ bool ai0099(void);
|
||||
/*0x009a*/ bool ai009a(void);
|
||||
/*0x009b*/ bool ai009b(void);
|
||||
/*0x009c*/ bool ai009c(void);
|
||||
/*0x009d*/ bool ai009d(void);
|
||||
/*0x009e*/ bool ai009e(void);
|
||||
/*0x009f*/ bool ai009f(void);
|
||||
/*0x00a0*/ bool ai00a0(void);
|
||||
/*0x00a1*/ bool ai00a1(void);
|
||||
/*0x00a2*/ bool ai00a2(void);
|
||||
/*0x00a3*/ bool ai00a3(void);
|
||||
/*0x00a4*/ bool ai00a4(void);
|
||||
/*0x00a5*/ bool ai00a5(void);
|
||||
/*0x00a6*/ bool ai00a6(void);
|
||||
/*0x00a7*/ bool ai00a7(void);
|
||||
/*0x00a8*/ bool ai00a8(void);
|
||||
/*0x00a9*/ bool ai00a9(void);
|
||||
/*0x00aa*/ bool ai00aa(void);
|
||||
/*0x00ab*/ bool ai00ab(void);
|
||||
/*0x00ac*/ bool ai00ac(void);
|
||||
/*0x00ad*/ bool ai00ad(void);
|
||||
/*0x00ae*/ bool ai00ae(void);
|
||||
/*0x00af*/ bool ai00af(void);
|
||||
/*0x00b0*/ bool ai00b0(void);
|
||||
/*0x00b1*/ bool ai00b1(void);
|
||||
/*0x00b2*/ bool ai00b2(void);
|
||||
/*0x00b3*/ bool ai00b3(void);
|
||||
/*0x00b4*/ bool ai00b4(void);
|
||||
/*0x00b5*/ bool ai00b5(void);
|
||||
/*0x00b6*/ bool ai00b6(void);
|
||||
/*0x00b7*/ bool ai00b7(void);
|
||||
/*0x00b8*/ bool ai00b8(void);
|
||||
/*0x00b9*/ bool ai00b9(void);
|
||||
/*0x00ba*/ bool ai00ba(void);
|
||||
/*0x00bb*/ bool ai00bb(void);
|
||||
/*0x00bc*/ bool ai00bc(void);
|
||||
/*0x00bd*/ bool ai00bd(void);
|
||||
/*0x00be*/ bool ai00be(void);
|
||||
/*0x00bf*/ bool ai00bf(void);
|
||||
/*0x00c0*/ bool ai00c0(void);
|
||||
/*0x00c1*/ bool ai00c1(void);
|
||||
/*0x00c2*/ bool ai00c2(void);
|
||||
/*0x00c3*/ bool ai00c3(void);
|
||||
/*0x00c4*/ bool ai00c4(void);
|
||||
/*0x00c5*/ bool ai00c5(void);
|
||||
/*0x00c6*/ bool ai00c6(void);
|
||||
/*0x00c7*/ bool ai00c7(void);
|
||||
/*0x00c8*/ bool ai00c8(void);
|
||||
/*0x00c9*/ bool ai00c9(void);
|
||||
/*0x00ca*/ bool ai00ca(void);
|
||||
/*0x00cb*/ bool ai00cb(void);
|
||||
/*0x00cc*/ bool ai00cc(void);
|
||||
/*0x00cd*/ bool ai00cd(void);
|
||||
/*0x00ce*/ bool ai00ce(void);
|
||||
/*0x00cf*/ bool ai00cf(void);
|
||||
/*0x00d0*/ bool ai00d0(void);
|
||||
/*0x00d1*/ bool ai00d1(void);
|
||||
/*0x00d2*/ bool ai00d2(void);
|
||||
/*0x00d3*/ bool ai00d3(void);
|
||||
/*0x00d4*/ bool ai00d4(void);
|
||||
/*0x00d5*/ bool ai00d5(void);
|
||||
/*0x00d6*/ bool ai00d6(void);
|
||||
/*0x00d7*/ bool ai00d7(void);
|
||||
/*0x00d8*/ bool ai00d8(void);
|
||||
/*0x00d9*/ bool ai00d9(void);
|
||||
/*0x00da*/ bool ai00da(void);
|
||||
/*0x00db*/ bool ai00db(void);
|
||||
/*0x00dc*/ bool ai00dc(void);
|
||||
/*0x00dd*/ bool ai00dd(void);
|
||||
/*0x00de*/ bool ai00de(void);
|
||||
/*0x00df*/ bool ai00df(void);
|
||||
/*0x00e0*/ bool ai00e0(void);
|
||||
/*0x00e1*/ bool ai00e1(void);
|
||||
/*0x00e2*/ bool ai00e2(void);
|
||||
/*0x00e3*/ bool ai00e3(void);
|
||||
/*0x00e4*/ bool ai00e4(void);
|
||||
/*0x00e5*/ bool ai00e5(void);
|
||||
/*0x00e8*/ bool ai00e8(void);
|
||||
/*0x00e9*/ bool ai00e9(void);
|
||||
/*0x00ea*/ bool ai00ea(void);
|
||||
/*0x00eb*/ bool ai00eb(void);
|
||||
/*0x00ec*/ bool ai00ec(void);
|
||||
/*0x00ed*/ bool ai00ed(void);
|
||||
/*0x00ee*/ bool ai00ee(void);
|
||||
/*0x00ef*/ bool ai00ef(void);
|
||||
/*0x00f0*/ bool ai00f0(void);
|
||||
/*0x00f1*/ bool ai00f1(void);
|
||||
/*0x00f2*/ bool ai00f2(void);
|
||||
/*0x00f3*/ bool ai00f3(void);
|
||||
/*0x00f4*/ bool ai00f4(void);
|
||||
/*0x00f5*/ bool ai00f5(void);
|
||||
/*0x00f6*/ bool ai00f6(void);
|
||||
/*0x00f7*/ bool ai00f7(void);
|
||||
/*0x00f8*/ bool ai00f8(void);
|
||||
/*0x00f9*/ bool ai00f9(void);
|
||||
/*0x00fa*/ bool ai00fa(void);
|
||||
/*0x00fb*/ bool ai00fb(void);
|
||||
/*0x00fc*/ bool ai00fc(void);
|
||||
/*0x00fd*/ bool ai00fd(void);
|
||||
/*0x00fe*/ bool ai00fe(void);
|
||||
/*0x00ff*/ bool ai00ff(void);
|
||||
/*0x0100*/ bool ai0100(void);
|
||||
/*0x0101*/ bool ai0101(void);
|
||||
/*0x0102*/ bool ai0102(void);
|
||||
/*0x0103*/ bool ai0103(void);
|
||||
/*0x0104*/ bool ai0104(void);
|
||||
/*0x0105*/ bool ai0105(void);
|
||||
/*0x0106*/ bool ai0106(void);
|
||||
/*0x0107*/ bool ai0107(void);
|
||||
/*0x0108*/ bool ai0108(void);
|
||||
/*0x0109*/ bool ai0109(void);
|
||||
/*0x010a*/ bool ai010a(void);
|
||||
/*0x010b*/ bool ai010b(void);
|
||||
/*0x010c*/ bool ai010c(void);
|
||||
/*0x010d*/ bool ai010d(void);
|
||||
/*0x010e*/ bool ai010e(void);
|
||||
/*0x010f*/ bool ai010f(void);
|
||||
/*0x0110*/ bool ai0110(void);
|
||||
/*0x0111*/ bool ai0111(void);
|
||||
/*0x0112*/ bool ai0112(void);
|
||||
/*0x0113*/ bool ai0113(void);
|
||||
/*0x0114*/ bool ai0114(void);
|
||||
/*0x0115*/ bool ai0115(void);
|
||||
/*0x0116*/ bool ai0116(void);
|
||||
/*0x0117*/ bool ai0117(void);
|
||||
/*0x0118*/ bool ai0118(void);
|
||||
/*0x0119*/ bool ai0119(void);
|
||||
/*0x011a*/ bool ai011a(void);
|
||||
/*0x011b*/ bool ai011b(void);
|
||||
/*0x011c*/ bool ai011c(void);
|
||||
/*0x011d*/ bool ai011d(void);
|
||||
/*0x011e*/ bool ai011e(void);
|
||||
/*0x011f*/ bool ai011f(void);
|
||||
/*0x0120*/ bool ai0120(void);
|
||||
/*0x0121*/ bool ai0121(void);
|
||||
/*0x0122*/ bool ai0122(void);
|
||||
/*0x0123*/ bool ai0123(void);
|
||||
/*0x0124*/ bool ai0124(void);
|
||||
/*0x0125*/ bool ai0125(void);
|
||||
/*0x0126*/ bool ai0126(void);
|
||||
/*0x0127*/ bool ai0127(void);
|
||||
/*0x0128*/ bool ai0128(void);
|
||||
/*0x0129*/ bool ai0129(void);
|
||||
/*0x012a*/ bool ai012a(void);
|
||||
/*0x012b*/ bool ai012b(void);
|
||||
/*0x012c*/ bool ai012c(void);
|
||||
/*0x012f*/ bool ai012f(void);
|
||||
/*0x0130*/ bool ai0130(void);
|
||||
/*0x0131*/ bool ai0131(void);
|
||||
/*0x0132*/ bool ai0132(void);
|
||||
/*0x0133*/ bool ai0133(void);
|
||||
/*0x0134*/ bool ai0134(void);
|
||||
/*0x0135*/ bool ai0135(void);
|
||||
/*0x0136*/ bool ai0136(void);
|
||||
/*0x0137*/ bool ai0137(void);
|
||||
/*0x0138*/ bool ai0138(void);
|
||||
/*0x0139*/ bool ai0139(void);
|
||||
/*0x013a*/ bool ai013a(void);
|
||||
/*0x013b*/ bool ai013b(void);
|
||||
/*0x013c*/ bool ai013c(void);
|
||||
/*0x013d*/ bool ai013d(void);
|
||||
/*0x013e*/ bool ai013e(void);
|
||||
/*0x013f*/ bool ai013f(void);
|
||||
/*0x0140*/ bool ai0140(void);
|
||||
/*0x0141*/ bool ai0141(void);
|
||||
/*0x0142*/ bool ai0142(void);
|
||||
/*0x0143*/ bool ai0143(void);
|
||||
/*0x0144*/ bool ai0144(void);
|
||||
/*0x0145*/ bool ai0145(void);
|
||||
/*0x0146*/ bool ai0146(void);
|
||||
/*0x0147*/ bool ai0147(void);
|
||||
/*0x0148*/ bool ai0148(void);
|
||||
/*0x0149*/ bool ai0149(void);
|
||||
/*0x014a*/ bool ai014a(void);
|
||||
/*0x014b*/ bool ai014b(void);
|
||||
/*0x0152*/ bool ai0152(void);
|
||||
/*0x0157*/ bool ai0157(void);
|
||||
/*0x015b*/ bool ai015b(void);
|
||||
/*0x015c*/ bool ai015c(void);
|
||||
/*0x0165*/ bool ai0165(void);
|
||||
/*0x0166*/ bool ai0166(void);
|
||||
/*0x0167*/ bool ai0167(void);
|
||||
/*0x0168*/ bool ai0168(void);
|
||||
/*0x0169*/ bool ai0169(void);
|
||||
/*0x016a*/ bool ai016a(void);
|
||||
/*0x016b*/ bool ai016b(void);
|
||||
/*0x016c*/ bool ai016c(void);
|
||||
/*0x016d*/ bool ai016d(void);
|
||||
/*0x016e*/ bool ai016e(void);
|
||||
/*0x016f*/ bool ai016f(void);
|
||||
/*0x0170*/ bool ai0170(void);
|
||||
/*0x0171*/ bool ai0171(void);
|
||||
/*0x0172*/ bool ai0172(void);
|
||||
/*0x0173*/ bool ai0173(void);
|
||||
/*0x0174*/ bool ai0174(void);
|
||||
/*0x0175*/ bool ai0175(void);
|
||||
/*0x0176*/ bool ai0176(void);
|
||||
/*0x0177*/ bool ai0177(void);
|
||||
/*0x0178*/ bool ai0178(void);
|
||||
/*0x0179*/ bool ai0179(void);
|
||||
/*0x017a*/ bool ai017a(void);
|
||||
/*0x017b*/ bool ai017b(void);
|
||||
/*0x017c*/ bool ai017c(void);
|
||||
/*0x017d*/ bool ai017d(void);
|
||||
/*0x017e*/ bool ai017e(void);
|
||||
/*0x017f*/ bool ai017f(void);
|
||||
/*0x0180*/ bool ai0180(void);
|
||||
/*0x0181*/ bool ai0181(void);
|
||||
/*0x0182*/ bool ai0182(void);
|
||||
/*0x0183*/ bool ai0183(void);
|
||||
/*0x0184*/ bool ai0184(void);
|
||||
/*0x0185*/ bool ai0185(void);
|
||||
/*0x0186*/ bool ai0186(void);
|
||||
/*0x0187*/ bool ai0187(void);
|
||||
/*0x0188*/ bool ai0188(void);
|
||||
/*0x0189*/ bool ai0189(void);
|
||||
/*0x018a*/ bool ai018a(void);
|
||||
/*0x018b*/ bool ai018b(void);
|
||||
/*0x018c*/ bool ai018c(void);
|
||||
/*0x018d*/ bool ai018d(void);
|
||||
/*0x018e*/ bool ai018e(void);
|
||||
/*0x018f*/ bool ai018f(void);
|
||||
/*0x0190*/ bool ai0190(void);
|
||||
/*0x0191*/ bool ai0191(void);
|
||||
/*0x0192*/ bool ai0192(void);
|
||||
/*0x0193*/ bool ai0193(void);
|
||||
/*0x019e*/ bool ai019e(void);
|
||||
/*0x019f*/ bool ai019f(void);
|
||||
/*0x01a0*/ bool ai01a0(void);
|
||||
/*0x01a1*/ bool ai01a1(void);
|
||||
/*0x01a2*/ bool ai01a2(void);
|
||||
/*0x01a3*/ bool ai01a3(void);
|
||||
/*0x01a4*/ bool ai01a4(void);
|
||||
/*0x01a5*/ bool ai01a5(void);
|
||||
/*0x01a6*/ bool ai01a6(void);
|
||||
/*0x01a7*/ bool ai01a7(void);
|
||||
/*0x01aa*/ bool ai01aa(void);
|
||||
/*0x01ab*/ bool ai01ab(void);
|
||||
/*0x01ad*/ bool ai01ad(void);
|
||||
/*0x01ae*/ bool ai01ae(void);
|
||||
/*0x01af*/ bool ai01af(void);
|
||||
/*0x01b1*/ bool ai01b1(void);
|
||||
/*0x01b2*/ bool ai01b2(void);
|
||||
/*0x01b3*/ bool ai01b3(void);
|
||||
/*0x01b4*/ bool ai01b4(void);
|
||||
/*0x01b5*/ bool ai01b5(void);
|
||||
/*0x01b6*/ bool ai01b6(void);
|
||||
/*0x01b7*/ bool ai01b7(void);
|
||||
/*0x01b8*/ bool ai01b8(void);
|
||||
/*0x01b9*/ bool ai01b9(void);
|
||||
/*0x01ba*/ bool ai01ba(void);
|
||||
/*0x01bb*/ bool ai01bb(void);
|
||||
/*0x01bc*/ bool ai01bc(void);
|
||||
/*0x01bd*/ bool ai01bd(void);
|
||||
/*0x01be*/ bool ai01be(void);
|
||||
/*0x01bf*/ bool ai01bf(void);
|
||||
/*0x01c0*/ bool ai01c0(void);
|
||||
/*0x01c1*/ bool aiSetPunchDodgeList(void);
|
||||
/*0x01c2*/ bool aiSetShootingAtMeList(void);
|
||||
/*0x01c3*/ bool aiSetDarkRoomList(void);
|
||||
/*0x01c4*/ bool aiSetPlayerDeadList(void);
|
||||
/*0x01c5*/ bool ai01c5(void);
|
||||
/*0x01c6*/ bool ai01c6(void);
|
||||
/*0x01c7*/ bool ai01c7(void);
|
||||
/*0x01c8*/ bool ai01c8(void);
|
||||
/*0x01c9*/ bool ai01c9(void);
|
||||
/*0x01ca*/ bool ai01ca(void);
|
||||
/*0x01cb*/ bool ai01cb(void);
|
||||
/*0x01cc*/ bool ai01cc(void);
|
||||
/*0x01cd*/ bool ai01cd(void);
|
||||
/*0x01ce*/ bool ai01ce(void);
|
||||
/*0x01cf*/ bool ai01cf(void);
|
||||
/*0x01d0*/ bool ai01d0(void);
|
||||
/*0x01d1*/ bool ai01d1(void);
|
||||
/*0x01d2*/ bool ai01d2(void);
|
||||
/*0x01d3*/ bool ai01d3(void);
|
||||
/*0x01d4*/ bool ai01d4(void);
|
||||
/*0x01d5*/ bool ai01d5(void);
|
||||
/*0x01d6*/ bool ai01d6(void);
|
||||
/*0x01d7*/ bool ai01d7(void);
|
||||
/*0x01d8*/ bool ai01d8(void);
|
||||
/*0x01d9*/ bool ai01d9(void);
|
||||
/*0x01da*/ bool ai01da(void);
|
||||
/*0x01db*/ bool ai01db(void);
|
||||
/*0x01dc*/ bool ai01dc(void);
|
||||
/*0x01dd*/ bool ai01dd(void);
|
||||
/*0x01de*/ bool ai01de(void);
|
||||
/*0x01df*/ bool ai01df(void);
|
||||
/*0x01e0*/ bool ai01e0(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _IN_GAME_000000_H
|
||||
#define _IN_GAME_000000_H
|
||||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
|
||||
struct chrdata *chrFindById(struct chrdata *data, u8 chrnum);
|
||||
|
||||
#endif
|
||||
@@ -1,449 +1,7 @@
|
||||
#ifndef _IN_GAME_H
|
||||
#define _IN_GAME_H
|
||||
#ifndef _IN_GAME_0601B0_H
|
||||
#define _IN_GAME_0601B0_H
|
||||
#include <ultra64.h>
|
||||
#include "src/include/constants.h"
|
||||
|
||||
/*0x0000*/ bool aiGoToNext(void);
|
||||
/*0x0001*/ bool aiGoToFirst(void);
|
||||
/*0x0002*/ bool aiLabel(void);
|
||||
/*0x0003*/ bool aiYield(void);
|
||||
/*0x0004*/ bool aiEndList(void);
|
||||
/*0x0005*/ bool aiSetList(void);
|
||||
/*0x0006*/ bool aiSetReturnList(void);
|
||||
/*0x0007*/ bool ai0007(void);
|
||||
/*0x0008*/ bool aiReturn(void);
|
||||
/*0x0009*/ bool aiStop(void);
|
||||
/*0x000a*/ bool aiKneel(void);
|
||||
/*0x000b*/ bool ai000b(void);
|
||||
/*0x000c*/ bool ai000c(void);
|
||||
/*0x000d*/ bool ai000d(void);
|
||||
/*0x000e*/ bool ai000e(void);
|
||||
/*0x000f*/ bool ai000f(void);
|
||||
/*0x0010*/ bool ai0010(void);
|
||||
/*0x0011*/ bool ai0011(void);
|
||||
/*0x0012*/ bool ai0012(void);
|
||||
/*0x0013*/ bool ai0013(void);
|
||||
/*0x0014*/ bool ai0014(void);
|
||||
/*0x0015*/ bool ai0015(void);
|
||||
/*0x0016*/ bool ai0016(void);
|
||||
/*0x0017*/ bool ai0017(void);
|
||||
/*0x0018*/ bool ai0018(void);
|
||||
/*0x0019*/ bool ai0019(void);
|
||||
/*0x001a*/ bool ai001a(void);
|
||||
/*0x001b*/ bool ai001b(void);
|
||||
/*0x001c*/ bool ai001c(void);
|
||||
/*0x001d*/ bool ai001d(void);
|
||||
/*0x001e*/ bool ai001e(void);
|
||||
/*0x001f*/ bool ai001f(void);
|
||||
/*0x0020*/ bool ai0020(void);
|
||||
/*0x0021*/ bool ai0021(void);
|
||||
/*0x0022*/ bool ai0022(void);
|
||||
/*0x0023*/ bool ai0023(void);
|
||||
/*0x0024*/ bool ai0024(void);
|
||||
/*0x0025*/ bool ai0025(void);
|
||||
/*0x0026*/ bool ai0026(void);
|
||||
/*0x0027*/ bool ai0027(void);
|
||||
/*0x0028*/ bool ai0028(void);
|
||||
/*0x0029*/ bool ai0029(void);
|
||||
/*0x002a*/ bool ai002a(void);
|
||||
/*0x002b*/ bool ai002b(void);
|
||||
/*0x002c*/ bool ai002c(void);
|
||||
/*0x002d*/ bool ai002d(void);
|
||||
/*0x002e*/ bool ai002e(void);
|
||||
/*0x002f*/ bool ai002f(void);
|
||||
/*0x0030*/ bool ai0030(void);
|
||||
/*0x0031*/ bool ai0031(void);
|
||||
/*0x0032*/ bool ai0032(void);
|
||||
/*0x0033*/ bool ai0033(void);
|
||||
/*0x0034*/ bool ai0034(void);
|
||||
/*0x0035*/ bool ai0035(void);
|
||||
/*0x0036*/ bool ai0036(void);
|
||||
/*0x0037*/ bool ai0037(void);
|
||||
/*0x0038*/ bool ai0038(void);
|
||||
/*0x0039*/ bool ai0039(void);
|
||||
/*0x003a*/ bool ai003a(void);
|
||||
/*0x003b*/ bool ai003b(void);
|
||||
/*0x003c*/ bool ai003c(void);
|
||||
/*0x003d*/ bool ai003d(void);
|
||||
/*0x003e*/ bool ai003e(void);
|
||||
/*0x003f*/ bool ai003f(void);
|
||||
/*0x0040*/ bool ai0040(void);
|
||||
/*0x0041*/ bool ai0041(void);
|
||||
/*0x0042*/ bool ai0042(void);
|
||||
/*0x0043*/ bool ai0043(void);
|
||||
/*0x0044*/ bool ai0044(void);
|
||||
/*0x0045*/ bool ai0045(void);
|
||||
/*0x0046*/ bool ai0046(void);
|
||||
/*0x0047*/ bool ai0047(void);
|
||||
/*0x0048*/ bool ai0048(void);
|
||||
/*0x0049*/ bool ai0049(void);
|
||||
/*0x004a*/ bool ai004a(void);
|
||||
/*0x004b*/ bool ai004b(void);
|
||||
/*0x004c*/ bool ai004c(void);
|
||||
/*0x004d*/ bool ai004d(void);
|
||||
/*0x004e*/ bool ai004e(void);
|
||||
/*0x004f*/ bool ai004f(void);
|
||||
/*0x0050*/ bool ai0050(void);
|
||||
/*0x0051*/ bool ai0051(void);
|
||||
/*0x0052*/ bool ai0052(void);
|
||||
/*0x0053*/ bool ai0053(void);
|
||||
/*0x0054*/ bool ai0054(void);
|
||||
/*0x0055*/ bool ai0055(void);
|
||||
/*0x0056*/ bool ai0056(void);
|
||||
/*0x0057*/ bool ai0057(void);
|
||||
/*0x0058*/ bool ai0058(void);
|
||||
/*0x0059*/ bool ai0059(void);
|
||||
/*0x005a*/ bool ai005a(void);
|
||||
/*0x005b*/ bool ai005b(void);
|
||||
/*0x005c*/ bool ai005c(void);
|
||||
/*0x005d*/ bool ai005d(void);
|
||||
/*0x005e*/ bool ai005e(void);
|
||||
/*0x005f*/ bool ai005f(void);
|
||||
/*0x0060*/ bool ai0060(void);
|
||||
/*0x0061*/ bool ai0061(void);
|
||||
/*0x0062*/ bool ai0062(void);
|
||||
/*0x0063*/ bool ai0063(void);
|
||||
/*0x0065*/ bool ai0065(void);
|
||||
/*0x0066*/ bool ai0066(void);
|
||||
/*0x0067*/ bool ai0067(void);
|
||||
/*0x0068*/ bool ai0068(void);
|
||||
/*0x0069*/ bool ai0069(void);
|
||||
/*0x006a*/ bool ai006a(void);
|
||||
/*0x006b*/ bool ai006b(void);
|
||||
/*0x006c*/ bool ai006c(void);
|
||||
/*0x006d*/ bool ai006d(void);
|
||||
/*0x006e*/ bool ai006e(void);
|
||||
/*0x006f*/ bool ai006f(void);
|
||||
/*0x0070*/ bool ai0070(void);
|
||||
/*0x0071*/ bool ai0071(void);
|
||||
/*0x0072*/ bool ai0072(void);
|
||||
/*0x0073*/ bool ai0073(void);
|
||||
/*0x0074*/ bool ai0074(void);
|
||||
/*0x0075*/ bool ai0075(void);
|
||||
/*0x0076*/ bool ai0076(void);
|
||||
/*0x0077*/ bool ai0077(void);
|
||||
/*0x0078*/ bool ai0078(void);
|
||||
/*0x0079*/ bool ai0079(void);
|
||||
/*0x007a*/ bool ai007a(void);
|
||||
/*0x007b*/ bool ai007b(void);
|
||||
/*0x007c*/ bool ai007c(void);
|
||||
/*0x007d*/ bool ai007d(void);
|
||||
/*0x007e*/ bool ai007e(void);
|
||||
/*0x007f*/ bool ai007f(void);
|
||||
/*0x0080*/ bool ai0080(void);
|
||||
/*0x0081*/ bool ai0081(void);
|
||||
/*0x0082*/ bool ai0082(void);
|
||||
/*0x0083*/ bool ai0083(void);
|
||||
/*0x0084*/ bool ai0084(void);
|
||||
/*0x0085*/ bool ai0085(void);
|
||||
/*0x0086*/ bool ai0086(void);
|
||||
/*0x0087*/ bool ai0087(void);
|
||||
/*0x0088*/ bool ai0088(void);
|
||||
/*0x0089*/ bool ai0089(void);
|
||||
/*0x008a*/ bool ai008a(void);
|
||||
/*0x008b*/ bool ai008b(void);
|
||||
/*0x008c*/ bool ai008c(void);
|
||||
/*0x008d*/ bool ai008d(void);
|
||||
/*0x008e*/ bool ai008e(void);
|
||||
/*0x008f*/ bool ai008f(void);
|
||||
/*0x0090*/ bool ai0090(void);
|
||||
/*0x0091*/ bool ai0091(void);
|
||||
/*0x0092*/ bool ai0092(void);
|
||||
/*0x0093*/ bool ai0093(void);
|
||||
/*0x0094*/ bool ai0094(void);
|
||||
/*0x0095*/ bool ai0095(void);
|
||||
/*0x0096*/ bool ai0096(void);
|
||||
/*0x0097*/ bool ai0097(void);
|
||||
/*0x0098*/ bool ai0098(void);
|
||||
/*0x0099*/ bool ai0099(void);
|
||||
/*0x009a*/ bool ai009a(void);
|
||||
/*0x009b*/ bool ai009b(void);
|
||||
/*0x009c*/ bool ai009c(void);
|
||||
/*0x009d*/ bool ai009d(void);
|
||||
/*0x009e*/ bool ai009e(void);
|
||||
/*0x009f*/ bool ai009f(void);
|
||||
/*0x00a0*/ bool ai00a0(void);
|
||||
/*0x00a1*/ bool ai00a1(void);
|
||||
/*0x00a2*/ bool ai00a2(void);
|
||||
/*0x00a3*/ bool ai00a3(void);
|
||||
/*0x00a4*/ bool ai00a4(void);
|
||||
/*0x00a5*/ bool ai00a5(void);
|
||||
/*0x00a6*/ bool ai00a6(void);
|
||||
/*0x00a7*/ bool ai00a7(void);
|
||||
/*0x00a8*/ bool ai00a8(void);
|
||||
/*0x00a9*/ bool ai00a9(void);
|
||||
/*0x00aa*/ bool ai00aa(void);
|
||||
/*0x00ab*/ bool ai00ab(void);
|
||||
/*0x00ac*/ bool ai00ac(void);
|
||||
/*0x00ad*/ bool ai00ad(void);
|
||||
/*0x00ae*/ bool ai00ae(void);
|
||||
/*0x00af*/ bool ai00af(void);
|
||||
/*0x00b0*/ bool ai00b0(void);
|
||||
/*0x00b1*/ bool ai00b1(void);
|
||||
/*0x00b2*/ bool ai00b2(void);
|
||||
/*0x00b3*/ bool ai00b3(void);
|
||||
/*0x00b4*/ bool ai00b4(void);
|
||||
/*0x00b5*/ bool ai00b5(void);
|
||||
/*0x00b6*/ bool ai00b6(void);
|
||||
/*0x00b7*/ bool ai00b7(void);
|
||||
/*0x00b8*/ bool ai00b8(void);
|
||||
/*0x00b9*/ bool ai00b9(void);
|
||||
/*0x00ba*/ bool ai00ba(void);
|
||||
/*0x00bb*/ bool ai00bb(void);
|
||||
/*0x00bc*/ bool ai00bc(void);
|
||||
/*0x00bd*/ bool ai00bd(void);
|
||||
/*0x00be*/ bool ai00be(void);
|
||||
/*0x00bf*/ bool ai00bf(void);
|
||||
/*0x00c0*/ bool ai00c0(void);
|
||||
/*0x00c1*/ bool ai00c1(void);
|
||||
/*0x00c2*/ bool ai00c2(void);
|
||||
/*0x00c3*/ bool ai00c3(void);
|
||||
/*0x00c4*/ bool ai00c4(void);
|
||||
/*0x00c5*/ bool ai00c5(void);
|
||||
/*0x00c6*/ bool ai00c6(void);
|
||||
/*0x00c7*/ bool ai00c7(void);
|
||||
/*0x00c8*/ bool ai00c8(void);
|
||||
/*0x00c9*/ bool ai00c9(void);
|
||||
/*0x00ca*/ bool ai00ca(void);
|
||||
/*0x00cb*/ bool ai00cb(void);
|
||||
/*0x00cc*/ bool ai00cc(void);
|
||||
/*0x00cd*/ bool ai00cd(void);
|
||||
/*0x00ce*/ bool ai00ce(void);
|
||||
/*0x00cf*/ bool ai00cf(void);
|
||||
/*0x00d0*/ bool ai00d0(void);
|
||||
/*0x00d1*/ bool ai00d1(void);
|
||||
/*0x00d2*/ bool ai00d2(void);
|
||||
/*0x00d3*/ bool ai00d3(void);
|
||||
/*0x00d4*/ bool ai00d4(void);
|
||||
/*0x00d5*/ bool ai00d5(void);
|
||||
/*0x00d6*/ bool ai00d6(void);
|
||||
/*0x00d7*/ bool ai00d7(void);
|
||||
/*0x00d8*/ bool ai00d8(void);
|
||||
/*0x00d9*/ bool ai00d9(void);
|
||||
/*0x00da*/ bool ai00da(void);
|
||||
/*0x00db*/ bool ai00db(void);
|
||||
/*0x00dc*/ bool ai00dc(void);
|
||||
/*0x00dd*/ bool ai00dd(void);
|
||||
/*0x00de*/ bool ai00de(void);
|
||||
/*0x00df*/ bool ai00df(void);
|
||||
/*0x00e0*/ bool ai00e0(void);
|
||||
/*0x00e1*/ bool ai00e1(void);
|
||||
/*0x00e2*/ bool ai00e2(void);
|
||||
/*0x00e3*/ bool ai00e3(void);
|
||||
/*0x00e4*/ bool ai00e4(void);
|
||||
/*0x00e5*/ bool ai00e5(void);
|
||||
/*0x00e8*/ bool ai00e8(void);
|
||||
/*0x00e9*/ bool ai00e9(void);
|
||||
/*0x00ea*/ bool ai00ea(void);
|
||||
/*0x00eb*/ bool ai00eb(void);
|
||||
/*0x00ec*/ bool ai00ec(void);
|
||||
/*0x00ed*/ bool ai00ed(void);
|
||||
/*0x00ee*/ bool ai00ee(void);
|
||||
/*0x00ef*/ bool ai00ef(void);
|
||||
/*0x00f0*/ bool ai00f0(void);
|
||||
/*0x00f1*/ bool ai00f1(void);
|
||||
/*0x00f2*/ bool ai00f2(void);
|
||||
/*0x00f3*/ bool ai00f3(void);
|
||||
/*0x00f4*/ bool ai00f4(void);
|
||||
/*0x00f5*/ bool ai00f5(void);
|
||||
/*0x00f6*/ bool ai00f6(void);
|
||||
/*0x00f7*/ bool ai00f7(void);
|
||||
/*0x00f8*/ bool ai00f8(void);
|
||||
/*0x00f9*/ bool ai00f9(void);
|
||||
/*0x00fa*/ bool ai00fa(void);
|
||||
/*0x00fb*/ bool ai00fb(void);
|
||||
/*0x00fc*/ bool ai00fc(void);
|
||||
/*0x00fd*/ bool ai00fd(void);
|
||||
/*0x00fe*/ bool ai00fe(void);
|
||||
/*0x00ff*/ bool ai00ff(void);
|
||||
/*0x0100*/ bool ai0100(void);
|
||||
/*0x0101*/ bool ai0101(void);
|
||||
/*0x0102*/ bool ai0102(void);
|
||||
/*0x0103*/ bool ai0103(void);
|
||||
/*0x0104*/ bool ai0104(void);
|
||||
/*0x0105*/ bool ai0105(void);
|
||||
/*0x0106*/ bool ai0106(void);
|
||||
/*0x0107*/ bool ai0107(void);
|
||||
/*0x0108*/ bool ai0108(void);
|
||||
/*0x0109*/ bool ai0109(void);
|
||||
/*0x010a*/ bool ai010a(void);
|
||||
/*0x010b*/ bool ai010b(void);
|
||||
/*0x010c*/ bool ai010c(void);
|
||||
/*0x010d*/ bool ai010d(void);
|
||||
/*0x010e*/ bool ai010e(void);
|
||||
/*0x010f*/ bool ai010f(void);
|
||||
/*0x0110*/ bool ai0110(void);
|
||||
/*0x0111*/ bool ai0111(void);
|
||||
/*0x0112*/ bool ai0112(void);
|
||||
/*0x0113*/ bool ai0113(void);
|
||||
/*0x0114*/ bool ai0114(void);
|
||||
/*0x0115*/ bool ai0115(void);
|
||||
/*0x0116*/ bool ai0116(void);
|
||||
/*0x0117*/ bool ai0117(void);
|
||||
/*0x0118*/ bool ai0118(void);
|
||||
/*0x0119*/ bool ai0119(void);
|
||||
/*0x011a*/ bool ai011a(void);
|
||||
/*0x011b*/ bool ai011b(void);
|
||||
/*0x011c*/ bool ai011c(void);
|
||||
/*0x011d*/ bool ai011d(void);
|
||||
/*0x011e*/ bool ai011e(void);
|
||||
/*0x011f*/ bool ai011f(void);
|
||||
/*0x0120*/ bool ai0120(void);
|
||||
/*0x0121*/ bool ai0121(void);
|
||||
/*0x0122*/ bool ai0122(void);
|
||||
/*0x0123*/ bool ai0123(void);
|
||||
/*0x0124*/ bool ai0124(void);
|
||||
/*0x0125*/ bool ai0125(void);
|
||||
/*0x0126*/ bool ai0126(void);
|
||||
/*0x0127*/ bool ai0127(void);
|
||||
/*0x0128*/ bool ai0128(void);
|
||||
/*0x0129*/ bool ai0129(void);
|
||||
/*0x012a*/ bool ai012a(void);
|
||||
/*0x012b*/ bool ai012b(void);
|
||||
/*0x012c*/ bool ai012c(void);
|
||||
/*0x012f*/ bool ai012f(void);
|
||||
/*0x0130*/ bool ai0130(void);
|
||||
/*0x0131*/ bool ai0131(void);
|
||||
/*0x0132*/ bool ai0132(void);
|
||||
/*0x0133*/ bool ai0133(void);
|
||||
/*0x0134*/ bool ai0134(void);
|
||||
/*0x0135*/ bool ai0135(void);
|
||||
/*0x0136*/ bool ai0136(void);
|
||||
/*0x0137*/ bool ai0137(void);
|
||||
/*0x0138*/ bool ai0138(void);
|
||||
/*0x0139*/ bool ai0139(void);
|
||||
/*0x013a*/ bool ai013a(void);
|
||||
/*0x013b*/ bool ai013b(void);
|
||||
/*0x013c*/ bool ai013c(void);
|
||||
/*0x013d*/ bool ai013d(void);
|
||||
/*0x013e*/ bool ai013e(void);
|
||||
/*0x013f*/ bool ai013f(void);
|
||||
/*0x0140*/ bool ai0140(void);
|
||||
/*0x0141*/ bool ai0141(void);
|
||||
/*0x0142*/ bool ai0142(void);
|
||||
/*0x0143*/ bool ai0143(void);
|
||||
/*0x0144*/ bool ai0144(void);
|
||||
/*0x0145*/ bool ai0145(void);
|
||||
/*0x0146*/ bool ai0146(void);
|
||||
/*0x0147*/ bool ai0147(void);
|
||||
/*0x0148*/ bool ai0148(void);
|
||||
/*0x0149*/ bool ai0149(void);
|
||||
/*0x014a*/ bool ai014a(void);
|
||||
/*0x014b*/ bool ai014b(void);
|
||||
/*0x0152*/ bool ai0152(void);
|
||||
/*0x0157*/ bool ai0157(void);
|
||||
/*0x015b*/ bool ai015b(void);
|
||||
/*0x015c*/ bool ai015c(void);
|
||||
/*0x0165*/ bool ai0165(void);
|
||||
/*0x0166*/ bool ai0166(void);
|
||||
/*0x0167*/ bool ai0167(void);
|
||||
/*0x0168*/ bool ai0168(void);
|
||||
/*0x0169*/ bool ai0169(void);
|
||||
/*0x016a*/ bool ai016a(void);
|
||||
/*0x016b*/ bool ai016b(void);
|
||||
/*0x016c*/ bool ai016c(void);
|
||||
/*0x016d*/ bool ai016d(void);
|
||||
/*0x016e*/ bool ai016e(void);
|
||||
/*0x016f*/ bool ai016f(void);
|
||||
/*0x0170*/ bool ai0170(void);
|
||||
/*0x0171*/ bool ai0171(void);
|
||||
/*0x0172*/ bool ai0172(void);
|
||||
/*0x0173*/ bool ai0173(void);
|
||||
/*0x0174*/ bool ai0174(void);
|
||||
/*0x0175*/ bool ai0175(void);
|
||||
/*0x0176*/ bool ai0176(void);
|
||||
/*0x0177*/ bool ai0177(void);
|
||||
/*0x0178*/ bool ai0178(void);
|
||||
/*0x0179*/ bool ai0179(void);
|
||||
/*0x017a*/ bool ai017a(void);
|
||||
/*0x017b*/ bool ai017b(void);
|
||||
/*0x017c*/ bool ai017c(void);
|
||||
/*0x017d*/ bool ai017d(void);
|
||||
/*0x017e*/ bool ai017e(void);
|
||||
/*0x017f*/ bool ai017f(void);
|
||||
/*0x0180*/ bool ai0180(void);
|
||||
/*0x0181*/ bool ai0181(void);
|
||||
/*0x0182*/ bool ai0182(void);
|
||||
/*0x0183*/ bool ai0183(void);
|
||||
/*0x0184*/ bool ai0184(void);
|
||||
/*0x0185*/ bool ai0185(void);
|
||||
/*0x0186*/ bool ai0186(void);
|
||||
/*0x0187*/ bool ai0187(void);
|
||||
/*0x0188*/ bool ai0188(void);
|
||||
/*0x0189*/ bool ai0189(void);
|
||||
/*0x018a*/ bool ai018a(void);
|
||||
/*0x018b*/ bool ai018b(void);
|
||||
/*0x018c*/ bool ai018c(void);
|
||||
/*0x018d*/ bool ai018d(void);
|
||||
/*0x018e*/ bool ai018e(void);
|
||||
/*0x018f*/ bool ai018f(void);
|
||||
/*0x0190*/ bool ai0190(void);
|
||||
/*0x0191*/ bool ai0191(void);
|
||||
/*0x0192*/ bool ai0192(void);
|
||||
/*0x0193*/ bool ai0193(void);
|
||||
/*0x019e*/ bool ai019e(void);
|
||||
/*0x019f*/ bool ai019f(void);
|
||||
/*0x01a0*/ bool ai01a0(void);
|
||||
/*0x01a1*/ bool ai01a1(void);
|
||||
/*0x01a2*/ bool ai01a2(void);
|
||||
/*0x01a3*/ bool ai01a3(void);
|
||||
/*0x01a4*/ bool ai01a4(void);
|
||||
/*0x01a5*/ bool ai01a5(void);
|
||||
/*0x01a6*/ bool ai01a6(void);
|
||||
/*0x01a7*/ bool ai01a7(void);
|
||||
/*0x01aa*/ bool ai01aa(void);
|
||||
/*0x01ab*/ bool ai01ab(void);
|
||||
/*0x01ad*/ bool ai01ad(void);
|
||||
/*0x01ae*/ bool ai01ae(void);
|
||||
/*0x01af*/ bool ai01af(void);
|
||||
/*0x01b1*/ bool ai01b1(void);
|
||||
/*0x01b2*/ bool ai01b2(void);
|
||||
/*0x01b3*/ bool ai01b3(void);
|
||||
/*0x01b4*/ bool ai01b4(void);
|
||||
/*0x01b5*/ bool ai01b5(void);
|
||||
/*0x01b6*/ bool ai01b6(void);
|
||||
/*0x01b7*/ bool ai01b7(void);
|
||||
/*0x01b8*/ bool ai01b8(void);
|
||||
/*0x01b9*/ bool ai01b9(void);
|
||||
/*0x01ba*/ bool ai01ba(void);
|
||||
/*0x01bb*/ bool ai01bb(void);
|
||||
/*0x01bc*/ bool ai01bc(void);
|
||||
/*0x01bd*/ bool ai01bd(void);
|
||||
/*0x01be*/ bool ai01be(void);
|
||||
/*0x01bf*/ bool ai01bf(void);
|
||||
/*0x01c0*/ bool ai01c0(void);
|
||||
/*0x01c1*/ bool aiSetPunchDodgeList(void);
|
||||
/*0x01c2*/ bool aiSetShootingAtMeList(void);
|
||||
/*0x01c3*/ bool aiSetDarkRoomList(void);
|
||||
/*0x01c4*/ bool aiSetPlayerDeadList(void);
|
||||
/*0x01c5*/ bool ai01c5(void);
|
||||
/*0x01c6*/ bool ai01c6(void);
|
||||
/*0x01c7*/ bool ai01c7(void);
|
||||
/*0x01c8*/ bool ai01c8(void);
|
||||
/*0x01c9*/ bool ai01c9(void);
|
||||
/*0x01ca*/ bool ai01ca(void);
|
||||
/*0x01cb*/ bool ai01cb(void);
|
||||
/*0x01cc*/ bool ai01cc(void);
|
||||
/*0x01cd*/ bool ai01cd(void);
|
||||
/*0x01ce*/ bool ai01ce(void);
|
||||
/*0x01cf*/ bool ai01cf(void);
|
||||
/*0x01d0*/ bool ai01d0(void);
|
||||
/*0x01d1*/ bool ai01d1(void);
|
||||
/*0x01d2*/ bool ai01d2(void);
|
||||
/*0x01d3*/ bool ai01d3(void);
|
||||
/*0x01d4*/ bool ai01d4(void);
|
||||
/*0x01d5*/ bool ai01d5(void);
|
||||
/*0x01d6*/ bool ai01d6(void);
|
||||
/*0x01d7*/ bool ai01d7(void);
|
||||
/*0x01d8*/ bool ai01d8(void);
|
||||
/*0x01d9*/ bool ai01d9(void);
|
||||
/*0x01da*/ bool ai01da(void);
|
||||
/*0x01db*/ bool ai01db(void);
|
||||
/*0x01dc*/ bool ai01dc(void);
|
||||
/*0x01dd*/ bool ai01dd(void);
|
||||
/*0x01de*/ bool ai01de(void);
|
||||
/*0x01df*/ bool ai01df(void);
|
||||
/*0x01e0*/ bool ai01e0(void);
|
||||
#include "constants.h"
|
||||
|
||||
void menudialog000fcd48(void);
|
||||
void menudialog000fcd48(void);
|
||||
@@ -996,6 +554,4 @@ u32 menuhandler001a6a70(u32, u32, u32);
|
||||
u32 menuhandler001a6ea4(u32, u32, u32);
|
||||
u32 menuhandler001a6d4c(u32, u32, u32);
|
||||
|
||||
struct chrdata *chrFindById(struct chrdata *data, u8 chrnum);
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "ultra64.h"
|
||||
#include "src/include/types.h"
|
||||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
struct g_vars {
|
||||
// Known member names based on debug strings:
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "ultra64.h"
|
||||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "commands.h"
|
||||
#include "intro.h"
|
||||
|
||||
+4
-3
@@ -1,9 +1,10 @@
|
||||
#ifndef _IN_TYPES_H
|
||||
#define _IN_TYPES_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
|
||||
#define bool u8
|
||||
|
||||
struct coord {
|
||||
float x;
|
||||
float y;
|
||||
@@ -25,7 +26,7 @@ struct chrdata {
|
||||
/*0x003*/ u8 speedrating;
|
||||
/*0x004*/ u16 firecount;
|
||||
/*0x006*/ u8 headnum;
|
||||
/*0x007*/ u8 actiontype;
|
||||
/*0x007*/ s8 actiontype;
|
||||
/*0x008*/ u8 sleep;
|
||||
/*0x009*/ u8 invalidmove;
|
||||
/*0x00a*/ u8 numclosearghs;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef _ULTRA64_H_
|
||||
#define _ULTRA64_H_
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <ultra64/types.h>
|
||||
#include <ultra64/interrupt.h>
|
||||
#include <ultra64/os_misc.h>
|
||||
#include <ultra64/rdp.h>
|
||||
#include <ultra64/thread.h>
|
||||
#include <ultra64/time.h>
|
||||
#include <ultra64/message.h>
|
||||
#include <ultra64/os_cont.h>
|
||||
#include <ultra64/tlb.h>
|
||||
#include <ultra64/sptask.h>
|
||||
#include <ultra64/ucode.h>
|
||||
#include <ultra64/cache.h>
|
||||
#include <ultra64/vi.h>
|
||||
#include <ultra64/pi.h>
|
||||
#include <ultra64/os_internal.h>
|
||||
#include <ultra64/gbi.h>
|
||||
#include <ultra64/eeprom.h>
|
||||
#include <ultra64/libc.h>
|
||||
#include <ultra64/gu.h>
|
||||
#include <ultra64/os_ai.h>
|
||||
#include <ultra64/libaudio.h>
|
||||
#include <ultra64/libultra.h>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef _ULTRA64_CACHE_H_
|
||||
#define _ULTRA64_CACHE_H_
|
||||
|
||||
/* Functions */
|
||||
|
||||
void osInvalICache(void *vaddr, s32 nbytes);
|
||||
void osInvalDCache(void *vaddr, s32 nbytes);
|
||||
void osWritebackDCache(void *vaddr, s32 nbytes);
|
||||
void osWritebackDCacheAll(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef _ULTRA64_EEPROM_H_
|
||||
#define _ULTRA64_EEPROM_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u16 unk00;
|
||||
u16 unk01;
|
||||
} OSEepromUnknownStruct0;
|
||||
|
||||
/* Functions */
|
||||
|
||||
s32 osEepromLongRead(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
|
||||
s32 osEepromLongWrite(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
|
||||
s32 osEepromWrite(OSMesgQueue *mq, u8 address, u8 *buffer);
|
||||
s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer);
|
||||
s32 osEepromProbe(OSMesgQueue *mq);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,736 @@
|
||||
#ifndef _ULTRA64_GBI_H_
|
||||
#define _ULTRA64_GBI_H_
|
||||
|
||||
/* Types */
|
||||
|
||||
/* Vertex (set up for use with colors) */
|
||||
typedef struct
|
||||
{
|
||||
short ob[3]; /* x, y, z */
|
||||
unsigned short flag;
|
||||
short tc[2]; /* texture coord */
|
||||
unsigned char cn[4]; /* color & alpha */
|
||||
} Vtx_t;
|
||||
|
||||
/* Vertex (set up for use with normals) */
|
||||
typedef struct
|
||||
{
|
||||
short ob[3]; /* x, y, z */
|
||||
unsigned short flag;
|
||||
short tc[2]; /* texture coord */
|
||||
signed char n[3]; /* normal */
|
||||
unsigned char a; /* alpha */
|
||||
} Vtx_tn;
|
||||
|
||||
typedef union
|
||||
{
|
||||
Vtx_t v; /* Use this one for colors */
|
||||
Vtx_tn n; /* Use this one for normals */
|
||||
long long int force_structure_alignment;
|
||||
} Vtx;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short vscale[4]; /* scale, 2 bits fraction */
|
||||
short vtrans[4]; /* translate, 2 bits fraction */
|
||||
} Vp_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
Vp_t vp;
|
||||
long long int force_structure_alignment;
|
||||
} Vp;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int w0;
|
||||
unsigned int w1;
|
||||
} Gwords;
|
||||
|
||||
/* TODO: fill in the rest of the members */
|
||||
typedef union
|
||||
{
|
||||
Gwords words;
|
||||
long long int force_structure_alignment;
|
||||
} Gfx;
|
||||
|
||||
|
||||
#define _SHIFTL(value, shift, size) \
|
||||
((unsigned int) (((unsigned int) (value) & ((1 << size) - 1)) << shift))
|
||||
|
||||
#define G_ON 1
|
||||
#define G_OFF 0
|
||||
|
||||
#define GPACK_RGBA5551(r, g, b, a) \
|
||||
((((r) << 8) & 0xF800) | \
|
||||
(((g) << 3) & 0x07C0) | \
|
||||
(((b) >> 2) & 0x003E) | \
|
||||
((a) & 0x0001))
|
||||
#define GPACK_ZDZ(z, dz) ((z) << 2 | (dz))
|
||||
|
||||
|
||||
#define G_ZBUFFER 0x00000001
|
||||
#define G_TEXTURE_ENABLE 0x00000002
|
||||
#define G_SHADE 0x00000004
|
||||
#define G_SHADING_SMOOTH 0x00000200
|
||||
#define G_CULL_FRONT 0x00001000
|
||||
#define G_CULL_BACK 0x00002000
|
||||
#define G_CULL_BOTH 0x00003000
|
||||
#define G_FOG 0x00010000
|
||||
#define G_LIGHTING 0x00020000
|
||||
#define G_TEXTURE_GEN 0x00040000
|
||||
#define G_TEXTURE_GEN_LINEAR 0x00080000
|
||||
#define G_LOD 0x00100000
|
||||
#define G_CLIPPING 0x00800000
|
||||
|
||||
#define G_IM_FMT_RGBA 0
|
||||
#define G_IM_FMT_YUV 1
|
||||
#define G_IM_FMT_CI 2
|
||||
#define G_IM_FMT_IA 3
|
||||
#define G_IM_FMT_I 4
|
||||
|
||||
#define G_IM_SIZ_4b 0
|
||||
#define G_IM_SIZ_8b 1
|
||||
#define G_IM_SIZ_16b 2
|
||||
#define G_IM_SIZ_32b 3
|
||||
#define G_IM_SIZ_DD 5
|
||||
|
||||
#define G_AC_NONE (0 << 0)
|
||||
#define G_AC_THRESHOLD (1 << 0)
|
||||
#define G_AC_DITHER (3 << 0)
|
||||
|
||||
#define G_ZS_PIXEL (0 << 2)
|
||||
#define G_ZS_PRIM (1 << 2)
|
||||
|
||||
#define G_CD_MAGICSQ (0 << 6)
|
||||
#define G_CD_BAYER (1 << 6)
|
||||
#define G_CD_NOISE (2 << 6)
|
||||
|
||||
#define G_CK_NONE (0 << 8)
|
||||
#define G_CK_KEY (1 << 8)
|
||||
|
||||
#define G_TC_CONV (0 << 9)
|
||||
#define G_TC_FILTCONV (5 << 9)
|
||||
#define G_TC_FILT (6 << 9)
|
||||
|
||||
#define G_TF_POINT (0 << 12)
|
||||
#define G_TF_BILERP (2 << 12)
|
||||
#define G_TF_AVERAGE (3 << 12)
|
||||
|
||||
#define G_TT_NONE (0 << 14)
|
||||
#define G_TT_RGBA16 (2 << 14)
|
||||
#define G_TT_IA16 (3 << 14)
|
||||
|
||||
#define G_TL_TILE (0 << 16)
|
||||
#define G_TL_LOD (1 << 16)
|
||||
|
||||
#define G_TD_CLAMP (0 << 17)
|
||||
#define G_TD_SHARPEN (1 << 17)
|
||||
#define G_TD_DETAIL (2 << 17)
|
||||
|
||||
#define G_TP_NONE (0 << 19)
|
||||
#define G_TP_PERSP (1 << 19)
|
||||
|
||||
#define G_CYC_1CYCLE (0 << 20)
|
||||
#define G_CYC_2CYCLE (1 << 20)
|
||||
#define G_CYC_COPY (2 << 20)
|
||||
#define G_CYC_FILL (3 << 20)
|
||||
|
||||
#define G_PM_NPRIMITIVE (0 << 23)
|
||||
#define G_PM_1PRIMITIVE (1 << 23)
|
||||
|
||||
#define G_SC_NON_INTERLACE 0
|
||||
#define G_SC_ODD_INTERLACE 3
|
||||
#define G_SC_EVEN_INTERLACE 2
|
||||
|
||||
#define G_TX_LOADTILE 7
|
||||
#define G_TX_RENDERTILE 0
|
||||
|
||||
#define G_TX_NOMIRROR 0
|
||||
#define G_TX_WRAP 0
|
||||
#define G_TX_MIRROR 1
|
||||
#define G_TX_CLAMP 2
|
||||
#define G_TX_NOMASK 0
|
||||
#define G_TX_NOLOD 0
|
||||
|
||||
#define G_TX_LDBLK_MAX_TXL 2047
|
||||
|
||||
#define G_MV_VIEWPORT 0x80
|
||||
#define G_MV_LOOKATY 0x82
|
||||
#define G_MV_LOOKATX 0x84
|
||||
#define G_MV_L0 0x86
|
||||
#define G_MV_L1 0x88
|
||||
#define G_MV_L2 0x8A
|
||||
#define G_MV_L3 0x8C
|
||||
#define G_MV_L4 0x8E
|
||||
#define G_MV_L5 0x90
|
||||
#define G_MV_L6 0x92
|
||||
#define G_MV_L7 0x94
|
||||
#define G_MV_TXTATT 0x96
|
||||
#define G_MV_MATRIX_1 0x9E
|
||||
#define G_MV_MATRIX_2 0x98
|
||||
#define G_MV_MATRIX_3 0x9A
|
||||
#define G_MV_MATRIX_4 0x9C
|
||||
|
||||
#define G_SETOTHERMODE_L 0xB9
|
||||
#define G_SETOTHERMODE_H 0xBA
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define gSPMatrix(pkt, m, p) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0x01, 24, 8) \
|
||||
| _SHIFTL((p), 16, 8) \
|
||||
| _SHIFTL(sizeof(Mtx), 0, 16); \
|
||||
_g->words.w1 = (u32)(m); \
|
||||
}
|
||||
|
||||
#define gSPVertex(pkt, v, n, v0) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0x04, 24, 8) \
|
||||
| _SHIFTL(((n)-1) << 4 | (v0), 16, 8) \
|
||||
| _SHIFTL(sizeof(Vtx)*(n), 0, 16); \
|
||||
_g->words.w1 = (u32)(v); \
|
||||
}
|
||||
|
||||
#define gDPLoadSync(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xE6000000; \
|
||||
_g->words.w1 = 0x00000000; \
|
||||
}
|
||||
|
||||
#define gDPPipeSync(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xE7000000; \
|
||||
_g->words.w1 = 0x00000000; \
|
||||
}
|
||||
|
||||
#define gDPTileSync(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xE8000000; \
|
||||
_g->words.w1 = 0x00000000; \
|
||||
}
|
||||
|
||||
#define gDPFullSync(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xE9000000; \
|
||||
_g->words.w1 = 0x00000000; \
|
||||
}
|
||||
|
||||
#define gSPDisplayList(pkt, dl) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0x06000000; \
|
||||
_g->words.w1 = (u32)(dl); \
|
||||
}
|
||||
|
||||
#define gSPBranchList(pkt, dl) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = 0x06010000; \
|
||||
_g->words.w1 = (u32)(dl); \
|
||||
}
|
||||
|
||||
#define gSPEndDisplayList(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB8000000; \
|
||||
_g->words.w1 = 0x00000000; \
|
||||
}
|
||||
|
||||
#define gDPSetCycleType(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA001402; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPPipelineMode(pkt, mode) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA001701; \
|
||||
_g->words.w1 = mode; \
|
||||
}
|
||||
|
||||
#define gDPSetScissor(pkt, mode, ulx, uly, lrx, lry) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xED, 24, 8) \
|
||||
| _SHIFTL((int)((float)(ulx)*4.0f), 12, 12) \
|
||||
| _SHIFTL((int)((float)(uly)*4.0f), 0, 12); \
|
||||
_g->words.w1 = _SHIFTL((mode), 24, 8) \
|
||||
| _SHIFTL((int)((float)(lrx)*4.0f), 12, 12) \
|
||||
| _SHIFTL((int)((float)(lry)*4.0f), 0, 12); \
|
||||
}
|
||||
|
||||
#define gDPSetCombine(pkt, muxs0, muxs1) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xFC, 24, 8) \
|
||||
| _SHIFTL((muxs0), 0, 24); \
|
||||
_g->words.w1 = (muxs1); \
|
||||
}
|
||||
|
||||
#define gDPSetTextureLOD(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA001001; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetTextureLUT(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA000E02; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetTextureDetail(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA001102; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetTexturePersp(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA001301; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetTextureFilter(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA000C02; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetTextureConvert(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA000903; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetCombineKey(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA000801; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetColorDither(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBA000602; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetFillColor(pkt, color) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xF7000000; \
|
||||
_g->words.w1 = color; \
|
||||
}
|
||||
|
||||
#define gDPFillRectangle(pkt, ulx, uly, lrx, lry) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xF6, 24, 8) \
|
||||
| _SHIFTL((lrx), 14, 10) \
|
||||
| _SHIFTL((lry), 2, 10); \
|
||||
_g->words.w1 = _SHIFTL(0, 24, 8) \
|
||||
| _SHIFTL((ulx), 14, 10) \
|
||||
| _SHIFTL((uly), 2, 10); \
|
||||
}
|
||||
|
||||
#define gDPSetAlphaCompare(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB9000002; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gDPSetDepthSource(pkt, type) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB9000201; \
|
||||
_g->words.w1 = type; \
|
||||
}
|
||||
|
||||
#define gSPSetOtherMode(pkt, cmd, shift, length, data) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = _SHIFTL((cmd), 24, 8) \
|
||||
| _SHIFTL((shift), 8, 8) \
|
||||
| _SHIFTL(((length)-1), 0, 8); \
|
||||
_g->words.w1 = (data); \
|
||||
}
|
||||
|
||||
#define gDPSetRenderMode(pkt, mode1, mode2) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB900031D; \
|
||||
_g->words.w1 = (mode1) | (mode2); \
|
||||
}
|
||||
|
||||
#define gSPClearGeometryMode(pkt, mode) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB6000000; \
|
||||
_g->words.w1 = mode; \
|
||||
}
|
||||
|
||||
#define gSPSetGeometryMode(pkt, word) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xB7000000; \
|
||||
_g->words.w1 = word; \
|
||||
}
|
||||
|
||||
#define gSPNumLights(pkt, n) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBC000002; \
|
||||
_g->words.w1 = (0x80000000 + ((n) + 1) * 0x20); \
|
||||
}
|
||||
|
||||
#define gSPTexture(pkt, sc, tc, level, tile, on) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xBB, 24, 8) \
|
||||
| _SHIFTL(0, 16, 8) \
|
||||
| _SHIFTL((level), 11, 3) \
|
||||
| _SHIFTL((tile), 8, 3) \
|
||||
| _SHIFTL((on), 0, 8); \
|
||||
_g->words.w1 = _SHIFTL((sc), 16, 16) \
|
||||
| _SHIFTL((tc), 0, 16); \
|
||||
}
|
||||
|
||||
#define gDPSetColorImage(pkt, fmt, size, width, image) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xFF, 24, 8) \
|
||||
| _SHIFTL((fmt), 21, 3) \
|
||||
| _SHIFTL((size), 19, 2) \
|
||||
| _SHIFTL((width)-1, 0, 12); \
|
||||
_g->words.w1 = (image); \
|
||||
}
|
||||
|
||||
#define gDPSetTileSize(pkt, tile, uls, ult, lrs, lrt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xF2, 24, 8) \
|
||||
| _SHIFTL(uls, 12, 12) \
|
||||
| _SHIFTL(ult, 0, 12); \
|
||||
_g->words.w1 = _SHIFTL(tile, 24, 3) \
|
||||
| _SHIFTL(lrs, 12, 12) \
|
||||
| _SHIFTL(lrt, 0, 12); \
|
||||
}
|
||||
|
||||
#define gDPLoadBlock(pkt, tile, uls, ult, lrs, dxt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xF3, 24, 8) \
|
||||
| _SHIFTL((uls), 12, 12) \
|
||||
| _SHIFTL((ult), 0, 12); \
|
||||
_g->words.w1 = _SHIFTL((tile), 24, 3) \
|
||||
| _SHIFTL((MIN((lrs),G_TX_LDBLK_MAX_TXL)), 12, 12) \
|
||||
| _SHIFTL((dxt), 0, 12); \
|
||||
}
|
||||
|
||||
#define gDPSetTile(pkt, fmt, siz, line, tmem, tile, \
|
||||
palette, cmt, maskt, shiftt, cms, masks, shifts) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xF5, 24, 8) \
|
||||
| _SHIFTL((fmt), 21, 3) \
|
||||
| _SHIFTL((siz), 19, 2) \
|
||||
| _SHIFTL((line), 9, 9) \
|
||||
| _SHIFTL((tmem), 0, 9); \
|
||||
_g->words.w1 = _SHIFTL((tile), 24, 3) \
|
||||
| _SHIFTL((palette), 20, 4) \
|
||||
| _SHIFTL((cmt), 18, 2) \
|
||||
| _SHIFTL((maskt), 14, 4) \
|
||||
| _SHIFTL((shiftt), 10, 4) \
|
||||
| _SHIFTL((cms), 8, 2) \
|
||||
| _SHIFTL((masks), 4, 4) \
|
||||
| _SHIFTL((shifts), 0, 4); \
|
||||
}
|
||||
|
||||
#define gDPSetDepthImage(pkt, image) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xFE, 24, 8); \
|
||||
_g->words.w1 = (image); \
|
||||
}
|
||||
|
||||
#define G_SETPRIMCOLOR 0xFA
|
||||
|
||||
#define gDPSetPrimColor(pkt, m, l, r, g, b, a) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(G_SETPRIMCOLOR, 24, 8) \
|
||||
| _SHIFTL(m, 8, 8) \
|
||||
| _SHIFTL(l, 0, 8); \
|
||||
_g->words.w1 = _SHIFTL(r, 24, 8) \
|
||||
| _SHIFTL(g, 16, 8) \
|
||||
| _SHIFTL(b, 8, 8) \
|
||||
| _SHIFTL(a, 0, 8); \
|
||||
}
|
||||
|
||||
#define gDPSetEnvColor(pkt, r, g, b, a) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xFB, 24, 8); \
|
||||
_g->words.w1 = _SHIFTL((r), 24, 8) \
|
||||
| _SHIFTL((g), 16, 8) \
|
||||
| _SHIFTL((b), 8, 8) \
|
||||
| _SHIFTL((a), 0, 8); \
|
||||
}
|
||||
|
||||
#define gDPSetTextureImage(pkt, fmt, size, width, img) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xFD, 24, 8) \
|
||||
| _SHIFTL((fmt), 21, 3) \
|
||||
| _SHIFTL((size), 19, 2) \
|
||||
| _SHIFTL((width)-1, 0, 12); \
|
||||
_g->words.w1 = (u32)(img); \
|
||||
}
|
||||
|
||||
#define gMoveWd(pkt, index, offset, data) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xBC, 24, 8) \
|
||||
| _SHIFTL((offset), 8, 16) \
|
||||
| _SHIFTL((index), 0, 8); \
|
||||
_g->words.w1 = (u32)(data); \
|
||||
}
|
||||
|
||||
/* Matrix Operations */
|
||||
|
||||
#define G_MTX_MODELVIEW 0x00
|
||||
#define G_MTX_PROJECTION 0x01
|
||||
#define G_MTX_MUL 0x00
|
||||
#define G_MTX_LOAD 0x02
|
||||
#define G_MTX_NOPUSH 0x00
|
||||
#define G_MTX_PUSH 0x04
|
||||
|
||||
#define gSPPopMatrix(pkt, n) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *) (pkt); \
|
||||
_g->words.w0 = 0xBD000000; \
|
||||
_g->words.w1 = (n); \
|
||||
}
|
||||
|
||||
#define gSPViewport(pkt, v) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0x03, 24, 8) \
|
||||
| _SHIFTL(G_MV_VIEWPORT, 16, 8) \
|
||||
| _SHIFTL(sizeof(Vp), 0, 16); \
|
||||
_g->words.w1 = (u32)(v); \
|
||||
}
|
||||
|
||||
#define gSP1Triangle(pkt, v0, v1, v2, flag) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xBF, 24, 8); \
|
||||
_g->words.w1 = _SHIFTL((flag), 24, 8) \
|
||||
| _SHIFTL((v0)*10, 16, 8) \
|
||||
| _SHIFTL((v1)*10, 8, 8) \
|
||||
| _SHIFTL((v2)*10, 0, 8); \
|
||||
}
|
||||
|
||||
#if (defined(F3DLP_GBI)||defined(F3DEX_GBI))
|
||||
/***
|
||||
*** 2 Triangles
|
||||
***/
|
||||
#define gSP2Triangles(pkt, v00, v01, v02, flag0, v10, v11, v12, flag1) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(G_TRI2, 24, 8)| \
|
||||
__gsSP1Triangle_w1f(v00, v01, v02, flag0)); \
|
||||
_g->words.w1 = __gsSP1Triangle_w1f(v10, v11, v12, flag1); \
|
||||
}
|
||||
|
||||
#define gsSP2Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \
|
||||
{ \
|
||||
(_SHIFTL(G_TRI2, 24, 8)| \
|
||||
__gsSP1Triangle_w1f(v00, v01, v02, flag0)), \
|
||||
__gsSP1Triangle_w1f(v10, v11, v12, flag1) \
|
||||
}
|
||||
|
||||
#endif /* F3DEX_GBI/F3DLP_GBI */
|
||||
|
||||
#if (defined(TRI4_Ext))
|
||||
/***
|
||||
*** 4 Triangles - 2Tri Extension
|
||||
*** Draws up to four triangles at a time.
|
||||
*** Expects values from 0-F, corresponding with # points declared by vertex command.
|
||||
*** Triangles with all points set to 0 are not drawn.
|
||||
*** Vertex Buffer reduced to 16 due to only being able to address 0-F
|
||||
***/
|
||||
#define gSP4Triangles(pkt, v00, v01, v02, v10, v11, v12, \
|
||||
v20, v21, v22, v30, v31, v32 ) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(G_TRI2, 24, 8)| \
|
||||
_SHIFTL((v32),12,4)|_SHIFTL((v22),8,4)|_SHIFTL((v12),4,4)|_SHIFTL((v02),0,4); \
|
||||
_g->words.w1 = _SHIFTL((v31),28,4)|_SHIFTL((v30),24,4)|_SHIFTL((v21),20,4)|_SHIFTL((v20),16,4) \
|
||||
_SHIFTL((v11),12,4)|_SHIFTL((v10),8,4)|_SHIFTL((v02),4,4)|_SHIFTL((v00),0,4); \
|
||||
}
|
||||
|
||||
#define gsSP4Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \
|
||||
{ \
|
||||
(_SHIFTL(G_TRI2, 24, 8)| \
|
||||
_SHIFTL((v32),12,4)|_SHIFTL((v22),8,4)|_SHIFTL((v12),4,4)|_SHIFTL((v02),0,4)), \
|
||||
(_SHIFTL((v31),28,4)|_SHIFTL((v30),24,4)|_SHIFTL((v21),20,4)|_SHIFTL((v20),16,4) \
|
||||
_SHIFTL((v11),12,4)|_SHIFTL((v10),8,4)|_SHIFTL((v02),4,4)|_SHIFTL((v00),0,4)); \
|
||||
}
|
||||
|
||||
#endif /* TRI4_Ext*/
|
||||
|
||||
#define gSPTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xE4, 24, 8) \
|
||||
| _SHIFTL((xh), 12, 12) \
|
||||
| _SHIFTL((yh), 0, 12); \
|
||||
_g->words.w1 = _SHIFTL((tile), 24, 3) \
|
||||
| _SHIFTL((xl), 12, 12) \
|
||||
| _SHIFTL((yl), 0, 12); \
|
||||
} \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xB3, 24, 8); \
|
||||
_g->words.w1 = _SHIFTL((s), 16, 16) \
|
||||
| _SHIFTL((t), 0, 16); \
|
||||
} \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(0xB2, 24, 8); \
|
||||
_g->words.w1 = _SHIFTL((dsdx), 16, 16) \
|
||||
| _SHIFTL((dtdy), 0, 16); \
|
||||
}
|
||||
|
||||
/* Lights and Light Operations */
|
||||
|
||||
typedef struct {
|
||||
unsigned char col[3];
|
||||
char pad1;
|
||||
unsigned char colc[3];
|
||||
char pad2;
|
||||
signed char dir[3];
|
||||
char pad3;
|
||||
} Light_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned char col[3];
|
||||
char pad1;
|
||||
unsigned char colc[3];
|
||||
char pad2;
|
||||
} Ambient_t;
|
||||
|
||||
typedef union {
|
||||
Ambient_t l;
|
||||
long long int force_structure_alignment[1];
|
||||
} Ambient;
|
||||
|
||||
typedef union {
|
||||
Light_t l;
|
||||
long long int force_structure_alignment[2];
|
||||
} Light;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
Light l[4];
|
||||
} Lights4;
|
||||
|
||||
typedef struct {
|
||||
Light l[2];
|
||||
} LookAt;
|
||||
|
||||
typedef struct {
|
||||
int x1, y1, x2, y2;
|
||||
} Hilite_t;
|
||||
|
||||
typedef union {
|
||||
Hilite_t h;
|
||||
long int force_alignmnet[4];
|
||||
} Hilite;
|
||||
|
||||
#define G_MOVEMEM 0x03
|
||||
/* for gSPNumLights */
|
||||
// is NUMLIGHTS_0 accurate?
|
||||
#define NUMLIGHTS_0 1
|
||||
#define NUMLIGHTS_1 1
|
||||
#define NUMLIGHTS_2 2
|
||||
#define NUMLIGHTS_3 3
|
||||
#define NUMLIGHTS_4 4
|
||||
#define NUMLIGHTS_5 5
|
||||
#define NUMLIGHTS_6 6
|
||||
#define NUMLIGHTS_7 7
|
||||
|
||||
/* for gSPLight */
|
||||
#define LIGHT_1 1
|
||||
#define LIGHT_2 2
|
||||
#define LIGHT_3 3
|
||||
#define LIGHT_4 4
|
||||
#define LIGHT_5 5
|
||||
#define LIGHT_6 6
|
||||
#define LIGHT_7 7
|
||||
#define LIGHT_8 8
|
||||
|
||||
#define gSPLight(pkt, l, n) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
|
||||
| _SHIFTL(((n)-1)*2+G_MV_L0, 16, 8) \
|
||||
| _SHIFTL(sizeof(Light), 0, 16); \
|
||||
_g->words.w1 = (u32)(l); \
|
||||
}
|
||||
|
||||
#define gSPLookAtX(pkt, la) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
|
||||
| _SHIFTL(G_MV_LOOKATX, 16, 8) \
|
||||
| _SHIFTL(sizeof(Light), 0, 16); \
|
||||
_g->words.w1 = (u32)(la); \
|
||||
}
|
||||
|
||||
#define gSPLookAtY(pkt, la) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
|
||||
| _SHIFTL(G_MV_LOOKATY, 16, 8) \
|
||||
| _SHIFTL(sizeof(Light), 0, 16); \
|
||||
_g->words.w1 = (u32)(la); \
|
||||
}
|
||||
|
||||
#define gSPLookAt(pkt, la) \
|
||||
{ \
|
||||
gSPLookAtX((pkt), (la)) \
|
||||
gSPLookAtY((pkt), (char *)(la)+16) \
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,332 @@
|
||||
/* GNU as assembler macros for F3D GBI */
|
||||
|
||||
/* commands with no parameters */
|
||||
.macro f3d_noparam cmd
|
||||
.word (\cmd << 24), 0x00000000
|
||||
.endm
|
||||
|
||||
.macro gsImmp1 cmd, param
|
||||
.word (\cmd << 24), \param
|
||||
.endm
|
||||
|
||||
/* DMA helper */
|
||||
.macro gsDma1p cmd, segAddr, length, params
|
||||
.byte \cmd, \params
|
||||
.hword \length
|
||||
.word \segAddr
|
||||
.endm
|
||||
|
||||
/* 01: G_MTX */
|
||||
/* params */
|
||||
.set G_MTX_MODELVIEW, 0x00
|
||||
.set G_MTX_PROJECTION, 0x01
|
||||
.set G_MTX_MUL, 0x00
|
||||
.set G_MTX_LOAD, 0x02
|
||||
.set G_MTX_NOPUSH, 0x00
|
||||
.set G_MTX_PUSH, 0x04
|
||||
|
||||
.set G_MTX, 0x01
|
||||
.macro gsSPMatrix matrix, params
|
||||
gsDma1p G_MTX, \matrix, 64, \params
|
||||
.endm
|
||||
|
||||
/* 02: reserved */
|
||||
|
||||
/* 03: G_MOVEMEM */
|
||||
.set G_MOVEMEM, 0x03
|
||||
.set G_MV_L0, 0x86
|
||||
.macro gsSPLight light, num
|
||||
gsDma1p G_MOVEMEM, \light, 16, ((\num)-1)*2+G_MV_L0
|
||||
.endm
|
||||
|
||||
/* 04: G_VTX */
|
||||
.set G_VTX, 0x04
|
||||
.macro gsSPVertex verts, num, index
|
||||
gsDma1p G_VTX, \verts, 16*\num, ((\num)-1)<<4|(\index)
|
||||
.endm
|
||||
|
||||
/* 05: reserved */
|
||||
|
||||
/* 06: G_DL */
|
||||
.set G_DL, 0x06
|
||||
.set G_DL_PUSH, 0x00
|
||||
.set G_DL_NOPUSH, 0x01
|
||||
.macro gsSPDisplayList dl
|
||||
gsDma1p G_DL, \dl, 0, G_DL_PUSH
|
||||
.endm
|
||||
.macro gsSPBranchList dl
|
||||
gsDma1p G_DL, \dl, 0, G_DL_NOPUSH
|
||||
.endm
|
||||
|
||||
/* geometry mode flags */
|
||||
.set G_ZBUFFER, 0x00000001
|
||||
.set G_SHADE, 0x00000004
|
||||
.set G_SHADING_SMOOTH, 0x00000200
|
||||
.set G_CULL_FRONT, 0x00001000
|
||||
.set G_CULL_BACK, 0x00002000
|
||||
.set G_FOG, 0x00010000
|
||||
.set G_LIGHTING, 0x00020000
|
||||
.set G_TEXTURE_GEN, 0x00040000
|
||||
.set G_TEXTURE_GEN_LINEAR, 0x00080000
|
||||
|
||||
/* B3: G_RDPHALF_2 */
|
||||
.set G_RDPHALF_2, 0xB3
|
||||
|
||||
/* B4: G_RDPHALF_1 */
|
||||
.set G_RDPHALF_1, 0xB4
|
||||
|
||||
/* B6: G_CLEARGEOMETRYMODE */
|
||||
.set G_CLEARGEOMETRYMODE, 0xB6
|
||||
.macro gsSPClearGeometryMode flags
|
||||
.word G_CLEARGEOMETRYMODE << 24
|
||||
.word \flags
|
||||
.endm
|
||||
|
||||
/* B7: G_SETGEOMETRYMODE */
|
||||
.set G_SETGEOMETRYMODE, 0xB7
|
||||
.macro gsSPSetGeometryMode flags
|
||||
.word G_SETGEOMETRYMODE << 24
|
||||
.word \flags
|
||||
.endm
|
||||
|
||||
/* B8: G_ENDDL */
|
||||
.set G_ENDDL, 0xB8
|
||||
.macro gsSPEndDisplayList
|
||||
f3d_noparam G_ENDDL
|
||||
.endm
|
||||
|
||||
/* B9: G_SETOTHERMODE_L */
|
||||
.set G_SETOTHERMODE_L, 0xB9
|
||||
/* G_SETOTHERMODE_L sft: shift count */
|
||||
.set G_MDSFT_ALPHACOMPARE, 0
|
||||
.set G_MDSFT_ZSRCSEL, 2
|
||||
.set G_MDSFT_RENDERMODE, 3
|
||||
.set G_MDSFT_BLENDER, 16
|
||||
|
||||
/* BA: G_SETOTHERMODE_H */
|
||||
.set G_SETOTHERMODE_H, 0xBA
|
||||
/* G_SETOTHERMODE_H sft: shift count */
|
||||
.set G_MDSFT_ALPHADITHER, 4
|
||||
.set G_MDSFT_RGBDITHER, 6
|
||||
.set G_MDSFT_COMBKEY, 8
|
||||
.set G_MDSFT_TEXTCONV, 9
|
||||
.set G_MDSFT_TEXTFILT, 12
|
||||
.set G_MDSFT_TEXTLUT, 14
|
||||
.set G_MDSFT_TEXTLOD, 16
|
||||
.set G_MDSFT_TEXTDETAIL, 17
|
||||
.set G_MDSFT_TEXTPERSP, 19
|
||||
.set G_MDSFT_CYCLETYPE, 20
|
||||
.set G_MDSFT_PIPELINE, 23
|
||||
|
||||
.macro gsSPSetOtherMode cmd, sft, len, data
|
||||
.word ((\cmd & 0xFF) << 24) | ((\sft & 0xFF) << 8) | (\len & 0xFF)
|
||||
.word \data
|
||||
.endm
|
||||
|
||||
/* BB: G_TEXTURE */
|
||||
.set G_TEXTURE, 0xBB
|
||||
.macro gsSPTexture scaleS, scaleT, level, tile, enable
|
||||
.word (G_TEXTURE << 24) | ((\level & 0x7) << 11) | ((\tile & 0x7) << 8) | \enable
|
||||
.word ((\scaleS & 0xFFFF) << 16) | (\scaleT & 0xFFFF)
|
||||
.endm
|
||||
|
||||
/* BC: G_MOVEWORD */
|
||||
.set G_MOVEWORD, 0xBC
|
||||
.macro gsMoveWd index, offset, data
|
||||
.word G_MOVEWORD << 24 | ((\index & 0xFFFF) << 8) | (\offset & 0xFF)
|
||||
.word \data
|
||||
.endm
|
||||
|
||||
/* BF: G_TRI1 */
|
||||
.set G_TRI1, 0xBF
|
||||
.macro gsSP1Triangle v0, v1, v2, flag
|
||||
.word G_TRI1 << 24
|
||||
.byte \flag, \v0*10, \v1*10, \v2*10
|
||||
.endm
|
||||
|
||||
/* C0: G_NOOP */
|
||||
.set G_NOOP, 0xC0
|
||||
.macro gsDPNoOp
|
||||
f3d_noparam G_NOOP
|
||||
.endm
|
||||
|
||||
/* E6: G_RDPLOADSYNC */
|
||||
.set G_RDPLOADSYNC, 0xE6
|
||||
.macro gsDPLoadSync
|
||||
f3d_noparam G_RDPLOADSYNC
|
||||
.endm
|
||||
|
||||
/* E7: G_RDPPIPESYNC */
|
||||
.set G_RDPPIPESYNC, 0xE7
|
||||
.macro gsDPPipeSync
|
||||
f3d_noparam G_RDPPIPESYNC
|
||||
.endm
|
||||
|
||||
/* E8: G_RDPTILESYNC */
|
||||
.set G_RDPTILESYNC, 0xE8
|
||||
.macro gsDPTileSync
|
||||
f3d_noparam G_RDPTILESYNC
|
||||
.endm
|
||||
|
||||
/* E9: G_RDPFULLSYNC */
|
||||
.set G_RDPFULLSYNC, 0xE9
|
||||
.macro gsDPFullSync
|
||||
f3d_noparam G_RDPFULLSYNC
|
||||
.endm
|
||||
|
||||
/* F0: G_LOADTLUT */
|
||||
.set G_LOADTLUT, 0xF0
|
||||
.macro gsDPLoadTLUTCmd tile, count
|
||||
.word G_LOADTLUT << 24
|
||||
.word ((\tile & 0x7) << 24) | (\count & 0x3FFF) << 10
|
||||
.endm
|
||||
|
||||
/* F1: unused */
|
||||
|
||||
/* F2: G_SETTILESIZE */
|
||||
.set G_SETTILESIZE, 0xF2
|
||||
.macro gsDPSetTileSize tile, uls, ult, lrs, lrt
|
||||
.word (G_SETTILESIZE << 24) | ((\uls & 0x0FFF) << 12) | (\ult & 0x0FFF)
|
||||
.word ((\tile & 0x7) << 24) | ((\lrs & 0x0FFF) << 12) | (\lrt & 0x0FFF)
|
||||
.endm
|
||||
|
||||
/* F3: G_LOADBLOCK */
|
||||
.set G_LOADBLOCK, 0xF3
|
||||
.macro gsDPLoadBlock tile, uls, ult, lrs, dxt
|
||||
.word (G_LOADBLOCK << 24) | ((\uls & 0x0FFF) << 12) | (\ult & 0x0FFF)
|
||||
.word ((\tile & 0x7) << 24) | ((\lrs & 0x0FFF) << 12) | (\dxt & 0x0FFF)
|
||||
.endm
|
||||
|
||||
/* F5: G_SETTILE */
|
||||
.set G_TX_LOADTILE, 0x7
|
||||
.set G_TX_RENDERTILE, 0x0
|
||||
|
||||
/* axis clamp and mirror flags */
|
||||
.set G_TX_NOMIRROR, 0x0
|
||||
.set G_TX_WRAP, 0x0
|
||||
.set G_TX_MIRROR, 0x1
|
||||
.set G_TX_CLAMP, 0x2
|
||||
|
||||
/* mask flags */
|
||||
.set G_TX_NOMASK, 0x0
|
||||
|
||||
/* shift flags */
|
||||
.set G_TX_NOLOD, 0x0
|
||||
|
||||
.set G_SETTILE, 0xF5
|
||||
.macro gsDPSetTile fmt, siz, line, tmem, tile, palette, cmt, maskt, shiftt, cms, masks, shifts
|
||||
.word (G_SETTILE << 24) | ((\fmt & 0x7) << 21) | ((\siz & 0x3) << 19) | ((\line & 0x1FF) << 9) | (\tmem & 0x1FF)
|
||||
.word ((\tile & 0x7) << 24) | ((\palette & 0xF) << 20) | ((\cmt & 0x3) << 18) | ((\maskt & 0xF) << 14) | ((\shiftt & 0xF) << 10) | ((\cms & 0x3) << 8) | ((\masks & 0xF) << 4) | (\shifts & 0xF)
|
||||
.endm
|
||||
|
||||
/* F6: G_FILLRECT */
|
||||
.set G_FILLRECT, 0xF6
|
||||
.macro gsDPFillRectangle ulx, uly, lrx, lry
|
||||
.word (G_FILLRECT << 24) | ((\lrx & 0x3FF) << 14) | ((\lry & 0x3FF) << 2)
|
||||
.word ((\ulx & 0x3FF) << 14) | ((\uly & 0x3FF) << 2)
|
||||
.endm
|
||||
|
||||
/* F7: G_SETFILLCOLOR */
|
||||
.set G_SETFILLCOLOR, 0xF7
|
||||
.macro gsDPSetFillColor fillValue
|
||||
.word G_SETFILLCOLOR << 24
|
||||
.word \fillValue
|
||||
.endm
|
||||
|
||||
/* helper for RGBA colors */
|
||||
.macro sDPRGBColor cmd r, g, b, a
|
||||
.word \cmd << 24
|
||||
.byte \r, \g, \b, \a
|
||||
.endm
|
||||
|
||||
/* F8: G_SETFOGCOLOR */
|
||||
.set G_SETFOGCOLOR, 0xF8
|
||||
.macro gsDPSetFogColor r, g, b, a
|
||||
sDPRGBColor G_SETFOGCOLOR, \r, \g, \b, \a
|
||||
.endm
|
||||
|
||||
/* F9: G_SETBLENDCOLOR */
|
||||
.set G_SETBLENDCOLOR, 0xF9
|
||||
.macro gsDPSetBlendColor r, g, b, a
|
||||
sDPRGBColor G_SETBLENDCOLOR, \r, \g, \b, \a
|
||||
.endm
|
||||
|
||||
/* FA: G_SETPRIMCOLOR */
|
||||
.set G_SETPRIMCOLOR, 0xFA
|
||||
.macro gsDPSetPrimColor m, l, r, g, b, a
|
||||
.word (G_SETPRIMCOLOR << 24) | ((\m & 0xFF) << 8) | (\l & 0xFF)
|
||||
.byte \r, \g, \b, \a
|
||||
.endm
|
||||
|
||||
/* FB: G_SETENVCOLOR */
|
||||
.set G_SETENVCOLOR, 0xFB
|
||||
.macro gsDPSetEnvColor r, g, b, a
|
||||
sDPRGBColor G_SETENVCOLOR, \r, \g, \b, \a
|
||||
.endm
|
||||
|
||||
/* FC: G_SETCOMBINE */
|
||||
/* color combiner */
|
||||
.set G_CCMUX_COMBINED, 0
|
||||
.set G_CCMUX_TEXEL0, 1
|
||||
.set G_CCMUX_TEXEL1, 2
|
||||
.set G_CCMUX_PRIMITIVE, 3
|
||||
.set G_CCMUX_SHADE, 4
|
||||
.set G_CCMUX_ENVIRONMENT, 5
|
||||
.set G_CCMUX_CENTER, 6
|
||||
.set G_CCMUX_SCALE, 6
|
||||
.set G_CCMUX_COMBINED_ALPHA, 7
|
||||
.set G_CCMUX_TEXEL0_ALPHA, 8
|
||||
.set G_CCMUX_TEXEL1_ALPHA, 9
|
||||
.set G_CCMUX_PRIMITIVE_ALPHA, 10
|
||||
.set G_CCMUX_SHADE_ALPHA, 11
|
||||
.set G_CCMUX_ENV_ALPHA, 12
|
||||
.set G_CCMUX_LOD_FRACTION, 13
|
||||
.set G_CCMUX_PRIM_LOD_FRAC, 14
|
||||
.set G_CCMUX_NOISE, 7
|
||||
.set G_CCMUX_K4, 7
|
||||
.set G_CCMUX_K5, 15
|
||||
.set G_CCMUX_1, 6
|
||||
.set G_CCMUX_0, 31
|
||||
|
||||
/* alpha combiner */
|
||||
.set G_ACMUX_COMBINED, 0
|
||||
.set G_ACMUX_TEXEL0, 1
|
||||
.set G_ACMUX_TEXEL1, 2
|
||||
.set G_ACMUX_PRIMITIVE, 3
|
||||
.set G_ACMUX_SHADE, 4
|
||||
.set G_ACMUX_ENVIRONMENT, 5
|
||||
.set G_ACMUX_LOD_FRACTION, 0
|
||||
.set G_ACMUX_PRIM_LOD_FRAC, 6
|
||||
.set G_ACMUX_1, 6
|
||||
.set G_ACMUX_0, 7
|
||||
|
||||
.set G_SETCOMBINE, 0xFC
|
||||
.macro gsDPSetCombine muxs0, muxs1
|
||||
.word (G_SETCOMBINE << 24) | (\muxs0 & 0x00FFFFFF)
|
||||
.word \muxs1
|
||||
.endm
|
||||
.macro gsDPSetCombineMode a0, b0, c0, d0, Aa0, Ab0, Ac0, Ad0, a1, b1, c1, d1, Aa1, Ab1, Ac1, Ad1
|
||||
.word (G_SETCOMBINE << 24) | ((\a0 & 0xF) << 20) | ((\c0 & 0x1F) << 15) | ((\Aa0 & 0x7) << 12) | ((\Ac0 & 0x7) << 9) | ((\a1 & 0xF) << 5) | (\c1 & 0x1F)
|
||||
.word ((\b0 & 0xF) << 28) | ((\b1 & 0xF) << 24) | ((\Aa1 & 0x7) << 21) | ((\Ac1 & 0x7) << 18) | ((\d0 & 0x7) << 15) | ((\Ab0 & 0x7) << 12) | ((\Ad0 & 0x7) << 9) | ((\d1 & 0x7) << 6) | ((\Ab1 & 0x7) << 3) | (\Ad1 & 0x7)
|
||||
.endm
|
||||
|
||||
/* FD: G_SETTIMG */
|
||||
/* fmt */
|
||||
.set G_IM_FMT_RGBA, 0x00
|
||||
.set G_IM_FMT_YUV, 0x01
|
||||
.set G_IM_FMT_CI, 0x02
|
||||
.set G_IM_FMT_IA, 0x03
|
||||
.set G_IM_FMT_I, 0x04
|
||||
|
||||
/* size */
|
||||
.set G_IM_SIZ_4b, 0x00
|
||||
.set G_IM_SIZ_8b, 0x01
|
||||
.set G_IM_SIZ_16b, 0x02
|
||||
.set G_IM_SIZ_32b, 0x03
|
||||
|
||||
.set G_SETTIMG, 0xFD
|
||||
.macro gsDPSetTextureImage fmt, size, width, segAddr
|
||||
.word (G_SETTIMG << 24) | ((\fmt & 0x7) << 21) | ((\size & 0x3) << 19) | ((\width-1) & 0x0FFF)
|
||||
.word \segAddr
|
||||
.endm
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef _ULTRA64_GU_H_
|
||||
#define _ULTRA64_GU_H_
|
||||
|
||||
#define GU_PI 3.1415926
|
||||
/* Functions */
|
||||
|
||||
void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect,
|
||||
float near, float far, float scale);
|
||||
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near,
|
||||
float far, float scale);
|
||||
void guOrtho(Mtx *m, float left, float right, float bottom, float top,
|
||||
float near, float far, float scale);
|
||||
void guTranslate(Mtx *m, float x, float y, float z);
|
||||
void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
void guScale(Mtx *m, float x, float y, float z);
|
||||
void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
void guMtxIdent(Mtx *m);
|
||||
void guMtxIdentF(float mf[4][4]);
|
||||
void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
void guNormalize(float *, float *, float *);
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef _ULTRA64_INTERRUPT_H_
|
||||
#define _ULTRA64_INTERRUPT_H_
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef u32 OSIntMask;
|
||||
|
||||
|
||||
/* Functions */
|
||||
|
||||
OSIntMask osGetIntMask(void);
|
||||
OSIntMask osSetIntMask(OSIntMask);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _ULTRA64_LIBAUDIO_H_
|
||||
#define _ULTRA64_LIBAUDIO_H_
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
} ALSeqData;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
s16 revision;
|
||||
s16 seqCount;
|
||||
ALSeqData seqArray[1];
|
||||
} ALSeqFile;
|
||||
|
||||
void alSeqFileNew(ALSeqFile *f, u8 *base);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _ULTRA64_LIBC_H_
|
||||
#define _ULTRA64_LIBC_H_
|
||||
|
||||
int sprintf(char *, const char *, ... );
|
||||
void bcopy(const void *src, void *dest, size_t size);
|
||||
void bzero(void *s, size_t size);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef _LIBULTRA_H
|
||||
#define _LIBULTRA_H
|
||||
|
||||
#define TV_TYPE_NTSC 1
|
||||
#define TV_TYPE_PAL 0
|
||||
#define TV_TYPE_MPAL 2
|
||||
|
||||
#define RESET_TYPE_COLD_RESET 0
|
||||
#define RESET_TYPE_NMI 1
|
||||
#define RESET_TYPE_BOOT_DISK 2
|
||||
|
||||
extern u32 osTvType;
|
||||
extern u32 osRomBase;
|
||||
extern u32 osResetType;
|
||||
extern u8 osAppNmiBuffer[64];
|
||||
|
||||
#endif /* _LIBULTRA_H */
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef _ULTRA64_MESSAGE_H_
|
||||
#define _ULTRA64_MESSAGE_H_
|
||||
|
||||
/* Events */
|
||||
#define OS_EVENT_SW1 0
|
||||
#define OS_EVENT_SW2 1
|
||||
#define OS_EVENT_CART 2
|
||||
#define OS_EVENT_COUNTER 3
|
||||
#define OS_EVENT_SP 4
|
||||
#define OS_EVENT_SI 5
|
||||
#define OS_EVENT_AI 6
|
||||
#define OS_EVENT_VI 7
|
||||
#define OS_EVENT_PI 8
|
||||
#define OS_EVENT_DP 9
|
||||
#define OS_EVENT_CPU_BREAK 10
|
||||
#define OS_EVENT_SP_BREAK 11
|
||||
#define OS_EVENT_FAULT 12
|
||||
#define OS_EVENT_THREADSTATUS 13
|
||||
#define OS_EVENT_PRENMI 14
|
||||
|
||||
#define OS_MESG_NOBLOCK 0
|
||||
#define OS_MESG_BLOCK 1
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef u32 OSEvent;
|
||||
|
||||
typedef void *OSMesg;
|
||||
|
||||
typedef struct OSMesgQueue_s
|
||||
{
|
||||
OSThread *mtqueue;
|
||||
OSThread *fullqueue;
|
||||
s32 validCount;
|
||||
s32 first;
|
||||
s32 msgCount;
|
||||
OSMesg *msg;
|
||||
} OSMesgQueue;
|
||||
|
||||
/* Functions */
|
||||
|
||||
void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msgBuf, s32 count);
|
||||
s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flag);
|
||||
s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag);
|
||||
s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flag);
|
||||
void osSetEventMesg(OSEvent e, OSMesgQueue *mq, OSMesg msg);
|
||||
void osViSetEvent(OSMesgQueue *mq, OSMesg msg, u32 retraceCount);
|
||||
s32 osContStartReadData(OSMesgQueue *mq);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _ULTRA64_AI_H_
|
||||
#define _ULTRA64_AI_H_
|
||||
|
||||
u32 osAiGetLength(void);
|
||||
s32 osAiSetNextBuffer(void *, u32);
|
||||
s32 osAiSetFrequency(u32);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef _ULTRA64_CONTROLLER_H_
|
||||
#define _ULTRA64_CONTROLLER_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*0x00*/ u16 type; /* Controller Type */
|
||||
/*0x02*/ u8 status; /* Controller status */
|
||||
/*0x03*/ u8 errno;
|
||||
} OSContStatus;
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ u16 button;
|
||||
/*0x02*/ s8 stick_x; /* -80 <= stick_x <= 80 */
|
||||
/*0x03*/ s8 stick_y; /* -80 <= stick_y <= 80 */
|
||||
/*0x04*/ u8 errno;
|
||||
} OSContPad;
|
||||
|
||||
#define A_BUTTON (1 << 15) // 0x8000
|
||||
#define B_BUTTON (1 << 14) // 0x4000
|
||||
#define Z_TRIG (1 << 13) // 0x2000
|
||||
#define START_BUTTON (1 << 12) // 0x1000
|
||||
#define U_JPAD (1 << 11) // 0x0800
|
||||
#define D_JPAD (1 << 10) // 0x0400
|
||||
#define L_JPAD (1 << 9) // 0x0200
|
||||
#define R_JPAD (1 << 8) // 0x0100
|
||||
#define DUMMY_1 (1 << 7) // 0x0080 (unused)
|
||||
#define DUMMY_2 (1 << 6) // 0x0040 (unused)
|
||||
#define L_TRIG (1 << 5) // 0x0020
|
||||
#define R_TRIG (1 << 4) // 0x0010
|
||||
#define U_CBUTTONS (1 << 3) // 0x0008
|
||||
#define D_CBUTTONS (1 << 2) // 0x0004
|
||||
#define L_CBUTTONS (1 << 1) // 0x0002
|
||||
#define R_CBUTTONS (1 << 0) // 0x0001
|
||||
|
||||
|
||||
s32 osContInit(OSMesgQueue *, u8 *, OSContStatus *);
|
||||
void osContGetReadData(OSContPad *);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef _ULTRA64_OS_INTERNAL_H_
|
||||
#define _ULTRA64_OS_INTERNAL_H_
|
||||
|
||||
/* Internal functions used by the operating system */
|
||||
/* Do not include this header in application code */
|
||||
|
||||
/* Variables */
|
||||
|
||||
//extern u64 osClockRate;
|
||||
|
||||
/* Functions */
|
||||
|
||||
/*u32 __osProbeTLB(void *);
|
||||
u32 __osDisableInt(void);
|
||||
void __osRestoreInt(u32);*/
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef _ULTRA64_OS_MISC_H_
|
||||
#define _ULTRA64_OS_MISC_H_
|
||||
|
||||
/* Miscellaneous OS functions */
|
||||
|
||||
void osInitialize(void);
|
||||
u32 osGetCount(void);
|
||||
|
||||
u32 osVirtualToPhysical(void *);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,85 @@
|
||||
#ifndef _ULTRA64_PI_H_
|
||||
#define _ULTRA64_PI_H_
|
||||
|
||||
/* Ultra64 Parallel Interface */
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 errStatus;
|
||||
void *dramAddr;
|
||||
void *C2Addr;
|
||||
u32 sectorSize;
|
||||
u32 C1ErrNum;
|
||||
u32 C1ErrSector[4];
|
||||
} __OSBlockInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 cmdType;
|
||||
u16 transferMode;
|
||||
u16 blockNum;
|
||||
s32 sectorNum;
|
||||
u32 devAddr;
|
||||
u32 bmCtlShadow;
|
||||
u32 seqCtlShadow;
|
||||
__OSBlockInfo block[2];
|
||||
} __OSTranxInfo;
|
||||
|
||||
typedef struct OSPiHandle_s
|
||||
{
|
||||
struct OSPiHandle_s *next;
|
||||
u8 type;
|
||||
u8 latency;
|
||||
u8 pageSize;
|
||||
u8 relDuration;
|
||||
u8 pulse;
|
||||
u8 domain;
|
||||
u32 baseAddress;
|
||||
u32 speed;
|
||||
__OSTranxInfo transferInfo;
|
||||
} OSPiHandle;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 type;
|
||||
u32 address;
|
||||
} OSPiInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u16 type;
|
||||
u8 pri;
|
||||
u8 status;
|
||||
OSMesgQueue *retQueue;
|
||||
} OSIoMesgHdr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*0x00*/ OSIoMesgHdr hdr;
|
||||
/*0x08*/ void *dramAddr;
|
||||
/*0x0C*/ u32 devAddr;
|
||||
/*0x10*/ u32 size;
|
||||
OSPiHandle *piHandle; //from the official definition
|
||||
} OSIoMesg;
|
||||
|
||||
/* Definitions */
|
||||
|
||||
#define OS_READ 0 // device -> RDRAM
|
||||
#define OS_WRITE 1 // device <- RDRAM
|
||||
|
||||
#define OS_MESG_PRI_NORMAL 0
|
||||
#define OS_MESG_PRI_HIGH 1
|
||||
|
||||
/* Functions */
|
||||
|
||||
s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction,
|
||||
u32 devAddr, void *vAddr, u32 nbytes, OSMesgQueue *mq);
|
||||
void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf,
|
||||
s32 cmdMsgCnt);
|
||||
OSMesgQueue *osPiGetCmdQueue(void);
|
||||
s32 osPiWriteIo(u32 devAddr, u32 data);
|
||||
s32 osPiReadIo(u32 devAddr, u32 *data);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef _ULTRA64_RDP_H_
|
||||
#define _ULTRA64_RDP_H_
|
||||
|
||||
/* DP Command Registers */
|
||||
|
||||
#define DPC_REG_BASE 0xA4100000
|
||||
|
||||
#define DPC_START_REG (*(vu32 *)(DPC_REG_BASE + 0x00))
|
||||
#define DPC_END_REG (*(vu32 *)(DPC_REG_BASE + 0x04))
|
||||
#define DPC_CURRENT_REG (*(vu32 *)(DPC_REG_BASE + 0x08))
|
||||
#define DPC_STATUS_REG (*(vu32 *)(DPC_REG_BASE + 0x0C))
|
||||
#define DPC_CLOCK_REG (*(vu32 *)(DPC_REG_BASE + 0x10))
|
||||
#define DPC_BUFBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x14))
|
||||
#define DPC_PIPEBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x18))
|
||||
#define DPC_TMEM_REG (*(vu32 *)(DPC_REG_BASE + 0x1C))
|
||||
|
||||
|
||||
/* DP Span Registers */
|
||||
|
||||
#define DPS_REG_BASE 0xA4200000
|
||||
|
||||
#define DPS_TBIST_REG (*(vu32 *)(DPS_REG_BASE + 0x00))
|
||||
#define DPS_TEST_MODE_REG (*(vu32 *)(DPS_REG_BASE + 0x04))
|
||||
#define DPS_BUFTEST_ADDR_REG (*(vu32 *)(DPS_REG_BASE + 0x08))
|
||||
#define DPS_BUFTEST_DATA_REG (*(vu32 *)(DPS_REG_BASE + 0x0C))
|
||||
|
||||
|
||||
/* Functions */
|
||||
|
||||
u32 osDpGetStatus(void);
|
||||
void osDpSetStatus(u32 status);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,114 @@
|
||||
#ifndef _ULTRA64_SPTASK_H_
|
||||
#define _ULTRA64_SPTASK_H_
|
||||
|
||||
/* Task Types */
|
||||
#define M_GFXTASK 1
|
||||
#define M_AUDTASK 2
|
||||
#define M_VIDTASK 3
|
||||
#define M_HVQTASK 6
|
||||
#define M_HVQMTASK 7
|
||||
|
||||
//gGfxSPTaskYieldBuffer has to be changed for this too
|
||||
#if (defined(F3DEX_GBI) || defined(F3DLP_GBI) || defined(F3DEX_GBI_2))
|
||||
#define OS_YIELD_DATA_SIZE 0xc00
|
||||
#else
|
||||
#define OS_YIELD_DATA_SIZE 0x900
|
||||
#endif
|
||||
#define OS_YIELD_AUDIO_SIZE 0x400
|
||||
|
||||
/* Flags */
|
||||
#define M_TASK_FLAG0 1
|
||||
#define M_TASK_FLAG1 2
|
||||
|
||||
/* SpStatus */
|
||||
#define SPSTATUS_CLEAR_HALT 0x00000001
|
||||
#define SPSTATUS_SET_HALT 0x00000002
|
||||
#define SPSTATUS_CLEAR_BROKE 0x00000004
|
||||
#define SPSTATUS_CLEAR_INTR 0x00000008
|
||||
#define SPSTATUS_SET_INTR 0x00000010
|
||||
#define SPSTATUS_CLEAR_SSTEP 0x00000020
|
||||
#define SPSTATUS_SET_SSTEP 0x00000040
|
||||
#define SPSTATUS_CLEAR_INTR_ON_BREAK 0x00000080
|
||||
#define SPSTATUS_SET_INTR_ON_BREAK 0x00000100
|
||||
#define SPSTATUS_CLEAR_SIGNAL0 0x00000200
|
||||
#define SPSTATUS_SET_SIGNAL0 0x00000400
|
||||
#define SPSTATUS_CLEAR_SIGNAL1 0x00000800
|
||||
#define SPSTATUS_SET_SIGNAL1 0x00001000
|
||||
#define SPSTATUS_CLEAR_SIGNAL2 0x00002000
|
||||
#define SPSTATUS_SET_SIGNAL2 0x00004000
|
||||
#define SPSTATUS_CLEAR_SIGNAL3 0x00008000
|
||||
#define SPSTATUS_SET_SIGNAL3 0x00010000
|
||||
#define SPSTATUS_CLEAR_SIGNAL4 0x00020000
|
||||
#define SPSTATUS_SET_SIGNAL4 0x00040000
|
||||
#define SPSTATUS_CLEAR_SIGNAL5 0x00080000
|
||||
#define SPSTATUS_SET_SIGNAL5 0x00100000
|
||||
#define SPSTATUS_CLEAR_SIGNAL6 0x00200000
|
||||
#define SPSTATUS_SET_SIGNAL6 0x00800000
|
||||
#define SPSTATUS_CLEAR_SIGNAL7 0x01000000
|
||||
#define SPSTATUS_SET_SIGNAL7 0x02000000
|
||||
|
||||
#define SPSTATUS_HALT 0x0001
|
||||
#define SPSTATUS_BROKE 0x0002
|
||||
#define SPSTATUS_DMA_BUSY 0x0004
|
||||
#define SPSTATUS_DMA_FULL 0x0008
|
||||
#define SPSTATUS_IO_FULL 0x0010
|
||||
#define SPSTATUS_SINGLE_STEP 0x0020
|
||||
#define SPSTATUS_INTERRUPT_ON_BREAK 0x0040
|
||||
#define SPSTATUS_SIGNAL0_SET 0x0080
|
||||
#define SPSTATUS_SIGNAL1_SET 0x0100
|
||||
#define SPSTATUS_SIGNAL2_SET 0x0200
|
||||
#define SPSTATUS_SIGNAL3_SET 0x0400
|
||||
#define SPSTATUS_SIGNAL4_SET 0x0800
|
||||
#define SPSTATUS_SIGNAL5_SET 0x1000
|
||||
#define SPSTATUS_SIGNAL6_SET 0x2000
|
||||
#define SPSTATUS_SIGNAL7_SET 0x4000
|
||||
|
||||
/* Types */
|
||||
/* Types */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*0x00*/ u32 type;
|
||||
/*0x04*/ u32 flags;
|
||||
|
||||
/*0x08*/ u64 *ucode_boot;
|
||||
/*0x0C*/ u32 ucode_boot_size;
|
||||
|
||||
/*0x10*/ u64 *ucode;
|
||||
/*0x14*/ u32 ucode_size;
|
||||
|
||||
/*0x18*/ u64 *ucode_data;
|
||||
/*0x1C*/ u32 ucode_data_size;
|
||||
|
||||
/*0x20*/ u64 *dram_stack;
|
||||
/*0x24*/ u32 dram_stack_size;
|
||||
|
||||
/*0x28*/ u64 *output_buff;
|
||||
/*0x2C*/ u64 *output_buff_size;
|
||||
|
||||
/*0x30*/ u64 *data_ptr;
|
||||
/*0x34*/ u32 data_size;
|
||||
|
||||
/*0x38*/ u64 *yield_data_ptr;
|
||||
/*0x3C*/ u32 yield_data_size;
|
||||
} OSTask_t; // size = 0x40
|
||||
|
||||
typedef union {
|
||||
OSTask_t t;
|
||||
long long int force_structure_alignment;
|
||||
} OSTask;
|
||||
|
||||
typedef u32 OSYieldResult;
|
||||
|
||||
/* Functions */
|
||||
|
||||
#define osSpTaskStart(p) \
|
||||
osSpTaskLoad(p); \
|
||||
osSpTaskStartGo(p);
|
||||
|
||||
void osSpTaskLoad(OSTask *task);
|
||||
void osSpTaskStartGo(OSTask *task);
|
||||
void osSpTaskYield(void);
|
||||
OSYieldResult osSpTaskYielded(OSTask *task);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
#ifndef _ULTRA64_THREAD_H_
|
||||
#define _ULTRA64_THREAD_H_
|
||||
|
||||
/* Recommended priorities for system threads */
|
||||
#define OS_PRIORITY_MAX 255
|
||||
#define OS_PRIORITY_VIMGR 254
|
||||
#define OS_PRIORITY_RMON 250
|
||||
#define OS_PRIORITY_RMONSPIN 200
|
||||
#define OS_PRIORITY_PIMGR 150
|
||||
#define OS_PRIORITY_SIMGR 140
|
||||
#define OS_PRIORITY_APPMAX 127
|
||||
#define OS_PRIORITY_IDLE 0
|
||||
|
||||
#define OS_STATE_STOPPED 1
|
||||
#define OS_STATE_RUNNABLE 2
|
||||
#define OS_STATE_RUNNING 4
|
||||
#define OS_STATE_WAITING 8
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef s32 OSPri;
|
||||
typedef s32 OSId;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct {f32 f_odd; f32 f_even;} f;
|
||||
} __OSfp;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* registers */
|
||||
/*0x20*/ u64 at, v0, v1, a0, a1, a2, a3;
|
||||
/*0x58*/ u64 t0, t1, t2, t3, t4, t5, t6, t7;
|
||||
/*0x98*/ u64 s0, s1, s2, s3, s4, s5, s6, s7;
|
||||
/*0xD8*/ u64 t8, t9, gp, sp, s8, ra;
|
||||
/*0x108*/ u64 lo, hi;
|
||||
/*0x118*/ u32 sr, pc, cause, badvaddr, rcp;
|
||||
/*0x12C*/ u32 fpcsr;
|
||||
__OSfp fp0, fp2, fp4, fp6, fp8, fp10, fp12, fp14;
|
||||
__OSfp fp16, fp18, fp20, fp22, fp24, fp26, fp28, fp30;
|
||||
} __OSThreadContext;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 flag;
|
||||
u32 count;
|
||||
u64 time;
|
||||
} __OSThreadprofile_s;
|
||||
|
||||
typedef struct OSThread_s
|
||||
{
|
||||
/*0x00*/ struct OSThread_s *next;
|
||||
/*0x04*/ OSPri priority;
|
||||
/*0x08*/ struct OSThread_s **queue;
|
||||
/*0x0C*/ struct OSThread_s *tlnext;
|
||||
/*0x10*/ u16 state;
|
||||
/*0x12*/ u16 flags;
|
||||
/*0x14*/ OSId id;
|
||||
/*0x18*/ int fp;
|
||||
/*0x1C*/ __OSThreadprofile_s *thprof;
|
||||
/*0x20*/ __OSThreadContext context;
|
||||
} OSThread;
|
||||
|
||||
|
||||
/* Functions */
|
||||
|
||||
void osCreateThread(OSThread *thread, OSId id, void (*entry)(void *),
|
||||
void *arg, void *sp, OSPri pri);
|
||||
OSId osGetThreadId(OSThread *thread);
|
||||
OSPri osGetThreadPri(OSThread *thread);
|
||||
void osSetThreadPri(OSThread *thread, OSPri pri);
|
||||
void osStartThread(OSThread *thread);
|
||||
void osStopThread(OSThread *thread);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _ULTRA64_TIME_H_
|
||||
#define _ULTRA64_TIME_H_
|
||||
#include "message.h"
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef struct OSTimer_str
|
||||
{
|
||||
struct OSTimer_str *next;
|
||||
struct OSTimer_str *prev;
|
||||
u64 interval;
|
||||
u64 remaining;
|
||||
OSMesgQueue *mq;
|
||||
OSMesg *msg;
|
||||
} OSTimer;
|
||||
|
||||
typedef u64 OSTime;
|
||||
|
||||
/* Functions */
|
||||
|
||||
OSTime osGetTime(void);
|
||||
void osSetTime(OSTime time);
|
||||
u32 osSetTimer(OSTimer *, OSTime, u64, OSMesgQueue *, OSMesg);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _ULTRA64_TLB_H_
|
||||
#define _ULTRA64_TLB_H_
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef u32 OSPageMask;
|
||||
/* OSPageMask Valid Values */
|
||||
#define OS_PM_4K 0x0000000
|
||||
#define OS_PM_16K 0x0006000
|
||||
#define OS_PM_64K 0x001e000
|
||||
#define OS_PM_256K 0x007e000
|
||||
#define OS_PM_1M 0x01fe000
|
||||
#define OS_PM_4M 0x07fe000
|
||||
#define OS_PM_16M 0x1ffe000
|
||||
|
||||
/* Functions */
|
||||
|
||||
void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr,
|
||||
u32 oddpaddr, s32 asid);
|
||||
void osMapTLBRdb(void);
|
||||
void osUnmapTLB(s32 index);
|
||||
void osUnmapTLBAll(void);
|
||||
void osSetTLBASID(s32 asid);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef _ULTRA64_TYPES_H_
|
||||
#define _ULTRA64_TYPES_H_
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (void *)0
|
||||
#endif
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
typedef signed short int s16;
|
||||
typedef unsigned short int u16;
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
typedef signed long long int s64;
|
||||
typedef unsigned long long int u64;
|
||||
|
||||
typedef volatile u8 vu8;
|
||||
typedef volatile u16 vu16;
|
||||
typedef volatile u32 vu32;
|
||||
typedef volatile u64 vu64;
|
||||
typedef volatile s8 vs8;
|
||||
typedef volatile s16 vs16;
|
||||
typedef volatile s32 vs32;
|
||||
typedef volatile s64 vs64;
|
||||
|
||||
typedef float f32;
|
||||
typedef double f64;
|
||||
|
||||
typedef long int Mtx_t[4][4];
|
||||
typedef union
|
||||
{
|
||||
Mtx_t m;
|
||||
long long int forc_structure_alignment;
|
||||
} Mtx;
|
||||
|
||||
typedef unsigned long size_t;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef _ULTRA64_UCODE_H_
|
||||
#define _ULTRA64_UCODE_H_
|
||||
|
||||
#define SP_DRAM_STACK_SIZE8 0x400
|
||||
#define SP_UCODE_SIZE 0x1000
|
||||
#define SP_UCODE_DATA_SIZE 0x800
|
||||
|
||||
// standard boot ucode
|
||||
extern u64 rspF3DBootStart[], rspF3DBootEnd[];
|
||||
|
||||
// F3D ucode
|
||||
extern u64 rspF3DStart[], rspF3DEnd[];
|
||||
|
||||
// F3D data ucode
|
||||
extern u64 rspF3DDataStart[], rspF3DDataEnd[];
|
||||
|
||||
// F3D audio ucode
|
||||
extern u64 rspF3DAudioStart[], rspF3DAudioEnd[];
|
||||
|
||||
// F3D audio data ucode
|
||||
extern u64 rspF3DAudioDataStart[], rspF3DAudioDataEnd[];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,143 @@
|
||||
#ifndef _ULTRA64_VI_H_
|
||||
#define _ULTRA64_VI_H_
|
||||
|
||||
/* Ultra64 Video Interface */
|
||||
|
||||
|
||||
/* Special Features */
|
||||
#define OS_VI_GAMMA_ON 0x0001
|
||||
#define OS_VI_GAMMA_OFF 0x0002
|
||||
#define OS_VI_GAMMA_DITHER_ON 0x0004
|
||||
#define OS_VI_GAMMA_DITHER_OFF 0x0008
|
||||
#define OS_VI_DIVOT_ON 0x0010
|
||||
#define OS_VI_DIVOT_OFF 0x0020
|
||||
#define OS_VI_DITHER_FILTER_ON 0x0040
|
||||
#define OS_VI_DITHER_FILTER_OFF 0x0080
|
||||
|
||||
#define OS_VI_GAMMA 0x08
|
||||
#define OS_VI_GAMMA_DITHER 0x04
|
||||
#define OS_VI_DIVOT 0x10
|
||||
#define OS_VI_DITHER_FILTER 0x10000
|
||||
#define OS_VI_UNK200 0x200
|
||||
#define OS_VI_UNK100 0x100
|
||||
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 ctrl;
|
||||
u32 width;
|
||||
u32 burst;
|
||||
u32 vSync;
|
||||
u32 hSync;
|
||||
u32 leap;
|
||||
u32 hStart;
|
||||
u32 xScale;
|
||||
u32 vCurrent;
|
||||
} OSViCommonRegs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 origin;
|
||||
u32 yScale;
|
||||
u32 vStart;
|
||||
u32 vBurst;
|
||||
u32 vIntr;
|
||||
} OSViFieldRegs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 type;
|
||||
OSViCommonRegs comRegs;
|
||||
OSViFieldRegs fldRegs[2];
|
||||
} OSViMode;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x00 */ u16 unk00; //some kind of flags. swap buffer sets to 0x10
|
||||
/* 0x02 */ u16 retraceCount;
|
||||
/* 0x04 */ void* buffer;
|
||||
/* 0x08 */ OSViMode *unk08;
|
||||
/* 0x0c */ u32 features;
|
||||
/* 0x10 */ OSMesgQueue *mq;
|
||||
/* 0x14 */ OSMesg *msg;
|
||||
/* 0x18 */ u32 unk18;
|
||||
/* 0x1c */ u32 unk1c;
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ f32 unk24;
|
||||
/* 0x28 */ u16 unk28;
|
||||
/* 0x2c */ u32 unk2c;
|
||||
} OSViContext;
|
||||
|
||||
void osCreateViManager(OSPri pri);
|
||||
void osViSetMode(OSViMode *mode);
|
||||
void osViBlack(u8 active);
|
||||
void osViSetSpecialFeatures(u32 func);
|
||||
void osViSwapBuffer(void *vaddr);
|
||||
|
||||
|
||||
#define OS_VI_NTSC_LPN1 0 /* NTSC */
|
||||
#define OS_VI_NTSC_LPF1 1
|
||||
#define OS_VI_NTSC_LAN1 2
|
||||
#define OS_VI_NTSC_LAF1 3
|
||||
#define OS_VI_NTSC_LPN2 4
|
||||
#define OS_VI_NTSC_LPF2 5
|
||||
#define OS_VI_NTSC_LAN2 6
|
||||
#define OS_VI_NTSC_LAF2 7
|
||||
#define OS_VI_NTSC_HPN1 8
|
||||
#define OS_VI_NTSC_HPF1 9
|
||||
#define OS_VI_NTSC_HAN1 10
|
||||
#define OS_VI_NTSC_HAF1 11
|
||||
#define OS_VI_NTSC_HPN2 12
|
||||
#define OS_VI_NTSC_HPF2 13
|
||||
|
||||
#define OS_VI_PAL_LPN1 14 /* PAL */
|
||||
#define OS_VI_PAL_LPF1 15
|
||||
#define OS_VI_PAL_LAN1 16
|
||||
#define OS_VI_PAL_LAF1 17
|
||||
#define OS_VI_PAL_LPN2 18
|
||||
#define OS_VI_PAL_LPF2 19
|
||||
#define OS_VI_PAL_LAN2 20
|
||||
#define OS_VI_PAL_LAF2 21
|
||||
#define OS_VI_PAL_HPN1 22
|
||||
#define OS_VI_PAL_HPF1 23
|
||||
#define OS_VI_PAL_HAN1 24
|
||||
#define OS_VI_PAL_HAF1 25
|
||||
#define OS_VI_PAL_HPN2 26
|
||||
#define OS_VI_PAL_HPF2 27
|
||||
|
||||
#define OS_VI_MPAL_LPN1 28 /* MPAL - mainly Brazil */
|
||||
#define OS_VI_MPAL_LPF1 29
|
||||
#define OS_VI_MPAL_LAN1 30
|
||||
#define OS_VI_MPAL_LAF1 31
|
||||
#define OS_VI_MPAL_LPN2 32
|
||||
#define OS_VI_MPAL_LPF2 33
|
||||
#define OS_VI_MPAL_LAN2 34
|
||||
#define OS_VI_MPAL_LAF2 35
|
||||
#define OS_VI_MPAL_HPN1 36
|
||||
#define OS_VI_MPAL_HPF1 37
|
||||
#define OS_VI_MPAL_HAN1 38
|
||||
#define OS_VI_MPAL_HAF1 39
|
||||
#define OS_VI_MPAL_HPN2 40
|
||||
#define OS_VI_MPAL_HPF2 41
|
||||
|
||||
#define OS_VI_FPAL_LPN1 42 /* FPAL - Full screen PAL */
|
||||
#define OS_VI_FPAL_LPF1 43
|
||||
#define OS_VI_FPAL_LAN1 44
|
||||
#define OS_VI_FPAL_LAF1 45
|
||||
#define OS_VI_FPAL_LPN2 46
|
||||
#define OS_VI_FPAL_LPF2 47
|
||||
#define OS_VI_FPAL_LAN2 48
|
||||
#define OS_VI_FPAL_LAF2 49
|
||||
#define OS_VI_FPAL_HPN1 50
|
||||
#define OS_VI_FPAL_HPF1 51
|
||||
#define OS_VI_FPAL_HAN1 52
|
||||
#define OS_VI_FPAL_HAF1 53
|
||||
#define OS_VI_FPAL_HPN2 54
|
||||
#define OS_VI_FPAL_HPF2 55
|
||||
|
||||
extern OSViMode osViModeTable[]; /* Global VI mode table */
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user