internal VideoFrameData(GameBoyMemoryBus bus) { VideoMemorySnapshot = new VideoMemorySnapshot(bus); VideoPortAccessList = new List <PortAccess>(1000); PaletteAccessList = new List <PaletteAccess>(1000); SgbCharacterData = new byte[0x2000]; SgbBorderMapData = new ushort[0x800]; }
public Mapper(GameBoyMemoryBus bus) { if (bus == null) throw new ArgumentNullException(); this.bus = bus; this.ramWriteInternalHandler = HandleRamWriteInternal; this.ramWriteHandler = HandleRamWrite; }
public unsafe VideoMemorySnapshot(GameBoyMemoryBus bus) { _bus = bus; _videoMemoryBlock = new MemoryBlock(16384); VideoMemory = (byte *)this._videoMemoryBlock.Pointer; _objectAttributeMemoryBlock = new MemoryBlock(0xA0); // Do not allocate more bytes than needed… GameBoyMemoryBus allocates 0x100 because of the segmented memory. ObjectAttributeMemory = (byte *)_objectAttributeMemoryBlock.Pointer; _paletteMemoryBlock = new MemoryBlock(16 * 4 * sizeof(ushort)); PaletteMemory = (byte *)this._paletteMemoryBlock.Pointer; }
public unsafe VideoStatusSnapshot(GameBoyMemoryBus bus) { this.bus = bus; this.videoMemoryBlock = new MemoryBlock(bus.VideoRam.Length); this.VideoMemory = (byte*)this.videoMemoryBlock.Pointer; this.objectAttributeMemoryBlock = new MemoryBlock(0xA0); // Do not allocate more bytes than needed… GameBoyMemoryBus allocates 0x100 because of the segmented memory. this.ObjectAttributeMemory = (byte*)this.objectAttributeMemoryBlock.Pointer; this.paletteMemoryBlock = new MemoryBlock(bus.PaletteMemory.Length); this.PaletteMemory = (byte*)this.paletteMemoryBlock.Pointer; }
public Mapper(GameBoyMemoryBus bus) { if (bus == null) { throw new ArgumentNullException(); } this._bus = bus; this._ramWriteInternalHandler = HandleRamWriteInternal; this._ramWriteHandler = HandleRamWrite; }
public EmulatedGameBoy(IContainer container) { bus = new GameBoyMemoryBus(); frameStopwatch = new Stopwatch(); frameRateStopwatch = new Stopwatch(); #if WITH_THREADING bus.EmulationStarted += OnEmulationStarted; bus.EmulationStopped += OnEmulationStopped; bus.ClockManager = this; #else Application.Idle += OnApplicationIdle; #endif bus.ReadKeys += new EventHandler<ReadKeysEventArgs>(OnReadKeys); emulationStatus = bus.UseBootRom ? EmulationStatus.Paused : EmulationStatus.Stopped; if (container != null) container.Add(this); }
private GameBoyMemoryBus @this; // “This” will better emphazize the fact that this structure does not hold any valuable data. internal JoypadState(GameBoyMemoryBus bus) { this.@this = bus; }
public unsafe AudioStatusSnapshot(GameBoyMemoryBus bus) { this.bus = bus; this.wavePatternMemoryBlock = new MemoryBlock(16); this.WavePatternMemory = (byte*)this.wavePatternMemoryBlock.Pointer; }
public unsafe AudioStatusSnapshot(GameBoyMemoryBus bus) { this.bus = bus; this.wavePatternMemoryBlock = new MemoryBlock(16); this.WavePatternMemory = (byte *)this.wavePatternMemoryBlock.Pointer; }
internal Processor(GameBoyMemoryBus bus) { this.bus = bus; }
public void Dispose() { if (bus != null) { bus.Dispose(); bus = null; if (Disposed != null) Disposed(this, EventArgs.Empty); } }