Editing PS2 Emulation

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 3,145: Line 3,145:
=LUA include files=
=LUA include files=
<pre>Files that some official pkgs use in order for the lua files to be separate.
<pre>Files that some official pkgs use in order for the lua files to be separate.
</pre>
<br>'''pad-connect-type.lua'''
<pre>
local PadConnectType = {}
PadConnectType.DS4 = 0
PadConnectType.HID              = 1 -- any 3rd party USB controller (fight stick, turbo controller, etc), always local.
PadConnectType.REMOTE_DS4      = 2 -- remote DS4 should behave just like regular DS4
PadConnectType.REMOTE_VITA      = 3 -- remote VITA lacks analog L2/R2
return PadConnectType
</pre>
<br>'''sprite.lua'''
<pre>
local kFilterMode = {}
kFilterMode.Point                          = 0x00000000 -- < Sample the one texel nearest to the sample point.
kFilterMode.Bilinear                        = 0x00000001 -- < Sample the four texels nearest the sample point, and blend linearly.
local kWrapMode = {}
kWrapMode.Wrap                              = 0x00000000 -- < The integer portion of the input coordinate is discarded, and the fractional portion is used instead. <c>U=U-floorf(U);</c>
kWrapMode.Mirror                            = 0x00000001 -- < The input coordinate is "reflected" across the texture boundary. This reflection may occur multiple times until the coordinate falls within the <c>[0..1]</c> range. <c>U=isOdd(floorf(U)) ? 1-fracf(U) : fracf(U)</c>
kWrapMode.ClampLastTexel                    = 0x00000002 -- < The input coordinate is clamped to the range <c>[0..1]</c>. <c>U=max(0,min(1,U));</c>
kWrapMode.MirrorOnceLastTexel              = 0x00000003 -- < The input coordinate is reflected at most one time and then clamped to the range <c>[0..1]</c>. <c>U=abs(max(-1,min(1,U));</c>
kWrapMode.ClampHalfBorder                  = 0x00000004 -- < Similar to kWrapModeClampLastTexel, but if clamping is necessary, the output color will be the border color specified by the Sampler. For this mode, coordinates that are not within half a pixel of the border are considered clamped.
kWrapMode.MirrorOnceHalfBorder              = 0x00000005 -- < Similar to kWrapModeMirrorOnceLastTexel, but if clamping is necessary, the output color will be the border color specified by the Sampler. For this mode, coordinates that are not within half a pixel of the border are considered clamped.
kWrapMode.ClampBorder                      = 0x00000006 -- < Similar to kWrapModeClampLastTexel, but if clamping is necessary, the output color will be the border color specified by the Sampler. For this mode, coordinates that are outside the range <c>[0..1]</c> are considered clamped.
kWrapMode.MirrorOnceBorder                  = 0x00000007 -- < Similar to kWrapModeMirrorOnceLastTexel, but if clamping is necessary, the output color will be the border color specified by the Sampler. For this mode, coordinates that are outside the range <c>[0..1]</c> are considered clamped.
local kBlendMultiplier = {}
kBlendMultiplier.Zero                            = 0x00000000  -- < Multiply the associated input by zero.
kBlendMultiplier.One                              = 0x00000001  -- < Multiply the associated input by one.
kBlendMultiplier.SrcColor                        = 0x00000002  -- < Multiply the associated input by the fragment color.
kBlendMultiplier.OneMinusSrcColor                = 0x00000003  -- < Multiply the associated input by one minus the fragment color.
kBlendMultiplier.SrcAlpha                        = 0x00000004  -- < Multiply the associated input by the fragment alpha.
kBlendMultiplier.OneMinusSrcAlpha                = 0x00000005  -- < Multiply the associated input by one minus the fragment alpha.
kBlendMultiplier.DestAlpha                        = 0x00000006  -- < Multiply the associated input by the render target alpha.
kBlendMultiplier.OneMinusDestAlpha                = 0x00000007  -- < Multiply the associated input by one minus the render target alpha.
kBlendMultiplier.DestColor                        = 0x00000008  -- < Multiply the associated input by the render target color.
kBlendMultiplier.OneMinusDestColor                = 0x00000009  -- < Multiply the associated input by one minus the render target color.
kBlendMultiplier.SrcAlphaSaturate                = 0x0000000a  -- < Multiply the associated input by the minimum of 1 or fragment alpha.
kBlendMultiplier.ConstantColor                    = 0x0000000d  -- < Multiply the associated input by the constant color. @see DrawCommandBuffer::setBlendColor()
kBlendMultiplier.OneMinusConstantColor            = 0x0000000e  -- < Multiply the associated input by one minus the constant color. @see DrawCommandBuffer::setBlendColor()
kBlendMultiplier.Src1Color                        = 0x0000000f  -- < Multiply the associated input by a secondary fragment color.
kBlendMultiplier.InverseSrc1Color                = 0x00000010  -- < Multiply the associated input by one minus a secondary fragment color.
kBlendMultiplier.Src1Alpha                        = 0x00000011  -- < Multiply the associated input by a secondary fragment alpha.
kBlendMultiplier.InverseSrc1Alpha                = 0x00000012  -- < Multiply the associated input by one minus a secondary fragment alpha.
kBlendMultiplier.ConstantAlpha                    = 0x00000013  -- < Multiply the associated input by the constant color alpha. @see DrawCommandBuffer::setBlendColor()
kBlendMultiplier.OneMinusConstantAlpha            = 0x00000014  -- < Multiply the associated input by one minus the constant color alpha. @see DrawCommandBuffer::setBlendColor()
local kBlendFunc = {}
kBlendFunc.Add                          = 0x00000000  -- < The source value is added to the destination value.
kBlendFunc.Subtract                    = 0x00000001  -- < The destination value is subtracted from the source value.
kBlendFunc.Min                          = 0x00000002  -- < The minimum of the source and destination values is selected.
kBlendFunc.Max                          = 0x00000003  -- < The maximum of the source and destination values is selected.
kBlendFunc.ReverseSubtract              = 0x00000004  -- < The source value is subtracted from the destination value.
-- Default blending mode, ideal for typical alpha channel embedded into a PNG image.
blendDefaultEquation = {
kBlendMultiplier.SrcAlpha, -- src multiplier
kBlendFunc.Add,                         -- blend function
kBlendMultiplier.OneMinusSrcAlpha,     -- dest multiplier
}
blendConstFadeEquation = {
kBlendMultiplier.ConstantAlpha, -- src multiplier
kBlendFunc.Add,                       -- blend function
kBlendMultiplier.OneMinusConstantAlpha,     -- dest multiplier
}
return kFilterMode, kWrapMode, kBlendMultiplier, kBlendFunc
</pre>
</pre>
<br>'''ee-cpr0-alias.lua'''
<br>'''ee-cpr0-alias.lua'''
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)