Files
bsnes/ui/main.cpp
Tim Allen f0796e546e Update to release v000r10.
byuu says:

Changelog:
- fixed LYC interrupt at LY=0 (fixes Makai Toushi SaGa)
- fixed MBC3 ROM bank mapping (fixes Harvest Moon GBC)
- added Super Game Boy MLT_REQ support to JOYP, needed for ICD2-R emulation
- temporarily changed System::run() to execute only four cycles before
  exiting for bsnes, will make two versions later
- uses actual boot ROMs, has DMG+SGB1 for now. Need SGB2, don't care
  about CGB. Defaults to SGB1, no way to select just yet.  DMG 4-second
  wait is annoying. Does not force games to act like SGB on bgameboy
  itself, because that has no ICD2 and fails the required MLT_REQ check
2011-01-06 21:16:07 +11:00

58 lines
1.3 KiB
C++
Executable File

#include "base.hpp"
Application application;
#include "interface.cpp"
#include "general/main-window.cpp"
void Application::main(int argc, char **argv) {
quit = false;
#if defined(PHOENIX_WINDOWS)
proportionalFont.create("Tahoma", 8);
proportionalFontBold.create("Tahoma", 8, Font::Style::Bold);
monospaceFont.create("Courier New", 8);
#else
proportionalFont.create("Sans", 8);
proportionalFontBold.create("Sans", 8, Font::Style::Bold);
monospaceFont.create("Liberation Mono", 8);
#endif
mainWindow.create();
mainWindow.setVisible();
OS::run();
#if defined(PHOENIX_WINDOWS)
video.driver("Direct3D");
#else
video.driver("OpenGL");
#endif
video.set(Video::Handle, (uintptr_t)mainWindow.viewport.handle());
video.set(Video::Synchronize, true);
video.set(Video::Filter, (unsigned)0);
video.init();
#if defined(PHOENIX_WINDOWS)
input.driver("RawInput");
#else
input.driver("SDL");
#endif
input.set(Input::Handle, (uintptr_t)mainWindow.viewport.handle());
input.init();
GameBoy::system.init(&interface);
while(quit == false) {
OS::run();
if(GameBoy::cartridge.loaded()) {
for(unsigned n = 0; n < 1024 * 1024; n++) GameBoy::system.run();
}
}
}
int main(int argc, char **argv) {
application.main(argc, argv);
return 0;
}