Write up on Tech geek HISTORY: THE Nintendo Entertainment System (NES)

images (33)

Background of Study

Introduction

In 1889, Fusajiro Yamauchi founded Nintendo Koppai and began manufacturing Japanese playing cards, hanafuda, in Kyoto [10]. By 1950, when Hiroshi Yamauchi became president, Nintendo was a successful manufacturer of both western and Japanese playing cards. In 1963, after several name changes, the company settled on Nintendo Co. Ltd. (NCL). By 1970, the company was producing electronic games and in 1973 they introduced a laser clay shooting system which they hoped would replace bowling as a major pastime [11]. Nolan Bushnell was a student at the University of Utah when he first had the idea of a coin operated computer game. Pong, which was released in 1972, quickly became a hit and inspired the release of a wave of arcade games. Bushnell’s company, Atari, wanted to replicate this success by releasing a system to play games in homes. By 1976 several companies had tried, and failed, to release a successful console. Bushnell was aware that Atari lacked the capital to produce a console and sold the company to Warner Communications, retaining the position of chairman [12].

 In 1977, Atari released the Atari Video Computer System (VCS), an 8-bit console which succeeded in opening up the home console market, aided by the home version of Space Invaders, released in 1980. Bushnell disagreed with the direction Warner were taking and left the company in 1978. In 1979, Nintendo made their first attempt to break into the arcade game market but by 1981 their success had been limited. Hiroshi Yamauchi asked Nintendo graphic artist, Shigeru Miyamoto, to design a new game. The result was Donkey Kong in which players controlled a carpenter called Jumpman and tried to rescue a captive girl from Donkey Kong, a large ape. Jumpman was renamed Mario after the landlord of Nintendo’s newly created American subsidiary, later to be called Nintendo of America Inc. (NOA), run by Yamauchi’s son in law, Minoru Arakawa. By 1982, third party development had led to several sub-standard games being released for Atari’s VCS and competition with other consoles was leading to saturation of the market. By 1984 the industry was suffering enormous losses and most product lines were discontinued.

Hiroshi Yamauchi’s instructions to design a console which would be cheaper than the competition resulted in Nintendo deciding to use an outdated Central Processing Unit (CPU). Although a 16-bit processor would have coped with ease, to keep the price low they decided to use a variant of the 8-bit 6502 processor, developed by MOS technology in 1975. The chip would be sufficient to run the programs but would be unable to generate the graphics required so the company decided to use a second chip as a dedicated Processing Unit (PPU), responsible for calculating and displaying the graphics. The NES motherboard [27]. Nintendo designed the basic features required from the chips but found it difficult to find a company willing to produce such highly customized chips for the low price they were looking for. Ricoh agreed to manufacture the chips after Nintendo guaranteed them a three-million chip order. By the end of 1986 Nintendo was Ricoh’s largest customer, accounting for between 60 and 70 percent of the company’s semiconductor sales [10]. Both chips feature their own internal memory, in the form of RAM. Games were usually stored on ROM chips within the game cartridges, which could be accessed by the CPU when the cartridges where inserted into the system

The Nintendo Entertainment System (NES) was the world’s most widely used videogames console during the 1980s. From its initial release in 1983 until it was discontinued in 1995 the console brought gaming into more homes than ever before and paved the way for the videogame industry as it stands today. Although technology has improved dramatically since the NES, many excellent games were only released on that format and so are unplayable on more modern systems. However these games have been able to survive and continue to be played thanks to emulation, which simulates the workings of one system to allow software created for it to be used on a modern system.

Significance of the Study

The NES impressive library of games was written using 6502 assembly language.

Compared to assembly languages for modern processors, 6502 assembly is relatively simple, with only 53 possible instructions, one accumulator, two index registers, and a 256 byte stack.

Almost all NES commercial titles were written in 6502 assembly language. This allowed developers to fine-tune each and every byte of their programs. This was critical when fitting games into the small but expensive in the game cartridge. It also allowed for clever optimizations which squeeze the most performance possible out of each frame of animation.

Nowadays, homebrew NES developers usually write games in either assembler or C, the latter using the cc65 compiler toolchain. Writing in C gives you more functionality per line of code. While it has lower performance and greater code size than a well-written assembly program, you can still write a pretty good game in C.

The Central Processing Unit The Central Processing Unit, or CPU, is located inside the custom 2A03 chip on the Nintendo. This CPU core is a 6502 microprocessor and is responsible for directly or indirectly controlling every other device in the Nintendo. The CPU interfaces with the system RAM, cartridge program ROM, and several peripheral devices such as the controller interface, Audio Processing Unit, and Picture Processing Unit. All of these devices interact together as the microcomputer system

NES is based on the 6502 CPU, and a custom video controller known as PPU

(Picture Processing Unit). The PPU’s video memory is separated from the

main CPU memory and can be read/written via special ports. Cartridges may

contain both ROM appearing in the main CPU address space at $8000-$FFFF,

and VROM or VRAM appearing in the PPU address space at $0000-$1FFF and

containing the Pattern Tables (aka Tile Tables). In smaller cartridges,

which only have 16kB ROM, it takes place at $C000-$FFFF leaving $8000-$BFFF

area unused. Internal NES VRAM is located at addresses $2000-$3FFF in the

PPU memory. Some cartridges also have RAM at $6000-$7FFF, which may or may

not be battery-backed.

CPU Memory Map

————————————— $10000

 Upper Bank of Cartridge ROM

————————————— $C000

 Lower Bank of Cartridge ROM

————————————— $8000

 Cartridge RAM (may be battery-backed)

————————————— $6000

 Expansion Modules

————————————— $5000

 Input/Output

————————————— $2000

 2kB Internal RAM, mirrored 4 times

The Historic 6502 The 6502 is a historic 8-bit microprocessor originally designed by MOS Technology in 1975. The 6500 family of processors was born after several designers of the Motorola 6800 left Motorola unhappy with the recent release of the 6800. After joining MOS Technology (which later became the Commodore Semiconductor Group), these designers set out to develop a new CPU that would be able to out-perform the Motorola 6800. When introduced, the 6502 not only outperformed the 6800 but was the least expensive yet fully-featured CPU on the market. The 6502 only cost $25 while the 6800 was selling for six times that. The 6502 and Zilog Z80 are considered responsible for sparking off a series of computer development projects that would eventually result in the home computer revolution of the 1980s. The 6502 was a landmark in microprocessor design. It was able to have very few registers because of its extremely fast access to RAM and pipelined bus technology. The processor’s internal logic also ran at the same speed as its peripherals which allowed for a lower system cost. Along with being used in the Nintendo Entertainment System and Japanese Famicom System, the 6502 was also used in the Apple I and Apple II families, the Atari, and the Commodore 64. The 6502 is still produced today for embedded systems. The legacy of the 6502 is that its efficient design is said to have inspired the development of the ARM RISC processors which are now used in many handheld devices.

ROM chips

Early NES cartridges had two ROM chips: an 8K CHR ROM and a 32K PRG ROM. The CHR ROM contained sprite and background image data, while the PRG ROM contained program data

NES games come in cartridges, and inside of those cartridges are various circuits and hardware. Different games use different circuits and hardware, and the configuration and capabilities of such cartridges is commonly called their mapper. Mappers are designed to extend the system and bypass its limitations, such as by adding RAM to the cartridge or even extra sound channels. More commonly though, mappers are designed to allow games larger than 40K to be made.

Software:

NES Software consists of a PRG-ROM (Program ROM) which is the code area and a CHR-RAM (Character RAM) which is the pattern table.
Most games load themselves into the Lower PRG-ROM ($8000), using 32kb of PRG-ROM space. The first game to use the entire PRG-ROM space is Super Mario Brothers. However, all games with more than one (1) 16K bank of PRG-ROM load themselves into $8000 as well. These games use MMCs (see section 2.5) to address PRG-ROM past the 32K boundary, and to access more than 8K of CHR-RAM simultaneously.

UNROM Games:

Unrom games come with a built-in PRG ROM chip as well as a RAM chip for memory storage. Such things as background and moving object characters for the current area are stored in the RAM chip until needed. The Unrom also was the first chip to expand the memory size of the NES games and were the first to carry a feature known as bank switching for the games.
This effect allowed for many pages of information and to have several programs on one chip. Back switching allowed for automatic switching between multiple programs on one chip. Also, the maximum game page size was 8x16kb, just like the MMC1 chip.

Memory Management Chips:

The NES used memory mapped I/O to allow the processor to communicate with the other components, the PPU and the input devices. Memory mapped I/O is a technique where data 7 can be transferred to a device via a write to a specific location in memory.

The memory is divided into three parts, ROM inside the cartridges, the CPU’s RAM and the I/O registers. The address bus is used to set the address of the required location. The control bus is used to inform the components whether the request is a read or a write. The data bus is used to read or write the byte to the selected address. Note that ROM is read-only and is accessed via a MMC, to allow bank switching to occur. The I/O registers are used to communicate with the other components of the system, the PPU and the control devices.

.

The memory breakdown defines where all of the different components of the Nintendo reside. Virtually everything in the Nintendo is memory mapped, primarily since this is the only way the CPU can communicate with the external devices such as the controllers, sound registers, and PPU. The CPU program memory is kept separately from the graphics memory in order not to fill up the code space with patterns and tables. This means that the CPU can only write to the graphics memory through the PPU control registers (mapped to addresses 2000-2007). There is 2K of internal program RAM and 2K of internal graphics RAM. The game cartridge gets an entire tap of the CPU and PPU busses and have complete control over where their internal ROMs which contain the program code and pattern tables appear in the address space.

NES games come in cartridges, and inside of those cartridges are various circuits and hardware. Different games use different circuits and hardware, and the configuration and capabilities of such cartridges is commonly called their mapper. Mappers are designed to extend the system and bypass its limitations, such as by adding RAM to the cartridge or even extra sound channels. More commonly though, mappers are designed to allow games larger than 40K to be made

Leave a Comment

Your email address will not be published. Required fields are marked *