public NesState(MusicNsf aMusicNsf) { nsf = aMusicNsf; memory = new NesMemory(nsf); cpuRegister = new NesCpuRegister(); apuRegister = new NesApuRegister(); }
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(); }
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()); }