Exemplo n.º 1
0
        protected override void EmitDebugData()
        {
            if (OnRegisterUpdate == null)
            {
                return;
            }

            _state.SnesState      = SnesDebugApi.GetState();
            _state.Memory.PpuData = SnesDebugApi.GetMemoryState(SnesMemoryType.VideoRam);
            _state.Memory.OamData = SnesDebugApi.GetMemoryState(SnesMemoryType.SpriteRam);
            _state.Memory.CgRam   = SnesDebugApi.GetMemoryState(SnesMemoryType.CGRam);
            _state.Memory.CpuData = SnesDebugApi.GetMemoryState(SnesMemoryType.CpuMemory);
            _state.Memory.X       = _state.SnesState.Cpu.X & (_state.SnesState.Cpu.PS.HasFlag(ProcFlags.IndexMode8) ? 0xFF : 0xFFFF);
            _state.Memory.Y       = _state.SnesState.Cpu.Y & (_state.SnesState.Cpu.PS.HasFlag(ProcFlags.IndexMode8) ? 0xFF : 0xFFFF);
            SnesDebugApi.GetSpritePreview(_spriteOptions, _state.SnesState.Ppu, _state.Memory.PpuData, _state.Memory.OamData, _state.Memory.CgRam, _state.Sprites.PixelData);
            _state.Sprites.Details = Sprite.GetSnesSprites(_state.Memory.OamData, _state.SnesState.Ppu.OamMode);

            GetCharacterData();
            GetTileMapData();

            OnRegisterUpdate(_state);
        }