GLWidget::GLWidget(QWidget * parent/*= 0*/): QGLWidget(parent), texture(0), textureWidth(0), textureHeight(0), buffer(0), rasterWidth(326), rasterHeight(240), offset(0), hideMouseTimeout(60) { // Screen pitch has to be the texture width (in 32-bit pixels)... JaguarSetScreenPitch(1024); setMouseTracking(true); }
bool retro_load_game(const struct retro_game_info *info) { enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888; if (!environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) { fprintf(stderr, "Pixel format XRGB8888 not supported by platform, cannot use.\n"); return false; } const char *full_path; if(failed_init) return false; full_path = info->path; vjs.renderType = 0; check_variables(); jaguarCartInserted = true; if (log_enabled) { bool success = (bool)LogInit("./virtualjaguar.log"); // Init logfile if (!success) printf("Failed to open virtualjaguar.log for writing!\n"); } //strcpy(vjs.EEPROMPath, "/path/to/eeproms/"); // battery saves JaguarInit(); // set up hardware memcpy(jagMemSpace + 0xE00000, (vjs.biosType == BT_K_SERIES ? jaguarBootROM : jaguarBootROM2), 0x20000); // Use the stock BIOS //memcpy(jagMemSpace + 0x800000, jaguarCDBootROM, 0x40000); JaguarSetScreenPitch(videoWidth); JaguarSetScreenBuffer(videoBuffer); //Init video for (int i = 0; i < videoWidth * videoHeight; ++i) videoBuffer[i] = 0xFF00FFFF; SET32(jaguarMainRAM, 0, 0x00200000); // set up stack JaguarLoadFile((char *)full_path); // load rom JaguarReset(); return true; }