Template:Boxcodelite: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (Reduced padding inside the <pre> area)
(Dark skin support)
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="float:{{{float|right}}}; font-size:85%; margin:5px; background:#eebb99; border:3px double #bb8866; box-shadow: 4px 4px 2px 1px #eeeeee;">
<div style="float:{{{float|right}}}; margin:5px; padding:3px; font-size:0.85em; background:#f7c7a7; border:3px double #c79777; box-shadow: 4px 4px 2px 1px rgba(0,0,0,.2);">
  <div style="margin-bottom:-5px; text-align:center; font-weight:bold;">{{{title|Title}}}</div>
  {{#if:{{{title|}}} | <div style="margin-top:-3px; text-align:center; font-weight:bolder;">{{{title|Custom Title}}}</div> | }}
  <div style="margin:5px; border:1px dashed #bb8866;">
  {{#ifeq:{{{syntax}}} | wiki | {{#tag:div|{{{code|Code Sample}}}|style="min-width:330px; padding:5px; background:{{{background|#f7f4f2}}}; color:{{{color|#000}}}; border:1px dashed #c79777; font-family:monospace; font-weight:bolder; font-size:1.2em; line-height:1.6em"}} | {{#tag:pre|{{{code|Code Sample}}}|style="min-width:330px; padding:5px; background:{{{background|#f7f4f2}}}; color:{{{color|#000}}}; border:1px dashed #c79777; line-height:1.1em"}}}}
  <div style="margin-top:-12px; margin-bottom:-12px;">{{#tag:pre|{{{code|Code}}}|style=padding:5px}}</div>
{{#if:{{{ps2configrev|}}} | <div style="height:13px; text-align:left; font-size:0.9em;">{{ps2configrev|{{{ps2configrev|}}}}}</div> | }}
</div>
</div><noinclude>
</div><noinclude>[[Category:Templates]]<noinclude>


{{clear}}<br>
{{clear}}
== Usage ==
== Usage ==
*<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=Code<nowiki>}}</nowiki>
*<nowiki>{{</nowiki>boxcodelite|'''code'''=Code Sample<nowiki>}}</nowiki>
**This way allows to display some "preformatted" code inside the box
*<nowiki>{{</nowiki>boxcodelite|'''title'''=Custom Title|'''code'''=Code Sample<nowiki>}}</nowiki>
*<nowiki>{{</nowiki>boxcodelite|'''float'''=left|'''title'''=Title|'''code'''=Code<nowiki>}}</nowiki>
*<nowiki>{{</nowiki>boxcodelite|'''float'''=left|'''title'''=Custom Title|'''code'''=Code Sample<nowiki>}}</nowiki>
**By default it floats to right, but can be configured to float left
*<nowiki>{{</nowiki>boxcodelite|'''syntax'''=wiki|'''float'''=left|'''title'''=Custom Title|'''code'''=Code Sample<nowiki>}}</nowiki>
*<nowiki>{{</nowiki>boxcodelite|'''syntax'''=wiki|'''background'''=#000|'''color'''=#fff|'''title'''=Custom Title|'''code'''=Code Sample<nowiki>}}</nowiki>
*<nowiki>{{</nowiki>boxcodelite|'''title'''=Custom Title|'''ps2configrev'''=17495|'''code'''=Code Sample<nowiki>}}</nowiki>


== Examples ==
== Examples ==
{{boxcodelite|title=BLJM85001|code=
<div style="float:right">
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192
}}
 
{{boxcodelite|title=HEX view|code=
{{boxcodelite|title=HEX view|code=
01 FF C4 00 1E 00 00 01 04 03 01 01 01 00 00 00
01 FF C4 00 1E 00 00 01 04 03 01 01 01 00 00 00
Line 40: Line 35:
31 41 07 13 51 61 14 22 71 81 08 32 91 A1 15 23
31 41 07 13 51 61 14 22 71 81 08 32 91 A1 15 23
}}
}}
{{clear|right}}
{{boxcodelite|title=BLJM85001|code=
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192
}}
{{boxcodelite|title=SCES-50885|ps2configrev=17495|code=
3D 00 00 00 57 44 00 00 0A 00 00 00 01 00 00 00
E0 E0 34 00 16 00 40 14 00 00 00 00 00 00 00 00
}}
{{clear|right}}
{{boxcodelite|syntax=wiki|background=#000|color=#fff|title=Text highlight|code=<div style="margin-top:-7px; margin-bottom:-7px">
FF FF <span style="background:#ffff00;">00 00</span> 4D 14 <span style="background:#ff4040;">FF FF FF FF FF</span> <span style="background:#ff8080;">81 88 81 88 FF</span><br>
5A 00 5B 00 02 00 60 00 61 00 02 00 7D 00 7D 00<br>
02 00 FF FF FF FF FF FF FF FF FF FF FF FF <span style="background:#ffbbbb;">FF FF</span><br>
<span style="background:#ffbbbb;">FF FF FF</span> FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF<br>
FF FF <span style="background:#666;">00</span> <span style="color:#ff0;">4D 14</span> <span style="background:#666;">FF FF FF FF FF</span> <span style="background:#666;">FF FF 00 FF 00</span> <span style="background:#666;">FF</span><br>
<span style="background:#88f;">54 00</span> <span style="background:#88f;">55 00</span> <span style="background:#88f;">02 00</span> <span style="color:#f00;">5E 00 5F 00 02 00</span> FF FF FF FF<br>
02 00 <span style="color:#0f0;">46 00 47 00 02 00</span> FF FF FF FF 02 00 <span style="background:#666;">FF FF</span><br>
</div>}}
</div>
T
E
X
T
L
I
N
E
S


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 19:04, 11 June 2023

Code Sample

Usage[edit source]

  • {{boxcodelite|code=Code Sample}}
  • {{boxcodelite|title=Custom Title|code=Code Sample}}
  • {{boxcodelite|float=left|title=Custom Title|code=Code Sample}}
  • {{boxcodelite|syntax=wiki|float=left|title=Custom Title|code=Code Sample}}
  • {{boxcodelite|syntax=wiki|background=#000|color=#fff|title=Custom Title|code=Code Sample}}
  • {{boxcodelite|title=Custom Title|ps2configrev=17495|code=Code Sample}}

Examples[edit source]

HEX view
01 FF C4 00 1E 00 00 01 04 03 01 01 01 00 00 00
00 00 00 00 00 00 04 02 03 05 06 01 07 08 00 09
0A FF C4 00 64 10 00 02 01 02 05 02 04 04 04 04
04 05 00 01 00 2B 01 02 03 04 11 00 05 06 12 21
31 41 07 13 51 61 14 22 71 81 08 32 91 A1 15 23
B1 C1 16 42 D1 F0 09 17 24 33 E1 52 F1 18 25 43
62 26 34 72 92 27 53 82 A2 19 B2 28 35 44 54 55
63 93 C2 36 73 A3 D2 38 64 83 B3 0A 45 74 94 37
56 65 84 A4 C3 D3 B4 FF C4 00 1D 01 00 01 05 01
HEX view
(allows to use more than one text row in the title)
01 FF C4 00 1E 00 00 01 04 03 01 01 01 00 00 00
00 00 00 00 00 00 04 02 03 05 06 01 07 08 00 09
0A FF C4 00 64 10 00 02 01 02 05 02 04 04 04 04
04 05 00 01 00 2B 01 02 03 04 11 00 05 06 12 21
31 41 07 13 51 61 14 22 71 81 08 32 91 A1 15 23
BLJM85001
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192
SCES-50885
3D 00 00 00 57 44 00 00 0A 00 00 00 01 00 00 00
E0 E0 34 00 16 00 40 14 00 00 00 00 00 00 00 00
(rev. 17495). Requires PS2 Emulator from firmware 4.78 or newer
Text highlight

FF FF 00 00 4D 14 FF FF FF FF FF 81 88 81 88 FF
5A 00 5B 00 02 00 60 00 61 00 02 00 7D 00 7D 00
02 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF 00 4D 14 FF FF FF FF FF FF FF 00 FF 00 FF
54 00 55 00 02 00 5E 00 5F 00 02 00 FF FF FF FF
02 00 46 00 47 00 02 00 FF FF FF FF 02 00 FF FF

T

E

X

T

L

I

N

E

S