pub(crate) fn mirror_address(self, address: u16) -> u16 {
        let address = (address - 0x2000) % 0x1000;
        let table = match (self, address / 0x400) {
            (Mirroring::Horizontal, 0) => 0,
            (Mirroring::Horizontal, 1) => 0,
            (Mirroring::Horizontal, 2) => 1,
            (Mirroring::Horizontal, 3) => 1,
            (Mirroring::Vertical, 0) => 0,
            (Mirroring::Vertical, 1) => 1,
            (Mirroring::Vertical, 2) => 0,
            (Mirroring::Vertical, 3) => 1,
            (Mirroring::SingleLower, _) => 0,
            (Mirroring::SingleUpper, _) => 1,
            _ => 0,
        };
        0x2000 + table * 0x400 + (address % 0x400)
    }
/// Mirrors an address >= 0x2000
Mirrors an address >= 0x2000
Mirrors an address > = 0x2000
pub(crate) fn mirror_address(self, address: u16) -> u16 {
        let address = (address - 0x2000) % 0x1000;
        let table = match (self, address / 0x400) {
            (Mirroring::Horizontal, 0) => 0,
            (Mirroring::Horizontal, 1) => 0,
            (Mirroring::Horizontal, 2) => 1,
            (Mirroring::Horizontal, 3) => 1,
            (Mirroring::Vertical, 0) => 0,
            (Mirroring::Vertical, 1) => 1,
            (Mirroring::Vertical, 2) => 0,
            (Mirroring::Vertical, 3) => 1,
            (Mirroring::SingleLower, _) => 0,
            (Mirroring::SingleUpper, _) => 1,
            _ => 0,
        };
        0x2000 + table * 0x400 + (address % 0x400)
    }
pub ( crate ) fn mirror_address ( self , address : u16 ) -> u16 { let address = ( address - 0x2000 ) % 0x1000 ; let table = match ( self , address / 0x400 ) { ( Mirroring :: Horizontal , 0 ) => 0 , ( Mirroring :: Horizontal , 1 ) => 0 , ( Mirroring :: Horizontal , 2 ) => 1 , ( Mirroring :: Horizontal , 3 ) => 1 , ( Mirroring :: Vertical , 0 ) => 0 , ( Mirroring :: Vertical , 1 ) => 1 , ( Mirroring :: Vertical , 2 ) => 0 , ( Mirroring :: Vertical , 3 ) => 1 , ( Mirroring :: SingleLower , _ ) => 0 , ( Mirroring :: SingleUpper , _ ) => 1 , _ => 0 , } ; 0x2000 + table * 0x400 + ( address % 0x400 ) }
Mirrors an address >= 0x2000
Mirrors an address > = 0x2000
self
address
u16
self
address
u16