fn index(&self, address: u16) -> usize {
        if address >= 0xC000 {
            let shift = (address - 0xC000) as usize;
            self.bank_1 * PRG_BANK_SIZE + shift
        } else if address >= 0x8000 {
            let shift = (address - 0x8000) as usize;
            self.bank_0 * PRG_BANK_SIZE + shift
        } else {
            unreachable!("Address out of PRG bounds: {:X}", address);
        }
    }
// Returns an index into cart.prg
Returns an index into cart.prg
Returns an index into cart . prg
fn index(&self, address: u16) -> usize {
        if address >= 0xC000 {
            let shift = (address - 0xC000) as usize;
            self.bank_1 * PRG_BANK_SIZE + shift
        } else if address >= 0x8000 {
            let shift = (address - 0x8000) as usize;
            self.bank_0 * PRG_BANK_SIZE + shift
        } else {
            unreachable!("Address out of PRG bounds: {:X}", address);
        }
    }
fn index ( & self , address : u16 ) -> usize { if address >= 0xC000 { let shift = ( address - 0xC000 ) as usize ; self . bank_1 * PRG_BANK_SIZE + shift } else if address >= 0x8000 { let shift = ( address - 0x8000 ) as usize ; self . bank_0 * PRG_BANK_SIZE + shift } else { unreachable ! ( " " address ) ; } }
Returns an index into cart.prg
Returns an index into cart . prg
&self
address
u16
&self
address
u16