import { Mapper020 } from './mapper020' ; import { Nes } from '../nes' ; import { PrgBankController } from '../mapper/mapper' ; import { Address , Byte } from '../types' ; export class Fds implements PrgBankController { private mapper : Mapper020 ; constructor ( biosData , private nes ) { const bus = this . nes . getBus ( ) ; const cpu = this . nes . getCpu ( ) ; const ppu = this . nes . getPpu ( ) ; this . mapper = new Mapper020 ( biosData , { bus , cpu , ppu , prgBankCtrl : this , prgSize : biosData . length , writeToApu : ( _adr , _value ) => { } , readFromApu : ( _adr ) => 0 , } ) ; this . mapper . setUp ( nes ) ; this . nes . setMapper ( this . mapper ) ; } public setImage ( image ) { this . mapper . setImage ( image ) ; return true ; } public getSideCount ( ) { return this . mapper . getSideCount ( ) ; } public eject ( ) { this . mapper . eject ( ) ; } public setSide ( side ) { this . mapper . setSide ( side ) ; } public setPrgBank ( _bank , _page ) { } }