pub struct Nes6502 {Show 40 fields
pub vcc: Pin,
pub gnd: Pin,
pub rst: Pin,
pub out0: Pin,
pub out1: Pin,
pub out2: Pin,
pub oe1: Pin,
pub oe2: Pin,
pub rw: Pin,
pub nmi: Pin,
pub irq: Pin,
pub m2: Pin,
pub tst: Pin,
pub clk: Pin,
pub ad1: Pin,
pub ad2: Pin,
pub a0: Pin,
pub a1: Pin,
pub a2: Pin,
pub a3: Pin,
pub a4: Pin,
pub a5: Pin,
pub a6: Pin,
pub a7: Pin,
pub a8: Pin,
pub a9: Pin,
pub a10: Pin,
pub a11: Pin,
pub a12: Pin,
pub a13: Pin,
pub a14: Pin,
pub a15: Pin,
pub d0: Pin,
pub d1: Pin,
pub d2: Pin,
pub d3: Pin,
pub d4: Pin,
pub d5: Pin,
pub d6: Pin,
pub d7: Pin,
/* private fields */
}Expand description
https://www.nesdev.org/wiki/CPU_pinout
Without the APU part yet
Neither the interrupt handling and decimal mode
WARNING: Not cycle accurate yet!
.--\/--.
AD1 <- |01 40| -- +5V
AD2 <- |02 39| -> OUT0
/RST -> |03 38| -> OUT1
A00 <- |04 37| -> OUT2
A01 <- |05 36| -> /OE1
A02 <- |06 35| -> /OE2
A03 <- |07 34| -> R/W
A04 <- |08 33| <- /NMI
A05 <- |09 32| <- /IRQ
A06 <- |10 31| -> M2
A07 <- |11 30| <- TST (usually GND)
A08 <- |12 29| <- CLK
A09 <- |13 28| <> D0
A10 <- |14 27| <> D1
A11 <- |15 26| <> D2
A12 <- |16 25| <> D3
A13 <- |17 24| <> D4
A14 <- |18 23| <> D5
A15 <- |19 22| <> D6
GND -- |20 21| <> D7
`------'Fields§
§vcc: Pin§gnd: Pin§rst: Pin§out0: Pin§out1: Pin§out2: Pin§oe1: Pin§oe2: Pin§rw: Pin§nmi: Pin§irq: Pin§m2: Pin§tst: Pin§clk: Pin§ad1: Pin§ad2: Pin§a0: Pin§a1: Pin§a2: Pin§a3: Pin§a4: Pin§a5: Pin§a6: Pin§a7: Pin§a8: Pin§a9: Pin§a10: Pin§a11: Pin§a12: Pin§a13: Pin§a14: Pin§a15: Pin§d0: Pin§d1: Pin§d2: Pin§d3: Pin§d4: Pin§d5: Pin§d6: Pin§d7: PinImplementations§
Source§impl Nes6502
impl Nes6502
pub const VCC: usize = 40usize
pub const GND: usize = 20usize
pub const RST: usize = 3usize
pub const OUT0: usize = 39usize
pub const OUT1: usize = 38usize
pub const OUT2: usize = 37usize
pub const OE1: usize = 36usize
pub const OE2: usize = 35usize
Sourcepub const RW: usize = 34usize
pub const RW: usize = 34usize
Read/write signal, which is used to indicate operations of the same names. Low is write. R/W stays high/low during the entire read/write cycle.
Sourcepub const NMI: usize = 33usize
pub const NMI: usize = 33usize
Non-maskable interrupt pin. See the 6502 manual and CPU interrupts for more details.
Sourcepub const IRQ: usize = 32usize
pub const IRQ: usize = 32usize
Interrupt pin. See the 6502 manual and CPU interrupts for more details
pub const M2: usize = 31usize
pub const TST: usize = 30usize
pub const CLK: usize = 29usize
pub const AD1: usize = 1usize
pub const AD2: usize = 2usize
pub const A0: usize = 4usize
pub const A1: usize = 5usize
pub const A2: usize = 6usize
pub const A3: usize = 7usize
pub const A4: usize = 8usize
pub const A5: usize = 9usize
pub const A6: usize = 10usize
pub const A7: usize = 11usize
pub const A8: usize = 12usize
pub const A9: usize = 13usize
pub const A10: usize = 14usize
pub const A11: usize = 15usize
pub const A12: usize = 16usize
pub const A13: usize = 17usize
pub const A14: usize = 18usize
pub const A15: usize = 19usize
pub const D0: usize = 28usize
pub const D1: usize = 27usize
pub const D2: usize = 26usize
pub const D3: usize = 25usize
pub const D4: usize = 24usize
pub const D5: usize = 23usize
pub const D6: usize = 22usize
pub const D7: usize = 21usize
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Nes6502
impl<'de> Deserialize<'de> for Nes6502
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Nes6502
impl RefUnwindSafe for Nes6502
impl Send for Nes6502
impl Sync for Nes6502
impl Unpin for Nes6502
impl UnwindSafe for Nes6502
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more