local gpr = require("ee-gpr-alias")
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--gameplay(ported by Jvn9207)
eeObj.WriteMem32(0x00751A7C,0x3c013f40)
eeObj.WriteMem32(0x00751A80,0x44810000)
eeObj.WriteMem32(0x00751A88,0x4600c602)
--FMV's fix(ported by Jvn9207)
eeObj.WriteMem32(0x00443F38,0x00000000)
eeObj.WriteMem32(0x00775A98,0x24056e40)
eeObj.WriteMem32(0x00775AA4,0x24072380)
-- Clamp value manually. Clamping from emulator change value to FLT_MIN
-- While we need correct lower bits + 1 due to x86 rounding...
--sps fix
eeObj.WriteMem32(0x00930430,0xFF7F8001)
--Stack-Pointer Values Changing Loop-based Control-System for enhanced
-- World and Characters Brightness without any bad additional Lights.
--[Characters (incl. Innocent Devils) true Shape and Skin will be revealed now]
--Disable also white Brigthness of the Blooms in Save-Procedure.
--(by Maori-Jigglypuff)
eeObj.WriteMem32(0x0041cce4,0x8e82007c)
eeObj.WriteMem32(0x0041ccf8,0x8c62000c)
eeObj.WriteMem32(0x0041cd00,0x8e82007c)
eeObj.WriteMem32(0x0041cd08,0x0c7fac40)
eeObj.WriteMem32(0x0041cd34,0x0c7fac40)
eeObj.WriteMem32(0x01feb100,0x0000482d)
eeObj.WriteMem32(0x01feb104,0x0220402d)
eeObj.WriteMem32(0x01feb108,0x2d2a0000)
eeObj.WriteMem32(0x01feb10c,0x394a0001)
eeObj.WriteMem32(0x01feb110,0x340b0002)
eeObj.WriteMem32(0x01feb114,0x0169582b)
eeObj.WriteMem32(0x01feb118,0x396b0001)
eeObj.WriteMem32(0x01feb11c,0x3c053fb0)
eeObj.WriteMem32(0x01feb120,0x514b0001)
eeObj.WriteMem32(0x01feb124,0xad050030)
eeObj.WriteMem32(0x01feb128,0x34060003)
eeObj.WriteMem32(0x01feb12c,0x11260003)
eeObj.WriteMem32(0x01feb130,0x00000000)
eeObj.WriteMem32(0x01feb134,0x1000000a)
eeObj.WriteMem32(0x01feb138,0x00000000)
eeObj.WriteMem32(0x01feb13c,0x3c073f80)
eeObj.WriteMem32(0x01feb140,0x10470006)
eeObj.WriteMem32(0x01feb144,0x00000000)
eeObj.WriteMem32(0x01feb148,0x3c074300)
eeObj.WriteMem32(0x01feb14c,0x10470003)
eeObj.WriteMem32(0x01feb150,0x00000000)
eeObj.WriteMem32(0x01feb154,0x10000002)
eeObj.WriteMem32(0x01feb158,0x00000000)
eeObj.WriteMem32(0x01feb15c,0xad070030)
eeObj.WriteMem32(0x01feb160,0x25290001)
eeObj.WriteMem32(0x01feb164,0x2d2b0004)
eeObj.WriteMem32(0x01feb168,0x1560ffe7)
eeObj.WriteMem32(0x01feb16c,0x25080004)
eeObj.WriteMem32(0x01feb170,0x03e00008)
eeObj.WriteMem32(0x01feb174,0x00000000)
eeObj.WriteMem32(0x0041ccc8,0x0c7fac5e)
eeObj.WriteMem32(0x01feb178,0x8fac0060)
eeObj.WriteMem32(0x01feb17c,0x340d0100)
eeObj.WriteMem32(0x01feb180,0x018d1824)
eeObj.WriteMem32(0x01feb184,0x50600001)
eeObj.WriteMem32(0x01feb188,0x7e800060)
eeObj.WriteMem32(0x01feb18c,0x340d0800)
eeObj.WriteMem32(0x01feb190,0x018d1824)
eeObj.WriteMem32(0x01feb194,0x50600001)
eeObj.WriteMem32(0x01feb198,0x7e800060)
eeObj.WriteMem32(0x01feb19c,0x340d0200)
eeObj.WriteMem32(0x01feb1a0,0x018d1824)
eeObj.WriteMem32(0x01feb1a4,0x50600001)
eeObj.WriteMem32(0x01feb1a8,0x7e800060)
eeObj.WriteMem32(0x01feb1ac,0x03e00008)
eeObj.WriteMem32(0x01feb1b0,0x24030003)
eeObj.WriteMem32(0x0041cdb0,0xae200040)
eeObj.WriteMem32(0x008c2264,0x1000000A)
eeObj.WriteMem32(0x0055749c,0x0c7fac6d)
eeObj.WriteMem32(0x01feb1b4,0x0200202D)
eeObj.WriteMem32(0x01feb1b8,0x10800004)
eeObj.WriteMem32(0x01feb1bc,0x00000000)
eeObj.WriteMem32(0x01feb1c0,0x8c830130)
eeObj.WriteMem32(0x01feb1c4,0x34630004)
eeObj.WriteMem32(0x01feb1c8,0xac830130)
eeObj.WriteMem32(0x01feb1cc,0x03E00008)
eeObj.WriteMem32(0x01feb1d0,0xC6200020)
eeObj.WriteMem32(0x004187bc,0x087fac80)
eeObj.WriteMem32(0x004187c0,0x00000000)
eeObj.WriteMem32(0x01feb200,0x3c0c4280)
eeObj.WriteMem32(0x01feb204,0x3c0d3f80)
eeObj.WriteMem32(0x01feb208,0x000c703c)
eeObj.WriteMem32(0x01feb20c,0x01cc7025)
eeObj.WriteMem32(0x01feb210,0x000d683c)
eeObj.WriteMem32(0x01feb214,0x01ac6825)
eeObj.WriteMem32(0x01feb218,0x71ae1488)
eeObj.WriteMem32(0x01feb21c,0x081061f1)
eeObj.WriteMem32(0x01feb220,0x7c620000)
eeObj.WriteMem32(0x0042a9d0,0x03E00008)
eeObj.WriteMem32(0x0042a9d4,0x00000000)
--[[Disable overall Fog Effect(by Maori-Jigglypuff)
eeObj.WriteMem32(0x00411c64,0xace10018)
eeObj.WriteMem32(0x00411c54,0xace0001c)
eeObj.WriteMem32(0x00411ce8,0x087fac8c)
eeObj.WriteMem32(0x00411cec,0x00000000)
eeObj.WriteMem32(0x01feb230,0x3c040002)
eeObj.WriteMem32(0x01feb234,0x3484ee00)
eeObj.WriteMem32(0x01feb238,0x0810473c)
eeObj.WriteMem32(0x01feb23c,0xac448658)
eeObj.WriteMem32(0x00411cf4,0xa0438bf2)--]]
emuObj.ThrottleMax()
end
emuObj.AddVsyncHook(patcher)