@{ /****************************************************************************** // Canary Islands Computer Museum Website // ---------------------------------------------------------------------------- // // Filename : Index.cshtml // Author(s) : Natalia Portillo // // --[ Description ] ---------------------------------------------------------- // // Index page (and news) // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- // Copyright © 2003-2018 Natalia Portillo *******************************************************************************/ ViewData["Title"] = "Computer"; } @using System.IO @model Computer

@if(Model.Company.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", Model.Company.LastLogo.Guid + ".svg"))) { }

@if(Model.Year == 1000) {
PROTOTYPE
} @Model.Company.Name @Model.Model @if(Model.Year != 1000) { } @if(Model.Cpu1 != null) { } else { } @if(Model.Cpu2 != null) { } @if(Model.Ram > 1024) { if(Model.Ram > 1048576) { } else { } } else { if(Model.Ram == 0) { } else { } } @if(Model.Rom > 1024) { if(Model.Rom > 1048576) { } else { } } else { if(Model.Rom == 0) { } else { } } @if(Model.Gpu.Id > 1) { if(Model.Gpu.Id > 2) { } else { } } else { } @if(Model.Vram > 1024) { if(Model.Vram > 1048576) { } else { } } else { if(Model.Vram == 0) { } else { } } @if(Model.Resolution != "???") { } else { } @if(Model.Colors > 0) { } else { } @if(Model.SoundSynth.Id > 1) { if(Model.SoundSynth.Id > 2) { if(Model.SoundChannels > 0) { } else { } } else { } } else { } @if(Model.MusicSynth.Id > 1) { if(Model.MusicSynth.Id > 2) { if(Model.MusicChannels > 0) { } else { } } else { } } else { } @if(Model.Hdd1 != null && Model.Hdd1.Id > 0 && Model.Hdd1.Id != 30) { } @if(Model.Disk1 != null) { @if(Model.Disk1.Id != 30) { int cap1 = int.Parse(Model.Cap1); if(Model.Disk1.Id != 8) { if(Model.Disk1.Id != 6) { string cap1Bytes = cap1 > 1024 ? (cap1 > 1048576 ? $"{cap1 / 1048576} GBytes" : $"{cap1 / 1024} MBytes") : (cap1 > 0 ? $"{cap1} Kbytes" : "Unknown capacity"); if(Model.Disk1.Id != 10) { if(Model.Disk1.Id != 15) { if(Model.Disk1.Id != 16) { if(Model.Disk1.Id != 36) { if(Model.Disk1.Id != 22) { if(Model.Disk1.Id != 23) { if(Model.Disk1.Id != 39) { if(Model.Disk1.Id != 31) { } else { } } else { } } else { } } else { } } else { } } else { } } else { } } else { } } else { string cap1Bits = cap1 > 1000 ? (cap1 > 1000000 ? $"{cap1 / 1000000} GBits" : $"{cap1 / 1000} MBits") : (cap1 > 0 ? $"{cap1} KBits" : "Unknown capacity"); } } else { } } else { } } @if(Model.Disk2 != null) { @if(Model.Disk2.Id != 30) { int cap2 = int.Parse(Model.Cap2); if(Model.Disk2.Id != 8) { if(Model.Disk2.Id != 6) { string cap2Bytes = cap2 > 1024 ? (cap2 > 1048576 ? $"{cap2 / 1048576} GBytes" : $"{cap2 / 1024} MBytes") : (cap2 > 0 ? $"{cap2} Kbytes" : "Unknown capacity"); if(Model.Disk2.Id != 10) { if(Model.Disk2.Id != 15) { if(Model.Disk2.Id != 16) { if(Model.Disk2.Id != 36) { if(Model.Disk2.Id != 22) { if(Model.Disk2.Id != 23) { if(Model.Disk2.Id != 39) { if(Model.Disk2.Id != 31) { } else { } } else { } } else { } } else { } } else { } } else { } } else { } } else { } } else { string cap2Bits = cap2 > 1000 ? (cap2 > 1000000 ? $"{cap2 / 1000000} GBits" : $"{cap2 / 1000} MBits") : (cap2 > 0 ? $"{cap2} KBits" : "Unknown capacity"); } } else { } } else { } }
Year
@Model.Year
Primary processor
@if(Model.Mhz1 > 0) { @(Model.Cpu1.GprSize > 0 ? $"{Model.Cpu1.Name} @ {Model.Mhz1}Mhz ({Model.Cpu1.GprSize} bits)" : $"{Model.Cpu1.Name} @ {Model.Mhz1}Mhz") } else { @($"{Model.Cpu1.Name}") }
@if(Model.Cpu1.ModelCode != null && Model.Cpu1.ModelCode != Model.Cpu1.Name) { } @if(Model.Cpu1.Introduced != DateTime.MinValue) { } @if(Model.Cpu1.InstructionSet != null) { } @if(Model.Cpu1.Speed > 0) { } @if(Model.Cpu1.Gpr > 0 || Model.Cpu1.Fpr > 0 || Model.Cpu1.Simd > 0) { } @if(Model.Cpu1.Cores > 1) { } @if(Model.Cpu1.Cores > 1) { } @if(Model.Cpu1.DataBus > 0 || Model.Cpu1.AddressBus > 0) { } @if(Model.Cpu1.L1Instruction > 0 || Model.Cpu1.L1Data > 0 || Model.Cpu1.L2 > 0 || Model.Cpu1.L2 > 0) { } @if(Model.Cpu1.Package != null) { } @if(Model.Cpu1.Process != null || Model.Cpu1.ProcessNm > 0) { } @if(Model.Cpu1.DieSize > 0) { } @if(Model.Cpu1.Transistors > 0) { }
Model @Model.Cpu1.ModelCode
Manufacturer @Model.Cpu1.Company.Name
Introduction date @($"{Model.Cpu1.Introduced:yyyy}")
Instruction set @Model.Cpu1.InstructionSet.Name
Nominal speed @Model.Cpu1.Speed MHz
Registers @if(Model.Cpu1.Gpr > 0) { } @if(Model.Cpu1.Fpr > 0) { } @if(Model.Cpu1.Simd > 0) { }
@Model.Cpu1.Gpr general purpose registers of @Model.Cpu1.GprSize bits @if(Model.Cpu1.FprSize > 0 && Model.Cpu1.Fpr == 0) { @($", that can be used as floating point registers of {Model.Cpu1.FprSize}") } @if(Model.Cpu1.SimdSize > 0 && Model.Cpu1.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu1.FprSize}") }
@Model.Cpu1.Fpr floating-point registers of @Model.Cpu1.FprSize bits @if(Model.Cpu1.SimdSize > 0 && Model.Cpu1.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu1.FprSize}") }
@Model.Cpu1.Simd SIMDregisters of @Model.Cpu1.SimdSize bits
Multi-core @Model.Cpu1.Cores cores
SMT @Model.Cpu1.ThreadsPerCore threads @if(Model.Cpu1.Cores > 1) { @(" per core") }
Bus @if(Model.Cpu1.DataBus > 0) { } @if(Model.Cpu1.AddressBus > 0) { }
@Model.Cpu1.DataBus-bit data
@Model.Cpu1.AddressBus-bit address
Cache @if(Model.Cpu1.L1Instruction > 0) { } @if(Model.Cpu1.L1Data > 0) { } @if(Model.Cpu1.L2 > 0) { } @if(Model.Cpu1.L3 > 0) { }
@(Model.Cpu1.L1Data < 0 ? $"{Model.Cpu1.L1Instruction}KiB combined instruction-data L1" : $"{Model.Cpu1.L1Instruction}KiB instruction L1")
@($"{Model.Cpu1.L1Data}KiB data L1")
@($"{Model.Cpu1.L2}KiB L2")
@($"{Model.Cpu1.L3}KiB L3")
Package @Model.Cpu1.Package
Manufacturing process @if(Model.Cpu1.Process != null && Model.Cpu1.ProcessNm > 0) { @Model.Cpu1.Process @("@") @(Model.Cpu1.ProcessNm > 100 ? $"{Model.Cpu1.ProcessNm / 100}µm" : $"{Model.Cpu1.ProcessNm}nm") } else if(Model.Cpu1.ProcessNm > 0) { @(Model.Cpu1.ProcessNm > 100 ? $"{Model.Cpu1.ProcessNm / 100}µm" : $"{Model.Cpu1.ProcessNm}nm") } else { @Model.Cpu1.Process }
Die size @Model.Cpu1.DieSize mm²
Transistors @Model.Cpu1.Transistors
Unknown data
Secondary processor
@if(Model.Mhz1 > 0) { @(Model.Cpu2.GprSize > 0 ? $"{Model.Cpu2.Name} @ {Model.Mhz1}Mhz ({Model.Cpu2.GprSize} bits)" : $"{Model.Cpu2.Name} @ {Model.Mhz1}Mhz") } else { @($"{Model.Cpu2.Name}") }
@if(Model.Cpu2.ModelCode != null && Model.Cpu2.ModelCode != Model.Cpu2.Name) { } @if(Model.Cpu2.Introduced != DateTime.MinValue) { } @if(Model.Cpu2.InstructionSet != null) { } @if(Model.Cpu2.Speed > 0) { } @if(Model.Cpu2.Gpr > 0 || Model.Cpu2.Fpr > 0 || Model.Cpu2.Simd > 0) { } @if(Model.Cpu2.Cores > 1) { } @if(Model.Cpu2.Cores > 1) { } @if(Model.Cpu2.DataBus > 0 || Model.Cpu2.AddressBus > 0) { } @if(Model.Cpu2.L1Instruction > 0 || Model.Cpu2.L1Data > 0 || Model.Cpu2.L2 > 0 || Model.Cpu2.L2 > 0) { } @if(Model.Cpu2.Package != null) { } @if(Model.Cpu2.Process != null || Model.Cpu2.ProcessNm > 0) { } @if(Model.Cpu2.DieSize > 0) { } @if(Model.Cpu2.Transistors > 0) { }
Model @Model.Cpu2.ModelCode
Manufacturer @Model.Cpu2.Company.Name
Introduction date @($"{Model.Cpu2.Introduced:yyyy}")
Instruction set @Model.Cpu2.InstructionSet.Name
Nominal speed @Model.Cpu2.Speed MHz
Registers @if(Model.Cpu2.Gpr > 0) { } @if(Model.Cpu2.Fpr > 0) { } @if(Model.Cpu2.Simd > 0) { }
@Model.Cpu2.Gpr general purpose registers of @Model.Cpu2.GprSize bits @if(Model.Cpu2.FprSize > 0 && Model.Cpu2.Fpr == 0) { @($", that can be used as floating point registers of {Model.Cpu2.FprSize}") } @if(Model.Cpu2.SimdSize > 0 && Model.Cpu2.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu2.FprSize}") }
@Model.Cpu2.Fpr floating-point registers of @Model.Cpu2.FprSize bits @if(Model.Cpu2.SimdSize > 0 && Model.Cpu2.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu2.FprSize}") }
@Model.Cpu2.Simd SIMDregisters of @Model.Cpu2.SimdSize bits
Multi-core @Model.Cpu2.Cores cores
SMT @Model.Cpu2.ThreadsPerCore threads @if(Model.Cpu2.Cores > 1) { @(" per core") }
Bus @if(Model.Cpu2.DataBus > 0) { } @if(Model.Cpu2.AddressBus > 0) { }
@Model.Cpu2.DataBus-bit data
@Model.Cpu2.AddressBus-bit address
Cache @if(Model.Cpu2.L1Instruction > 0) { } @if(Model.Cpu2.L1Data > 0) { } @if(Model.Cpu2.L2 > 0) { } @if(Model.Cpu2.L3 > 0) { }
@(Model.Cpu2.L1Data < 0 ? $"{Model.Cpu2.L1Instruction}KiB combined instruction-data L1" : $"{Model.Cpu2.L1Instruction}KiB instruction L1")
@($"{Model.Cpu2.L1Data}KiB data L1")
@($"{Model.Cpu2.L2}KiB L2")
@($"{Model.Cpu2.L3}KiB L3")
Package @Model.Cpu2.Package
Manufacturing process @if(Model.Cpu2.Process != null && Model.Cpu2.ProcessNm > 0) { @Model.Cpu2.Process @("@") @(Model.Cpu2.ProcessNm > 100 ? $"{Model.Cpu2.ProcessNm / 100}µm" : $"{Model.Cpu2.ProcessNm}nm") } else if(Model.Cpu2.ProcessNm > 0) { @(Model.Cpu2.ProcessNm > 100 ? $"{Model.Cpu2.ProcessNm / 100}µm" : $"{Model.Cpu2.ProcessNm}nm") } else { @Model.Cpu2.Process }
Die size @Model.Cpu2.DieSize mm²
Transistors @Model.Cpu2.Transistors
Base RAM memory
@($"{Model.Ram / 1048576}") Gbytes@($"{Model.Ram / 1024}") MbytesUnknown data@Model.Ram Kbytes
ROM
@($"{Model.Rom / 1048576}") Gbytes@($"{Model.Rom / 1024}") MbytesUnknown data@Model.Rom Kbytes
Graphics processor
@Model.Gpu.NameUnknown dataNone
Video memory
@($"{Model.Vram / 1048576}") Gbytes@($"{Model.Vram / 1024}") MbytesUnknown data@Model.Vram Kbytes
Video resolution
@Model.ResolutionUnknown data
Colors
@Model.ColorsUnknown data
Sound processor
@Model.SoundSynth.Name (@Model.SoundChannels channels)@Model.SoundSynth.NameUnknown dataNone
Music synthetizer
@Model.MusicSynth.Name (@Model.MusicChannels channels)@Model.MusicSynth.NameUnknown dataNone
Disk interfaces
@Model.Hdd1.Description @if(Model.Hdd2 != null && Model.Hdd2.Id > 0 && Model.Hdd2.Id != 30) {
@Model.Hdd2.Description } @if(Model.Hdd3 != null && Model.Hdd3.Id > 0 && Model.Hdd3.Id != 30) {
@Model.Hdd3.Description }
Primary disk
@Model.Disk1.Description (@cap1Bytes)Propietary (@cap1Bytes)Digital tape (@cap1Bytes)Punched card (@cap1Bytes)Chip card (@cap1Bytes)Magnetic card (@cap1Bytes)Memory (@cap1Bytes)Magneto-optical (@cap1Bytes)Optical disk (@cap1Bytes)Cartridge (@cap1Bits)Standard audio cassette (@cap1 bps)None
Secondary disk
@Model.Disk2.Description (@cap2Bytes)Propietary (@cap2Bytes)Digital tape (@cap2Bytes)Punched card (@cap2Bytes)Chip card (@cap2Bytes)Magnetic card (@cap2Bytes)Memory (@cap2Bytes)Magneto-optical (@cap2Bytes)Optical disk (@cap2Bytes)Cartridge (@cap2Bits)Standard audio cassette (@cap2 bps)None
@if(File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/photos/computers", Model.Id + ".jpg"))) { }