CONSOLE ARCHITECTUREARCHITECTURE Introductionintroduction –– Partpart 11
Total Page:16
File Type:pdf, Size:1020Kb
CONSOLECONSOLE ARCHITECTUREARCHITECTURE IntroductionIntroduction –– PartPart 11 WhatWhat isis aa console?console? ConsoleConsole componentscomponents DifferencesDifferences betweenbetween consolesconsoles andand PCsPCs BenefitsBenefits ofof consoleconsole developmentdevelopment TheThe developmentdevelopment environmentenvironment ConsoleConsole gamegame designdesign WhatWhat isis aa Console?Console? ConsolesConsoles areare dedicateddedicated gamegame machinesmachines – Nintendo Wii – Nintendo GameCube (NGC) – Nintendo64 (N64) – Sony Playstation 3 (PS3) – Sony Playstation 2 (PS2) – Sony Playstation (PSX) – Microsoft Xbox 360 – Microsoft Xbox – Sega Dreamcast (DC) – Nintendo DS (DS) ConsoleConsole EvolutionEvolution • Super Nintendo (1991) • 3.58 MHz 65816 (16 bit 6502) • 128 Kb RAM • Cartridge-based storage (~4 MB / cart) • Sony Playstation (1995) • 33 MHz MIPS R3000 derivative • 2 MB RAM • CD-based storage (~650 MB / disc) • Sony Playstation 2 (2000) • 300 MHz MIPS R5000 derivative • 32 MB RAM • DVD-based storage (~4 GB / disc) • Sony Playstation 3 (2005) • 3.2 GHz Power-PC • 512 MB Total RAM • Blu-Ray (~50GB) ConsoleConsole HardwareHardware TrendsTrends • MemoryMemory wallwall The "memory wall" is the growing disparity of speed between CPU and memory outside the CPU chip. An important reason for this disparity is the limited communication bandwidth beyond chip boundaries. From 1986 to 2000, CPU speed improved at an annual rate of 55% while memory speed only improved at 10%. – This is getting worse, currently potentially hundreds of cycles for cache miss – Need to learn how to write cache efficient code • FrequencyFrequency wallwall – CPUs aren't getting faster as quickly as they used to • PowerPower wallwall – Moore's Law is starting to run into the laws of Thermodynamics PowerPower DensityDensity WallWall Multi-core,Multi-core, parallelparallel architecturesarchitectures • SolutionSolution toto manymany hardwarehardware challengeschallenges – Increased performance without increased frequency – Simpler CPU architecture • No Out of Order Execution • MakesMakes thethe softwaresoftware muchmuch harderharder thoughthough – Need to learn how to write parallel code – Simpler CPU architecture makes memory wall more important BusinessBusiness TrendsTrends • TheThe riserise ofof thethe littlelittle guyguy (Wii)(Wii) – Much broader market appeal • RiseRise andand FallFall ofof accessoriesaccessories – Guitar, DJ turntable, Skateboard, etc. • PublishersPublishers vs.vs. GamestopGamestop – Used game sales are a problem for publishers – Games are adding features to delay resale • Online, Downloadable Content DifferencesDifferences OverOver PCPC GamesGames • OutputOutput toto TVTV ratherrather thanthan monitormonitor – Lower resolution • HD helps, but it's still lower resolution – Poor colour reproduction (NTSC) • HD helps a lot here • LimitedLimited permanentpermanent storagestorage – Low capacity memory cards – No virtual memory – No complex saved games – Hard drives available on some “Next-Gen” consoles (PS3, 360) • NoNo keyboard,keyboard, mousemouse – Makes control systems for FPS, RTS games difficult • CustomCustom ControllersControllers – Wiimote,Wiimote, steeringsteering wheel,wheel, guitarguitar ConsolesConsoles • SmallSmall memorymemory • SlowSlow CPUCPU – But has lots of hardware to help out • Little,Little, oror nono operatingoperating systemsystem – This helps the speed deficit somewhat – DIY memory management – lotslots ofof hardwarehardware levellevel programmingprogramming • interruptinterrupt handlershandlers • DMA • task scheduling • assembly BenefitsBenefits • FixedFixed targettarget • ConsolesConsoles areare dedicateddedicated toto gamesgames • BiggerBigger marketmarket – Consoles are cheaper – More people have them • PC hardware market is bigger, but a lot of that is for businesses – More people buy games – More $$$ for developers TheThe DevelopmentDevelopment EnvironmentEnvironment • ProgramsPrograms areare writtenwritten onon aa hosthost machinemachine – PC – Mac – Linux • GamesGames areare compiledcompiled onon thethe hosthost withwith aa cross-compiler,cross-compiler, andand downloadeddownloaded toto developmentdevelopment systemsystem throughthrough aa networknetwork connectionconnection TheThe DevelopmentDevelopment EnvironmentEnvironment • TheThe gamegame runsruns onon thethe developmentdevelopment system.system. • DebuggingDebugging isis donedone remotelyremotely – Can be across regular network connection (360, PS3) – Or custom connection (GameCube, earlier consoles) • RatherRather thanthan burningburning DVDs,DVDs, aa CD/DVDCD/DVD emulatoremulator isis usedused toto allowallow gamesgames toto testtest streamingstreaming systems,systems, etc.etc. – Gamecube has reusable cartridges that emulate discs – Xbox has connection to host PC TheThe DevelopmentDevelopment EnvironmentEnvironment • ThereThere isis nono operatingoperating system,system, butbut therethere areare usuallyusually somesome librarieslibraries toto helphelp youyou getget started.started. – Lots of variation between consoles • PS3 had very sketchy early libraries and tools • XBox has great library support • DocumentationDocumentation isis usuallyusually weak,weak, especiallyespecially whenwhen aa consoleconsole isis young.young. – PS2 documentation was poorly translated from Japanese, and near useless – Xbox & Wii documentation is pretty good GameGame DesignDesign • ConsoleConsole architecturearchitecture cancan havehave aa largelarge effecteffect onon gamegame design:design: – limitedlimited memory:memory: • reduce size of world or stream from DVD – limitedlimited networknetwork supportsupport • this is changing – lowlow resolutionresolution – largelarge savedsaved gamesgames areare notnot usuallyusually possiblepossible – Controllers affect types of input • ConsoleConsole gamersgamers representrepresent aa differentdifferent marketmarket • ConsoleConsole gamesgames areare playedplayed inin aa differentdifferent environmentenvironment – Living room, TV, stereo – Party gaming AA ThirdThird GenerationGeneration 3D3D ConsoleConsole XBoxXBox 360360 – releasedreleased inin 20052005 – 3.23.2 GHzGHz XenonXenon (PowerPC)(PowerPC) CPUCPU – 33 symmetricalsymmetrical 22 wayway multithreadedmultithreaded corescores – 512512 MBMB unifiedunified memorymemory – DVD-ROMDVD-ROM – ATIATI CustomCustom GraphicsGraphics ChipChip CPUCPU • IBMIBM “Xenon”“Xenon” processorprocessor – PowerPC instruction set – 165 million transistors – Three symmetrical cores, two way SMT-capable,clocked at 3.2 GHz – SIMD: VMX128 with 2× (128×128 bit) register files for each core. – 1 MB L2 cache (lockable by the GPU) running at half-speed (1.6 GHz) with a 256-bit bus – 51.2 gigabytes per second of L2 memory bandwidth (256 bit × 1600 MHz) – 21.6 GB/s Front-Side Bus – Dot product performance: 9.6 billion per second – 115.2 GFLOPS theoretical peak performance – Restricted to In-order code execution GraphicsGraphics • ATIATI “Xenos”“Xenos” – 500 MHz GPU, 232 million transistors – 10 MB daughter embedded DRAM framebuffer – 48-way parallel floating-point dynamically-scheduled shader pipelines • Unified shading architecture (each pipeline is capable of running either pixel or vertex shaders) • Maximum vertex count: 1.6 billion vertices per second • Maximum polygon count: 500 million triangles per second • Maximum shader operations: 96 billion per second • Maximum Dot product operations: 24 billion per second – Support for a superset of DirectX 9.0c API and Shader Model 3.0+ DevelopmentDevelopment EnvironmentEnvironment • VisualVisual StudioStudio • GraphicsGraphics usesuses Direct3DDirect3D APIAPI • Documentation,Documentation, toolstools andand librarieslibraries areare prettypretty goodgood – Microsoft is a software company AnotherAnother ThirdThird GenGen 3D3D ConsoleConsole • PlayStationPlayStation 33 (PS3)(PS3) – Announced in 2005 – Released in 2007 – 3.2 GHz Cell (Power PC) • 1 PPE (main CPU) • 8 SPE (vector processors) – 256MB Main Memory – 256MB VRAM – BluRay Drive – NVidia Graphics Chip (RSX) CPUCPU • IBMIBM CellCell ProcessorProcessor – PPE • PowerPC instruction set • Single core, two way SMT-capable, clocked at 3.2 GHz • SIMD: VMX/AltiVec • 512 KB L2 cache • Restricted to In-order code execution – SPE (x8) • Vector processor • Programmable in C • 128bit SIMD registers • 256KB embedded RAM (Local Store) • Memory Flow Controller (DMA) GraphicsGraphics • NVidiaNVidia RSXRSX 'Reality'Reality Synthesizer'Synthesizer' – 550 MHz GPU, 300+ million transistors – Based on NV47 Chip (Nvidia GeForce 7800 Architecture) • Multi-way programmable parallel floating-point shader pipelines • Independent pixel/vertex shader architecture • 24 parallel pixel-shader ALU pipes • 8 parallel vertex pipelines • Maximum texel fillrate: 13.2 GigaTexels per second • Maximum Dot product operations: 51 billion per second – Supports PSGL (OpenGL ES) InIn ClosingClosing • ConsolesConsoles presentpresent manymany interestinginteresting challenges.challenges. • TheThe fixedfixed platformplatform thatthat consolesconsoles offeroffer isis bothboth advantageousadvantageous andand limiting.limiting. .