Ejemplo n.º 1
0
 public NesState(MusicNsf aMusicNsf)
 {
     nsf         = aMusicNsf;
     memory      = new NesMemory(nsf);
     cpuRegister = new NesCpuRegister();
     apuRegister = new NesApuRegister();
 }
Ejemplo n.º 2
0
        public PlayerNsf(string aFilePath)
        {
            MusicNsf lMusic = ( MusicNsf )LoaderMusic.Load(aFilePath);

            Logger.LogNormal("Load");

            midiSynthesizer = new MidiSynthesizer();
            midiSynthesizer.SetVolume(( UInt16 )0x4000);
            midiSynthesizer.MonoModeOn(1);

            nesState = new NesState(lMusic);
            NesCpu.InitNsf(nesState);

            float lVolume = ( float )(40.0d * Math.Log10(0.5f));

            volume = ( float )Math.Pow(10.0d, lVolume / 20.0d);

            Init();
        }
Ejemplo n.º 3
0
 public NesMemory(MusicNsf nsf)
 {
     Logger.LogNormal(nsf.GetHeader().GetLoadAddress());
     Logger.LogNormal(nsf.GetDataSize());
     MemoryTool.memcpy(data, nsf.GetHeader().GetLoadAddress(), nsf.GetDataPoint(), 0x00, sizeof(Byte) * ( UInt16 )nsf.GetDataSize());
 }