Template:Ps2configrev: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
mNo edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
*Requires [[PS2 Emulation|ps2_netemu.self]] from firmware {{#switch:{{{1|}}}
(<abbr title="Config File Revision>rev.</abbr> {{{1|0}}}). Requires [[PS2 Emulation|PS2 Emulator]] from '''firmware <!--
| 15686    = [[3.70_CEX|3.70]] or newer
-->{{#ifexpr:{{{1|0}}}>=0 and {{{1|0}}}<=15686
| 15842     = [[3.72_CEX|3.72]] or newer
    |<!--then-->[[3.70_CEX|3.70]]
| 15936     = [[3.73_CEX|3.73]] or newer
    |<!--else-->{{#ifexpr:{{{1}}}>=15687 and {{{1}}}<=15842
| 16195     = [[4.00_CEX|4.00]] or newer
      |<!--then-->[[3.72_CEX|3.72]]
| 16361     = [[4.10_CEX|4.10]] or newer
      |<!--else-->{{#ifexpr:{{{1}}}>=15843 and {{{1}}}<=15936
| 16604     = [[4.20_CEX|4.20]] or newer
        |<!--then-->[[3.73_CEX|3.73]]
| 16740     = [[4.25_CEX|4.25]] or newer
        |<!--else-->{{#ifexpr:{{{1}}}>=15937 and {{{1}}}<=16195
          |<!--then-->[[4.00_CEX|4.00]]
          |<!--else-->{{#ifexpr:{{{1}}}>=16196 and {{{1}}}<=16361
            |<!--then-->[[4.10_CEX|4.10]]
            |<!--else-->{{#ifexpr:{{{1}}}>=16362 and {{{1}}}<=16604
              |<!--then-->[[4.20_CEX|4.20]]
              |<!--else-->{{#ifexpr:{{{1}}}>=16605 and {{{1}}}<=16740
                |<!--then-->[[4.25_CEX|4.25]]
                |<!--else-->{{#ifexpr:{{{1}}}>=16741 and {{{1}}}<=16808
                  |<!--then-->[[4.30_CEX|4.30]]
                  |<!--else-->{{#ifexpr:{{{1}}}>=16809 and {{{1}}}<=16916
                    |<!--then-->[[4.40_CEX|4.40]]
                    |<!--else-->{{#ifexpr:{{{1}}}>=16917 and {{{1}}}<=17041
                      |<!--then-->[[4.45_CEX|4.45]]
                      |<!--else-->{{#ifexpr:{{{1}}}>=17042 and {{{1}}}<=17179
                        |<!--then-->[[4.50_CEX|4.50]]
                        |<!--else-->{{#ifexpr:{{{1}}}>=17180 and {{{1}}}<=17277
                          |<!--then-->[[4.55_CEX|4.55]]
                          |<!--else-->{{#ifexpr:{{{1}}}>=17278 and {{{1}}}<=17314
                            |<!--then-->[[4.60_CEX|4.60]]
                            |<!--else-->{{#ifexpr:{{{1}}}>=17315 and {{{1}}}<=17495
                              |<!--then-->[[4.78_CEX|4.78]]
                              |<!--else--><abbr style="color:#aa0000;" title="Incompatible">9.99</abbr>
                            }}
                          }}
                        }}
                      }}
                    }}
                  }}
                }}
              }}
            }}
          }}
        }}
      }}
    }}
  }}''' or newer<noinclude>


| 9841
== Examples ==
| 0x9841
<nowiki>{{ps2configrev|01337}}</nowiki> = {{ps2configrev|01337}}<br>
| 4198
<nowiki>{{ps2configrev|15700}}</nowiki> = {{ps2configrev|15700}}<br>
| 0x4198
<nowiki>{{ps2configrev|15900}}</nowiki> = {{ps2configrev|15900}}<br>
| 16792    = [[4.30_CEX|4.30]] or newer
<nowiki>{{ps2configrev|16000}}</nowiki> = {{ps2configrev|16000}}<br>
<nowiki>{{ps2configrev|16200}}</nowiki> = {{ps2configrev|16200}}<br>
<nowiki>{{ps2configrev|16500}}</nowiki> = {{ps2configrev|16500}}<br>
<nowiki>{{ps2configrev|16700}}</nowiki> = {{ps2configrev|16700}}<br>
<nowiki>{{ps2configrev|16800}}</nowiki> = {{ps2configrev|16800}}<br>
<nowiki>{{ps2configrev|16900}}</nowiki> = {{ps2configrev|16900}}<br>
<nowiki>{{ps2configrev|17000}}</nowiki> = {{ps2configrev|17000}}<br>
<nowiki>{{ps2configrev|17100}}</nowiki> = {{ps2configrev|17100}}<br>
<nowiki>{{ps2configrev|17200}}</nowiki> = {{ps2configrev|17200}}<br>
<nowiki>{{ps2configrev|17300}}</nowiki> = {{ps2configrev|17300}}<br>
<nowiki>{{ps2configrev|17400}}</nowiki> = {{ps2configrev|17400}}<br>
<nowiki>{{ps2configrev|18000}}</nowiki> = {{ps2configrev|18000}}


| 5744
== Notes ==
| 0x5744
It could be handy to do the conversion in this sequence: '''1) hexLE to hexBE, 2) hexBE to dec, 3) Math expression to compare the value in ranges'''<br>
| 4457
I was experimenting in wikipedia to do step 2 using the template https://en.wikipedia.org/wiki/Template:Hex2dec and it works, is dependant of the module https://en.wikipedia.org/wiki/Module:BaseConvert but actually we dont need the template because we can call the module BaseConvert directly in a single line this way: <nowiki>{{#invoke:BaseConvert|16to10|FFFF}}</nowiki><br>
| 0x4457
We already have a template named https://www.psdevwiki.com/ps3/Template:Hex2dec in this wiki but is not working. And we already have the module BaseConvert installed https://www.psdevwiki.com/ps3/Special:Version but doesnt seems to work, it looks we cant "#invoke" it. Im wondering if is because we need to copy also the script into https://www.psdevwiki.com/ps3/Module:BaseConvert (the page doesnt exists)<br>
| 17495    = [[4.78_CEX|4.78]] or newer
So... by now i dont know how to do '''steps 1 and 2''' of the conversion process, and the math expressions (required for '''step 3''') only works with decimals... so the only solution by now is to pass the decimal value to this template
 
== hex2dec conversion way around 16 bits ==
This trick would allow to pass the value in hex format to this template
*Formula: #expr: '''W'''*16^3 + '''X'''*16^2 + '''Y'''*16^1 + '''Z'''*16^0
*Example 0x5555 = <code><nowiki>{{#expr: 5*16^3 + 5*16^2 + 5*16^1 + 5*16^0}}</nowiki></code> = {{#expr: 5*16^3 + 5*16^2 + 5*16^1 + 5*16^0}}
** 5*16^3 + 5*16^2 + 5*16^1 + 5*16^0
** 5*4096 + 5*256 + 5*16 + 5*1
** 20480 + 1280 + 80 + 5
** 21845
 
For this to work it would be needed also to split the original hex value in digits (4 bits, or half a byte). And pass the digits individually to another template containing a "switch" statement that should return 16 posible values in decimal (if 0=0, 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, A=10, B=11, C=12, D=13, E=14, F=15)<br>
The endianess is something trivial and easy to implement as an additional parameter when calling the template, but i think is better to simplify the usage as most as posible so the candidate template names by now are: <nowiki>{{hex2dec1byte}}, {{hex2dec2bytesLE}}, {{hex2dec2bytesBE}}</nowiki>


| #default  = ('''Unknown config revision, please help <strike>adding</strike> breaking the template {{edit|Template:ps2configrev|<nowiki>{{ps2configrev}}</nowiki>}}''')
*Not working in psdevwiki, see: [https://www.mediawiki.org/wiki/Module:String 1] and [https://www.mediawiki.org/wiki/Extension:StringFunctions 2]
}}<noinclude>
**{{#invoke:String|pos|target_string|index_value}}<br>
**{{#invoke:String|pos|target=target_string|pos=index_value}}<br>
**{{#pos|target=target_string|pos=index_value}}<br>
**{{#len:string}}<br>
**{{#sub:QWERTY|3|1}}<br>


<br>
== Notes ==
It could be handy to do the conversion in this sequence: '''1) hexLE to hexBE, 2) hexBE to dec, 3) Math expression to compare the value in ranges'''<br>
I been trying to do step 2 using this template https://en.wikipedia.org/wiki/Template:Hex2dec Is dependant of the module https://en.wikipedia.org/wiki/Module:BaseConvert Actually we dont need the template because we can call the module BaseConvert directly in a single line this way: <nowiki>{{#invoke:BaseConvert|16to10|FFFF}}</nowiki><br>
We already have a template named https://www.psdevwiki.com/ps3/Template:Hex2dec ... but is not doing the conversion<br>
We already have the module BaseConvert installed in this wiki https://www.psdevwiki.com/ps3/Special:Version but doesnt seems to work, it looks we cant "#invoke" it. Im wondering if is because we need to copy also the script into https://www.psdevwiki.com/ps3/Module:BaseConvert (the page doesnt exists)<br>
So... by now i dont know how to do '''steps 1 and 2''' of the conversion process. And the math expressions (required for '''step 3''') only works with decimals... so the only solution by now is to pass the decimal value to this template
[[Category:Games]]</noinclude>
[[Category:Games]]</noinclude>

Latest revision as of 00:54, 27 October 2022

(rev. 0). Requires PS2 Emulator from firmware 3.70 or newer

Examples[edit source]

{{ps2configrev|01337}} = (rev. 01337). Requires PS2 Emulator from firmware 3.70 or newer
{{ps2configrev|15700}} = (rev. 15700). Requires PS2 Emulator from firmware 3.72 or newer
{{ps2configrev|15900}} = (rev. 15900). Requires PS2 Emulator from firmware 3.73 or newer
{{ps2configrev|16000}} = (rev. 16000). Requires PS2 Emulator from firmware 4.00 or newer
{{ps2configrev|16200}} = (rev. 16200). Requires PS2 Emulator from firmware 4.10 or newer
{{ps2configrev|16500}} = (rev. 16500). Requires PS2 Emulator from firmware 4.20 or newer
{{ps2configrev|16700}} = (rev. 16700). Requires PS2 Emulator from firmware 4.25 or newer
{{ps2configrev|16800}} = (rev. 16800). Requires PS2 Emulator from firmware 4.30 or newer
{{ps2configrev|16900}} = (rev. 16900). Requires PS2 Emulator from firmware 4.40 or newer
{{ps2configrev|17000}} = (rev. 17000). Requires PS2 Emulator from firmware 4.45 or newer
{{ps2configrev|17100}} = (rev. 17100). Requires PS2 Emulator from firmware 4.50 or newer
{{ps2configrev|17200}} = (rev. 17200). Requires PS2 Emulator from firmware 4.55 or newer
{{ps2configrev|17300}} = (rev. 17300). Requires PS2 Emulator from firmware 4.60 or newer
{{ps2configrev|17400}} = (rev. 17400). Requires PS2 Emulator from firmware 4.78 or newer
{{ps2configrev|18000}} = (rev. 18000). Requires PS2 Emulator from firmware 9.99 or newer

Notes[edit source]

It could be handy to do the conversion in this sequence: 1) hexLE to hexBE, 2) hexBE to dec, 3) Math expression to compare the value in ranges
I was experimenting in wikipedia to do step 2 using the template https://en.wikipedia.org/wiki/Template:Hex2dec and it works, is dependant of the module https://en.wikipedia.org/wiki/Module:BaseConvert but actually we dont need the template because we can call the module BaseConvert directly in a single line this way: {{#invoke:BaseConvert|16to10|FFFF}}
We already have a template named https://www.psdevwiki.com/ps3/Template:Hex2dec in this wiki but is not working. And we already have the module BaseConvert installed https://www.psdevwiki.com/ps3/Special:Version but doesnt seems to work, it looks we cant "#invoke" it. Im wondering if is because we need to copy also the script into https://www.psdevwiki.com/ps3/Module:BaseConvert (the page doesnt exists)
So... by now i dont know how to do steps 1 and 2 of the conversion process, and the math expressions (required for step 3) only works with decimals... so the only solution by now is to pass the decimal value to this template

hex2dec conversion way around 16 bits[edit source]

This trick would allow to pass the value in hex format to this template

  • Formula: #expr: W*16^3 + X*16^2 + Y*16^1 + Z*16^0
  • Example 0x5555 = {{#expr: 5*16^3 + 5*16^2 + 5*16^1 + 5*16^0}} = 21845
    • 5*16^3 + 5*16^2 + 5*16^1 + 5*16^0
    • 5*4096 + 5*256 + 5*16 + 5*1
    • 20480 + 1280 + 80 + 5
    • 21845

For this to work it would be needed also to split the original hex value in digits (4 bits, or half a byte). And pass the digits individually to another template containing a "switch" statement that should return 16 posible values in decimal (if 0=0, 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, A=10, B=11, C=12, D=13, E=14, F=15)
The endianess is something trivial and easy to implement as an additional parameter when calling the template, but i think is better to simplify the usage as most as posible so the candidate template names by now are: {{hex2dec1byte}}, {{hex2dec2bytesLE}}, {{hex2dec2bytesBE}}

  • Not working in psdevwiki, see: 1 and 2
    • {{#invoke:String|pos|target_string|index_value}}
    • {{#invoke:String|pos|target=target_string|pos=index_value}}
    • {{#pos|target=target_string|pos=index_value}}
    • {{#len:string}}
    • {{#sub:QWERTY|3|1}}