-- Resident Evil 4 [SLUS-21134] (U)
-- emu used=KOF 2000
apiRequest(1.0)
local gpr = require("ee-gpr-alias")
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
-- Characters and World Brighter and disable all kind of their additional Lights
-- and correct Brightness and individual Color Adjust for Item Indicators
-- Stack-Pointer controlled for special Brigthness Adjust of
-- 1/3) Laboratory of Plaga Sample ("Assignment Ada")
-- 2/3) Cannons in Shipyard ("Separate Ways")
-- 3/3) Giant Salazar-Statue ("Main Game")
eeObj.WriteMem32(0x00258034,0x0c7fac40)
eeObj.WriteMem32(0x00258b0c,0x0c7fac40)
eeObj.WriteMem32(0x01FEB100,0x3c070025)
eeObj.WriteMem32(0x01FEB104,0x34e78b14)
eeObj.WriteMem32(0x01FEB108,0x17e70012)
eeObj.WriteMem32(0x01FEB10C,0x00000000)
eeObj.WriteMem32(0x01FEB110,0x3c0242b0)
eeObj.WriteMem32(0x01FEB114,0x3c033f80)
eeObj.WriteMem32(0x01FEB118,0x0002383c)
eeObj.WriteMem32(0x01FEB11C,0x00e23825)
eeObj.WriteMem32(0x01FEB120,0x0003183c)
eeObj.WriteMem32(0x01FEB124,0x00621825)
eeObj.WriteMem32(0x01FEB128,0x70675c88)
eeObj.WriteMem32(0x01FEB12C,0x7c8b0000)
eeObj.WriteMem32(0x01FEB130,0x3c023f00)
eeObj.WriteMem32(0x01FEB134,0x3c033f80)
eeObj.WriteMem32(0x01FEB138,0x0002383c)
eeObj.WriteMem32(0x01FEB13C,0x00e23825)
eeObj.WriteMem32(0x01FEB140,0x0003183c)
eeObj.WriteMem32(0x01FEB144,0x00621825)
eeObj.WriteMem32(0x01FEB148,0x70675c88)
eeObj.WriteMem32(0x01FEB14C,0x7cab0000)
eeObj.WriteMem32(0x01FEB150,0x00000000)
eeObj.WriteMem32(0x01FEB154,0x3c070025)
eeObj.WriteMem32(0x01FEB158,0x34e7803c)
eeObj.WriteMem32(0x01FEB15C,0x17e700ae)
eeObj.WriteMem32(0x01FEB160,0x00000000)
eeObj.WriteMem32(0x01FEB164,0x3c024308)
eeObj.WriteMem32(0x01FEB168,0x3c033f80)
eeObj.WriteMem32(0x01FEB16C,0x0002383c)
eeObj.WriteMem32(0x01FEB170,0x00e23825)
eeObj.WriteMem32(0x01FEB174,0x0003183c)
eeObj.WriteMem32(0x01FEB178,0x00621825)
eeObj.WriteMem32(0x01FEB17C,0x70675c88)
eeObj.WriteMem32(0x01FEB180,0x7c8b0000)
eeObj.WriteMem32(0x01FEB184,0x3c023f80)
eeObj.WriteMem32(0x01FEB188,0x3c033f80)
eeObj.WriteMem32(0x01FEB18C,0x0002383c)
eeObj.WriteMem32(0x01FEB190,0x00e23825)
eeObj.WriteMem32(0x01FEB194,0x0003183c)
eeObj.WriteMem32(0x01FEB198,0x00621825)
eeObj.WriteMem32(0x01FEB19C,0x70675c88)
eeObj.WriteMem32(0x01FEB1A0,0x7cab0000)
eeObj.WriteMem32(0x01FEB1A4,0x00000000)
eeObj.WriteMem32(0x01FEB1A8,0x3c030002)
eeObj.WriteMem32(0x01FEB1AC,0x8cc20000)
eeObj.WriteMem32(0x01FEB1B0,0x00431024)
eeObj.WriteMem32(0x01FEB1B4,0x10400052)
eeObj.WriteMem32(0x01FEB1B8,0x00000000)
eeObj.WriteMem32(0x01FEB1BC,0x3c020032)
eeObj.WriteMem32(0x01FEB1C0,0x8c425308)
eeObj.WriteMem32(0x01FEB1C4,0x94437eb8)
eeObj.WriteMem32(0x01FEB1C8,0x2c690100)
eeObj.WriteMem32(0x01FEB1CC,0x39290001)
eeObj.WriteMem32(0x01FEB1D0,0x340a03ff)
eeObj.WriteMem32(0x01FEB1D4,0x0143502b)
eeObj.WriteMem32(0x01FEB1D8,0x394a0001)
eeObj.WriteMem32(0x01FEB1DC,0x3c080118)
eeObj.WriteMem32(0x01FEB1E0,0x112a0022)
eeObj.WriteMem32(0x01FEB1E4,0x3508100e)
eeObj.WriteMem32(0x01FEB1E8,0x340a0400)
eeObj.WriteMem32(0x01FEB1EC,0x3c08010c)
eeObj.WriteMem32(0x01FEB1F0,0x106a001e)
eeObj.WriteMem32(0x01FEB1F4,0x35081018)
eeObj.WriteMem32(0x01FEB1F8,0x340a0402)
eeObj.WriteMem32(0x01FEB1FC,0x3c080104)
eeObj.WriteMem32(0x01FEB200,0x106a001a)
eeObj.WriteMem32(0x01FEB204,0x35080c18)
eeObj.WriteMem32(0x01FEB208,0x340a0403)
eeObj.WriteMem32(0x01FEB20C,0x3c080102)
eeObj.WriteMem32(0x01FEB210,0x106a0016)
eeObj.WriteMem32(0x01FEB214,0x35080618)
eeObj.WriteMem32(0x01FEB218,0x340a0404)
eeObj.WriteMem32(0x01FEB21C,0x3c080108)
eeObj.WriteMem32(0x01FEB220,0x106a0012)
eeObj.WriteMem32(0x01FEB224,0x35080e18)
eeObj.WriteMem32(0x01FEB228,0x2c690405)
eeObj.WriteMem32(0x01FEB22C,0x39290001)
eeObj.WriteMem32(0x01FEB230,0x340a04ff)
eeObj.WriteMem32(0x01FEB234,0x0143502b)
eeObj.WriteMem32(0x01FEB238,0x394a0001)
eeObj.WriteMem32(0x01FEB23C,0x3c080118)
eeObj.WriteMem32(0x01FEB240,0x112a000a)
eeObj.WriteMem32(0x01FEB244,0x3508000c)
eeObj.WriteMem32(0x01FEB248,0x2c690500)
eeObj.WriteMem32(0x01FEB24C,0x39290001)
eeObj.WriteMem32(0x01FEB250,0x340a05ff)
eeObj.WriteMem32(0x01FEB254,0x0143502b)
eeObj.WriteMem32(0x01FEB258,0x394a0001)
eeObj.WriteMem32(0x01FEB25C,0x3c080104)
eeObj.WriteMem32(0x01FEB260,0x112a0002)
eeObj.WriteMem32(0x01FEB264,0x35080118)
eeObj.WriteMem32(0x01FEB268,0x00000000)
eeObj.WriteMem32(0x01FEB26C,0x00084e3c)
eeObj.WriteMem32(0x01FEB270,0x00094e3e)
eeObj.WriteMem32(0x01FEB274,0x44890800)
eeObj.WriteMem32(0x01FEB278,0x46800860)
eeObj.WriteMem32(0x01FEB27C,0x44090800)
eeObj.WriteMem32(0x01FEB280,0x00085a3c)
eeObj.WriteMem32(0x01FEB284,0x000b5e3e)
eeObj.WriteMem32(0x01FEB288,0x448b1800)
eeObj.WriteMem32(0x01FEB28C,0x468018e0)
eeObj.WriteMem32(0x01FEB290,0x440b1800)
eeObj.WriteMem32(0x01FEB294,0x000b583c)
eeObj.WriteMem32(0x01FEB298,0x01694825)
eeObj.WriteMem32(0x01FEB29C,0x0008543c)
eeObj.WriteMem32(0x01FEB2A0,0x000a563e)
eeObj.WriteMem32(0x01FEB2A4,0x448a1000)
eeObj.WriteMem32(0x01FEB2A8,0x468010a0)
eeObj.WriteMem32(0x01FEB2AC,0x440a1000)
eeObj.WriteMem32(0x01FEB2B0,0x0008603c)
eeObj.WriteMem32(0x01FEB2B4,0x000c663e)
eeObj.WriteMem32(0x01FEB2B8,0x448c2000)
eeObj.WriteMem32(0x01FEB2BC,0x46802120)
eeObj.WriteMem32(0x01FEB2C0,0x440c2000)
eeObj.WriteMem32(0x01FEB2C4,0x000c603c)
eeObj.WriteMem32(0x01FEB2C8,0x018a5025)
eeObj.WriteMem32(0x01FEB2CC,0x71494488)
eeObj.WriteMem32(0x01FEB2D0,0x7c880000)
eeObj.WriteMem32(0x01FEB2D4,0x3c023f80)
eeObj.WriteMem32(0x01FEB2D8,0x3c033f80)
eeObj.WriteMem32(0x01FEB2DC,0x0002383c)
eeObj.WriteMem32(0x01FEB2E0,0x00e23825)
eeObj.WriteMem32(0x01FEB2E4,0x0003183c)
eeObj.WriteMem32(0x01FEB2E8,0x00621825)
eeObj.WriteMem32(0x01FEB2EC,0x70675c88)
eeObj.WriteMem32(0x01FEB2F0,0x7cab0000)
eeObj.WriteMem32(0x01FEB2F4,0x00000000)
eeObj.WriteMem32(0x01FEB2F8,0x00000000)
eeObj.WriteMem32(0x01FEB2FC,0x00000000)
eeObj.WriteMem32(0x01FEB300,0x3c030032)
eeObj.WriteMem32(0x01FEB304,0x8c635308)
eeObj.WriteMem32(0x01FEB308,0x94627eb8)
eeObj.WriteMem32(0x01FEB30C,0x00000000)
eeObj.WriteMem32(0x01FEB310,0x34070308)
eeObj.WriteMem32(0x01FEB314,0x10470012)
eeObj.WriteMem32(0x01FEB318,0x00000000)
eeObj.WriteMem32(0x01FEB31C,0x34070309)
eeObj.WriteMem32(0x01FEB320,0x1047000f)
eeObj.WriteMem32(0x01FEB324,0x00000000)
eeObj.WriteMem32(0x01FEB328,0x3407040c)
eeObj.WriteMem32(0x01FEB32C,0x1047000c)
eeObj.WriteMem32(0x01FEB330,0x00000000)
eeObj.WriteMem32(0x01FEB334,0x3407040d)
eeObj.WriteMem32(0x01FEB338,0x10470009)
eeObj.WriteMem32(0x01FEB33C,0x00000000)
eeObj.WriteMem32(0x01FEB340,0x34070513)
eeObj.WriteMem32(0x01FEB344,0x1047000e)
eeObj.WriteMem32(0x01FEB348,0x00000000)
eeObj.WriteMem32(0x01FEB34C,0x34070226)
eeObj.WriteMem32(0x01FEB350,0x10470013)
eeObj.WriteMem32(0x01FEB354,0x00000000)
eeObj.WriteMem32(0x01FEB358,0x1000002f)
eeObj.WriteMem32(0x01FEB35C,0x00000000)
eeObj.WriteMem32(0x01FEB360,0x8fa30088)
eeObj.WriteMem32(0x01FEB364,0x8c6303e4)
eeObj.WriteMem32(0x01FEB368,0x3c020003)
eeObj.WriteMem32(0x01FEB36C,0x00431024)
eeObj.WriteMem32(0x01FEB370,0x10400029)
eeObj.WriteMem32(0x01FEB374,0x00000000)
eeObj.WriteMem32(0x01FEB378,0x10000011)
eeObj.WriteMem32(0x01FEB37C,0x00000000)
eeObj.WriteMem32(0x01FEB380,0x8fa30088)
eeObj.WriteMem32(0x01FEB384,0x8c630334)
eeObj.WriteMem32(0x01FEB388,0x3c020400)
eeObj.WriteMem32(0x01FEB38C,0x00431024)
eeObj.WriteMem32(0x01FEB390,0x10400021)
eeObj.WriteMem32(0x01FEB394,0x00000000)
eeObj.WriteMem32(0x01FEB398,0x1000000b)
eeObj.WriteMem32(0x01FEB39C,0x00000000)
eeObj.WriteMem32(0x01FEB3A0,0x8fa30088)
eeObj.WriteMem32(0x01FEB3A4,0x8C630214)
eeObj.WriteMem32(0x01FEB3A8,0x34022000)
eeObj.WriteMem32(0x01FEB3AC,0x00431024)
eeObj.WriteMem32(0x01FEB3B0,0x10400019)
eeObj.WriteMem32(0x01FEB3B4,0x00000000)
eeObj.WriteMem32(0x01FEB3B8,0x10000005)
eeObj.WriteMem32(0x01FEB3BC,0x00000000)
eeObj.WriteMem32(0x01FEB3C0,0x10000005)
eeObj.WriteMem32(0x01FEB3C4,0x3c0241d0)
eeObj.WriteMem32(0x01FEB3C8,0x10000003)
eeObj.WriteMem32(0x01FEB3CC,0x3c0242d0)
eeObj.WriteMem32(0x01FEB3D0,0x10000001)
eeObj.WriteMem32(0x01FEB3D4,0x3c0242c8)
eeObj.WriteMem32(0x01FEB3D8,0x3c033f80)
eeObj.WriteMem32(0x01FEB3DC,0x0002383c)
eeObj.WriteMem32(0x01FEB3E0,0x00e23825)
eeObj.WriteMem32(0x01FEB3E4,0x0003183c)
eeObj.WriteMem32(0x01FEB3E8,0x00621825)
eeObj.WriteMem32(0x01FEB3EC,0x70675b89)
eeObj.WriteMem32(0x01FEB3F0,0x7c8b0000)
eeObj.WriteMem32(0x01FEB3F4,0x3c023f80)
eeObj.WriteMem32(0x01FEB3F8,0x3c033f80)
eeObj.WriteMem32(0x01FEB3FC,0x0002383c)
eeObj.WriteMem32(0x01FEB400,0x00e23825)
eeObj.WriteMem32(0x01FEB404,0x0003183c)
eeObj.WriteMem32(0x01FEB408,0x00621825)
eeObj.WriteMem32(0x01FEB40C,0x70675b89)
eeObj.WriteMem32(0x01feb410,0x7cab0000)
eeObj.WriteMem32(0x01feb414,0x00000000)
eeObj.WriteMem32(0x01feb418,0x3c073f80)
eeObj.WriteMem32(0x01feb41c,0x03e00008)
eeObj.WriteMem32(0x01feb420,0x44870000)
eeObj.WriteMem32(0x00257f08,0x24030009)
eeObj.WriteMem32(0x0020d12c,0x64020000)
-- No Body Shadow of the Characters on the Ground
eeObj.WriteMem32(0x00257fd0,0x34020100)
-- Disable Fog
eeObj.WriteMem32(0x002299e4,0x3C020010)
-- Disable moving Fog Clouds
eeObj.WriteMem32(0x0028effc,0x64020000)
--Progressive Scan ON
eeObj.WriteMem32(0x20F98820,0x00010100)
--Keep on always
eeObj.WriteMem32(0x20430F60,0x40000000) --Internal widescreen on
eeObj.WriteMem32(0x002810e0,0x3c013f2b) --3c013f00 //Render fix
--Use if doing Leon's campaign (disable if not doing Leon's campaign)
eeObj.WriteMem32(0x2031E3F4,0x42820000) --FOV1
eeObj.WriteMem32(0x2031DC74,0x42820000) --FOV2
eeObj.WriteMem32(0x2031C2F4,0x42700000) --knife/grenade
eeObj.WriteMem32(0x2031C474,0x42700000) --knife/grenade
end
emuObj.AddVsyncHook(patcher)