indexing all to revise system to use flags
00000001	YOLT
00000002	TLD
00000004	MwtGX
00000008	LtK

teams...  will need to do scoring differently
	most you could have are 3, and scoring could depend on matching scenario bitflags
40000000	2 teams
80000000	3 teams
	teams go in reverse order, so 02 is team 1, 01 team 2, 00 team 3
	that means red, blue, white for colors

collectables...	will need to do different radar overlay and flags
	if flag, 04.  If GX, 08.  Teams use 02,01,00
00		white	yellow
01	FF7777FF	red
02	8888FFFF	blue
04	
08	FFC000FF	[team]/gold
10	flag	green border
20	MwtGX	gold border

7F014758:	49288	0FC051D6	return V0=scenario
LUI	V0,8003
JR	RA
LW	V0,B540


rewritten during MwtGX hack...
//7F001E38:	36968	scenario-specific inhibitors
0FC051D6	JAL	7F014758	;ret V0=scenario
24010003	ADDIU	AT,R0,0003
1441000E	BNE	V0,AT,7F001E7C	;branch if not MwtGG
24020058	ADDIU	V0,R0,0058	;V0=flag - always inhibit flags
//7F001E48:	36978	man w/ the GG
0FC1A4FD	JAL	7F0693F4	;V0=p->MP weapon F7 data - GG slot
240400F7	ADDIU	A0,R0,00F7
90420000	LBU	V0,0000 (V0)	;A0=weapon code
NOP


7F010170	44CA0	handles selecting game length under different scenarios


rewritten during MwtGX
7F010468:	44F98	set default MP menu settings for scenario A0
27BDFFE8	ADDIU	SP,SP,FFE8
AFBF0014	SW	RA,0014 (SP)
3C018003	LUI	AT,8003
240800FF	ADDIU	T0,R0,00FF	;start with all bits unset
AC24B540	SW	A0,B540 (AT)	;A0->8002B540: save scenario
//7F01047C:	if "Last ..Alive" set, unset it
8C22B538	LW	V0,B538 (AT)	;length setting
2442FFFA	ADDIU	V0,V0,FFFA	;V0-=6: 7=1, all else <=0
5C400001	BGTZL	V0,+1
AC22B538	SW	V0,B538 (AT)	;1->length setting if already =7
//7F01048C:	set you only live twice scenario specific settings
24030001	ADDIU	V1,R0,0001
14830003	BNE	A0,V1,+3
24020007	ADDIU	V0,R0,0007
AC22B538	SW	V0,B538 (AT)
310800FD	ANDI	T0,T0,00FD	;untoggle length bit
//7F0104A0:	set the living daylights scenario specific settings
24020002	ADDIU	V0,R0,0002
14820004	BNE	A0,V0,+4
8C22B538	LW	V0,B538 (AT)
28420004	SLTI	V0,V0,0004
50400001	BEQL	V0,R0,+1
AC22B538	SW	V1,B538 (AT)
//7F0104B8:	set license to kill scenario specific settings:
24020004	ADDIU	V0,R0,0004
50820001	BEQL	A0,V0,+1
310800EF	ANDI	T0,T0,00EF	;untoggle health bit
//7F0104C4:	set man with the golden gun scenario specific settings
24020003	ADDIU	V0,R0,0003
14820006	BNE	A0,V0,+6
3C038005	LUI	V1,8005
0FC3198F	JAL	7F0C6640	;A0->selected MP weapon set
9064915F	LBU	A0,915F (V1)
0044102A	SLT	V0,V0,A0	;V0=TRUE if # < minimum
54400001	BNEL	V0,R0,+1	;only set the flag if < minimum
A0649162	SB	A0,9162 (V1)	;set selected weapon set to A0
//7F0104E4:	finish up
A028B544	SB	T0,B544 (AT)	;save new scenario mask
8FBF0014	LW	RA,0014 (SP)
03E00008	JR	RA
27BD0018	ADDIU	SP,SP,0018


+_+

the horrible scoring fixes.
seriously, it might just be easier to rewrite the scoring system now...


//7F00289C	373CC	part of flag handler in 08 object expansion
ADDIU	AT,R0,0002
JAL	7F014758
NOP
BNEL	V0,AT,7F0028B0
SW	R0,0018 (SP)


[7F050A38]	15 object collectability: body armor
//7F050A8C	855BC	detect if possess flag if Flag Tag active
JAL	7F014758
NOP
ADDIU	AT,R0,0002
BNE	V0,AT,7F050ABC	;branch if not Flag Tag
OR	V1,V0,R0
//7F050AA0:	855D0	if flag held, disable BA pickup
0FC233E0	JAL	7F08CF80	;V0=TRUE if flag in inventory
AFA20058	SW	V0,0058 (SP)
10400004	BEQ	V0,R0,0004	;branch if it isn't in inventory
8FA30058	LW	V1,0058 (SP)
24090001	ADDIU	T1,R0,0001	;T1=1: uncollectability flag
10000009	BEQ	R0,R0,+9
AFA9005C	SW	T1,005C (SP)	;SP+5C=1: BA uncollectable
//7F050ABC:		detect if possess F7 if MwtGX active
ADDIU	AT,R0,0003
BNEL	V1,AT,7F050AE0	;branch if not MwtGX
LW	T3,005C (SP)	;SP+5C=1 if BA is uncollectable


//7F083DC4	B88F4	
JAL	7F014758
NOP
ADDIU	AT,R0,0002
BNEL	V0,AT,7F083DF0	;branch if not scenario 2: Flag Tag
LW	T3,0074 (SP)
JAL	7F08CF80	;TRUE if player possesses flag
NOP
BEQL	V0,R0,7F083DF0	;branch if they don't
LW	T3,0074 (SP)
SW	R0,0074 (SP)	;kill player inventory control
LW	T3,0074 (SP)

//7F0895C0	BE0F0	stores to SP+40
JAL	7F014758
NOP
JAL	7F09B150
SW	V0,0040 (SP)
...
//7F089614
LW	T4,0040 (SP)
ADDIU	AT,R0,0001
BNE	T4,AT,7F08962C	;branch if not you only live twice
SLTI	AT,A0,0002
BEQ	AT,R0,7F089658
NOP


//7F089A70	BE5A0	LtK, but no idea what it does...
JAL	7F014758
NOP
ADDIU	AT,R0,0004
BNE	V0,AT,7F089AAC	;branch if not License to Kill
LUI	V0,8008
LW	V0,A0B0 (V0)	;V0=p->BONDdata
LWC1	F18,00DC (V0)	;F18=health in watch display
LWC1	F4,2A3C (V0)	;F4=actual Health register
LWC1	F8,00E0 (V0)	;F4=body armor in watch display
LWC1	F10,2A40 (V0)	;F10=actual BA register
MUL.S	F6,F18,F4	;F6=%health * actual
NOP
MUL.S	F16,F8,F10	;F16=%armor * actual
ADD.S	F18,F6,F16	;F18=(%health * actual) + (%armor * actual)
SWC1	F18,003C (SP)	;save total health * percentage

//7F089D04	BE834	detect MwtGX item
JAL	7F014758
SW	V0,002C (SP)
ADDIU	AT,R0,0003
BNE	AT,V0,7F089D28	;branch if scenario 3: MwtGX
SW	R0,0028 (SP)
JAL	7F08CFC0	;TRUE if item F7 is in inventory
NOP
NOP
SW	V0,0028 (SP)


7F0BDAB0	calls necessary stuff for stage loading!
//7F0BDC80	F27F0
LUI	AT,4348
ADDIU	S2,T2,9EF0
MTC1	AT,F20		;F20=200.0: LtK handicap
ADDIU	S3,R0,0004
...
//7F0BDCD0	F2800	set player's handicap
0FC051D6	JAL	7F014758
00000000	NOP
14530003	BNE	V0,S3,7F0BDCE8	;branch if not LtK
00000000	NOP
10000004	BEQ	R0,R0,7F0BDCF4
E634005C	SWC1	F20,005C (S1)

!note! MwtGX and Handicaps altered this!
//7F0BDC80	F27B0
	NOP
	ADDIU	S2,T2,9EF0
	NOP
	ADDIU	S3,R0,0004
...
//7F0BDCC8	F27F8	set player's handicap
3C118008	LUI	S1,8008
0FC00A50	JAL	7F002940	;Casino Royale
26319EF0	ADDIU	S1,S1,9EF0
//7F0BDCD4	F2804	loop for each player
0FC051D6	JAL	7F014758	;ret V0=scenario
00002025	OR	A0,R0,R0	;A0=handicap 0: LtK
0FC040ED	JAL	7F0103B4	;ret F0=LtK handicap; fries AT,A0
	*ANDI	V0,V0,0008	;V0=scenario & LtK flag
14400003	*BNEZ	V0,R0,+3
00000000	NOP
0FC040EA	JAL	7F0103A8
02002025	OR	A0,S0,R0
E620005C	SWC1	F0,005C (S1)
//7F0BDCF4
02002025	OR	A0,S0,R0
26100001	ADDIU	S0,S0,0001	;S0++: player#++
26310070	ADDIU	S1,S1,0070	;S1=p->next player's stats
1613FFF3	BNE	S0,S3,7F0BDCD4	;branch if all 4 players dealt with
00000000	NOP


7F0BEB88	MP time and score loop - MP game, in other words
//7F0BEFB8	F3AE8	"You Only Live Twice" handling
JAL	7F014758	RETURNS V0=scenario
NOP
ADDIU	AT,R0,0001
BNE	V0,AT,7F0BF1E0	branch if not "You Only Live Twice"
LUI	T7,8005


7F0BF800	???
//7F0BFA30	F4560	set item ownership flag for Flag Tag and force item out
JAL	7F014758
SWC1	F6,0038 (V0)
ADDIU	AT,R0,0002
BNE	V0,AT,7F0BFAD0	;branch if not scenario 2: flag tag
NOP
...
//7F0BFAD0	F4600	set item ownership flag for MwtGX
JAL	7F014758
NOP
ADDIU	AT,R0,0003
BNEL	V0,AT,7F0BFB14	;branch if not scenario 3: MwtGX
LW	RA,0014 (SP)
//7F0BFAE4		test if own GX
JAL	7F04FD98
ADDIU	A0,R0,00F7
BEQ	V0,R0,7F0BFB08	;branch if you don't have it or aren't alive
LUI	T0,8008
//7F0BFAF4		set GX ownership flag
LUI	T9,8008
LW	T9,A0B4 (T9)
ADDIU	T8,R0,0001
BEQ	R0,R0,7F0BFB10
SB	T8,0069 (T9)
//7F0BFB08		reset GX ownership flag
LW	T0,A0B4 (T0)
SB	R0,0069 (T0)
//7F0BFB10		return
LW	RA,0014 (SP)
ADDIU	SP,SP,0030
JR	RA
NOP



7F0C38D8	F8408	MP watch menu, at least in part
//7F0C3910	F8440	use scenario as an offset in TLB table
JAL	7F014758
SW	V0,0030 (SP)
LUI	V1,8008
SLTIU	AT,V0,0008
ADDIU	V1,V1,9EF0
LW	A0,0024 (SP)
LW	A1,0038 (SP)
LW	A3,0034 (SP)
LW	T2,0030 (SP)
BEQ	AT,R0,7F0C3C80
LW	T3,0018 (SP)
SLL	T7,V0,0x2
LUI	AT,8006
ADDU	AT,AT,T7
LW	T7,BCA0 (AT)	;T7=8005BCA0+offset: TLBp->scoring, or something
JR	T7
NOP

//7F0C3CA4	F87D4	
JAL	7F014758
SW	A1,0084 (SP)
JAL	7F09A464
SW	V0,007C (SP)
...
//7F0C3F0C	F8A3C
ADDIU	AT,R0,0006
BEQ	T9,AT,7F0C3F34	;branch if scenario 6: ; display A012, not A014 (2nd, not 4th)
NOP


7F0C3F5C	F8A94	??? - uses scenario TLB pointers @ 8005BCC0
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
JAL	7F014758
SW	A0,0018 (SP)
SLTIU	AT,V0,0008
BEQ	AT,R0,7F0C3FB4
SLL	T6,V0,0x2
LUI	AT,8006
ADDU	AT,AT,T6
LW	T6,BCC0 (AT)
JR	T6
NOP
...

7F0C3FCC	F8B04	??? - uses scenario TLB pointers @ 8005BCE0
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
JAL	7F014758
SW	A0,0018 (SP)
SLTIU	AT,V0,0008
BEQ	AT,R0,7F0C400C
SLL	T6,V0,0x2
LUI	AT,8006
ADDU	AT,AT,T6
LW	T6,BCE0 (AT)
JR	T6
NOP
...

also part of watch menu, probably physical display
//7F0C4728	F9258	stores to SP+80, disp. A01B: "SCORES"
JAL	7F014758
NOP
SW	V0,0080 (SP)
...
//7F0C4800	F9330
LW	V1,0080 (SP)
ADDIU	AT,R0,0005
OR	S1,V0,R0
BEQ	V1,AT,7F0C4834	;branch if 2v2
LW	T1,00D4 (SP)
ADDIU	AT,R0,0006
BEQ	V1,AT,7F0C4834	;branch if 3v1
ADDIU	AT,R0,0007
BEQ	V1,AT,7F0C4834	;branch if 2v1
ADDIU	AT,R0,0002
BEQ	V1,AT,7F0C4834	;branch if Flag Tag
ADDIU	AT,R0,0003
BNE	V1,AT,7F0C4888	;branch if not MwtGX
SLL	T4,T1,0x3


//7F0C5F0C	FAA3C	handle you only live twice...
JAL	7F014758
SW	A0,0058 (SP)
ADDIU	AT,R0,0001
BNE	V0,AT,7F0C5F2C	;branch if scenario isn't 1: you only live twice
LW	A0,0058 (SP)

//7F0C60D0	FAC00	
JAL	7F014758
SW	A0,0088 (SP)
JAL	7F09B150
OR	S4,V0,R0
...
//7F0C62AC	FADDC
ADDIU	AT,R0,0005
BEQ	S4,AT,7F0C62DC	;branch if 2v2
SW	V0,0088 (SP)
ADDIU	AT,R0,0006
BEQ	S4,AT,7F0C62DC	;branch if 3v1
ADDIU	AT,R0,0007
BEQ	S4,AT,7F0C62DC	;branch if 2v1
ADDIU	AT,R0,0002
BEQ	S4,AT,7F0C62DC	;branch if Flag Tag
ADDIU	AT,R0,0003
BNE	S4,AT,7F0C6338	;branch if not MwtGX
LW	A0,0088 (SP)
...
//7F0C6420	FAF50
ADDIU	AT,R0,0005
SLL	T1,S3,0x3
SUBU	T1,T1,S3
BEQ	S4,AT,7F0C6458	;branch if 2v2
MOV.S	F22,F2
ADDIU	AT,R0,0006
BEQ	S4,AT,7F0C6458	;branch if 3v1
ADDIU	AT,R0,0007
BEQ	S4,AT,7F0C6458	;branch if 2v1
ADDIU	AT,R0,0002
BEQ	S4,AT,7F0C6458	;branch if Flag Tag
ADDIU	AT,R0,0007
BNEL	S4,AT,7F0C64C0	;branch if MwtGX
C.LT.S	F2,F24
...


&_&

player statistics scenario flag usage
note: 7F0C6288 sets the border color...
//7F0C62E0
LUI	T6,8008
LW	A0,0088 (SP)
SLL	T5,T4,0x3
SUBU	T5,T5,T4
SLL	T5,T5,0x4
ADDU	T6,T6,T5
LBU	T6,9F59 (T6)	;T6=stats+0x69: scenario flags
ADDIU	A1,S5,FFFF
ADDIU	A2,S6,FFFF
BNEZ	T6,7F0C6318	;branch if collected item or blue team
ADDIU	A3,S5,0001
//7F0C630C	red team
LUI	V0,FF77
BEQ	R0,R0,F70C6320
ORI	V0,V0,77FF
//7F0C6318	blue team
LUI	V0,8888
ORI	V0,V0,FFFF
//F70C6320	display block with color
ADDIU	T9,S6,0001
SW	T9,0010 (SP)
JAL	7F0AD014
SW	V0,0014 (SP)
BEQ	R0,R0,7F0C635C
SW	V0,0088 (SP)
//7F0C6338	

also radar, but later
//7F0C6458
C.LT.S	F2,F24
LUI	T7,8008
ADDIU	T7,T7,9EF0
SLL	T1,T1,0x4
BC1F	7F0C6494
ADDU	V0,T1,T7
LBU	T8,0069 (V0)
LUI	S1,2828
BNEZ	T8,7F0C648C
NOP
//7F0C6480		red team opaque
LUI	S1,FF00
BEQ	R0,R0,7F0C64E0
ORI	S1,S1,00A0
//7F0C648C		blue team opaque
BEQ	R0,R0,7F0C64E0
ORI	S1,S1,FFFF
//7F0C6494
LBU	T2,0069 (V0)
MOV.S	F22,F24
LUI	S1,2828
BNEZ	T2,7F0C64B4
NOP
//7F0C64A8		red team translucent - current player
LUI	S1,FF00
BEQ	R0,R0,7F0C64E0
ORI	S1,S1,0060
//7F0C64B4		blue team translucent - current player
BEQ	R0,R0,7F0C64E0
ORI	S1,S1,FFB0
//7F0C64BC		normal mode game - current player
C.LT.S	F2,F24
LUI	S1,FFFF
ORI	S1,S1,0060	;S1=FFFF0060
BC1FL	7F0C64E0	;yellow - mostly translucent
MOV.S	F22,F24
LUI	S1,FFFF
BEQ	R0,R0,7F0C64E0	;yellow - less than half translucent
ORI	S1,S1,00A0	;S1=FFFF00A0
//7F0C64DC	
note: 7F0C6510 sets the border color