mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Implemented the cheat database dialog, and most of the cheat editor dialog. I still have to handle loading and saving the cheats.bml file for each game. I wanted to finish it today, but I burned out. It's a ton of really annoying work to support cheat codes. There's also some issue with the width calculation for the "code(s)" column in hiro/GTK. Short-term: - add input port changing support - add other input types (mouse-based, etc) - finish cheat codes Long-term: - add slotted cart loader (SGB, BSX, ST) - add DIP switch selection window (NSS) - add overscan masking - add timing configuration (video/audio sync) Not planned: - video color adjustments (will allow emulated color vs raw color; but no more sliders) - pixel shaders - ananke integration (will need to make a command-line version to get my games in) - fancy audio adjustment controls (resampler, latency, volume) - input focus settings - localization support (not enough users) - window geometry memory - anything else not in higan v094
83 lines
2.1 KiB
C++
83 lines
2.1 KiB
C++
#include "../tomoko.hpp"
|
|
#include <fc/interface/interface.hpp>
|
|
#include <sfc/interface/interface.hpp>
|
|
#include <gb/interface/interface.hpp>
|
|
#include <gba/interface/interface.hpp>
|
|
#include "interface.cpp"
|
|
#include "media.cpp"
|
|
#include "state.cpp"
|
|
#include "utility.cpp"
|
|
Program* program = nullptr;
|
|
|
|
Program::Program() {
|
|
program = this;
|
|
directory::create({configpath(), "tomoko/"});
|
|
Application::onMain({&Program::main, this});
|
|
|
|
emulators.append(new Famicom::Interface);
|
|
emulators.append(new SuperFamicom::Interface);
|
|
emulators.append(new GameBoy::Interface);
|
|
emulators.append(new GameBoyAdvance::Interface);
|
|
for(auto& emulator : emulators) emulator->bind = this;
|
|
|
|
new ConfigurationManager;
|
|
new InputManager;
|
|
new LibraryManager;
|
|
new SettingsManager;
|
|
new CheatDatabase;
|
|
new ToolsManager;
|
|
new Presentation;
|
|
|
|
presentation->setVisible();
|
|
|
|
video.driver(config().video.driver);
|
|
video.set(Video::Handle, presentation->viewport.handle());
|
|
video.set(Video::Synchronize, config().video.synchronize);
|
|
if(!video.init()) { video.driver("None"); video.init(); }
|
|
|
|
audio.driver(config().audio.driver);
|
|
audio.set(Audio::Handle, presentation->viewport.handle());
|
|
audio.set(Audio::Synchronize, config().audio.synchronize);
|
|
audio.set(Audio::Frequency, 96000u);
|
|
audio.set(Audio::Latency, 80u);
|
|
if(!audio.init()) { audio.driver("None"); audio.init(); }
|
|
|
|
input.driver(config().input.driver);
|
|
input.set(Input::Handle, presentation->viewport.handle());
|
|
if(!input.init()) { input.driver("None"); input.init(); }
|
|
|
|
dsp.setPrecision(16);
|
|
dsp.setBalance(0.0);
|
|
dsp.setVolume(config().audio.mute ? 0.0 : 1.0);
|
|
dsp.setFrequency(32040);
|
|
dsp.setResampler(DSP::ResampleEngine::Sinc);
|
|
dsp.setResamplerFrequency(96000);
|
|
|
|
presentation->drawSplashScreen();
|
|
|
|
updateVideoFilter();
|
|
}
|
|
|
|
auto Program::main() -> void {
|
|
updateStatusText();
|
|
inputManager->poll();
|
|
|
|
if(!emulator || !emulator->loaded() || pause) {
|
|
audio.clear();
|
|
usleep(20 * 1000);
|
|
return;
|
|
}
|
|
|
|
emulator->run();
|
|
}
|
|
|
|
auto Program::quit() -> void {
|
|
unloadMedia();
|
|
configurationManager->quit();
|
|
inputManager->quit();
|
|
video.term();
|
|
audio.term();
|
|
input.term();
|
|
Application::quit();
|
|
}
|