André's 8-bit Pages  Projects  Code  Resources  Tools  Forum
(by Google)

The 65k Project - Future Options

This page describes the future options for my 65k line of processors. The current options can be found in the processor specifications, so here only the future features are discussed.

These opcodes are defined by the "QUICK prefix" byte, being followed by an additional opcode byte. These opcodes may still even be modified by the prefix1 and prefix2 opcodes though!

The QUICK opcodes provide a way to "quickly" do repetitive operations which require multiple opcodes on the 6502 - like INY with an increment larger than one for example.

The following table describes the opcodes:

LSB->
MSB\
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 INY #1 INX #1 INC A #1 ROL A #1 ASL A #1 RDL A #1 INC #1, (E) ROL #1, (E) RDL #1 (E) ASL #1, (E) SLX #1 SLY #1 ASR A #1 INC #1, zp ROL #1, zp ASL #1, zp
1 INY #2 INX #2 INC A #2 ROL A #2 ASL A #2 RDL A #2 INC #2, (E) ROL #2, (E) RDL #2 (E) ASL #2, (E) SLX #2 SLY #2 ASR A #2 INC #1, zp ROL #2, zp ASL #2, zp
2 INY #3 INX #3 INC A #3 ROL A #3 ASL A #3 RDL A #3 INC #3, (E) ROL #3, (E) RDL #3 (E) ASL #3, (E) SLX #3 SLY #3 ASR A #3 INC #1, zp ROL #3, zp ASL #3, zp
3 INY #4 INX #4 INC A #4 ROL A #4 ASL A #4 RDL A #4 INC #4, (E) ROL #4, (E) RDL #4 (E) ASL #4, (E) SLX #4 SLY #4 ASR A #4 INC #1, zp ROL #4, zp ASL #4, zp
4 INY #5 INX #5 INC A #5 ROL A #5 ASL A #5 RDL A #5 INC #5, (E) ROL #5, (E) RDL #5 (E) ASL #5, (E) SLX #5 SLY #5 ASR A #5 INC #1, zp ROL #5, zp ASL #5, zp
5 INY #6 INX #6 INC A #6 ROL A #6 ASL A #6 RDL A #6 INC #6, (E) ROL #6, (E) RDL #6 (E) ASL #6, (E) SLX #6 SLY #6 ASR A #6 INC #1, zp ROL #6, zp ASL #6, zp
6 INY #7 INX #7 INC A #7 ROL A #7 ASL A #7 RDL A #7 INC #7, (E) ROL #7, (E) RDL #7 (E) ASL #7, (E) SLX #7 SLY #7 ASR A #7 INC #1, zp ROL #7, zp ASL #7, zp
7 INY #8 INX #8 INC A #8 ROL A #8 ASL A #8 RDL A #8 INC #8, (E) ROL #8, (E) RDL #8 (E) ASL #8, (E) SLX #8 SLY #8 ASR A #8 INC #1, zp ROL #8, zp ASL #8, zp
8 DEY #1 DEX #1 DEC A #1 ROR A #1 LSR A #1 RDR A #1 DEC #1, (E) ROR #1, (E) RDR #1 (E) LSR #1, (E) SRX #1 SRY #1 ASR #1, (E) DEC #1, zp ROR #1, zp LSR #1, zp
9 DEY #2 DEX #2 DEC A #2 ROR A #2 LSR A #2 RDR A #2 DEC #2, (E) ROR #2, (E) RDR #2 (E) LSR #2, (E) SRX #2 SRY #2 ASR #2, (E) DEC #1, zp ROR #2, zp LSR #2, zp
A DEY #3 DEX #3 DEC A #3 ROR A #3 LSR A #3 RDR A #3 DEC #3, (E) ROR #3, (E) RDR #3 (E) LSR #3, (E) SRX #3 SRY #3 ASR #3, (E) DEC #1, zp ROR #3, zp LSR #3, zp
B DEY #4 DEX #4 DEC A #4 ROR A #4 LSR A #4 RDR A #4 DEC #4, (E) ROR #4, (E) RDR #4 (E) LSR #4, (E) SRX #4 SRY #4 ASR #4, (E) DEC #1, zp ROR #4, zp LSR #4, zp
C DEY #5 DEX #5 DEC A #5 ROR A #5 LSR A #5 RDR A #5 DEC #5, (E) ROR #5, (E) RDR #5 (E) LSR #5, (E) SRX #5 SRY #5 ASR #5, (E) DEC #1, zp ROR #5, zp LSR #5, zp
D DEY #6 DEX #6 DEC A #6 ROR A #6 LSR A #6 RDR A #6 DEC #6, (E) ROR #6, (E) RDR #6 (E) LSR #6, (E) SRX #6 SRY #6 ASR #6, (E) DEC #1, zp ROR #6, zp LSR #6, zp
E DEY #7 DEX #7 DEC A #7 ROR A #7 LSR A #7 RDR A #7 DEC #7, (E) ROR #7, (E) RDR #7 (E) LSR #7, (E) SRX #7 SRY #7 ASR #7, (E) DEC #1, zp ROR #7, zp LSR #7, zp
F DEY #8 DEX #8 DEC A #8 ROR A #8 LSR A #8 RDR A #8 DEC #8, (E) ROR #8, (E) RDR #8 (E) LSR #8, (E) SRX #8 SRY #8 ASR #8, (E) DEC #1, zp ROR #8, zp LSR #8, zp

Here is the description of the new opcodes:

  • ASR - Arithmetic Shift Right - shift right and shift in the sign of the original value from the highest bit
  • RDR - Rotate Direct Right - shift right, but without using the carry flag (only setting it)
  • RDL - Rotate Direct Left - shift left, but without using the carry flag (only setting it)
  • SLX - shift left X by 1 to 8 bit, similar to ASL
  • SRX - right left X by 1 to 8 bit, similar to ASL
  • SLY - shift left Y by 1 to 8 bit, similar to LSR
  • SRY - right left Y by 1 to 8 bit, similar to LSR

Note that the zp, and (E) addressing modes can be modified by the UM prefix bit, Y,X and AC related opcodes can be modified by the RS prefix. LE is not applicable as these opcodes are read-modify-write operations. All opcodes can be modified by the NF prefix.

These have been deprecated as they are redundant to ADE/SBE/ADB/SBB:

  • INE - increment E register by values 1 to 8
  • DEE - decrement E register by values 1 to 8
  • INB - increment B register by values 1 to 8
  • DEB - increment B register by values 1 to 8

This section gives an overview over the system opcodes that handle system configuration registers etc. These opcodes are all privileged.

NOTE: some of these already belong to the 65002!

LSB->
MSB\
01 2 3 4 5 6 7 8 9 A B C D E F
0 LCR imm SENV zp
1 SENV zp, (E)
2 SCR imm
3
4 BCR imm SMMU JPU abs
OF,AM
5 CLEIM
6 RTU JPU (abs)
OF,AM
7 FILU
8
9 MVNTU
A
B MVPFU
C
D WAI MVNTU
E
F STP MVPTU

Here is a short explanation of the new opcodes

  • LCR - Load value from configuration register into AC. The immediate value gives the register number.
  • SCR - Store value from AC to configuration register. The immediate value gives the register number.
  • BCR - BIT value from AC with configuration register. The immediate value gives the register number.
  • JPU - Jump to user space. Read parameter, then go from hypervisor to user mode, then read the effective address from the user mode address space (for abs indirect mode) and execute the jump
  • RTU - return to user space from a Trap opcode: go to user mode, pull return address from user mode stack and execute RTS
  • SENV - the byte operand determines the environment number, first variant: AC, XR and YR determine the address mask, address value and address offset registers. Second variant: the byte operand determines the environment number, E gives the memory address of the address mask, value and offset
  • CLEIM - Clear EIM: load EIM bits from IMR bits; start interrupt if ISR bits have higher interrupt than EIM
  • SMMU - Set the MMU base configuration address (to be defined)
  • MVNTU - MVN but target is in user space
  • MVNFU - MVN but source is in user space
  • MVPTU - MVP but target is in user space
  • MVPFU - MVP but source is in user space
  • FILU - Fill user space area (i.e. use user mode match code)
  • STP - Stop current core until reset (core 0) resp. enabling via core control register.
  • WAI - Wait for interrupt - stops execution of current core until next interrupt

Note: these have been deprecated:

  • TAI - transfer accumulator to interrupt base register (deprecated, replaced by LCR/SCR)
  • TIA - transfer interrupt base register to accumulator (deprecated, replaced by LCR/SCR)
  • TAT - transfer accumulator to trap vector base register (deprecated, replaced by LCR/SCR)
  • TTA - transfer trap vector base register to accumulator (deprecated, replaced by LCR/SCR)
  • TAU - transfer accumulator to user space stack pointer -- deprecated, replaced by TXS.U and TXS.U
  • TUA - transfer user space stack pointer to accumulator -- deprecated, replaced by TXS.U and TXS.U
  • SHM - Set Hypervisor Match register: Store accumulator into hypervisor mode match register (deprecated, replaced by LCR/SCR)
  • SUM - Set User mode Match register: Store accumulator into user mode match register (deprecated, replaced by LCR/SCR)
  • LHM - Load Hypervisor Match register: Load accumulator from hypervisor mode match register (deprecated, replaced by LCR/SCR)
  • LUM - Load User mode Match register: Load accumulator from user mode match register (deprecated, replaced by LCR/SCR)
  • LDA SR - Load AC from status register (can do 8 or 16 bit) (deprecated, replaced by LCR/SCR)
  • LDA ISR - Load AC from interrupt status register (can do 8 bit) (deprecated, replaced by LCR/SCR)
  • BIT ISR - Test interrupt status register (can do 8 bit) (deprecated, replaced by BCR)
  • AND/ORA/EOR/BIT SR - operations on the status register (can do 8, 16, or 24 (zero-extended 32) bit) (no replacement)

Note: this section still needs to be worked out.

Note: this section still needs to be worked out. It is not clear if the blitter opcodes could be a not implemented column in the SYS opcodes table. Blitter opcodes would be privileged.

This section describes the memory management features of the 65k. Those features are optional. They are decoupled from the main core by the means of "match codes".

Paged Memory Management Unit (MMU)

TBD

The 65k will support multiprocessing. With the LLA and SCA it supports load-linked and store-conditional multiprocessor-safe synchronization primitives. Note that the usual read-modify write operations (ROR, ROL, LSR, ASL, ASR, RDR, RDL, INC, DEC, TSB, TRB, SLY, SRY, SLX, SRX) are in general not multiprocessor-safe. They may be multicore-safe (two cores on one processor).


Return to Homepage

Last modified: 2012-04-30
follow

Follow my 8-bit tweets on Mastodon (In new window) or Bluesky

discuss

Discuss my site on this 6502.org forum thread

Discuss this page's content on this 6502.org forum thread

(Forum registration required to post)

hot!

Dive into the retro feeling and build yourself a Micro-PET or a Multi-board Commodore 4032 replica

Need more speed? Speed up your 6502 computer with this 10 MHz 6502 CPU accelerator board

Interested in electronics design? Look at the design lesson I got from Bil Herd, the hardware designer of the C128

Want 64bit? - pimp the 6502 with the 65k processor design!