Difference between revisions of "Template:IPC/RequestHeader/sandbox"

From 3dbrew
Jump to navigation Jump to search
(Created page with "|- | {{#var:ipc_offset}}{{#vardefine:ipc_offset|{{#expr: {{#var:ipc_offset}} + 1}}}} | Header code [{{{1}}}] {| class="wikitable" border="1" style="margin:0 0 0.4em 0" |-...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
|-
 
|-
 
| {{#var:ipc_offset}}{{#vardefine:ipc_offset|{{#expr: {{#var:ipc_offset}} + 1}}}}
 
| {{#var:ipc_offset}}{{#vardefine:ipc_offset|{{#expr: {{#var:ipc_offset}} + 1}}}}
| Header code [{{{1}}}]
+
| Header code [{{{1}}}{{
 +
#vardefine:headerlow|{{#expr:{{{3}}}+({{{2}}}*64)}}}}{{
 +
#vardefine:looppow|12}}{{#while:
 +
| {{#ifexpr: {{#var:looppow}} >= 0 | true }}
 +
| {{#switch: {{#expr:trunc({{#var:headerlow}}/(2^{{#var:looppow}})) mod 16}}
 +
| 0 = 0
 +
| 1 = 1
 +
| 2 = 2
 +
| 3 = 3
 +
| 4 = 4
 +
| 5 = 5
 +
| 6 = 6
 +
| 7 = 7
 +
| 8 = 8
 +
| 9 = 9
 +
| 10 = A
 +
| 11 = B
 +
| 12 = C
 +
| 13 = D
 +
| 14 = E
 +
| 15 = F
 +
| #default = ?
 +
}}{{#vardefine:looppow|{{#expr:{{#var:looppow}}-4}}}}
 +
}}]
 
   {| class="wikitable" border="1" style="margin:0 0 0.4em 0"
 
   {| class="wikitable" border="1" style="margin:0 0 0.4em 0"
 
   |-
 
   |-
 
   ! <abbr title="Command ID">Cmd</abbr>
 
   ! <abbr title="Command ID">Cmd</abbr>
   | {{#sub|{{{1}}}|1|6}}
+
   | {{{1}}}
 
   ! <abbr title="Number of raw parameter words">Param</abbr>
 
   ! <abbr title="Number of raw parameter words">Param</abbr>
   | TODO
+
   | {{{2}}}
 
   ! <abbr title="Number of words in the translate section of the message">Xlat</abbr>
 
   ! <abbr title="Number of words in the translate section of the message">Xlat</abbr>
   | TODO
+
   | {{{3}}}
 
   |}
 
   |}

Latest revision as of 00:06, 17 September 2024

|- | | Header code [{{{1}}}????]

Cmd {{{1}}} Param {{{2}}} Xlat {{{3}}}