Design Decisions

Total Page:16

File Type:pdf, Size:1020Kb

Design Decisions Design Decisions Chris Fernandez, Dakota Folger-Reeder, and Michael Shullick 1 On Deck ● History ● CPU Choice ● Board Layout and Architecture ● PPU ● Impact 2 ➔ 1889 Brief History of ◆ Nintendo founded in Japan as a playing card Nintendo and the manufacturer ➔ 1966 NES ◆ Nintendo shifts to toys ➔ 1975 ◆ Nintendo has success with arcade games like Donkey Kong ➔ 1983 ◆ Nintendo’s Family Computer (“Famicom”) released in Japan ◆ Video games crash in North America ➔ 1984 ◆ Nintendo releases the Advanced Video System home computer (flopped) ➔ 1985 ◆ Nintendo released the Nintendo Entertainment System 3 NES Dissection So what’s inside? 4 CPU - MOS Technology 6502 ● Introduced in 1975, a sixth of the cost of competitors ● Designed by same engineers of the Motorola 6800 ● Cost reduction performed by removing extra features of Motorola 6800 and use of new fabrication technology for depletion-mode MOSFETs. ● Used in many famous applications 5 6502 Specifications ● Proprietary derivative of the 6502 manufactured by Ricoh ● Accumulator-based with only 6 special registers ● 8-bits, little endian ● 16 bit addresses ● 1-3 MHz clock ● 56 instructions ● Fast “zero page” mode for faster access to first 256 addresses in memory, intended to be quasi-registers 6 Ricoh 2A03 - Deviations from MOS 6502 ● Hardwired to disable BCD mode of 6502 ● Memory-mapped components: ○ APU ○ DMA ○ Game controller polling ● Different versions for different regions 7 Architecture 8 Memory ● Memory is split between the CPU and the PPU(Picture Processing Unit) ● CPU Memory is divided into 3 main parts, ROM in the cartridges, the CPU RAM, and I/O registers ● CPU and PPU interact only through I/O registers 9 Memory and I/O ● The Zero Page memory addressing, which is the first page in memory was also mirrored three times between $0800 and $1FFF. ● If data is written to $0000 it is also written to $0800, $1000, and $1800. ● The I/O registers are located between $2000 and $401F ● There are 8 main I/O registers, with them being mirrored every 8 bytes between $2008 and $3FFFF ● Addresses $4000 to $4013 are used for sound, and controller input 10 Game Cartridges ● Depending on the cartridge games use different amounts of the CPU memory ● If the game has 16 kB of ROM then it only uses $C000-$FFFF ● If it has 32 kB of ROM it uses the all of the assigned memory for ROM which is $8000-$FFFF 11 Registers ● CPU had three special purpose registers, and three for general purposes ● PC, SP, and Accumulator were the three special purpose registers ○ The SP did not have a stack overflow detection and would just wrap around from $00-$FF ○ The Accumulator stored the results of operations and could be used to hold values taken from memory ● Two Index registers were used for general addressing or as a counter ● Processor Status Register held 7 flags based on the result of instructions 12 Interrupts ● There are three types of interrupts, IRQ, Non-Maskable Interrupts (NMI) and Reset ● IRQs are generated by either Memory Mappers or by software ○ Can be ignored if the Interrupt Disable Flag is set ● NMIs is generated by the PPU at the end of each frame ○ Can be ignored if bit 7 of PPU Control Register 1 is clear ● Reset interrupts are generated when the system is first turned on or the reset button is pressed 13 Picture Processing Unit (PPU) ● The custom PPU, known as the Ricoh RP2C02, was developed by Ricoh Company, Ltd. for Nintendo ● Has eight registers, visible to the CPU by its address spaces $2000-$2007 ● The PPU is responsible for interpreting data to properly display the orientation, spatial position, color, and shape of sprites ● Runs 3 times faster than the CPU clock speed NES board, PPU framed in red, CPU in blue 14 Picture Processing Unit (PPU) cont. ● The PPU sends 240 visible scan lines of sprite data to televisions to create graphical frames ● Finite set of 54 hardware controlled colors for a total of 25 concurrent colors on screen ● Able to display up to 64 moving objects on screen at a time ● Resolves at a whopping 256 × 240 pixels ● Extended capabilities through the usage of mappers NES graphical output to TV 15 PPU Memory Designation ● PPU operates in smallest graphical unit of “tiles” ● 8 kB (2 tiles of 4 kB) of ROM/RAM allocated on the Game Pak itself for tiles data ● 2 kB of external RAM to store extra maps/nametables ● 32 bytes of internal SRAM for color data Internals of NES Game Paks ● 288 total bytes of internal DRAM for Object Attribute Memory (OAM) 16 PPU Attribute Tables ● 64-byte 8x8 arrays that control spatially which color pallet should be applied to the objects in the array ● Each byte in the array is responsible for a 4x4 tile (32x32 pixel) ● This means every two-bits in a byte has the information for a quadrant of a graphical tile Attribute Table example 17 PPU Rendering Process ● Each frame is 89,342 PPU clock cycles long ● The PPU renders 262 total scanlines per frame, each lasting for a total of 341 PPU cycles ● Each rendered tile takes 4 memory accesses, each requiring 2 PPU cycles per access ● Using a combination of latches, shift registers, and counters the PPU is read in the data from memory ● This data is held in the latches until it is time to be fed to the appropriate shift registers (every 8 clock cycles) 18 PPU Timing Diagram 19 Impact & Legacy ● Poor design of front-loading cartridge ● Lockout malfunction ● Judged the second greatest console of all time by PC Magazine ● Succeeded by the Super Nintendo Entertainment System (SNES) ● NES Classic Edition released in 2016 (still unavailable everywhere) 20 References ● https://wiki.nesdev.com/w/index.php/PPU ● https://wiki.nesdev.com/w/index.php/PPU_registers ● https://wiki.nesdev.com/w/index.php/PPU_rendering ● https://en.wikipedia.org/wiki/Picture_Processing_Unit ● https://fms.komkon.org/EMUL8/NES.html ● http://nesdev.com/NESDoc.pdf 21.
Recommended publications
  • Go Forth with TTL !
    Go Forth with TTL ! The Gigatron TTL Color Computer Forth for a Very Unusual Processor Ken Boak SV Fig. Forth Day 2019 . In September of 1975, MOS Technology launched the 6502 at the Wescon75 Computer Conference in San Francisco. Chuck Peddle and his team had created a very lean, stripped down, small die cpu. Costing just $25, the 6502 was a fraction of the cost of its nearest competitor. At that time the Intel 8080 was $360 and the Motorola 6800 was $175 . The 6502 was clearly a disruptive usurper. 25 year old, HP Engineer, Steve Wozniak, realised that this new microprocessor would be a game-changer and went on to incorporate it into the small computer he was developing. That machine went on to become the Apple I. In 1975 7400 TTL was the “Bread and Butter” of logic design: 7400 series TTL integrated circuits were developed in the early 1960’s. Initially quite expensive so mainly used in Military and Aerospace applications. By the early 1970’s TTL had become a versatile family of standardised, low cost,. easy to use logic. Typically about $1 per device. 7400 series logic was widely used in the design of minicomputers, including the PDP-11, the Data General Nova 1200 and later models of PDP-8. TTL was a viable, faster and cheaper processing solution than the emerging 8-bit microprocessors such as MOS 6502, Intel 8080 and the Motorola 6800. Essential Reading 16-bit TTL CPU board from Data General Nova 1200 The Gigatron TTL Computer – What is it? Started as a Hackaday.io project in Spring 2017 by Marcel van Kervinck of The Hague, Netherlands.
    [Show full text]
  • Exploring Software Inefficiency With
    ZeroSpy: Exploring Software Inefficiency with Redundant Zeros Xin You∗, Hailong Yang∗y, Zhongzhi Luan∗, Depei Qian∗ and Xu Liuz Beihang University, China∗, North Carolina State University, USAz State Key Laboratory of Mathematical Engineering and Advanced Computing, Wuxi, Chinay fyouxin2015,hailong.yang,07680,[email protected]∗, [email protected] Abstract—Redundant zeros cause inefficiencies in which the 1 for(int i=0;i<1000;++i) { 2 A[i] = 0; B[i] = i; zero values are loaded and computed repeatedly, resulting in 3 } 4 ... unnecessary memory traffic and identity computation that waste 5 for(int i=0;i<1000;++i) memory bandwidth and CPU resources. Optimizing compilers 6 I C[i] = A[i]-B[i]; is difficult in eliminating these zero-related inefficiencies due to Listing 1. An example code working on redundant zeros, where all variables are 32-bit integers. limitations in static analysis. Hardware approaches, in contrast, optimize inefficiencies without code modification, but are not enough to fulfill the computation, which yields better cache widely adopted in commodity processors. In this paper, we 1 propose ZeroSpy - a fine-grained profiler to identify redundant usage and vectorization potentials . zeros caused by both inappropriate use of data structures and Actually, a larger number of real-world applications (e.g., useless computation. ZeroSpy also provides intuitive optimization deep neural network and high-efficiency video coding) have guidance by revealing the locations where the redundant zeros already been reported to contain a significant amount of happen in source lines and calling contexts. The experimental redundant zeros and achieved significant speedup from the results demonstrate ZeroSpy is capable of identifying redundant zeros in programs that have been highly optimized for years.
    [Show full text]
  • Professor Won Woo Ro, School of Electrical and Electronic Engineering Yonsei University the Intel® 4004 Microprocessor, Introdu
    Professor Won Woo Ro, School of Electrical and Electronic Engineering Yonsei University The 1st Microprocessor The Intel® 4004 microprocessor, introduced in November 1971 An electronics revolution that changed our world. There were no customer‐ programmable microprocessors on the market before the 4004. It propelled software into the limelight as a key player in the world of digital electronics design. 4004 Microprocessor Display at New Intel Museum A Japanese calculator maker (Busicom) asked to design: A set of 12 custom logic chips for a line of programmable calculators. Marcian E. "Ted" Hoff Recognized the integrated circuit technology (of the day) had advanced enough to build a single chip, general purpose computer. Federico Faggin to turn Hoff's vision into a silicon reality. (In less than one year, Faggin and his team delivered the 4004, which was introduced in November, 1971.) The world's first microprocessor application was this Busicom calculator. (sold about 100,000 calculators.) Measuring 1/8 inch wide by 1/6 inch long, consisting of 2,300 transistors, Intel’s 4004 microprocessor had as much computing power as the first electronic computer, ENIAC. 2 inch 4004 and 12 inch Core™2 Duo wafer ENIAC, built in 1946, filled 3000‐cubic‐ feet of space and contained 18,000 vacuum tubes. The 4004 microprocessor could execute 60,000 operations per second Running frequency: 108 KHz Founders wanted to name their new company Moore Noyce. However the name sounds very much similar to “more noise”. "Only the paranoid survive". Moore received a B.S. degree in Chemistry from the University of California, Berkeley in 1950 and a Ph.D.
    [Show full text]
  • 6502 Introduction
    6502 Introduction Philipp Koehn 18 September 2019 Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1 some history Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1971 2 • First microprocessor on an integrated circuit: Intel 4004 • 4-bit central processing unit, 12 bit address space (4KB) Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1975 3 • MOS Technology 6502 • Dominant CPU in home computers for a decade (Atari, Apple II, Nintendo Entertainment System, Commodore PET) Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1977 4 • Atari 2600 • Video game console: Pong, Pac Man, ... connected to TV Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1980 5 • Commodore VIC20 • 1 MHz, 5KB RAM, BASIC, 3.5KB RAM, 176x184 3 bit color video Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 1982 6 • Commodore C64 • 64KB RAM, 320x200 4 bit color video Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 Commodore C64 7 • BASIC programming language, but serious programs written in assembly • No fancy stuff like multi-process, user accounts, virtual memory, etc. • Machine itself had no mass storage - had to buy tape drive, then floppy disk drive, machine was obsolete once hard drives came around Philipp Koehn Computer Systems Fundamentals: 6502 Introduction 18 September 2019 BASIC Demo 8 • Commands get executed (just like Python interpreter)
    [Show full text]
  • Download a Sample
    Preface Like many American kids in 1979, I woke up to find that Santa had left a brand new Atari VCS1 under the tree (thanks, Mom and Dad, for paying Santa’s invoice!). This was a pretty big deal for a six- year-old who could tell you the location and manufacturer of every standup arcade cabinet within a five mile radius. Having an “arcade in your home” wasn’t just a thing you saw on Silver Spoons, it was now a real thing. The sights and sounds that jumped o↵ of our little Panasonic color TV probably deserve a gigantic run-on sentence worthy of Dylan Thomas, as my brother and I bounced tiny pixellated missiles o↵ of walls in Combat, combed through the perplexing game modes of Space Invaders, battled angry duck-like dragons in Adventure, and became Superman as we put flickering bad guys in a flickering jail. These cartridges were opaque obelisks packaged in boxes with fantastically unattainable illustrations, available at K-Mart for $30 or so. You could tell these species of video games weren’t related to arcade games, though they had a unique look-and-feel of their own. We also had an Apple ][ by this time, so I tried to fit all of these creatures into a digital taxonomy. Atari games had colors and fast motion, but not as much as arcade games, and they never were as complex as Apple ][ games. What made them tick? Why were Activision games so much more detailed? Would the missile still blow up your spaceship if you turned the TV o↵? (Turns out the answer is yes.) 1 It wasn’t sold as “Atari 2600” until 1982.
    [Show full text]
  • The Ultimate C64 Overview Michael Steil, 25Th Chaos Communication Congress 2008
    The Ultimate C64 Overview Michael Steil, http://www.pagetable.com/ 25th Chaos Communication Congress 2008 Retrocomputing is cool as never before. People play Look and Feel C64 games in emulators and listen to SID music, but few people know much about the C64 architecture A C64 only needs to be connected to power and a TV and its limitations, and what programming was like set (or monitor) to be fully functional. When turned back then. This paper attempts to give a comprehen- on, it shows a blue-on-blue theme with a startup mes- sive overview of the Commodore 64, including its in- sage and drops into a BASIC interpreter derived from ternals and quirks, making the point that classic Microsoft BASIC. In order to load and save BASIC computer systems aren't all that hard to understand - programs or use third party software, the C64 re- and that programmers today should be more aware of quires mass storage - either a “datasette” cassette the art that programming once used to be. tape drive or a disk drive like the 5.25" Commodore 1541. Commodore History Unless the user really wanted to interact with the BA- SIC interpreter, he would typically only use the BA- Commodore Business Machines was founded in 1962 SIC instructions LOAD, LIST and RUN in order to by Jack Tramiel. The company specialized on elec- access mass storage. LOAD"$",8 followed by LIST tronic calculators, and in 1976, Commodore bought shows the directory of the disk in the drive, and the chip manufacturer MOS Technology and decided LOAD"filename",8 followed by RUN would load and to have Chuck Peddle from MOS evolve their KIM-1 start a program.
    [Show full text]
  • Appendix A: Microprocessor Data Sheets
    Appendix A: Microprocessor Data Sheets Intel8085 Zilog Z80 MOS Technology 6502 Motorola 6809 Microcontrollers (Single-chip Microcomputers) Intel 8086 ( & 80186 & 80286) Zilog Z8000 Motorola 68000 32-bit Microprocessors lnmos Transputer 184 Appendix A 185 Intel 8085 Followed on from the 8080, which was a two-chip equivalent of the 8085. Not used in any home computers, but was extremely popular in early (late 1970s) industrial control systems. A15-A8 A B c D E Same register AD7-ADO H L set is used in SP 8080 PC ALE Flags Multiplexed d ata bus and lower half of address bus (require 8212 to split data and address buses) Start addresses of Interrupt P/Os Service Routines: 8155- 3 ports, 256 bytes RAM RESET-()()()(J 8255 - 3 ports TRAP- 0024 8355 - 2 ports, 2K ROM RST5.5- 002C 8755 - 2 ports, 2K EPROM RST6.5 - ()(J34 RST7.5- <XJ3C INTR - from interrupting device Other 8251- USART 8202 - Dynamic RAM controller support 8253- CTC (3 counters) 8257 - DMA controller devices: 8271 - FDC 8257 - CRT controller Intel DMA Control System Character CPU buses­ de-multiplexed Video signal to CRT 186 Microcomputer Fault-finding and Design Zilog Z80 Probably the most popular 8-bit microprocessor. Used in home computers (Spectrum, Amstrad, Tandy), office computers and industrial controllers. A F A' F' B c B' C' D E D' E' H L H' L' 8 data Interrupt Memory lines vector I refresh R Index register IX Index register IY (to refresh dynamic RAMI Stack pointer Based on the Intel 8085, but possesses second set of registers.
    [Show full text]
  • Programmable Digital Microcircuits - a Survey with Examples of Use
    - 237 - PROGRAMMABLE DIGITAL MICROCIRCUITS - A SURVEY WITH EXAMPLES OF USE C. Verkerk CERN, Geneva, Switzerland 1. Introduction For most readers the title of these lecture notes will evoke microprocessors. The fixed instruction set microprocessors are however not the only programmable digital mi• crocircuits and, although a number of pages will be dedicated to them, the aim of these notes is also to draw attention to other useful microcircuits. A complete survey of programmable circuits would fill several books and a selection had therefore to be made. The choice has rather been to treat a variety of devices than to give an in- depth treatment of a particular circuit. The selected devices have all found useful ap• plications in high-energy physics, or hold promise for future use. The microprocessor is very young : just over eleven years. An advertisement, an• nouncing a new era of integrated electronics, and which appeared in the November 15, 1971 issue of Electronics News, is generally considered its birth-certificate. The adver• tisement was for the Intel 4004 and its three support chips. The history leading to this announcement merits to be recalled. Intel, then a very young company, was working on the design of a chip-set for a high-performance calculator, for and in collaboration with a Japanese firm, Busicom. One of the Intel engineers found the Busicom design of 9 different chips too complicated and tried to find a more general and programmable solu• tion. His design, the 4004 microprocessor, was finally adapted by Busicom, and after further négociation, Intel acquired marketing rights for its new invention.
    [Show full text]
  • Microcomputer Associates, Inc
    Bulk Rate Permit No. 243 Cupertino, CA 95014 MICROCOMPUTER ASSOCIATES, INC. Product Catalog* featuring VT-100 CRT Terminal VT -200 CRT Terminal with Tiny BASIC, Resident Assembler and Demon Single Board Computers and The newest generation microcomputer system with the exclusive on­ board DEMONTM debug monitor. In kit form, you can build it, plug it in JJOlT and talk to it in three hours or less ... for unheard of low prices! This is the fully assembled JOLpM 4K System. The JOLT CPU card includes the powerful DEMONTM Debug Monitor . • Catalog items and prices subject to change without notice. A READY control line provides for asynchronous operation with JOLT SYSTEM DESCRIPTION slow memory or I/O devices. The JOLT system consists of a set of modular microcomputer The address bus (AO-A 15). the data bus (00-07). the two phase boards which can be used singly or tied together to produce any clock (PIT. P2T). the reset line (·RESET). the interrupt lines ("IRZ. desired microcomputer system configuration. The minimum system AND *NMI). and the ready line (ROY) are all available at the edge is one CPU board. which alone constitutes a viable computer sys­ connector of the CPU card. The loading restrictions should be con­ tem complete with central processor. 1/0. interrupts. timer. read­ sidered when using the signal lines driven by the CPU for external write memory. and a complete software debug monitor in read­ system expansion. A more detailed description of the CPU inputs and outputs may only-memory. be found in the MCS6500 hardware manual available from MOS Additional boards in the JOLT system include a 4 K byte RAM.
    [Show full text]
  • Computer Architectures an Overview
    Computer Architectures An Overview PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sat, 25 Feb 2012 22:35:32 UTC Contents Articles Microarchitecture 1 x86 7 PowerPC 23 IBM POWER 33 MIPS architecture 39 SPARC 57 ARM architecture 65 DEC Alpha 80 AlphaStation 92 AlphaServer 95 Very long instruction word 103 Instruction-level parallelism 107 Explicitly parallel instruction computing 108 References Article Sources and Contributors 111 Image Sources, Licenses and Contributors 113 Article Licenses License 114 Microarchitecture 1 Microarchitecture In computer engineering, microarchitecture (sometimes abbreviated to µarch or uarch), also called computer organization, is the way a given instruction set architecture (ISA) is implemented on a processor. A given ISA may be implemented with different microarchitectures.[1] Implementations might vary due to different goals of a given design or due to shifts in technology.[2] Computer architecture is the combination of microarchitecture and instruction set design. Relation to instruction set architecture The ISA is roughly the same as the programming model of a processor as seen by an assembly language programmer or compiler writer. The ISA includes the execution model, processor registers, address and data formats among other things. The Intel Core microarchitecture microarchitecture includes the constituent parts of the processor and how these interconnect and interoperate to implement the ISA. The microarchitecture of a machine is usually represented as (more or less detailed) diagrams that describe the interconnections of the various microarchitectural elements of the machine, which may be everything from single gates and registers, to complete arithmetic logic units (ALU)s and even larger elements.
    [Show full text]
  • W65C02S Microprocessor DATA SHEET
    The Western Design Center, Inc. February 2004 W65C02S Data Sheet W65C02S Microprocessor DATA SHEET WDC ã The Western Design Center, Inc., 2003. All rights reserved The Western Design Center, Inc. February 2004 W65C02S Data Sheet WDC reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Information contained herein is provided gratuitously and without liability, to any user. Reasonable efforts have been made to verify the accuracy of the information but no guarantee whatsoever is given as to the accuracy or as to its applicability to particular uses. In every instance, it must be the responsibility of the user to determine the suitability of the products for each application. WDC products are not authorized for use as critical components in life support devices or systems. Nothing contained herein shall be construed as a recommendation to use any product in violation of existing patents or other rights of third parties. The sale of any WDC product is subject to all WDC Terms and Conditions of Sales and Sales Policies, copies of which are available upon request. Copyright Ó1981-2004 by The Western Design Center, Inc. All rights reserved, including the right of reproduction, in whole, or in part, in any form. The Western Design Center, Inc. W65C02S Data Sheet 2 The Western Design Center, Inc. W65C02S Data Sheet TABLE OF CONTENTS 1 INTRODUCTION................................................................................................................................................................................5
    [Show full text]
  • W65C02S 8–Bit Microprocessor
    October 19, 2010 W65C02S 8–bit Microprocessor WDC reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Information contained herein is provided gratuitously and without liability, to any user. Reasonable efforts have been made to verify the accuracy of the information but no guarantee whatsoever is given as to the accuracy or as to its applicability to particular uses. In every instance, it must be the responsibility of the user to determine the suitability of the products for each application. WDC products are not authorized for use as critical components in life support devices or systems. Nothing contained herein shall be construed as a recommendation to use any product in violation of existing patents or other rights of third parties. The sale of any WDC product is subject to all WDC Terms and Conditions of Sales and Sales Policies, copies of which are available upon request. Copyright ©1981-2010 by The Western Design Center, Inc. All rights reserved, including the right of reproduction, in whole, or in part, in any form. TABLE OF CONTENTS 1 INTRODUCTION ....................................................................................................... 5 1.1 FEATURES OF THE W65C02S ........................................................................................................... 5 2 FUNCTIONAL DESCRIPTION .................................................................................. 6 2.1 INSTRUCTION REGISTER (IR) AND DECODE .......................................................................................
    [Show full text]