mirror of https://github.com/stella-emu/stella.git
Fixed libretro errors preventing a successful build.
Still TODO is actually test this functionality.
This commit is contained in:
parent
36da2bcabc
commit
9d287666f9
|
@ -41,7 +41,7 @@ StellaLIBRETRO::StellaLIBRETRO()
|
||||||
video_aspect_pal = 0;
|
video_aspect_pal = 0;
|
||||||
|
|
||||||
video_palette = "standard";
|
video_palette = "standard";
|
||||||
video_filter = NTSCFilter::PRESET_OFF;
|
video_filter = NTSCFilter::Preset::OFF;
|
||||||
video_ready = false;
|
video_ready = false;
|
||||||
|
|
||||||
audio_samples = 0;
|
audio_samples = 0;
|
||||||
|
@ -49,7 +49,7 @@ StellaLIBRETRO::StellaLIBRETRO()
|
||||||
|
|
||||||
video_phosphor = "byrom";
|
video_phosphor = "byrom";
|
||||||
video_phosphor_blend = 60;
|
video_phosphor_blend = 60;
|
||||||
|
|
||||||
rom_image = make_unique<uInt8[]>(getROMMax());
|
rom_image = make_unique<uInt8[]>(getROMMax());
|
||||||
|
|
||||||
system_ready = false;
|
system_ready = false;
|
||||||
|
@ -108,7 +108,7 @@ bool StellaLIBRETRO::create(bool logging)
|
||||||
//fastscbios
|
//fastscbios
|
||||||
// Fast loading of Supercharger BIOS
|
// Fast loading of Supercharger BIOS
|
||||||
|
|
||||||
settings.setValue("tv.filter", video_filter);
|
settings.setValue("tv.filter", static_cast<int>(video_filter));
|
||||||
|
|
||||||
settings.setValue("tv.phosphor", video_phosphor);
|
settings.setValue("tv.phosphor", video_phosphor);
|
||||||
settings.setValue("tv.phosblend", video_phosphor_blend);
|
settings.setValue("tv.phosblend", video_phosphor_blend);
|
||||||
|
@ -214,11 +214,11 @@ void StellaLIBRETRO::updateAudio()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool StellaLIBRETRO::loadState(const void* data, uInt32 size)
|
bool StellaLIBRETRO::loadState(const void* data, size_t size)
|
||||||
{
|
{
|
||||||
Serializer state;
|
Serializer state;
|
||||||
|
|
||||||
state.putByteArray(reinterpret_cast<const uInt8*>(data), size);
|
state.putByteArray(reinterpret_cast<const uInt8*>(data), static_cast<uInt32>(size));
|
||||||
|
|
||||||
if (!myOSystem->state().loadState(state))
|
if (!myOSystem->state().loadState(state))
|
||||||
return false;
|
return false;
|
||||||
|
@ -227,7 +227,7 @@ bool StellaLIBRETRO::loadState(const void* data, uInt32 size)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool StellaLIBRETRO::saveState(void* data, uInt32 size)
|
bool StellaLIBRETRO::saveState(void* data, size_t size)
|
||||||
{
|
{
|
||||||
Serializer state;
|
Serializer state;
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ float StellaLIBRETRO::getVideoAspect()
|
||||||
{
|
{
|
||||||
if (!video_aspect_ntsc)
|
if (!video_aspect_ntsc)
|
||||||
// non-interlace square pixel clock -- 1.0 pixel @ color burst -- double-width pixels
|
// non-interlace square pixel clock -- 1.0 pixel @ color burst -- double-width pixels
|
||||||
par = (6.1363635 / 3.579545454) / 2;
|
par = (6.1363635f / 3.579545454f) / 2;
|
||||||
else
|
else
|
||||||
par = video_aspect_ntsc / 100.0;
|
par = video_aspect_ntsc / 100.0;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ float StellaLIBRETRO::getVideoAspect()
|
||||||
{
|
{
|
||||||
if (!video_aspect_pal)
|
if (!video_aspect_pal)
|
||||||
// non-interlace square pixel clock -- 0.8 pixel @ color burst -- double-width pixels
|
// non-interlace square pixel clock -- 0.8 pixel @ color burst -- double-width pixels
|
||||||
par = (7.3750000 / (4.43361875 * 4/5)) / 2;
|
par = (7.3750000f / (4.43361875f * 4/5)) / 2;
|
||||||
else
|
else
|
||||||
par = video_aspect_pal / 100.0;
|
par = video_aspect_pal / 100.0;
|
||||||
}
|
}
|
||||||
|
@ -313,11 +313,11 @@ bool StellaLIBRETRO::getVideoResize()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void StellaLIBRETRO::setROM(const void* data, uInt32 size)
|
void StellaLIBRETRO::setROM(const void* data, size_t size)
|
||||||
{
|
{
|
||||||
memcpy(rom_image.get(), data, size);
|
memcpy(rom_image.get(), data, size);
|
||||||
|
|
||||||
rom_size = size;
|
rom_size = static_cast<uInt32>(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -341,20 +341,10 @@ void StellaLIBRETRO::setConsoleFormat(uInt32 mode)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void StellaLIBRETRO::setVideoFilter(uInt32 mode)
|
void StellaLIBRETRO::setVideoFilter(uInt32 mode)
|
||||||
{
|
{
|
||||||
switch (mode)
|
if (system_ready && mode <= 5)
|
||||||
{
|
{
|
||||||
case 0: video_filter = NTSCFilter::PRESET_OFF; break;
|
myOSystem->settings().setValue("tv.filter", mode);
|
||||||
case 1: video_filter = NTSCFilter::PRESET_COMPOSITE; break;
|
myOSystem->frameBuffer().tiaSurface().setNTSC(static_cast<NTSCFilter::Preset>(mode));
|
||||||
case 2: video_filter = NTSCFilter::PRESET_SVIDEO; break;
|
|
||||||
case 3: video_filter = NTSCFilter::PRESET_RGB; break;
|
|
||||||
case 4: video_filter = NTSCFilter::PRESET_BAD; break;
|
|
||||||
case 5: video_filter = NTSCFilter::PRESET_CUSTOM; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (system_ready)
|
|
||||||
{
|
|
||||||
myOSystem->settings().setValue("tv.filter", static_cast<int>(video_filter));
|
|
||||||
myOSystem->frameBuffer().tiaSurface().setNTSC(video_filter);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ class StellaLIBRETRO
|
||||||
|
|
||||||
void runFrame();
|
void runFrame();
|
||||||
|
|
||||||
bool loadState(const void* data, uInt32 size);
|
bool loadState(const void* data, size_t size);
|
||||||
bool saveState(void* data, uInt32 size);
|
bool saveState(void* data, size_t size);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const char* getCoreName() { return "Stella"; }
|
const char* getCoreName() { return "Stella"; }
|
||||||
|
@ -93,7 +93,7 @@ class StellaLIBRETRO
|
||||||
Int16* getAudioBuffer() { return audio_buffer.get(); }
|
Int16* getAudioBuffer() { return audio_buffer.get(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setROM(const void* data, uInt32 size);
|
void setROM(const void* data, size_t size);
|
||||||
|
|
||||||
void setConsoleFormat(uInt32 mode);
|
void setConsoleFormat(uInt32 mode);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -294,8 +294,8 @@
|
||||||
<TargetEnvironment>X64</TargetEnvironment>
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
</Midl>
|
</Midl>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
@ -1399,4 +1399,4 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue