Linux: Fixed compilation errors/warnings and issues w/ hd packs, ppu viewer and debugger

This commit is contained in:
Sour 2017-12-28 12:47:26 -05:00
parent 026bb5522b
commit af0454b3ef
6 changed files with 17 additions and 13 deletions

View file

@ -12,7 +12,7 @@ protected:
uint16_t GetCHRPageSize() override { return 0x2000; }
bool AllowRegisterRead() override { return true; }
bool HasBusConflicts() override { return true; }
ConsoleFeatures GetAvailableFeatures() { return ConsoleFeatures::BandaiMicrophone; }
ConsoleFeatures GetAvailableFeatures() override { return ConsoleFeatures::BandaiMicrophone; }
void InitMapper() override
{

View file

@ -86,7 +86,7 @@ ControllerType EmulationSettings::_controllerTypes[4] = { ControllerType::None,
KeyMappingSet EmulationSettings::_controllerKeys[4] = { KeyMappingSet(), KeyMappingSet(), KeyMappingSet(), KeyMappingSet() };
bool EmulationSettings::_needControllerUpdate = false;
uint32_t EmulationSettings::_zapperDetectionRadius = 0;
std::unordered_map<MouseDevice, double> EmulationSettings::_mouseSensitivity;
std::unordered_map<int, double> EmulationSettings::_mouseSensitivity;
int32_t EmulationSettings::_inputPollScanline = 240;
uint32_t EmulationSettings::_defaultPpuPalette[64] = { /* 2C02 */ 0xFF666666, 0xFF002A88, 0xFF1412A7, 0xFF3B00A4, 0xFF5C007E, 0xFF6E0040, 0xFF6C0600, 0xFF561D00, 0xFF333500, 0xFF0B4800, 0xFF005200, 0xFF004F08, 0xFF00404D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFADADAD, 0xFF155FD9, 0xFF4240FF, 0xFF7527FE, 0xFFA01ACC, 0xFFB71E7B, 0xFFB53120, 0xFF994E00, 0xFF6B6D00, 0xFF388700, 0xFF0C9300, 0xFF008F32, 0xFF007C8D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFF64B0FF, 0xFF9290FF, 0xFFC676FF, 0xFFF36AFF, 0xFFFE6ECC, 0xFFFE8170, 0xFFEA9E22, 0xFFBCBE00, 0xFF88D800, 0xFF5CE430, 0xFF45E082, 0xFF48CDDE, 0xFF4F4F4F, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFFC0DFFF, 0xFFD3D2FF, 0xFFE8C8FF, 0xFFFBC2FF, 0xFFFEC4EA, 0xFFFECCC5, 0xFFF7D8A5, 0xFFE4E594, 0xFFCFEF96, 0xFFBDF4AB, 0xFFB3F3CC, 0xFFB5EBF2, 0xFFB8B8B8, 0xFF000000, 0xFF000000 };

View file

@ -613,7 +613,7 @@ private:
static KeyMappingSet _controllerKeys[4];
static bool _needControllerUpdate;
static uint32_t _zapperDetectionRadius;
static std::unordered_map<MouseDevice, double> _mouseSensitivity;
static std::unordered_map<int, double> _mouseSensitivity;
static int32_t _inputPollScanline;
static int32_t _nsfAutoDetectSilenceDelay;
@ -1296,12 +1296,12 @@ public:
static void SetMouseSensitivity(MouseDevice device, double sensitivity)
{
_mouseSensitivity[device] = sensitivity;
_mouseSensitivity[(int)device] = sensitivity;
}
static double GetMouseSensitivity(MouseDevice device)
{
auto result = _mouseSensitivity.find(device);
auto result = _mouseSensitivity.find((int)device);
if(result != _mouseSensitivity.end()) {
return result->second;
} else {

View file

@ -120,6 +120,7 @@ bool HdPackLoader::LoadFile(string filename, vector<uint8_t> &fileData)
bool HdPackLoader::LoadPack()
{
string currentLine;
try {
vector<uint8_t> hdDefinition;
if(!LoadFile("hires.txt", hdDefinition)) {
@ -129,7 +130,10 @@ bool HdPackLoader::LoadPack()
InitializeGlobalConditions();
for(string lineContent : StringUtilities::Split(string(hdDefinition.data(), hdDefinition.data() + hdDefinition.size()), '\n')) {
lineContent = lineContent.substr(0, lineContent.length() - 1);
if(lineContent[lineContent.size() - 1] == '\r') {
lineContent = lineContent.substr(0, lineContent.size() - 1);
}
currentLine = lineContent;
vector<HdPackCondition*> conditions;
if(lineContent.substr(0, 1) == "[") {
@ -181,7 +185,7 @@ bool HdPackLoader::LoadPack()
return true;
} catch(std::exception ex) {
MessageManager::Log(string("[HDPack] Error loading HDPack: ") + ex.what());
MessageManager::Log(string("[HDPack] Error loading HDPack: ") + ex.what() + " on line: " + currentLine);
return false;
}
}

View file

@ -167,7 +167,7 @@
//
this.picPreview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.picPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tableLayoutPanel4.SetColumnSpan(this.picPreview, 3);
this.tableLayoutPanel4.SetColumnSpan(this.picPreview, 4);
this.picPreview.ContextMenuStrip = this.ctxMenu;
this.picPreview.Location = new System.Drawing.Point(94, 257);
this.picPreview.Name = "picPreview";
@ -269,7 +269,7 @@
this.txtPosition.Location = new System.Drawing.Point(94, 55);
this.txtPosition.Name = "txtPosition";
this.txtPosition.ReadOnly = true;
this.txtPosition.Size = new System.Drawing.Size(53, 20);
this.txtPosition.Size = new System.Drawing.Size(66, 20);
this.txtPosition.TabIndex = 18;
//
// lblTileIndex

View file

@ -1205,7 +1205,7 @@ namespace Mesen.GUI
[MarshalAs(UnmanagedType.I1)]
public bool Enabled;
public Byte OutputVolume;
public UInt32 Frequency;
public double Frequency;
public ApuLengthCounterState LengthCounter;
public ApuEnvelopeState Envelope;
@ -1218,7 +1218,7 @@ namespace Mesen.GUI
[MarshalAs(UnmanagedType.I1)]
public bool Enabled;
public UInt32 Frequency;
public double Frequency;
public Byte OutputVolume;
public ApuLengthCounterState LengthCounter;
@ -1233,7 +1233,7 @@ namespace Mesen.GUI
[MarshalAs(UnmanagedType.I1)]
public bool Enabled;
public UInt32 Frequency;
public double Frequency;
public Byte OutputVolume;
public ApuLengthCounterState LengthCounter;
@ -1252,7 +1252,7 @@ namespace Mesen.GUI
public UInt16 Period;
public UInt16 BytesRemaining;
public UInt32 Frequency;
public double SampleRate;
public Byte OutputVolume;
}