gte.h (662B)
1 // SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com> 2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) 3 4 #pragma once 5 #include "gte_types.h" 6 7 class StateWrapper; 8 9 namespace GTE { 10 11 void Initialize(); 12 void Reset(); 13 bool DoState(StateWrapper& sw); 14 void UpdateAspectRatio(); 15 16 // control registers are offset by +32 17 u32 ReadRegister(u32 index); 18 void WriteRegister(u32 index, u32 value); 19 20 // use with care, direct register access 21 u32* GetRegisterPtr(u32 index); 22 23 void ExecuteInstruction(u32 inst_bits); 24 25 using InstructionImpl = void (*)(Instruction); 26 InstructionImpl GetInstructionImpl(u32 inst_bits, TickCount* ticks); 27 28 } // namespace GTE