Content deleted Content added
Undid revision 1195053595 by 216.152.18.132 (talk): that section isn't there to counter some claim. It is there in order to explain and contrast. Feel free to improve the phrasing, but don't throw out the baby with the bathwater |
|||
(18 intermediate revisions by 13 users not shown) | |||
Line 15:
* 8 (external)
* 16 (internal)}}
|address-width = 24 bits
|pack1 = 40-pin [[Dual in-line package|DIP]]
|pack2 = 44-pin [[Plastic leaded chip carrier|PLCC]], others
|variant = {{plainlist|
* W65C802 (pin-compatible with W65C02)
* W65C265 (MCU)}}
|predecessor = {{plainlist|
* MOS 6502
* [[WDC 65C02]]}}
|successor = WDC 65C832<ref>{{Cite web |last=Mensch |first=William D. |title=A Report on the 65c832 |url=https://mirrors.apple2.org.za/apple2.caltech.edu/miscinfo/65xxx.chronology |url-status=live |archive-url=https://web.archive.org/web/20240407125418/https://mirrors.apple2.org.za/apple2.caltech.edu/miscinfo/65xxx.chronology | archive-date=7 Apr 2024 |access-date=7 Apr 2024}}</ref><ref>{{Cite web |date=6 Sep 2010 |orig-date=Mar 1990 |title=W65C832 Information, Specification, and Data Sheet (March 1990) |url=https://downloads.reactivemicro.com/Electronics/CPU/W65C832%20CPU%20Datasheet%20v2.0.pdf |url-status=live |archive-url=https://web.archive.org/web/20240407125548/https://downloads.reactivemicro.com/Electronics/CPU/W65C832%20CPU%20Datasheet%20v2.0.pdf |archive-date= 7 Apr 2024 |access-date=7 Apr 2024 |website=ReActive Micro }}</ref><ref>{{Cite web |orig-date=Mar 1991 |title=W65C832 Information, Specification, and Data Sheet |url=http://6502.org/documents/datasheets/wdc/wdc_w65c832_preliminary_mar_1991.pdf |url-status=dead |archive-url=https://web.archive.org/web/20230630173006/http://archive.6502.org/datasheets/wdc_w65c832_preliminary_mar_1991.pdf |archive-date=30 Jun 2023 |access-date=7 Apr 2024 |website=6502.org }}</ref> (never released)
}}
The '''W65C816S''' (also '''65C816''' or '''65816''') is a 16-bit [[microprocessor]] (MPU) developed and sold by the [[Western Design Center]] (WDC). Introduced in 1983,<ref>[https://web.archive.org/web/20100206192831/http://processortimeline.info/proc1980.htm Chronology of Microprocessors (1980–1989)]</ref> the W65C816S is an enhanced version of the [[WDC 65C02]] [[8-bit computing|8-bit]] MPU, itself a [[CMOS]] enhancement of the venerable [[MOS Technology]] [[MOS Technology 6502|6502]] [[NMOS logic|NMOS]] MPU. The 65C816 is the CPU for the [[Apple IIGS]] and, in modified form, the [[Super Nintendo Entertainment System]].
The ''65'' in the part's designation comes from its 65C02 compatibility mode, and the ''816'' signifies that the MPU has selectable 8- and [[16-bit computing|16-bit]] [[processor register|register]] sizes. In addition to the availability of 16-bit registers, the W65C816S extends [[memory address]]ing to [[24-bit computing|24 bit]]s, supporting up to 16 [[megabyte]]s of [[random-access memory]]. It has an enhanced instruction set and a 16-bit [[
At [[reset (computing)|reset]], the W65C816S starts in "emulation mode", meaning it substantially behaves as a 65C02. Thereafter, the W65C816S may be switched to "native mode" with a two instruction sequence, causing it to enable all enhanced features, yet still maintain a substantial degree of [[backward compatibility]] with most 65C02 software. However, unlike the [[PDIP|PDIP40]] version of the 65C02, which is a [[pin-compatible]] replacement for its NMOS ancestor, the PDIP40 W65C816S is not pin-compatible with any other 6502 family MPU.
Line 42 ⟶ 43:
The same process also led to the 65C802, which was identical inside to the 65C816. Both were produced on the same fabrication lines and diverged only during the last metalization stages when the chip was being connected to the external pins. In the 65C802, those pins had the same layout as the original 6502, which allowed it to be used as a drop-in replacement while still allowing the 16-bit processing of the CPU to be used. However, as it used the original pinout it had only 16 addressing pins, and could therefore only access 64 KB of external memory.{{sfn|Eyes|Lichty|1986|p=45}} Typically, when hardware manufacturers designed a project from the ground up, they used the 65C816 rather than the 65C802, resulting in the latter being withdrawn from production.
Apple subsequently integrated the 65C816 into the [[Apple IIGS]] computer. The basic 65C816 design was [[second source|second-sourced]] by [[VLSI Technology]],<ref name="vti_65816">{{ cite book | url=https://archive.org/details/1988vlsidatabookocrbm/page/n263/mode/2up | title=Application Specific Logic Products Data Book 1988 | publisher=VLSI Technology Inc. | date=1988 | access-date=18 March 2024 | pages=257–279 }}</ref> [[GTE]], [[Sanyo]] and others from the mid-to-late 1980s to the early 1990s.
In the 1990s, both the 65C816 and 65C02 were converted to a fully [[static core]], which made it possible to completely stop the [[clock signal|processor's Ø2 clock]] without loss of register contents. This feature, along with the use of [[static RAM|asynchronous static RAM]], made it possible to produce designs that used minimal power when in a standby state.
{{As of|April 2024}}, the W65C816S is available from WDC in 40 pin [[PDIP]], [[plastic leaded chip carrier|PLCC44]], or 44-pin [[Quad flat package#PQFP|TQFP]] packaging, as an [[microcontroller|MCU]] through the W65C265,<ref>{{Cite web |date=5 Jan 2021 |title=W65C265S 16-bit Microcontroller |url=https://www.westerndesigncenter.com/wdc/w65c265s-chip.php |url-status=live |archive-url=https://web.archive.org/web/20240402205917/https://www.westerndesigncenter.com/wdc/w65c265s-chip.php |archive-date=2 Apr 2024 |access-date=7 Apr 2024 |website=The Western Design Center, Inc.}}</ref> and as IP cores for [[Application-specific integrated circuit|ASIC]] integration<ref>{{Cite web |date=5 Jan 2021 |title=W65C816 8/16-bit Microprocessor |url=https://www.westerndesigncenter.com/wdc/w65c816s-core.php |url-status=live |archive-url=https://web.archive.org/web/20231115050721/https://www.westerndesigncenter.com/wdc/w65c816s-core.php |archive-date=15 Nov 2023 |access-date=7 Apr 2024 |website=The Western Design Center, Inc.}}</ref><ref>{{Cite web |date=5 Jan 2021 |title=W65C265S 8/16-bit Microcontroller |url=https://www.westerndesigncenter.com/wdc/w65c265s-core.php |url-status=live |archive-url=https://web.archive.org/web/20240407131630/https://www.westerndesigncenter.com/wdc/w65c265s-core.php |archive-date=7 Apr 2024 |access-date=7 Apr 2024 |website=The Western Design Center, Inc.}}</ref> (for example [[Winbond]]'s W55V9x series of TV [[Edutainment]] [[integrated circuit|IC]]s<ref>{{Cite web |date=2 May 2006 |title=W55V92 TV-toy Controller Data Sheet |url=https://static6.arrow.com/aropdfconversion/5557b1c0d4895012527b1add354b861f938e4daa/w55v92a1.7.pdf |access-date=12 June 2024 |website=Arrow Electronics}}</ref>).
[[File:WDC W65C802P 4 1.jpg|thumb|W65C802P]]
Line 157 ⟶ 158:
| style="text-align:center;"| '''z'''
| style="text-align:center;"| '''c'''
| style="background:white; color:black" | [[Status register|'''
|- style="background:silver;color:black"
| style="text-align:center; background:white" colspan="23" |
| style="text-align:center;"| '''e'''
| style="background:white; color:black" | '''
|}
|}
Line 194 ⟶ 195:
The most obvious change to the 65C816 when running in native mode is the expansion of the various registers from 8-bit to 16-bit sizes. This enhancement affects the accumulator (<code>A</code>), the <code>X</code> and <code>Y</code> [[index register]]s, and the [[stack pointer]] (<code>SP</code>). It does not affect the [[program counter]] (<code>PC</code>), which has always been 16-bit.{{sfn|Eyes|Lichty|1986|p=46}}
When running in native mode, two bits in the status register change their meaning. In the original 6502, bits 4 and 5 were not used, although bit 4 is referred to as the break (<code>b</code>) flag. In native mode, bit 4 becomes the <code>x</code> flag and bit 5 becomes the <code>m</code> flag. These bits control whether or not the [[index register]]s (<code>x</code>) and
In native mode operation, the accumulator and index registers may be set to 16- or 8-bit sizes at the programmer’s discretion by using the <code>REP</code> and <code>SEP</code> instructions to manipulate the <code>m</code> and <code>x</code> status register bits. This feature gives the programmer the ability to perform operations on either word- and byte-size data. As the accumulator and index register sizes are independently settable, it is possible, for example, to have the accumulator set to eight bits and the index registers set to 16 bits, giving the programmer the ability to manipulate individual bytes over a 64KB range without having to perform pointer arithmetic.
Line 216 ⟶ 217:
Internally, the 65c816 is a fully 16-bit design. The <code>m</code> and <code>x</code> bits in <code>SR</code> determine how the user registers (accumulator and index) appear to the rest of the system. Upon reset, the 65c816 starts in 6502 emulation mode, in which <code>m</code> and <code>x</code> are locked to <code>1</code>. Hence the registers are locked to eight-bit size. The most significant byte (MSB) of the accumulator (the <code>B</code>-accumulator) is not directly accessible but can be swapped with the least significant byte (LSB) of the accumulator (the <code>A</code>-accumulator) by using the <code>XBA</code> instruction. There is no corresponding operation for the index registers (<code>X</code> and <code>Y</code>), whose MSBs are locked at <code>$00</code>.
Upon being switched to native mode, the MSB of <code>X</code> and <code>Y</code> will be zero, and the <code>B</code>-accumulator will be unchanged. If the <code>m</code> bit in <code>SR</code> is cleared, the <code>B</code>-accumulator will be
If the <code>x</code> bit in <code>SR</code> is cleared, both index registers will be set to 16 bits. If used to index an address, e.g., <code>LDA SOMEWHERE,X</code>, the 16-bit value in the index register will be added to the base address to form the effective address.
Line 248 ⟶ 249:
{{See also|MOS Technology 6502#Further reading|l1=List of books about 65xx microprocessor families}}
* ''[http://www.westerndesigncenter.com/wdc/documentation/w65c816s.pdf 65C816 Datasheet]''; Western Design Center; 55 pages; 2018.
* Eyes, David and Ron Lichty; ''Programming the 65816: Including the 6502, 65C02, and 65802''; Brady Publishing; 636 pg; 2015
* Fischer, Michael; ''65816/65802 assembly language programming''; Osborne/McGraw-Hill; 686 pg; 1986
==External links==
|