All Topics  
Bank switching

 

   Email Print
   Bookmark   Link






 

Bank switching



 
 
Bank switching (also known as "paging", but only loosely related to the ordinary meaning of "paging
Paging

In computer operating systems that have their main memory divided into page , paging is a transfer of pages between main memory and an auxiliary store, such as hard disk drive....
" in computing) was a technique common in 8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 microcomputer
Microcomputer

A microcomputer is a computer with a microprocessor as its central processing unit. Another general characteristic of these computers is that they occupy physically small amounts of space when compared to mainframe computer and minicomputers....
 systems, to increase the amount of addressable RAM
Random-access memory

Random-Assess Memory Card is a form of computer data storage. Today it takes the form of integrated circuits that allows the stored data to be accessed in any order ....
 and ROM
Read-only memory

Read-only memory is a class of computer storage media used in computers and other electronic devices. Because data stored in ROM cannot be modified , it is mainly used to distribute firmware ....
 without extending the address bus
Address bus

An address bus is a computer bus that is used to specify a memory address. When a central processing unit or direct memory access-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus ....
. Bank switching was also used to configure a system differently at different times, for example, a ROM required to start a system
Booting

In computing, booting is a Bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the initial set of operations that the computer performs when it is switched on....
 from diskette could be switched out when no longer needed.






Discussion
Ask a question about 'Bank switching'
Start a new discussion about 'Bank switching'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Bank switching (also known as "paging", but only loosely related to the ordinary meaning of "paging
Paging

In computer operating systems that have their main memory divided into page , paging is a transfer of pages between main memory and an auxiliary store, such as hard disk drive....
" in computing) was a technique common in 8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 microcomputer
Microcomputer

A microcomputer is a computer with a microprocessor as its central processing unit. Another general characteristic of these computers is that they occupy physically small amounts of space when compared to mainframe computer and minicomputers....
 systems, to increase the amount of addressable RAM
Random-access memory

Random-Assess Memory Card is a form of computer data storage. Today it takes the form of integrated circuits that allows the stored data to be accessed in any order ....
 and ROM
Read-only memory

Read-only memory is a class of computer storage media used in computers and other electronic devices. Because data stored in ROM cannot be modified , it is mainly used to distribute firmware ....
 without extending the address bus
Address bus

An address bus is a computer bus that is used to specify a memory address. When a central processing unit or direct memory access-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus ....
. Bank switching was also used to configure a system differently at different times, for example, a ROM required to start a system
Booting

In computing, booting is a Bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the initial set of operations that the computer performs when it is switched on....
 from diskette could be switched out when no longer needed. Certain modern microcontroller
Microcontroller

A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc....
s use bank switching to manage read-write memory, non-volatile memory, input-output devices and system management registers.

Since 8-bit CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
s such as the Zilog Z80
Zilog Z80

The Zilog Z80 is an 8-bit microprocessor designed and sold by Zilog from July 1976 onwards. It was widely used both in desktop and embedded computer designs as well as for military purposes....
 and the MOS Technology 6502
MOS Technology 6502

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured central processing unit on the market by a considerable margin, costing less than one-sixth the price of competing designs from larger companies such...
 series, with their 16-bit
16-bit

16-bit architectureThe HP 2100#Descendants and variants , introduced in 1975, was the world's first 16-bit microprocessor.Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816....
 address registers, could only address a maximum of 64 KB
Kilobyte

Kilobyte is a unit of Computer data storage equal to either 1,024 bytes or 1,000 bytes , depending on context.It is abbreviated in a number of ways: KB, kB, K and Kbyte....
 of memory (in case of a single address being an 8-bit element, see address bus
Address bus

An address bus is a computer bus that is used to specify a memory address. When a central processing unit or direct memory access-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus ....
), 8-bit systems containing more than 64 KB of memory addressed memory in banks (or "pages"). Typically there was some memory that was always mapped into the processor's address space and other parts that could be switched in and out through use of a bank select register. Caution was required when breaking memory into banks so that the processor could always correctly handle interrupt
Interrupt

In computing, an interrupt is an asynchronous communication signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution....
s and the processor stack
Stack

Stack may refer to:...
, if any. Unlike other memory management techniques, bank switching was nearly always initiated by the application program explicitly, although some operating systems such as CP/M
CP/M

CP/M is an operating system originally created for Intel 8080/Intel 8085 based microcomputers by Gary Kildall of Digital Research. Initially confined to single tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations, and were migrated to 16-bit processors....
 version 3.0 took detailed control of the bank switching operation out of the application programmer's hands. The contents of memory temporarily bank-switched out of the processors address space was inaccessible to the processor, but may have been used by, for example, video display hardware or disk controllers
Direct memory access

Direct memory access is a feature of modern computers and microprocessors that allows certain hardware subsystems within the computer to access system Computer storage for reading and/or writing independently of the central processing unit....
.

Bank switching allowed extra memory and functions to be added to a computer design without the expense and incompatibility of switching to a processor with a wider address bus
Address bus

An address bus is a computer bus that is used to specify a memory address. When a central processing unit or direct memory access-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus ....
. For example, the C64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
 used bank switching to allow for a full 64KB of RAM and still provide for ROM and memory-mapped I/O
Memory-mapped I/O

Memory-mapped I/O and port I/O are two complementary methods of performing input/output between the Central processing unit and peripheral devices in a computer....
 as well. The Atari 130XE
Atari 8-bit family

The Atari 8-bit family is a series of 8-bit home computers manufactured from 1979 to 1992. All are based on the MOS Technology MOS Technology 6502 central processing unit and were the first home computers designed with custom coprocessor chips, giving them the most powerful graphic, sound and I/O subsystems of any 8 bit machine of their time...
 could allow its two processors (the 6502 and the ANTIC
ANTIC

ANTIC is an early video system chip used in the Atari 8-bit family of microcomputers as well as the Atari 5200 in the 1980s....
) to access separate RAM banks, allowing programmers on both machines to make large playfields and other graphic objects without using up the memory visible to the CPU.

Bank switching in the IBM PC

In 1988 the companies Lotus
Lotus Software

Lotus Software is a software company with headquarters in Westford, Massachusetts, Massachusetts. Lotus is most commonly known for the Lotus 1-2-3 spreadsheet application, the first feature-heavy, user friendly, reliable and WYSIWYG-enabled product to become widely available in the early days of the IBM PC, when there was no Graphical user i...
, Intel and Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 agreed on a specification called Expanded Memory System (EMS, also stated as LIM-EMS) for use in IBM PC compatible
IBM PC compatible

IBM PC compatible computers are those generally similar to the original IBM Personal Computer, IBM Personal Computer XT, and IBM Personal Computer/AT....
 computers running MS-DOS
MS-DOS

MS-DOS is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the main operating system for personal computers during the 1980s....
. It was a form of bank switching technique that allowed more than the 640 KB of RAM foreseen by the original IBM PC architecture, by letting it appear piecewise in a 64KB "window" located in the Upper Memory Area
Upper Memory Area

The Upper Memory Area is a design feature of IBM IBM PC compatible x86 computers that was responsible for the Conventional memory#640 KB barrier....
. Some computer games made use of this, and the feature is nowadays emulated by later Microsoft Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
s to provide backwards compatibility with those programs.

Video game consoles

Bank switching was also utilized in some video game console
Video game console

A video game console is an game development that produces a video signal which can be used with a display device to display a video game. The term "video game console" is used to distinguish a machine designed for consumers to buy and use solely for playing video games from a personal computer, which has many other functions, or arcade machi...
s. The Atari 2600
Atari 2600

The Atari 2600 is a video game console released in October 1977. It is credited with popularizing the use of microprocessor-based hardware and cartridge containing game code, instead of having non-microprocessor dedicated console hardware with all games built in....
, for instance, could only address 4 KB of ROM, so later 2600 game cartridge
Cartridge (electronics)

In various types of electronic equipment, a cartridge can refer to one method of adding different functionality or content; for example, a video game played on a video game console; or a method by which consumables may be replenished, such as an ink cartridge for a printer....
s contained their own bank switching hardware in order to permit the use of more ROM and thus allow for more sophisticated games (via more program code and, equally important, larger amounts of gameworld data such as graphics and sound). The Nintendo Entertainment System
Nintendo Entertainment System

The Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America, Europe and Australia in . In most of Asia, including Japan , the Philippines, China, Vietnam and Singapore, it was released as the ....
 contained a modified 6502
MOS Technology 6502

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured central processing unit on the market by a considerable margin, costing less than one-sixth the price of competing designs from larger companies such...
 but its cartridges sometimes contained a megabit
Megabit

A megabit is a unit of Computer data storage, abbreviated Mbit .1 megabit = 106 = 1,000,000 bits which is equal to 125,000 bytes....
 or more of ROM, addressed via bank switching called a Multi-Memory Controller
Multi-Memory Controller

Multi-Memory Controllers or Memory Management Controllers are different kinds of special Microprocessor designed by various video game developers for use in Nintendo Entertainment System cartridge s....
. Game Boy
Game Boy

The is an 8-bit handheld game console developed and manufactured by Nintendo. It was released in Japan on , in North America in August , and in Europe in ....
 cartridges used a chip called MBC (Memory Bank Controller), which not only offered ROM bank switching, but also cartridge SRAM bank switching, and even access to such features as infrared links or rumble motors. Bank switching was still being used on later games systems. Several Sega Mega Drive cartridges were over 4MB in size and required the use of this technique (4MB being the maximum address size). The GP2X
GP2X

The GP2X is an open-source, Linux -based handheld video game console and media player created by GamePark Holdings of South Korea.The GP2X is designed for Homebrew developers as well as commercial developers....
 handheld from Gamepark Holdings uses bank switching in order to control the start address (or memory offset) for the second processor.

See also

Sideways address space
Sideways address space

The "Sideways" address space on the Acorn Computers BBC Micro and BBC Master was Acorn's bank switching implementation, providing for permanent system expansion in the days before hard disk drives or even floppy disk drives were commonplace....
, an example of bank switching on the BBC Micro
BBC Micro

The BBC Microcomputer System, or BBC Micro, was a series of microcomputers and associated peripherals designed and built by Acorn Computers for the BBC Computer Literacy Project, operated by the British Broadcasting Corporation....


Computers using bank switching

  • Amstrad CPC
    Amstrad CPC

    The Amstrad CPC is a series of 8-bit home computers produced by Amstrad during the 1980s and early 1990s. "CPC" stands for 'Colour Personal Computer', although it was possible to purchase a CPC with a Green screen display as well as with the standard colour screen ....
  • Amstrad PCW
    Amstrad PCW

    The Amstrad PCW series was United Kingdom company Amstrad's versatile line of home/personal microcomputers pitched as a complete, integrated home/office solution....
  • Apple II series
    Apple II series

    The Apple II was one of the first highly successful mass produced microcomputer products, manufactured by Apple Computer and introduced in 1976....
  • Apple III
    Apple III

    The Apple III was a personal computer aimed at business users, manufactured and sold by Apple Inc. from May, 1980 until its discontinuation on April 24, 1984....
  • Commodore 128
    Commodore 128

    The Commodore 128 home computer/personal computer was the last 8-bit machine commercially released by Commodore International . Introduced in January of 1985 at the Consumer Electronics Show in Las Vegas metropolitan area, it appeared three years after its predecessor, the bestselling Commodore 64....
  • MSX
    MSX

    MSX was the name of a standardized home computer architecture in the 1980s. It was a Microsoft-led attempt to create unified standards among hardware makers, conceived by one-time Microsoft Japan executive Kazuhiko Nishi....
  • PIC microcontroller
    PIC microcontroller

    PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division....
  • ZX Spectrum 128 models
    ZX Spectrum

    The Sinclair ZX Spectrum is an 8-bit personal home computer released in the United Kingdom in 1982 by Sinclair Research Ltd. Referred to during development as the ZX81 Colour and ZX82, the machine was launched as the ZX Spectrum by Sinclair to highlight the machine's colour display, compared with the black-and-white of its predec...
  • Super TV-Boy


External links