Template:Computer specs full

From 68kMLA Wiki
Revision as of 22:19, 22 August 2007 by ~tl (talk | contribs)
Jump to: navigation, search
Although this template looks blank, it isn't!

Usage

Items will only be included in the list if you enter a value for them.

A note on style... please use the binary units and include a space between the value and the unit. For example use "2 MiB" rather than "2MB". The only case where you should use the SI units is for drive sizes as they are calculated in decimal.

Available variables

The available variables (with descriptions) are:

General

  • cpu-speed - The CPU Speed, e.g. "8MHz".
  • cpu-type - The CPU Type, e.g. "Motorola MC68000".
  • fpu - Whether the machine has an FPU, e.g. "Motorola MC68882" or "Integrated".
  • rom - The size of the machine's ROM, e.g. "128 kiB".
  • bus - The bus speed of the machine, e.g. "8 MHz".
  • data-path - The bus width of the machine, e.g. "32 bit".
  • ram-speed - The minimum RAM speed, e.g. "70 ns".
  • ram-type - The type of RAM the machine takes, e.g. "72 pin SIMM".
  • ram-std - The amount of RAM that shipped with the machine, e.g. "2 MiB".
  • ram-onboard - The amount of RAM soldered onto the machine's motherboard, e.g. "1 MiB".
  • ram-slots - The number of RAM slots, e.g. "1".
  • ram-max-apple - The amount of RAM specified as the max by Apple, e.g. "32 MiB".
  • ram-max-actual - The max if bigger SIMMs work in the machine than Apple specifies, e.g. "64 MiB".
  • cache - The size and type of the cache, e.g. "8 kiB (level 1)"

I/O & Expansion

  • adb - The number of ADB ports, if any, e.g. "1".
  • serial - The number of serial ports, if any, e.g. "2".
  • scsi - The number and type of SCSI connectors, if any, e.g. "1 (DB-25)".
  • floppy-connector - The number of floppy connectors, if any, e.g. "1".
  • ethernet - The number and type of ethernet connector, if any, e.g. "1 (AAUI-15)".
  • modem - The type of modem, if any, e.g. "33 kbps".
  • audio-in - The quality and type of line in, e.g. "16 bit stereo (mini-jack)".
  • audio-out - The quality and type of line out, e.g. "16 bit stereo (mini-jack)".
  • speaker - The type of speaker if any, e.g. "Mono".
  • mic - The type of microphone if any, e.g. "Mono".
  • pds - The number of PDS slots, e.g. "1".
  • pds-type - The type of PDS slots, e.g. "LCIII-PDS".
  • nubus - The number of Nubus slots, e.g. "3".

Storage

  • hd-std - The size or range of hard drives that shipped as standard, e.g. "80 MB" or "230 MB - 1 GB".
  • hd-type - The type of the internal hard drive, e.g. "SCSI".
  • floppy - The type and number of the internal drives, e.g. "1.44 MB Superdrive (manual inject)" or "Two 800 kB (auto inject)".
  • cd-std - The optical drive if present, e.g. "CD-ROM".
  • cd-type - The type of the CD drive, e.g. "2x SCSI Caddy".

Video

  • display - Size of built in display is present,, e.g. "9" B&W".
  • resolution - The max resolution and colour depth supported, e.g. "512x342 (1 bit)".
  • vram-std - The VRAM that shipped with the machine, e.g. "1 MiB".
  • vram-onboard - Amount of VRAM soldered to the motherboard, e.g. "512 kiB".
  • vram-slots - The number of VRAM slots, e.g. "4".
  • vram-max - The max amount of VRAM, e.g. "2 MiB".
  • video-in - Video in ports if available, e.g. "S-video, composite".
  • video-out - Video out ports, e.g. "DA-15, composite".

Miscellaneous

  • model-no - Apple model number, e.g. "M0001".
  • codename - Apple code names - , e.g. "Aladdin, Chablis".
  • gestalt - The Gestalt ID of the machine, e.g. "24".
  • power - The rating of the PSU, e.g. "200 W".
  • pram - The type of PRAM battery, e.g. "3.6 V lithium ½-AA".
  • width - The width of the case, e.g. "17.7"".
  • depth - The depth of the case, e.g. "14"".
  • height - The height of the case, e.g. "15.75"".
  • weight - The weight of the machine, e.g. "25.3 lbs.".
  • os - The OSes supported by the machine, e.g. "Mac OS 7.1 - 8.1, A/UX".
  • enabler - The enabler needed, if any - , e.g. "003".
  • born - The date the machine was introduced, e.g. "July 1993".
  • died - The date the machine was discontinued, e.g. "July 1994".
  • msrp - Apple's suggested retail price, in multiple countries if known, e.g. "$6500 (US)".
  • startup-chime - Name of a sound file stored on the wiki for the machine's startup chime (see Category:Startup Chimes), e.g. "Macintosh_LC.mp3".
  • death-chime - Name of a sound file stored on the wiki for the machine's death chime (see Category:Death Chimes), e.g. "Macintosh LC (Death).mp3".

Template for use in pages

To save a lot of typing simply copy this template and fill in the values. It's fine to leave lines blank... so it's worth leaving them in to make it easier for someone else to fill in the missing values.

{{computer specs full|
|cpu-speed=
|cpu-type=
|fpu=
|rom=
|bus=
|data-path=
|ram-speed=
|ram-type=
|ram-std=
|ram-onboard=
|ram-slots=
|ram-max-apple=
|ram-max-actual=
|cache=

|adb=
|serial=
|scsi=
|floppy-connector=
|ethernet=
|modem=
|audio-in=
|audio-out=
|speaker=
|mic=
|pds=
|pds-type=
|nubus=

|hd-std=
|hd-type=
|floppy=
|cd-std=
|cd-type=

|display=
|resolution=
|vram-std=
|vram-onboard=
|vram-slots=
|vram-max=
|video-in=
|video-out=

|model-no=
|codename=
|gestalt=
|power=
|pram=
|width=
|depth=
|height=
|weight=
|os=
|enabler=
|born=
|died=
|msrp=
|startup-chime=
|death-chime=
}}

Example

Here's an example of the template filled out with the details of a Quadra 840AV:

  • General
    • CPU: 40MHz Motorola MC68040
    • ROM: 2 MiB
    • Bus Speed: 40 MHz
    • Data Path: 32 bit
    • RAM Type: 72 pin SIMM (70 ns)
    • RAM Onboard: None
    • RAM Slots: 4
    • Maximum RAM: 128 MiB
    • Cache: 8 kiB (level 1)
  • I/O & Expansion
    • Audio In: 16 bit (stereo mini-jack)
    • Audio Out: 16 bit (stereo mini-jack)
    • Built-in Speaker: Mono
    • Built-in Microphone: Mono
  • Storage
    • Hard Drive: 230 MB - 1 GB
    • Hard Drive Type: SCSI
    • Floppy Drive: Superdrive
    • Optical Drive: CD-ROM
    • Optical Drive Type: 2x SCSI Caddy
  • Video
    • Max Resolution: 1152x870
    • Standard VRAM: 1 MiB - 2 MiB
    • VRAM Slots: 4
    • Maximum VRAM: 4 MiB
    • Video In: DA-15, s-video, composite
    • Video Out: S-video, composite
  • Miscellaneous
    • Codename: Quadra 1000, Cyclone
    • Gestalt ID: 78
    • Power: 200 Watts
    • Dimensions: 17.7" x 15.75" x 14" (W x D x H)
    • Weight: 25.3 lbs.
    • System Enabler: 088
    • MSRP: $3500 (US)

Editing

To stop rogue new lines appearing when the template is used, but all the variables aren't filled in, it's important not to have any line breaks in the template itself. To make it easier to edit, I've included a copy with the linebreaks I had originally below. I'd suggest that you make any changes to the copy below, strip out all the new lines in a text editor, and then paste it above.

Each variable uses ParserFunctions so that it only appears if it's filled out on the template. On lines that only have a single variable a simple #if is fine. For example:

{{ #if: {{{fpu|}}} | **FPU: ''{{{fpu|}}}'' }}

On lines that contain more than one variable, the more complicated #ifexpr needs to be used since we either want to show the line if any one of the variables is there (using the "or" operator) or if they're all there (using the "and" operator). Since the #ifexpr only checks mathematical statements, it's also necessary to use an #if statement to check if a variable is set and return 1 or 0 depending on it's status. The complete code for a line with two variables ends up something like this:

{{ #ifexpr: {{ #if: {{{cpu-speed|}}} | 1 | 0 }} or {{ #if: {{{cpu-type|}}} | 1 | 0 }} | **CPU: ''{{{cpu-speed|}}} {{{cpu-type|}}}'' }}

That is also how we check to see if a header should be shown. If you add more variables in, it's important to also add them to the #ifexpr for the header, so that the header gets included if the variable is set.

Anyway here's the complete code! If this all looks a bit daunting to you, feel free to suggest changes on the talk page and I'll make the changes for you!

{{ #ifexpr: {{ #if: {{{cpu-speed|}}} | 1 | 0 }}
 or {{ #if: {{{cpu-type|}}} | 1 | 0 }}
 or {{ #if: {{{fpu|}}} | 1 | 0 }}
 or {{ #if: {{{rom|}}} | 1 | 0 }}
 or {{ #if: {{{bus|}}} | 1 | 0 }}
 or {{ #if: {{{data-path|}}} | 1 | 0 }}
 or {{ #if: {{{ram-speed|}}} | 1 | 0 }}
 or {{ #if: {{{ram-type|}}} | 1 | 0 }}
 or {{ #if: {{{ram-std|}}} | 1 | 0 }}
 or {{ #if: {{{ram-onboard|}}} | 1 | 0 }}
 or {{ #if: {{{ram-slots|}}} | 1 | 0 }}
 or {{ #if: {{{ram-max-apple|}}} | 1 | 0 }}
 or {{ #if: {{{ram-max-actual|}}} | 1 | 0 }}
 or {{ #if: {{{cache|}}} | 1 | 0 }}
| *'''General''' }}

{{ #ifexpr: {{ #if: {{{cpu-speed|}}} | 1 | 0 }} or {{ #if: {{{cpu-type|}}} | 1 | 0 }} | **CPU: ''{{{cpu-speed|}}} {{{cpu-type|}}}'' }}
{{ #if: {{{fpu|}}} | **FPU: ''{{{fpu|}}}'' }}
{{ #if: {{{rom|}}} | **ROM: ''{{{rom|}}}'' }}
{{ #if: {{{bus|}}} | **Bus Speed: ''{{{bus|}}}'' }}
{{ #if: {{{data-path|}}} | **Data Path: ''{{{data-path|}}}'' }}
{{ #ifexpr: {{ #if: {{{ram-speed|}}} | 1 | 0 }} or {{ #if: {{{ram-type|}}} | 1 | 0 }} | **RAM Type: ''{{{ram-type|}}} {{ #if: {{{ram-speed|}}} | ({{{ram-speed|}}}) }}'' }}
{{ #if: {{{ram-std|}}} | **Standard RAM: ''{{{ram-std|}}}'' }}
{{ #if: {{{ram-onboard|}}} | **RAM Onboard: ''{{{ram-onboard|}}}'' }}
{{ #if: {{{ram-slots|}}} | **RAM Slots: ''{{{ram-slots|}}}'' }}
{{ #if: {{{ram-max-apple|}}} | **Maximum RAM{{ #if: {{{ram-max-actual|}}} |  (Apple) }}: ''{{{ram-max-apple|}}}'' }}
{{ #if: {{{ram-max-actual|}}} | **Maximum RAM{{ #if: {{{ram-max-apple|}}} |  (Actual) }}: ''{{{ram-max-actual|}}}'' }}
{{ #if: {{{cache|}}} | **Cache: ''{{{cache|}}}'' }}


{{ #ifexpr: {{ #if: {{{adb|}}} | 1 | 0 }}
 or {{ #if: {{{serial|}}} | 1 | 0 }}
 or {{ #if: {{{scsi|}}} | 1 | 0 }}
 or {{ #if: {{{floppy-connector|}}} | 1 | 0 }}
 or {{ #if: {{{ethernet|}}} | 1 | 0 }}
 or {{ #if: {{{modem|}}} | 1 | 0 }}
 or {{ #if: {{{audio-in|}}} | 1 | 0 }}
 or {{ #if: {{{audio-out|}}} | 1 | 0 }}
 or {{ #if: {{{speaker|}}} | 1 | 0 }}
 or {{ #if: {{{mic|}}} | 1 | 0 }}
 or {{ #if: {{{pds|}}} | 1 | 0 }}
 or {{ #if: {{{pds-type|}}} | 1 | 0 }}
 or {{ #if: {{{nubus|}}} | 1 | 0 }}
| *'''I/O & Expansion''' }}

{{ #if: {{{adb|}}} | **ADB: ''{{{adb|}}}'' }}
{{ #if: {{{serial|}}} | **Serial: ''{{{serial|}}}'' }}
{{ #if: {{{scsi|}}} | **SCSI: ''{{{scsi|}}}'' }}
{{ #if: {{{floppy-connector|}}} | **Floppy Connector: ''{{{floppy-connector|}}}'' }}
{{ #if: {{{ethernet|}}} | **Ethernet: ''{{{ethernet|}}}'' }}
{{ #if: {{{modem|}}} | **Modem: ''{{{modem|}}}'' }}
{{ #if: {{{audio-in|}}} | **Audio In: ''{{{audio-in|}}}'' }}
{{ #if: {{{audio-out|}}} | **Audio Out: ''{{{audio-out|}}}'' }}
{{ #if: {{{speaker|}}} | **Built-in Speaker: ''{{{speaker|}}}'' }}
{{ #if: {{{mic|}}} | **Built-in Microphone: ''{{{mic|}}}'' }}
{{ #ifexpr: {{ #if: {{{pds|}}} | 1 | 0 }} or {{ #if: {{{pds-type|}}} | 1 | 0 }} | **PDS: ''{{{pds|}}} {{{pds-type|}}}'' }}
{{ #if: {{{nubus|}}} | **Nubus: ''{{{nubus|}}}'' }}


{{ #ifexpr: {{ #if: {{{hd-std|}}} | 1 | 0 }}
 or {{ #if: {{{hd-type|}}} | 1 | 0 }}
 or {{ #if: {{{floppy|}}} | 1 | 0 }}
 or {{ #if: {{{cd-std|}}} | 1 | 0 }}
 or {{ #if: {{{cd-type|}}} | 1 | 0 }}
| *'''Storage''' }}

{{ #if: {{{hd-std|}}} | **Hard Drive: ''{{{hd-std|}}}'' }}
{{ #if: {{{hd-type|}}} | **Hard Drive Type: ''{{{hd-type|}}}'' }}
{{ #if: {{{floppy|}}} | **Floppy Drive: ''{{{floppy|}}}'' }}
{{ #if: {{{cd-std|}}} | **Optical Drive: ''{{{cd-std|}}}'' }}
{{ #if: {{{cd-type|}}} | **Optical Drive Type: ''{{{cd-type|}}}'' }}


{{ #ifexpr: {{ #if: {{{display|}}} | 1 | 0 }}
 or {{ #if: {{{resolution|}}} | 1 | 0 }}
 or {{ #if: {{{vram-std|}}} | 1 | 0 }}
 or {{ #if: {{{vram-onboard|}}} | 1 | 0 }}
 or {{ #if: {{{vram-slots|}}} | 1 | 0 }}
 or {{ #if: {{{vram-max|}}} | 1 | 0 }}
 or {{ #if: {{{video-in|}}} | 1 | 0 }}
 or {{ #if: {{{video-out|}}} | 1 | 0 }}
| *'''Video''' }}

{{ #if: {{{display|}}} | **Built-in Display: ''{{{display|}}}'' }}
{{ #if: {{{resolution|}}} | **Max Resolution: ''{{{resolution|}}}'' }}
{{ #if: {{{vram-std|}}} | **Standard VRAM: ''{{{vram-std|}}}'' }}
{{ #if: {{{vram-onboard|}}} | **VRAM Onboard: ''{{{vram-onboard|}}}'' }}
{{ #if: {{{vram-slots|}}} | **VRAM Slots: ''{{{vram-slots|}}}'' }}
{{ #if: {{{vram-max|}}} | **Maximum VRAM: ''{{{vram-max|}}}'' }}
{{ #if: {{{video-in|}}} | **Video In: ''{{{video-in|}}}'' }}
{{ #if: {{{video-out|}}} | **Video Out: ''{{{video-out|}}}'' }}


{{ #ifexpr: {{ #if: {{{model-no|}}} | 1 | 0 }}
 or {{ #if: {{{codename|}}} | 1 | 0 }}
 or {{ #if: {{{gestalt|}}} | 1 | 0 }}
 or {{ #if: {{{power|}}} | 1 | 0 }}
 or {{ #if: {{{pram|}}} | 1 | 0 }}
 or {{ #if: {{{width|}}} | 1 | 0 }}
 or {{ #if: {{{weight|}}} | 1 | 0 }}
 or {{ #if: {{{os|}}} | 1 | 0 }}
 or {{ #if: {{{enabler|}}} | 1 | 0 }}
 or {{ #if: {{{born|}}} | 1 | 0 }}
 or {{ #if: {{{died|}}} | 1 | 0 }}
 or {{ #if: {{{startup-chime|}}} | 1 | 0 }}
 or {{ #if: {{{death-chime|}}} | 1 | 0 }}
| *'''Miscellaneous''' }}

{{ #if: {{{model-no|}}} | **Apple Model Number: ''{{{model-no|}}}'' }}
{{ #if: {{{codename|}}} | **Codename: ''{{{codename|}}}'' }}
{{ #if: {{{gestalt|}}} | **Gestalt ID: ''{{{gestalt|}}}'' }}
{{ #if: {{{power|}}} | **Power: ''{{{power|}}}'' }}
{{ #if: {{{pram|}}} | **PRAM Battery: ''{{{pram|}}}'' }}
{{ #ifexpr: {{ #if: {{{width|}}} | 1 | 0 }} and {{ #if: {{{height|}}} | 1 | 0 }} and {{ #if: {{{depth|}}} | 1 | 0 }} | **Dimensions: ''{{{width|}}} x {{{depth|}}} x {{{height|}}} (W x D x H)'' }}
{{ #if: {{{weight|}}} | **Weight: ''{{{weight|}}}'' }}
{{ #if: {{{os|}}} | **OS Support: ''{{{os|}}}'' }}
{{ #if: {{{enabler|}}} | **System Enabler: ''{{{enabler|}}}'' }}
{{ #if: {{{born|}}} | **Introduced: ''{{{born|}}}'' }}
{{ #if: {{{died|}}} | **Discontinued: ''{{{died|}}}'' }}
{{ #if: {{{msrp|}}} | **MSRP: ''{{{msrp|}}}'' }}
{{ #if: {{{startup-chime|}}} | **Startup Chime: {{mp3|{{{startup-chime|}}}}} }}
{{ #if: {{{death-chime|}}} | **Death Chime: {{mp3|{{{death-chime|}}}}} }}

~tl (talk · contribs) 15:07, 21 August 2007 (UTC)