65816 system engineering pros and cons
Posted: Tue Dec 28, 2010 6:06 pm
Elsewhere, André said:
and I thought it might be good to have a thread specifically about the features and difficulties of building with the 65816.
To recap, the 65816 offers
- a 6502 compatible mode, which it uses at reset time and optionally thereafter
- optional modes for 16-bit registers, arithmetic and/or and memory accesses
- 16-bit stack pointer
- base address register for zero-page accesses (now called direct page)
- a 24-bit address space, with
- an 8-bit wide databus, used part-time for the high byte of the address bus
- bank registers, to allow 16-bit pointers to access programs or data in the 24-bit address space
- some addressing modes which allow for 24 bit addresses
- some stack-relative instructions
- long branches with 16-bit displacement
- ABORT input
- outputs to indicate the mode, vector accesses, valid addresses, valid fetches, rmw accesses
but it has some drawbacks, such as
- no supervisor mode
- 16-bit bank boundaries are visible
- address bus is not 24 dedicated pins
- a need for conventions and discipline as to which modes are used, and when.
- some structures are forced to be in bank 0 (stacks, direct page, vectors, interrupt handlers)
- timing of bank address (on data bus) and ABORT input are relative to rising edge of phi2 (which is rather early at high clock speeds)
Any other observations about the usefulness or difficulty of building systems with this processor?
Edit: Just to note that simple systems remain simple with the 65816 - it's a relatively easy design job to replace an existing 6502, or to design a system around it with say 512Mbyte of SRAM. Things start getting complicated when the system is to support slow peripherals, have memory protection or multiple bus masters. A simple system doesn't need to use the extra pins such as RDY, ABORT, MPB, VPB, VDA, VPA, M/X or E - conversely, if the system seems to need those pins, it's complex and the designer will need a good understanding of what they are for and how they are to be used.
fachat wrote:
... the 65816 does not make it easy to build a simple system.... That's why I started to design my own 6502 extension...
To recap, the 65816 offers
- a 6502 compatible mode, which it uses at reset time and optionally thereafter
- optional modes for 16-bit registers, arithmetic and/or and memory accesses
- 16-bit stack pointer
- base address register for zero-page accesses (now called direct page)
- a 24-bit address space, with
- an 8-bit wide databus, used part-time for the high byte of the address bus
- bank registers, to allow 16-bit pointers to access programs or data in the 24-bit address space
- some addressing modes which allow for 24 bit addresses
- some stack-relative instructions
- long branches with 16-bit displacement
- ABORT input
- outputs to indicate the mode, vector accesses, valid addresses, valid fetches, rmw accesses
but it has some drawbacks, such as
- no supervisor mode
- 16-bit bank boundaries are visible
- address bus is not 24 dedicated pins
- a need for conventions and discipline as to which modes are used, and when.
- some structures are forced to be in bank 0 (stacks, direct page, vectors, interrupt handlers)
- timing of bank address (on data bus) and ABORT input are relative to rising edge of phi2 (which is rather early at high clock speeds)
Any other observations about the usefulness or difficulty of building systems with this processor?
Edit: Just to note that simple systems remain simple with the 65816 - it's a relatively easy design job to replace an existing 6502, or to design a system around it with say 512Mbyte of SRAM. Things start getting complicated when the system is to support slow peripherals, have memory protection or multiple bus masters. A simple system doesn't need to use the extra pins such as RDY, ABORT, MPB, VPB, VDA, VPA, M/X or E - conversely, if the system seems to need those pins, it's complex and the designer will need a good understanding of what they are for and how they are to be used.