It has two main changes:
* A Memory Management Unit (MMU) which is based on 6502/65C02 NOP opcodes.
* The WDC/Rockwell 65C02 instructions that were missing:
SMB $ZP, RMB $ZP, BBS $ZP,branch, BBR $ZP,branch, WAI, STP
These have been documented elsewere, so no need to say anything about them.
The MMU
The 65C02 is a fabulous CPU, but it lacks one essencial feature: A way to properly access large chunks of memory! A MMU is not only a way to access more memory, but also a way to protect that memory. Think about Linux or any other system that needs memory protection. And that is essencially what you get with this MMU. Plus a way to efficiently access all that memory (without having to think about shifting memory banks around).
The MMU uses unused opcodes, so it doesn't really interfere with the 65C02. In the future I may also release the MMU as a separate unit so that one can use a real 65C02 and get the same features.
The following is a list of MMU instuctions with opcodes. They are explained in the attached file.
Code: Select all
$82 $xy MMS #$xy Memory Management System register
$44 $ZP MMB $ZP Memory Management BLOCK register from Zero Page
$E2 $xx MMB #$xx Memory Management BLOCK register
$C2 $xx MMZ #$xx Memory Management Zeropage BANK register
$5C $xx $yy MMI $yyxx Memory Management Interrupt BANK register
$D4 $ZP MMP $ZP,X Memory Management Protection Table from Indexed Zeropage
$FC $xx $yy MMF $yyxx Memory Management Fetch BANK register
$54 $ZP MMF $ZP,x Memory Management Fetch BANK register from Indexed Zeropage
$DC $xx $yy MMJ $yyxx Memory Management Jump BANK register
$F4 $ZP MMJ $ZP,X Memory Management Jump BANK register from Indexed ZeropageAll the files and the testsuite now resides at this Github repo: https://github.com/kakemoms/65C02MMU
Direct download files (V1.4): -------------------------------------------------------------------------------------------
Version history
Version 1.1:
Updated core to correctly handle MMI instruction. MMJ_STORAGE flag now resides at bit 6 of the MMZ instruction (manual needs update).
Version 1.3 changes:
- MMJ_STORAGE now implemented and tested.
- Integrated SRAM-backed JBANK, ZBANK, and ACCESS_KEY architecture
- Added transparent stall mechanism for SRAM-backed state
- Extended BANK_REG_MEM mapping
- Added per-bank protection keys and enforcement rules
- a Testsuite as well as Claus Dormann's Test (with a small patch).
Version 1.4 changes:
- Extended address bus from 20 bits to 24 bits (16 MiB)
- 64 KiB mode now uses full 24-bit addresses: {BANK[7:0], addr[15:0]}
- PC widened to 24 bits
- DIHOLD logic modified to fix a problem with the RDY signal
- Extended to 29 test benches (updated to 24bit, all passing)
- Added comprehensive documentation