mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
Linux: Fixed compilation errors/warnings
This commit is contained in:
parent
13acb3fe42
commit
bb96928fe9
15 changed files with 28 additions and 33 deletions
|
@ -17,7 +17,7 @@ class GbaWaveChannel;
|
|||
class EmuSettings;
|
||||
class SoundMixer;
|
||||
|
||||
class GbaApu : public ISerializable
|
||||
class GbaApu final : public ISerializable
|
||||
{
|
||||
static constexpr int MaxSampleRate = 256*1024;
|
||||
static constexpr int MaxSamples = MaxSampleRate * 8 / 60;
|
||||
|
|
|
@ -7,7 +7,7 @@ class Emulator;
|
|||
class GbaMemoryManager;
|
||||
class GbaFlash;
|
||||
|
||||
class GbaCart : public ISerializable
|
||||
class GbaCart final : public ISerializable
|
||||
{
|
||||
private:
|
||||
Emulator* _emu = nullptr;
|
||||
|
|
|
@ -12,7 +12,7 @@ enum class GbaEepromMode
|
|||
WriteCommand,
|
||||
};
|
||||
|
||||
class GbaEeprom : public ISerializable
|
||||
class GbaEeprom final : public ISerializable
|
||||
{
|
||||
private:
|
||||
uint8_t* _saveRam = nullptr;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "Utilities/HexUtilities.h"
|
||||
#include "Utilities/Serializer.h"
|
||||
|
||||
class GbaFlash : public ISerializable
|
||||
class GbaFlash final : public ISerializable
|
||||
{
|
||||
private:
|
||||
enum class ChipMode
|
||||
|
|
|
@ -108,7 +108,7 @@ void GbaDebugger::ProcessInstruction()
|
|||
ProcessCallStackUpdates(addressInfo, pc);
|
||||
|
||||
if(_settings->CheckDebuggerFlag(DebuggerFlags::GbaDebuggerEnabled)) {
|
||||
if((accessWidth == 2 && opCode == 0x46DB || (accessWidth == 4 && opCode == 0xE1A0B00B)) && _settings->GetDebugConfig().GbaBreakOnNopLoad) {
|
||||
if(((accessWidth == 2 && opCode == 0x46DB) || (accessWidth == 4 && opCode == 0xE1A0B00B)) && _settings->GetDebugConfig().GbaBreakOnNopLoad) {
|
||||
//Break on MOV R11, R11
|
||||
_step->Break(BreakSource::GbaNopLoad);
|
||||
}
|
||||
|
|
|
@ -328,10 +328,6 @@ DebugTilemapTileInfo GbaPpuTools::GetTilemapTileInfo(uint32_t x, uint32_t y, uin
|
|||
case 4:
|
||||
case 5: {
|
||||
uint16_t screenWidth = state.BgMode == 5 ? 160 : 240;
|
||||
uint16_t screenHeight = state.BgMode == 5 ? 128 : 160;
|
||||
if(state.BgMode >= 4) {
|
||||
screenHeight *= 2;
|
||||
}
|
||||
|
||||
column = x;
|
||||
row = y;
|
||||
|
|
|
@ -111,21 +111,6 @@ void GbaCpu::ReloadPipeline()
|
|||
pipe.Fetch.OpCode = ReadCode(pipe.Mode, pipe.Fetch.Address);
|
||||
}
|
||||
|
||||
void GbaCpu::ProcessPipeline()
|
||||
{
|
||||
GbaCpuPipeline& pipe = _state.Pipeline;
|
||||
|
||||
if(pipe.ReloadRequested) {
|
||||
ReloadPipeline();
|
||||
}
|
||||
|
||||
pipe.Execute = pipe.Decode;
|
||||
pipe.Decode = pipe.Fetch;
|
||||
|
||||
pipe.Fetch.Address = _state.R[15] = _state.CPSR.Thumb ? (_state.R[15] + 2) : (_state.R[15] + 4);
|
||||
pipe.Fetch.OpCode = ReadCode(pipe.Mode, pipe.Fetch.Address);
|
||||
}
|
||||
|
||||
void GbaCpu::CheckForIrqs()
|
||||
{
|
||||
uint32_t originalPc = _state.Pipeline.Execute.Address;
|
||||
|
|
|
@ -93,7 +93,21 @@ private:
|
|||
void SwitchMode(GbaCpuMode mode);
|
||||
|
||||
void ReloadPipeline();
|
||||
__forceinline void ProcessPipeline();
|
||||
|
||||
__forceinline void ProcessPipeline()
|
||||
{
|
||||
GbaCpuPipeline& pipe = _state.Pipeline;
|
||||
|
||||
if(pipe.ReloadRequested) {
|
||||
ReloadPipeline();
|
||||
}
|
||||
|
||||
pipe.Execute = pipe.Decode;
|
||||
pipe.Decode = pipe.Fetch;
|
||||
|
||||
pipe.Fetch.Address = _state.R[15] = _state.CPSR.Thumb ? (_state.R[15] + 2) : (_state.R[15] + 4);
|
||||
pipe.Fetch.OpCode = ReadCode(pipe.Mode, pipe.Fetch.Address);
|
||||
}
|
||||
|
||||
uint32_t ReadCode(GbaAccessModeVal mode, uint32_t addr);
|
||||
uint32_t Read(GbaAccessModeVal mode, uint32_t addr);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
class GbaMemoryManager;
|
||||
class GbaCpu;
|
||||
|
||||
class GbaDmaController : public ISerializable
|
||||
class GbaDmaController final : public ISerializable
|
||||
{
|
||||
private:
|
||||
GbaCpu* _cpu = nullptr;
|
||||
|
|
|
@ -405,8 +405,8 @@ void GbaMemoryManager::InternalWrite(GbaAccessModeVal mode, uint32_t addr, uint8
|
|||
_palette[addr & (GbaConsole::PaletteRamSize - 1)] = value;
|
||||
} else {
|
||||
//Mirror the value over a half-word
|
||||
_palette[addr & (GbaConsole::PaletteRamSize - 1) & ~0x01] = value;
|
||||
_palette[addr & (GbaConsole::PaletteRamSize - 1) | 0x01] = value;
|
||||
_palette[(addr & (GbaConsole::PaletteRamSize - 1)) & ~0x01] = value;
|
||||
_palette[(addr & (GbaConsole::PaletteRamSize - 1)) | 0x01] = value;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class GbaCart;
|
|||
class GbaSerial;
|
||||
class GbaRomPrefetch;
|
||||
|
||||
class GbaMemoryManager : public ISerializable
|
||||
class GbaMemoryManager final : public ISerializable
|
||||
{
|
||||
private:
|
||||
Emulator* _emu = nullptr;
|
||||
|
|
|
@ -76,7 +76,7 @@ struct GbaPixelData
|
|||
uint8_t Layer = 5;
|
||||
};
|
||||
|
||||
class GbaPpu : public ISerializable
|
||||
class GbaPpu final : public ISerializable
|
||||
{
|
||||
private:
|
||||
static constexpr int SpriteLayerIndex = 4;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "Utilities/ISerializable.h"
|
||||
#include "Utilities/Serializer.h"
|
||||
|
||||
class GbaRomPrefetch : ISerializable
|
||||
class GbaRomPrefetch final : ISerializable
|
||||
{
|
||||
private:
|
||||
GbaRomPrefetchState _state = {};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "Utilities/BitUtilities.h"
|
||||
#include "Utilities/Serializer.h"
|
||||
|
||||
class GbaSerial : public ISerializable
|
||||
class GbaSerial final : public ISerializable
|
||||
{
|
||||
private:
|
||||
GbaSerialState _state = {};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
class GbaMemoryManager;
|
||||
class GbaApu;
|
||||
|
||||
class GbaTimer : public ISerializable
|
||||
class GbaTimer final : public ISerializable
|
||||
{
|
||||
private:
|
||||
GbaTimersState _state = {};
|
||||
|
|
Loading…
Add table
Reference in a new issue