bsnes/target-tomoko/program/program.hpp

54 lines
1.9 KiB
C++
Raw Normal View History

struct Program : Emulator::Interface::Bind {
//program.cpp
Program(lstring args);
auto main() -> void;
auto quit() -> void;
//interface.cpp
Update to v094r39 release. byuu says: Changelog: - SNES mid-scanline BGMODE fixes finally merged (can run atx2.zip{mode7.smc}+mtest(2).sfc properly now) - Makefile now discards all built-in rules and variables - switch on bool warning disabled for GCC now as well (was already disabled for Clang) - when loading a game, if any required files are missing, display a warning message box (manifest.bml, program.rom, bios.rom, etc) - when loading a game (or a game slot), if manifest.bml is missing, it will invoke icarus to try and generate it - if that fails (icarus is missing or the folder is bad), you will get a warning telling you that the manifest can't be loaded The warning prompt on missing files work for both games and the .sys folders and their files. For some reason, failing to load the DMG/CGB BIOS is causing a crash before I can display the modal dialog. I have no idea why, and the stack frame backtrace is junk. I also can't seem to abort the failed loading process. If I call Program::unloadMedia(), I get a nasty segfault. Again with a really nasty stack trace. So for now, it'll just end up sitting there emulating an empty ROM (solid black screen.) In time, I'd like to fix that too. Lastly, I need a better method than popen for Windows. popen is kind of ugly and flashes a console window for a brief second even if the application launched is linked with -mwindows. Not sure if there even is one (I need to read the stdout result, so CreateProcess may not work unless I do something nasty like "> %tmp%/temp") I'm also using the regular popen instead of _wpopen, so for this WIP, it won't work if your game folder has non-English letters in the path.
2015-08-04 09:00:55 +00:00
auto loadRequest(unsigned id, string name, string type, bool required) -> void override;
auto loadRequest(unsigned id, string path, bool required) -> void override;
auto saveRequest(unsigned id, string path) -> void override;
auto videoColor(unsigned source, uint16 alpha, uint16 red, uint16 green, uint16 blue) -> uint32 override;
auto videoRefresh(const uint32* palette, const uint32* data, unsigned pitch, unsigned width, unsigned height) -> void override;
auto audioSample(int16 lsample, int16 rsample) -> void override;
auto inputPoll(unsigned port, unsigned device, unsigned input) -> int16 override;
auto inputRumble(unsigned port, unsigned device, unsigned input, bool enable) -> void override;
auto dipSettings(const Markup::Node& node) -> unsigned override;
auto path(unsigned group) -> string override;
auto notify(string text) -> void override;
//media.cpp
auto loadMedia(string location) -> void;
auto loadMedia(Emulator::Interface& interface, Emulator::Interface::Media& media, const string& location) -> void;
auto unloadMedia() -> void;
//state.cpp
auto stateName(unsigned slot, bool manager = false) -> string;
auto loadState(unsigned slot, bool manager = false) -> bool;
auto saveState(unsigned slot, bool manager = false) -> bool;
//utility.cpp
auto powerCycle() -> void;
auto softReset() -> void;
auto showMessage(const string& text) -> void;
auto updateStatusText() -> void;
auto updateVideoFilter() -> void;
auto updateVideoPalette() -> void;
auto updateAudio() -> void;
auto updateDSP() -> void;
DSP dsp;
bool pause = false;
vector<Emulator::Interface*> emulators;
vector<string> mediaPaths;
vector<string> folderPaths;
string statusText;
string statusMessage;
time_t statusTime = 0;
};
extern Program* program;