gametitle=Twisted Metal: Black (PAL-Unk) [SCES-50360] [2E93D897]

[Widescreen 16:9]
gsaspectratio=16:9
author=Aced14
comment=Widescreen Hack
//16:9 Widescreen

//Main Menu
patch=1,EE,204E25B0,extended,43C00000 //44000000 - Menu Master X FOV
patch=1,EE,204E25D0,extended,3FAAAAAB //3F800000 - Menu Master Y FOV
patch=1,EE,1019D044,extended,0000003B //2405002C - Menu Game Descriptions Font Width (44 -> 59)
patch=1,EE,1019D32C,extended,0000003B //2405002C - Menu High Score Font Width (44 -> 59)
patch=1,EE,104E2B34,extended,0000009D //001400D1 - Menu Loading Bar Width (209 -> 157)

//1 Player
patch=1,EE,204E1F80,extended,43E40000 //44180000 - 1P Master X FOV
patch=1,EE,204E1FA0,extended,3F3BBBBC //3F0CCCCD - 1P Master Y FOV
patch=1,EE,20500318,extended,C01F1AA0 //BFF28F5C - 1P Master X Radar
patch=1,EE,20500324,extended,40076C8B //3FBFF6F5 - 1P Master X Weapon
patch=1,EE,101400C4,extended,0000004F //2411006C - 1P Radar Closest Enemy Name X Position (108 -> 79)
patch=1,EE,1013DC70,extended,00000284 //24050219 - 1P Machine Gun Counter X Position (537 -> 644)
patch=1,EE,1013DFD4,extended,00000235 //2405021C - 1P Endurance "KILLS:%d" X Position (English, French, German, Italian) (540 -> 565)
patch=1,EE,1013DFBC,extended,0000022E //24050212 - 1P Endurance "KILLS:%d" X Position (Spanish) (530 -> 558)

//1 Player - Large Rear View
patch=1,EE,204E29D0,extended,43E40000 //44180000 - 1P Large Rear View Master X Rear FOV
patch=1,EE,204E29F0,extended,3F3BBBBC //3F0CCCCD - 1P Large Rear View Master Y Rear FOV
patch=1,EE,204E2A80,extended,43E40000 //44180000 - 1P Large Rear View Master X Front FOV
patch=1,EE,204E2AA0,extended,3F3BBBBC //3F0CCCCD - 1P Large Rear View Master Y Front FOV
patch=1,EE,205002F8,extended,3E46A7F0 //3E19999A - 1P Large Rear View Master X Radar
patch=1,EE,2050030c,extended,3ED47AE1 //3E99999A - 1P Large Rear View Master X Weapon
patch=1,EE,101400AC,extended,00000047 //24110061 - 1P Large Rear View Radar Closest Enemy Name X Position (97 -> 71)
patch=1,EE,1013DC30,extended,0000028C //24050221 - 1P Large Rear View Machine Gun Counter X Position (545 -> 652)

//1 Player - Small Rear View
patch=1,EE,204E2920,extended,44100000 //44400000 - 1P Small Rear View Master X FOV
patch=1,EE,204E2940,extended,3F3BBBBC //3F0CCCCD - 1P Small Rear View Master Y FOV
patch=1,EE,104E292C,extended,000001AC //000E01A8 - 1P Small Rear View Viewport X Position (424 -> 428)
patch=1,EE,204E2930,extended,450D0000 //450CC000 - 1P Small Rear View Camera X Position
patch=1,EE,204E2938,extended,000008D0 //000008CC - 1P Small Rear View Borders X Position (2252 -> 2256)
patch=1,EE,1013E368,extended,00000002 //24840001 - 1P Small Rear View Right Border X Position (Bug Fix) (2 -> 1)
patch=1,EE,101423E0,extended,0000003D //24060041 - 1P Small Rear View Reticle Counter Y Position (65 -> 61)

//2-4 Players - In-Game Loading Bar
patch=1,EE,104E2BE4,extended,000000A1 //000A00D8 - 2-4P In-Game Loading Bar Width (216 -> 161)
patch=1,EE,104E2BEC,extended,000000F0 //00C800D4 - 2-4P In-Game Loading Bar X Position (212 -> 240)

//2 Players - Horizontal Splitscreen
patch=1,EE,204E2030,extended,43E40000 //44180000 - 2P Horizontal P1 Master X FOV
patch=1,EE,204E2050,extended,3F3BBBBC //3F0CCCCD - 2P Horizontal P1 Master Y FOV
patch=1,EE,204E20E0,extended,43E40000 //44180000 - 2P Horizontal P2 Master X FOV
patch=1,EE,204E2100,extended,3F3BBBBC //3F0CCCCD - 2P Horizontal P2 Master Y FOV
patch=1,EE,20500330,extended,C043645A //C0147AE1 - 2P Horizontal Master X Radar
patch=1,EE,1013D4EC,extended,0000401D //3C013FE0 - 2P Horizontal Master X Weapon
patch=1,EE,101400D8,extended,0000003F //24110057 - 2P Horizontal Radar Closest Enemy Name X Position (87 -> 63)
patch=1,EE,1013DCB0,extended,0000028C //24050221 - 2P Horizontal Machine Gun Counter X Position (545 -> 652)

//2 Players - Vertical Splitscreen
patch=1,EE,204E2190,extended,43C00000 //44000000 - 2P Vertical P1 Master X FOV
patch=1,EE,204E21B0,extended,3F3BBBBC //3F0CCCCD - 2P Vertical P1 Master Y FOV
patch=1,EE,204E2240,extended,43C00000 //44000000 - 2P Vertical P2 Master X FOV
patch=1,EE,204E2260,extended,3F3BBBBC //3F0CCCCD - 2P Vertical P2 Master Y FOV
patch=1,EE,20500344,extended,BFCF1AA0 //BF9F5C29 - 2P Vertical Master X Radar
patch=1,EE,20500350,extended,3F900000 //3F428F5C - 2P Vertical Master X Weapon
patch=1,EE,101400E8,extended,0000003F //24110054 - 2P Vertical Radar Closest Enemy Name X Position (84 -> 63)
patch=1,EE,10142948,extended,00000023 //24A5002E - 2P Vertical Notification Center Offset X Position (46 -> 35)
patch=1,EE,1013DCF8,extended,000000BD //240600BC - 2P Vertical Machine Gun Counter Y Position (188 -> 189)
patch=1,EE,10142494,extended,000000BB //240500F0 - 2P Vertical Reticle Counter X Position (240 -> 187)
patch=1,EE,1014249C,extended,00000049 //24060043 - 2P Vertical Reticle Counter X Position (67 -> 73)

//3-4 Players
patch=1,EE,204E2660,extended,44040000 //44300000 - 4P P1 Master X FOV
patch=1,EE,204E2680,extended,3F3BBBBB //3F0CCCCD - 4P P1 Master Y FOV
patch=1,EE,204E2710,extended,44040000 //44300000 - 4P P2 Master X FOV
patch=1,EE,204E2730,extended,3F3BBBBB //3F0CCCCD - 4P P2 Master Y FOV
patch=1,EE,204E27C0,extended,44040000 //44300000 - 4P P3 Master X FOV
patch=1,EE,204E27E0,extended,3F3BBBBB //3F0CCCCD - 4P P3 Master Y FOV
patch=1,EE,204E2870,extended,44040000 //44300000 - 4P P4 Master X FOV
patch=1,EE,204E2890,extended,3F3BBBBB //3F0CCCCD - 4P P4 Master Y FOV
patch=1,EE,20500358,extended,C006978D //BFCF5C29 - 4P Master X Radar
patch=1,EE,20500364,extended,3FBDF3B6 //3F83D70A - 4P Master X Weapon
patch=1,EE,1013D918,extended,00000111 //24060102 - 4P Master X Turbo Bar (258 -> 273)
patch=1,EE,1013D920,extended,00000025 //2408002E - 4P Master Width Turbo Bar (46 -> 37)
patch=1,EE,1013D934,extended,00000111 //24060102 - 4P Master X Energy Bar (258 -> 273)
patch=1,EE,1013D938,extended,0000000E //2407000D - 4P Master Y Energy Bar (13 -> 14)
patch=1,EE,1013D93C,extended,00000025 //2408002E - 4P Master Width Energy Bar (46 -> 37)
patch=1,EE,1013D950,extended,0000012D //24060128 - 4P Master X Health Bar (296 -> 301)
patch=1,EE,1013D954,extended,00000011 //2407000F - 4P Master Y Health Bar (15 -> 17)
patch=1,EE,1013D958,extended,00000008 //2408000A - 4P Master Width Health Bar (10 -> 8) (Set to 9 to look better on real PS2s/PCSX2 GSdx software mode)
patch=1,EE,1013D960,extended,00000020 //2409001C - 4P Master Height Health Bar (28 -> 32)
patch=1,EE,10142378,extended,00000099 //240500CF - 4P Reticle Counter X Position (207 -> 153)
patch=1,EE,101643B4,extended,0000019D //240501BC - 4P Team Play Scoreboard - GREEN TEAM HIT PTS # X Position (444 -> 413)
patch=1,EE,101644CC,extended,0000019D //240501BC - 4P Team Play Scoreboard - WHITE TEAM HIT PTS # X Position (444 -> 413)
patch=1,EE,101648D4,extended,0000019D //240501BC - 4P Free For All Scoreboard - HIT PTS # X Position (444 -> 413)

//Moving Enemy Health Bars
patch=1,EE,1013FE34,extended,00000020 //2408002A - Moving Enemy Health Bar Width (42 -> 32)
patch=1,EE,1013FE3C,extended,00000010 //24C60015 - Moving Enemy Health Bar X Position Offset (21 -> 16)

//Moving Enemy Indicator Arrows
patch=1,EE,1013F7E4,extended,0000FFF7 //26A6FFF4 - Moving Enemy Indicator Arrow Left Width (-12 -> -9)
patch=1,EE,1013F80C,extended,00000009 //26A9000C - Moving Enemy Indicator Arrow Right Width (9 -> 12)

//Sprites
patch=1,EE,20234750,extended,43E40000 //44180000 - "Hollow" Sprite Width (Non-Interactive Trees, Signal Lights, Etc...)
//patch=1,EE,20234488,extended,43E40000 //44180000 - "Physical" Sprite Size (Interactive Bushy Trees, Weapon Pickups/Street Lights Glow, Etc...) (WIP)
//patch=1,EE,202344A8,extended,43640000 //43980000 - "Physical" Sprite Rotation (Interactive Bushy Trees, Weapon Pickups/Street Lights Glow, Etc...) (WIP)

//Generic Font
patch=1,EE,101C538C,extended,00000007 //24060005 - Most In-Game Text Widths (Notifications, Machine Gun Counter, Start Menu, Scoreboards, Etc...) (5 -> 7)

//Radar - Closest Enemy Names Widths (hudCarWidths)
patch=1,EE,2023E650,extended,09070707 //0C0A0A09 - Closest Enemy Names Pixel Widths ("OutLaw", "Yellow-J", "RoadKill", "         " - Initial Empty Name for "WarHawk") (12 -> 9, 10 -> 7, 10 -> 7, 9 -> 7)
patch=1,EE,2023E654,extended,06080808 //090B0B0B - Closest Enemy Names Pixel Widths ("Brimstone", "S-TOOTH", "Crazy 8", "Spectre") (9 -> 6, 11 -> 8, 11 -> 8, 11 -> 8)
patch=1,EE,2023E658,extended,09070807 //0C0A0B09 - Closest Enemy Names Pixel Widths ("Axel", "Mr.Grimm", "Shadow", "Junk-Dog") (12 -> 9, 10 -> 7, 11 -> 8, 9 -> 7)
patch=1,EE,2023E65C,extended,08060708 //0B090A0A - Closest Enemy Names Pixel Widths ("Minion", "M-Slaught", "DarkSide", "WartHog") (11 -> 8, 9 -> 6, 10 -> 7, 10 -> 8)
patch=1,EE,1023E660,extended,00000808 //00000A0B - Closest Enemy Names Pixel Widths ("Tanker", "WarHawk") (10 -> 8, 11 -> 8)

//Radar - Coordinates Positioning
patch=1,EE,101404DC,extended,00004134 //3C014170 - Radar X Axis Coordinates Width
patch=1,EE,20140508,extended,08071648 //46051082 - j $001C5920 - Jump to injected MIPS instructions
patch=1,EE,201C5920,extended,3C014189 //00822021 - lui at, $4189 - Set radar Y axis coordinate height #1
patch=1,EE,201C5924,extended,34212492 //A4860012 - ori at, at, $2492 - Set radar Y axis coordinate height #2
patch=1,EE,201C5928,extended,44812800 //A4850010 - mtc1 at, $f5 - Set radar Y axis coordinate height #3
patch=1,EE,201C592C,extended,08050144 //03E00008 - j $00140510 - Jump to 2 lines after the overwritten MIPS instruction
patch=1,EE,201C5930,extended,46051082 //A4850014 - mul.s $f2, $f2, $f5 - Restore overwritten MIPS instruction from initial jump

//Left-Aligned Text Positioning (fontSpritePrintXY)
patch=1,EE,201C55F4,extended,080819C8 //3C030051 - j $00206720 - Jump to injected MIPS instructions
patch=1,EE,20206720,extended,4485F800 //0080302D - mtc1 a1, $f31 - Convert int to float #1
patch=1,EE,20206724,extended,4680FFE0 //24030070 - cvt.s.w $f31, $f31 - Convert int to float #2
patch=1,EE,20206728,extended,3C0142D5 //2404001C - lui at, $42d5 - Set $f30 register to 106.666687 #1
patch=1,EE,2020672C,extended,34215558 //70C31818 - ori at, at, $5556 - Set $f30 register to 106.666687 #2
patch=1,EE,20206730,extended,4481F000 //00A42018 - mtc1 at, $f30 - Set $f30 register to 106.666687 #3
patch=1,EE,20206734,extended,461EFFC0 //27BDFFF0 - add.s $f31, $f31, $f30 - Add $f30 to $f31
patch=1,EE,20206738,extended,3C013F40 //3C020075 - lui at, $3f40 - Set $f30 register to .75 #1
patch=1,EE,2020673C,extended,4481F000 //FFBF0000 - mtc1 at, $f30 - Set $f30 register to .75 #2
patch=1,EE,20206740,extended,461EFFC2 //24422910 - mul.s $f31, $f31, $f30 - Multiply $f31 by $f30
patch=1,EE,20206744,extended,3C013F00 //00832021 - lui at, $3f00 - Set $f30 register to .5 #1
patch=1,EE,20206748,extended,4481F000 //00441021 - mtc1 at, $f30 - Set $f30 register to .5 #2
patch=1,EE,2020674C,extended,461EFFC0 //8C430010 - add.s $f31, $f31, $f30 - Add .5 for rounding
patch=1,EE,20206750,extended,4600FFE4 //10600004 - cvt.w.s $f31, $f31 - Convert float to int #1
patch=1,EE,20206754,extended,4405F800 //0000102D - mfc1 a1, $f31 - Convert float to int #2
patch=1,EE,20206758,extended,0807157F //0C0819B0 - j $001c55fc - Jump to 2 lines after the overwritten MIPS instruction
patch=1,EE,2020675C,extended,3C030051 //00C0202D - lui v1, $0051 - Restore overwritten MIPS instruction from initial jump

//Sub Pixel Font Width/Spacing (fontSetCharSizesInSubPixels)
patch=1,EE,201C5870,extended,08071626 //00832018 - j $001c5898 - Jump to injected MIPS instructions
patch=1,EE,201C5898,extended,3C013F40 //24030038 - lui at, $3f40 - Set $f29 register to .75 #1
patch=1,EE,201C589C,extended,4481E800 //3C020051 - mtc1 at, $f29 - Set $f29 register to .75 #2
patch=1,EE,201C58A0,extended,3C013F00 //00832018 - lui at, $3f00 - Set $f30 register to .5 #1
patch=1,EE,201C58A4,extended,4481F000 //2442CAF0 - mtc1 at, $f30 - Set $f30 register to .5 #2
patch=1,EE,201C58A8,extended,4485F800 //00822021 - mtc1 a1, $f31 - Convert int to float #1
patch=1,EE,201C58AC,extended,4680FFE0 //9483000E - cvt.s.w $f31, $f31 - Convert int to float #2
patch=1,EE,201C58B0,extended,461DFFC2 //9482000C - mul.s $f31, $f31, $f29 - Multiply $f31 by $f29
patch=1,EE,201C58B4,extended,461EFFC0 //00A32818 - add.s $f31, $f31, $f30 - Add .5 for rounding
patch=1,EE,201C58B8,extended,4600FFE4 //70C23018 - cvt.w.s $f31, $f31 - Convert float to int #1
patch=1,EE,201C58BC,extended,4405F800 //A4850010 - mfc1 a1, $f31 - Convert float to int #2
patch=1,EE,201C58C0,extended,4487F800 //A4860012 - mtc1 a3, $f31 - Convert int to float #1
patch=1,EE,201C58C4,extended,4680FFE0 //03E00008 - cvt.s.w $f31, $f31 - Convert int to float #2
patch=1,EE,201C58C8,extended,461DFFC2 //A4850014 - mul.s $f31, $f31, $f29 - Multiply $f31 by $f29
patch=1,EE,201C58CC,extended,461EFFC1 //00000000 - sub.s $f31, $f31, $f30 - Subtract .5 for rounding
patch=1,EE,201C58D0,extended,4600FFE4 //24030038 - cvt.w.s $f31, $f31 - Convert float to int #1
patch=1,EE,201C58D4,extended,4407F800 //3C020051 - mfc1 a3, $f31 - Convert float to int #2
patch=1,EE,201C58D8,extended,0807161E //00832018 - j $001c5878 - Jump to 2 lines after the overwritten MIPS instruction
patch=1,EE,201C58DC,extended,00832018 //2442CAF0 - mult a0, a0, v1 - Restore overwritten MIPS instruction from initial jump

//Sub Pixel-Based Text Positioning (fontSetCursorAtSubPixel)
patch=1,EE,201C5940,extended,08071638 //00832018 - j $001c58e0 - Jump to injected MIPS instructions
patch=1,EE,201C58E0,extended,4485F800 //00822021 - mtc1 a1, $f31 - Convert int to float #1
patch=1,EE,201C58E4,extended,4680FFE0 //9483000E - cvt.s.w $f31, $f31 - Convert int to float #2
patch=1,EE,201C58E8,extended,3C0144D5 //9482000C - lui at, $44d5 - Set $f30 register to 1708.333374 #1
patch=1,EE,201C58EC,extended,34218AAB //00C33018 - ori at, at, $8aab - Set $f30 register to 1708.333374 #2
patch=1,EE,201C58F0,extended,4481F000 //70A22818 - mtc1 at, $f30 - Set $f30 register to 1708.333374 #3
patch=1,EE,201C58F4,extended,461EFFC0 //A4860010 - add.s $f31, $f31, $f30 - Add $f30 to $f31
patch=1,EE,201C58F8,extended,3C013F40 //A4850012 - lui at, $3f40 - Set $f30 register to .75 #1
patch=1,EE,201C58FC,extended,4481F000 //03E00008 - mtc1 at, $f30 - Set $f30 register to .75 #2
patch=1,EE,201C5900,extended,461EFFC2 //A4860014 - mul.s $f31, $f31, $f30 - Multiply $f31 by $f30
patch=1,EE,201C5904,extended,3C013F00 //00000000 - lui at, $3f00 - Set $f30 register to .5 #1
patch=1,EE,201C5908,extended,4481F000 //24030038 - mtc1 at, $f30 - Set $f30 register to .5 #2
patch=1,EE,201C590C,extended,461EFFC0 //3C020051 - add.s $f31, $f31, $f30 - Add .5 for rounding
patch=1,EE,201C5910,extended,4600FFE4 //00832018 - cvt.w.s $f31, $f31 - Convert float to int #1
patch=1,EE,201C5914,extended,4405F800 //2442CAF0 - mfc1 a1, $f31 - Convert float to int #2
patch=1,EE,201C5918,extended,08071652 //00052900 - j $001c5948 - Jump to 2 lines after the overwritten MIPS instruction
patch=1,EE,201C591C,extended,00832018 //00063100 - mult a0, a0, v1 - Restore overwritten MIPS instruction from initial jump


