2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2019-09-17 13:35:17 +00:00
|
|
|
#pragma once
|
|
|
|
#include "gte_types.h"
|
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
class StateWrapper;
|
2019-12-11 12:33:54 +00:00
|
|
|
|
2019-09-17 13:35:17 +00:00
|
|
|
namespace GTE {
|
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
void Initialize();
|
|
|
|
void Reset();
|
|
|
|
bool DoState(StateWrapper& sw);
|
2021-04-28 16:42:08 +00:00
|
|
|
void UpdateAspectRatio();
|
2019-10-04 05:58:28 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
// control registers are offset by +32
|
|
|
|
u32 ReadRegister(u32 index);
|
|
|
|
void WriteRegister(u32 index, u32 value);
|
2019-09-22 07:33:11 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
// use with care, direct register access
|
|
|
|
u32* GetRegisterPtr(u32 index);
|
2019-09-22 07:33:11 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
void ExecuteInstruction(u32 inst_bits);
|
2019-09-17 13:35:17 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
using InstructionImpl = void (*)(Instruction);
|
2021-07-15 11:57:52 +00:00
|
|
|
InstructionImpl GetInstructionImpl(u32 inst_bits, TickCount* ticks);
|
2019-09-22 11:41:11 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
} // namespace GTE
|