mirror of
https://github.com/mre/mos6502.git
synced 2024-09-27 19:56:34 +00:00
some doc comments
This commit is contained in:
parent
09b78bed30
commit
26ea6e0c76
@ -156,6 +156,7 @@ impl AddressingMode {
|
||||
|
||||
pub type DecodedInstr = (Instruction, OpInput);
|
||||
|
||||
/// The NMOS 6502 variant. This one is present in the Commodore 64, early Apple IIs, etc.
|
||||
pub struct Nmos6502;
|
||||
|
||||
impl crate::Variant for Nmos6502 {
|
||||
@ -421,6 +422,8 @@ impl crate::Variant for Nmos6502 {
|
||||
}
|
||||
}
|
||||
|
||||
/// The Ricoh variant which has no decimal mode. This is what to use if you want to emulate the
|
||||
/// NES.
|
||||
pub struct Ricoh2a03;
|
||||
|
||||
impl crate::Variant for Ricoh2a03 {
|
||||
@ -446,6 +449,9 @@ impl crate::Variant for Ricoh2a03 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Emulates some very early 6502s which have no ROR instruction. This one is used in very early
|
||||
/// KIM-1s.
|
||||
pub struct RevisionA;
|
||||
|
||||
impl crate::Variant for RevisionA {
|
||||
|
@ -41,6 +41,8 @@ pub mod instruction;
|
||||
pub mod memory;
|
||||
pub mod registers;
|
||||
|
||||
/// Trait for 6502 variant. This is the mechanism allowing the different 6502-like CPUs to be
|
||||
/// emulated. It allows a struct to decode an opcode into its instruction and addressing mode.
|
||||
pub trait Variant {
|
||||
fn decode(
|
||||
opcode: u8,
|
||||
|
Loading…
Reference in New Issue
Block a user