这篇教程C++ MDFN_printf函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中MDFN_printf函数的典型用法代码示例。如果您正苦于以下问题:C++ MDFN_printf函数的具体用法?C++ MDFN_printf怎么用?C++ MDFN_printf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了MDFN_printf函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: LoadIPS// Return FALSE on fatal error(IPS file found but couldn't be applied),// or TRUE on success(IPS patching succeeded, or IPS file not found).static bool LoadIPS(MDFNFILE &GameFile, const char *path){ FILE *IPSFile; MDFN_printf(_("Applying IPS file /"%s/".../n"), path); IPSFile = fopen(path, "rb"); if(!IPSFile) { ErrnoHolder ene(errno); MDFN_printf(_("Failed: %s/n"), ene.StrError()); if(ene.Errno() == ENOENT) return(1); else { MDFN_PrintError(_("Error opening IPS file: %s/n"), ene.StrError()); return(0); } } if(!GameFile.ApplyIPS(IPSFile)) { fclose(IPSFile); return(0); } fclose(IPSFile); return(1);}
开发者ID:ficoos,项目名称:mednafen-psx-libretro,代码行数:33,
示例2: Loadstatic int Load(const char *name, MDFNFILE *fp){ lynxie = new CSystem(GET_FDATA_PTR(fp), GET_FSIZE_PTR(fp)); int rot = lynxie->CartGetRotate(); if(rot == CART_ROTATE_LEFT) MDFNGameInfo->rotated = MDFN_ROTATE270; else if(rot == CART_ROTATE_RIGHT) MDFNGameInfo->rotated = MDFN_ROTATE90; gAudioEnabled = 1; memcpy(MDFNGameInfo->MD5, lynxie->mCart->MD5, 16); MDFNGameInfo->GameSetMD5Valid = FALSE; MDFN_printf(_("ROM: %dKiB/n"), (lynxie->mCart->InfoROMSize + 1023) / 1024); MDFN_printf(_("ROM CRC32: 0x%08x/n"), lynxie->mCart->CRC32()); MDFN_printf(_("ROM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); MDFNGameInfo->fps = (uint32)(59.8 * 65536 * 256); if(MDFN_GetSettingB("lynx.lowpass")) { lynxie->mMikie->miksynth.treble_eq(-35); } else { lynxie->mMikie->miksynth.treble_eq(0); } return(1);}
开发者ID:Nukotan,项目名称:beetle-lynx-libretro,代码行数:29,
示例3: LoadCPalettestatic void LoadCPalette(const char *syspalname, uint8 **ptr, uint32 num_entries){ std::string colormap_fn = MDFN_MakeFName(MDFNMKF_PALETTE, 0, syspalname).c_str(); MDFN_printf(_("Loading custom palette from /"%s/".../n"), colormap_fn.c_str()); MDFN_indent(1); try { FileStream fp(colormap_fn.c_str(), FileStream::MODE_READ); *ptr = new uint8[num_entries * 3]; fp.read(*ptr, num_entries * 3); } catch(MDFN_Error &e) { MDFN_printf(_("Error: %s/n"), e.what()); MDFN_indent(-1); if(e.GetErrno() != ENOENT) throw; return; } catch(std::exception &e) { MDFN_printf(_("Error: %s/n"), e.what()); MDFN_indent(-1); throw; } MDFN_indent(-1);}
开发者ID:XeresRazor,项目名称:Provenance,代码行数:34,
示例4: DINFstatic void DINF(Stream *fp){ union { struct { char name[100]; uint8 raw_date[4]; char method[100]; }; uint8 raw[100 + 4 + 100]; } dinf; uint8 d, m; uint16 y; fp->read(dinf.raw, sizeof(dinf.raw)); d = dinf.raw_date[0]; m = dinf.raw_date[1]; y = MDFN_de16lsb(&dinf.raw_date[2]); dinf.name[99] = dinf.method[99] = 0; MDFN_RemoveControlChars(dinf.name); MDFN_RemoveControlChars(dinf.method); MDFN_printf(_("Dumped by: %s/n"), dinf.name); MDFN_printf(_("Dumped with: %s/n"), dinf.method); { const char* months[12]={_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"), _("August"),_("September"),_("October"),_("November"),_("December")}; MDFN_printf(_("Dumped on: %s %d, %d/n"),months[(m-1)%12],d,y); }}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:34,
示例5: CDIF_DumpCDbool CDIF_DumpCD(const char *fn){ FILE *fp; if(!(fp = fopen(fn, "wb"))) { ErrnoHolder ene(errno); MDFN_printf("File open error: %s/n", ene.StrError()); return(0); } for(long long i = 0; i < toc.tracks[100].lba; i++) { uint8 buf[2352 + 96]; CDIF_ReadRawSector(buf, i); if(fwrite(buf, 1, 2352 + 96, fp) != 2352 + 96) { ErrnoHolder ene(errno); MDFN_printf("File write error: %s/n", ene.StrError()); } } if(fclose(fp)) { ErrnoHolder ene(errno); MDFN_printf("fclose error: %s/n", ene.StrError()); } return(1);}
开发者ID:kokopalen,项目名称:rs97_emulator,代码行数:35,
示例6: MemoryStreamvoid MDFNFILE::ApplyIPS(Stream *ips){//// If the stream is not a MemoryStream, turn it into one.////if(!(str->attributes() & Stream::ATTRIBUTE_WRITEABLE)) if(dynamic_cast<MemoryStream*>(str.get()) == nullptr) { str.reset(new MemoryStream(str.release(), MaxROMImageSize)); } { MDFN_AutoIndent aind(1); uint32 count; count = IPSPatcher::Apply(ips, str.get()); MDFN_printf(_("IPS EOF: Did %u patches/n/n"), count); if(ips->tell() < ips->size()) { MDFN_AutoIndent aindw(1); MDFN_printf(_("Warning: trailing unused data in IPS file./n")); } }}
开发者ID:Rakashazi,项目名称:emu-ex-plus-alpha,代码行数:27,
示例7: rom_hack//=============================================================================static void rom_hack(void){ //============================= // SPECIFIC ROM HACKS ! //============================= //"Neo-Neo! V1.0 (PD)" if (MATCH_CATALOG(0, 16)) { ngpc_rom.data[0x23] = 0x10; // Fix rom header MDFN_printf("HACK: /"Neo-Neo! V1.0 (PD)/"/n"); } //"Cool Cool Jam SAMPLE (U)" if (MATCH_CATALOG(4660, 161)) { ngpc_rom.data[0x23] = 0x10; // Fix rom header MDFN_printf("HACK: /"Cool Cool Jam SAMPLE (U)/"/n"); } //"Dokodemo Mahjong (J)" if (MATCH_CATALOG(51, 33)) { ngpc_rom.data[0x23] = 0x00; // Fix rom header MDFN_printf("HACK: /"Dokodemo Mahjong (J)/"/n"); }}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:31,
示例8: cdif_open_substatic bool cdif_open_sub(const char *device_name){ MDFN_printf(_("Loading %s.../n/n"), device_name ? device_name : _("PHYSICAL CDROM DISC")); MDFN_indent(1); if(!(p_cdrfile = cdrfile_open(device_name))) { MDFN_indent(-1); return(0); } CD_Info.NumTracks = cdrfile_get_num_tracks(p_cdrfile); if(CD_Info.NumTracks < 1 || CD_Info.NumTracks > 100) { MDFN_indent(-1); return(0); } CD_Info.FirstTrack = cdrfile_get_first_track_num(p_cdrfile); for(track_t track = CD_Info.FirstTrack; track < CD_Info.FirstTrack + CD_Info.NumTracks; track++) { CD_Info.Tracks[track].LSN = cdrfile_get_track_lsn(p_cdrfile, track); CD_Info.Tracks[track].Format = cdrfile_get_track_format(p_cdrfile, track); MDFN_printf(_("Track %2d, LSN: %6d %s/n"), track, CD_Info.Tracks[track].LSN, track_format2str[CD_Info.Tracks[track].Format]); } MDFN_indent(-1); return(1);}
开发者ID:ben401,项目名称:OpenEmu,代码行数:29,
示例9: LoadCPalettestatic bool LoadCPalette(const char *syspalname, uint8 **ptr, uint32 num_entries){ std::string colormap_fn = MDFN_MakeFName(MDFNMKF_PALETTE, 0, syspalname).c_str(); MDFN_printf(_("Loading custom palette from /"%s/".../n"), colormap_fn.c_str()); MDFN_indent(1); *ptr = NULL; try { FileStream fp(colormap_fn.c_str(), FileStream::MODE_READ); if(!(*ptr = (uint8 *)MDFN_malloc(num_entries * 3, _("custom color map")))) { MDFN_indent(-1); return(false); } fp.read(*ptr, num_entries * 3); } catch(MDFN_Error &e) { if(*ptr) { MDFN_free(*ptr); *ptr = NULL; } MDFN_printf(_("Error: %s/n"), e.what()); MDFN_indent(-1); return(e.GetErrno() == ENOENT); // Return fatal error if it's an error other than the file not being found. } catch(std::exception &e) { if(*ptr) { MDFN_free(*ptr); *ptr = NULL; } MDFN_printf(_("Error: %s/n"), e.what()); MDFN_indent(-1); return(false); } MDFN_indent(-1); return(true);}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:49,
示例10: Loadstatic void Load(MDFNFILE *fp){ try { const uint64 fp_size = fp->size(); if(fp_size > 1024 * 1024 * 8) // 4MiB maximum ROM size, 2* to be a little tolerant of garbage. throw MDFN_Error(0, _("NGP/NGPC ROM image is too large.")); ngpc_rom.length = fp_size; ngpc_rom.data = new uint8[ngpc_rom.length]; fp->read(ngpc_rom.data, ngpc_rom.length); md5_context md5; md5.starts(); md5.update(ngpc_rom.data, ngpc_rom.length); md5.finish(MDFNGameInfo->MD5); rom_loaded(); MDFN_printf(_("ROM: %uKiB/n"), (ngpc_rom.length + 1023) / 1024); MDFN_printf(_("ROM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); FLASH_LoadNV(); MDFNMP_Init(1024, 1024 * 1024 * 16 / 1024); NGPGfx = new NGPGFX_CLASS(); MDFNGameInfo->fps = (uint32)((uint64)6144000 * 65536 * 256 / 515 / 198); // 3072000 * 2 * 10000 / 515 / 198 MDFNGameInfo->GameSetMD5Valid = FALSE; MDFNNGPCSOUND_Init(); MDFNMP_AddRAM(16384, 0x4000, CPUExRAM); SetFRM(); // Set up fast read memory mapping bios_install(); //main_timeaccum = 0; z80_runtime = 0; reset(); } catch(...) { Cleanup(); throw; }}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:49,
示例11: Loadstatic void Load(MDFNFILE *fp){ try { lynxie = new CSystem(fp); switch(lynxie->CartGetRotate()) { case CART_ROTATE_LEFT: MDFNGameInfo->rotated = MDFN_ROTATE270; break; case CART_ROTATE_RIGHT: MDFNGameInfo->rotated = MDFN_ROTATE90; break; } MDFNGameInfo->GameSetMD5Valid = false; if(lynxie->mRam->InfoRAMSize) { memcpy(MDFNGameInfo->MD5, lynxie->mRam->MD5, 16); MDFN_printf(_("RAM: %u bytes/n"), lynxie->mRam->InfoRAMSize); MDFN_printf(_("RAM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); } else { memcpy(MDFNGameInfo->MD5, lynxie->mCart->MD5, 16); MDFN_printf(_("ROM: %dKiB/n"), (lynxie->mCart->InfoROMSize + 1023) / 1024); MDFN_printf(_("ROM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); } MDFNGameInfo->fps = (uint32)(59.8 * 65536 * 256); if(MDFN_GetSettingB("lynx.lowpass")) { lynxie->mMikie->miksynth.treble_eq(-35); } else { lynxie->mMikie->miksynth.treble_eq(0); } } catch(std::exception &e) { Cleanup(); throw; }}
开发者ID:OpenEmu,项目名称:Mednafen-Core,代码行数:49,
示例12: MPCReader MPCReader(FILE *fp) { fseek(fp, 0, SEEK_SET); lseek(fileno(fp), 0, SEEK_SET); memset(&MPCReaderFile, 0, sizeof(MPCReaderFile)); memset(&MPCStreamInfo, 0, sizeof(MPCStreamInfo)); memset(&MPCDecoder, 0, sizeof(MPCDecoder)); memset(MPCBuffer, 0, sizeof(MPCBuffer)); mpc_streaminfo_init(&MPCStreamInfo); mpc_reader_setup_file_reader(&MPCReaderFile, fp); if(mpc_streaminfo_read(&MPCStreamInfo, &MPCReaderFile.reader) != ERROR_CODE_OK) { throw(0); } mpc_decoder_setup(&MPCDecoder, &MPCReaderFile.reader); if(!mpc_decoder_initialize(&MPCDecoder, &MPCStreamInfo)) { MDFN_printf(_("Error initializing MusePack decoder!/n")); throw(0); } }
开发者ID:RobertSzkutak,项目名称:mednafenPSP,代码行数:25,
示例13: PCECD_Initint32 PCECD_Init(){ if (!CDIF_Init()) return -1; CDDAVolumeSetting = (double)MDFN_GetSettingUI("pce.cddavolume"); if(CDDAVolumeSetting != 100) { MDFN_printf(_("CD-DA Volume: %d%%/n"), (int)CDDAVolumeSetting); } CDDAVolumeSetting /= 100; CurrentCDVolume = InitialCdVolume = 65536; VolumeStep = InitialCdVolume / 100; bFadeOut = FALSE; bFadeIn = FALSE; ADPCM_SetNotificationFunction(adpcm_state_notification_callback_function); SCSICD_Init(SCSICD_PCE, 1 * pce_overclocked, &sbuf[0], &sbuf[1], 126000 * MDFN_GetSettingUI("pce.cdspeed"), 7159091 * pce_overclocked, CDIRQ, StuffSubchannel); SyncCDVolume(); #ifdef WANT_DEBUGGER MDFNDBG_AddRegGroup(&PCECDRegsGroup); #endif return 0;}
开发者ID:CaoCaoBeard,项目名称:pcejin,代码行数:33,
示例14: LoadPRGstatic void LoadPRG(Stream *fp){ uint32 t; unsigned z; z = uchead.ID[3] - '0'; // FIXME hex if(z > 15) throw MDFN_Error(0, "Invalid PRG ROM index '%c'./n", uchead.ID[3]); MDFN_printf(_("PRG ROM %u size: %u/n"), z, uchead.info); if(malloced[z]) free(malloced[z]); t = FixRomSize(uchead.info, 2048); malloced[z] = (uint8 *)MDFN_malloc_T(t, _("PRG ROM")); mallocedsizes[z] = t; memset(malloced[z] + uchead.info, 0xFF, t - uchead.info); fp->read(malloced[z], uchead.info); SetupCartPRGMapping(z,malloced[z],t,0); }
开发者ID:Oggom,项目名称:mednafen-git,代码行数:25,
示例15: MakeSFMapstatic void MakeSFMap(SFORMAT *sf, SFMap_t &sfmap){ while(sf->size || sf->name) // Size can sometimes be zero, so also check for the text name. These two should both be zero only at the end of a struct. { if(!sf->size || !sf->v) { sf++; continue; } if(sf->size == (uint32)~0) /* Link to another SFORMAT structure. */ MakeSFMap((SFORMAT *)sf->v, sfmap); else { assert(sf->name); if(sfmap.find(sf->name) != sfmap.end()) MDFN_printf("Duplicate save state variable in internal emulator structures(CLUB THE PROGRAMMERS WITH BREADSTICKS): %s/n", sf->name); sfmap[sf->name] = sf; } sf++; }}
开发者ID:acgleader,项目名称:emu-ex-plus-alpha,代码行数:25,
示例16: MDFNI_StartAVRecordbool MDFNI_StartAVRecord(const char *path, double SoundRate){ try { QTRecord::VideoSpec spec; memset(&spec, 0, sizeof(spec)); spec.SoundRate = SoundRate; spec.SoundChan = MDFNGameInfo->soundchan; spec.VideoWidth = MDFNGameInfo->lcm_width; spec.VideoHeight = MDFNGameInfo->lcm_height; spec.VideoCodec = MDFN_GetSettingI("qtrecord.vcodec"); spec.MasterClock = MDFNGameInfo->MasterClock; if(spec.VideoWidth < MDFN_GetSettingUI("qtrecord.w_double_threshold")) spec.VideoWidth *= 2; if(spec.VideoHeight < MDFN_GetSettingUI("qtrecord.h_double_threshold")) spec.VideoHeight *= 2; spec.AspectXAdjust = ((double)MDFNGameInfo->nominal_width * 2) / spec.VideoWidth; spec.AspectYAdjust = ((double)MDFNGameInfo->nominal_height * 2) / spec.VideoHeight; MDFN_printf("/n"); MDFN_printf(_("Starting QuickTime recording to file /"%s/":/n"), path); MDFN_indent(1); MDFN_printf(_("Video width: %u/n"), spec.VideoWidth); MDFN_printf(_("Video height: %u/n"), spec.VideoHeight); MDFN_printf(_("Video codec: %s/n"), MDFN_GetSettingS("qtrecord.vcodec").c_str()); if(spec.SoundRate && spec.SoundChan) { MDFN_printf(_("Sound rate: %u/n"), std::min<uint32>(spec.SoundRate, 64000)); MDFN_printf(_("Sound channels: %u/n"), spec.SoundChan); } else MDFN_printf(_("Sound: Disabled/n")); MDFN_indent(-1); MDFN_printf("/n"); qtrecorder = new QTRecord(path, spec); } catch(std::exception &e) { MDFND_PrintError(e.what()); return(false); } return(true);}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:52,
示例17: Loadstatic int Load(const char *name, MDFNFILE *fp){ try { lynxie = new CSystem(fp->data, fp->size); switch(lynxie->CartGetRotate()) { case CART_ROTATE_LEFT: MDFNGameInfo->rotated = MDFN_ROTATE270; break; case CART_ROTATE_RIGHT: MDFNGameInfo->rotated = MDFN_ROTATE90; break; } memcpy(MDFNGameInfo->MD5, lynxie->mCart->MD5, 16); MDFNGameInfo->GameSetMD5Valid = FALSE; MDFN_printf(_("ROM: %dKiB/n"), (lynxie->mCart->InfoROMSize + 1023) / 1024); MDFN_printf(_("ROM CRC32: 0x%08x/n"), lynxie->mCart->CRC32()); MDFN_printf(_("ROM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); MDFNGameInfo->fps = (uint32)(59.8 * 65536 * 256); if(MDFN_GetSettingB("lynx.lowpass")) { lynxie->mMikie->miksynth.treble_eq(-35); } else { lynxie->mMikie->miksynth.treble_eq(0); } } catch(std::exception &e) { MDFN_PrintError("%s", e.what()); Cleanup(); return(0); } return(1);}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:46,
示例18: MDFN_ErrorMCGenjin::MCGenjin(Blip_Buffer *bb, const uint8 *rr, uint32 rr_size){ uint8 revision, num256_pages, region, cs_di[2]; if(rr_size < 8192) throw MDFN_Error(0, _("MCGenjin ROM size is too small!")); if(memcmp(rr + 0x1FD0, "MCGENJIN", 8)) throw MDFN_Error(0, _("MC Genjin header magic missing!")); rom.resize(round_up_pow2(rr_size)); memcpy(&rom[0], rr, rr_size); revision = rom[0x1FD8]; num256_pages = rom[0x1FD9]; region = rom[0x1FDA]; cs_di[0] = rom[0x1FDB]; cs_di[1] = rom[0x1FDC]; for(unsigned i = 0; i < 2; i++) { switch(cs_di[i]) { default: for(unsigned si = 0; si < i; si++) // FIXME: auto ptr to make this not necessary delete cs[si]; throw MDFN_Error(0, _("Unsupported MCGENJIN device on CS%d: 0x%02x"), i, cs_di[i]); break; case 0x00: MDFN_printf(_("CS%d: Unused/n"), i); cs[i] = new MCGenjin_CS_Device(); break; case 0x10 ... 0x18: case 0x20 ... 0x28: MDFN_printf(_("CS%d: %uKiB %sRAM/n"), i, 8 << (cs_di[i] & 0xF), (cs_di[i] & 0x20) ? "Nonvolatile " : ""); cs[i] = new MCGenjin_CS_Device_RAM(8192 << (cs_di[i] & 0xF), (bool)(cs_di[i] & 0x20)); break; } }}
开发者ID:chipsoftwaretester,项目名称:OpenEmu,代码行数:44,
示例19: EnableBatterystatic void EnableBattery(Stream *fp){ uint8 t; fp->read(&t, 1); MDFN_printf(_("Battery-backed./n")); UNIFCart.battery = 1;}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:10,
示例20: PCE_InitCDvoid PCE_InitCD(void){ PCECD_Settings cd_settings; memset(&cd_settings, 0, sizeof(PCECD_Settings)); cd_settings.CDDA_Volume = (double)MDFN_GetSettingUI("pce_fast.cddavolume") / 100; cd_settings.CD_Speed = MDFN_GetSettingUI("pce_fast.cdspeed"); cd_settings.ADPCM_Volume = (double)MDFN_GetSettingUI("pce_fast.adpcmvolume") / 100; cd_settings.ADPCM_LPF = MDFN_GetSettingB("pce_fast.adpcmlp"); if(cd_settings.CDDA_Volume != 1.0) MDFN_printf(_("CD-DA Volume: %d%%/n"), (int)(100 * cd_settings.CDDA_Volume)); if(cd_settings.ADPCM_Volume != 1.0) MDFN_printf(_("ADPCM Volume: %d%%/n"), (int)(100 * cd_settings.ADPCM_Volume)); PCECD_Init(&cd_settings, PCECDIRQCB, PCE_MASTER_CLOCK, pce_overclocked, sbuf);}
开发者ID:aerdnar,项目名称:emu-ex-plus-alpha,代码行数:19,
示例21: NAMEstatic void NAME(Stream *fp){ assert(uchead.info <= (SIZE_MAX - 1)); MDFNGameInfo->name.resize((size_t)uchead.info); fp->read(&MDFNGameInfo->name[0], (size_t)uchead.info); MDFN_zapctrlchars(MDFNGameInfo->name); MDFN_printf(_("Name: %s/n"), MDFNGameInfo->name.c_str());}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:10,
示例22: Loadstatic MDFN_COLD void Load(MDFNFILE *fp){ try { uint8 hes_header[4]; const bool IsHES = false; IsSGX = false; fp->read(hes_header, 4); fp->seek(0, SEEK_SET); /*if(!memcmp(hes_header, "HESM", 4)) IsHES = true;*/ LoadCommonPre(); for(int x = 0; x < 0x100; x++) { HuCPU.PCERead[x] = PCEBusRead; HuCPU.PCEWrite[x] = PCENullWrite; } if(IsHES) HES_Load(fp); else { uint32 crc; crc = HuC_Load(fp); if(fp->ext == "sgx") IsSGX = true; else { for(auto const& e : sgx_table) { if(e.crc == crc) { IsSGX = true; MDFN_printf(_("SuperGrafx: %s/n"), e.name); break; } } } } LoadCommon(); } catch(...) { Cleanup(); throw; }}
开发者ID:aerdnar,项目名称:emu-ex-plus-alpha,代码行数:55,
示例23: instruction_errorvoid instruction_error(char* vaMessage,...){ char message[1000]; va_list vl; va_start(vl, vaMessage); vsprintf(message, vaMessage, vl); va_end(vl); MDFN_printf("[PC %06X] %s/n", pc, message);}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:11,
示例24: CDIF_ReadSectorbool CDIF_ReadSector(uint8* pBuf, uint32 lba, uint32 nSectors){ while(nSectors--) { uint8 tmpbuf[2352 + 96]; if(!CDIF_ReadRawSector(tmpbuf, lba)) { MDFN_printf("CDIF Raw Read error"); return(FALSE); } if(!CDIF_ValidateRawSector(tmpbuf)) { MDFN_DispMessage(_("Uncorrectable data at sector %d"), lba); MDFN_PrintError(_("Uncorrectable data at sector %d"), lba); return(false); } const int mode = tmpbuf[12 + 3]; if(mode == 1) { memcpy(pBuf, &tmpbuf[12 + 4], 2048); } else if(mode == 2) { memcpy(pBuf, &tmpbuf[12 + 4 + 8], 2048); } else { MDFN_printf("CDIF_ReadSector() invalid sector type at LBA=%u/n", (unsigned int)lba); return(false); } pBuf += 2048; lba++; } return(true);}
开发者ID:kokopalen,项目名称:rs97_emulator,代码行数:41,
示例25: LoadCommonPrestatic void LoadCommonPre(void){ // FIXME: Make these globals less global! pce_overclocked = MDFN_GetSettingUI("pce_fast.ocmultiplier"); PCE_ACEnabled = MDFN_GetSettingB("pce_fast.arcadecard"); if(pce_overclocked > 1) MDFN_printf(_("CPU overclock: %dx/n"), pce_overclocked); if(MDFN_GetSettingUI("pce_fast.cdspeed") > 1) MDFN_printf(_("CD-ROM speed: %ux/n"), (unsigned int)MDFN_GetSettingUI("pce_fast.cdspeed")); memset(HuCPUFastMap, 0, sizeof(HuCPUFastMap)); for(int x = 0; x < 0x100; x++) { PCERead[x] = PCEBusRead; PCEWrite[x] = PCENullWrite; } MDFNMP_Init(1024, (1 << 21) / 1024);}
开发者ID:acgleader,项目名称:emu-ex-plus-alpha,代码行数:21,
示例26: VBlur_Initvoid VBlur_Init(void){ std::string sn = MDFNGameInfo->shortname; if(MDFN_GetSettingB(std::string(sn + "." + std::string("vblur")).c_str())) { AccumBlurAmount = (uint32)(16384 * MDFN_GetSettingF(std::string(sn + "." + std::string("vblur.accum.amount")).c_str()) / 100); if(MDFN_GetSettingB(std::string(sn + "." + std::string("vblur.accum")).c_str())) { AccumBlurBuf = (HQPixelEntry *)calloc(sizeof(HQPixelEntry), (MDFNGameInfo->pitch >> 2) * 256); MDFN_printf(_("Video frame blur enabled with accumulation: %f./n"), (double)AccumBlurAmount * 100 / 16384); }
开发者ID:ben401,项目名称:OpenEmu,代码行数:12,
示例27: DetectMMC5WRAMSizeint DetectMMC5WRAMSize(uint32 crc32){ int x; for(x=0;x<MMC5_NOCARTS;x++) if(crc32==MMC5CartList[x].crc32) { MDFN_printf(_(">8KB external WRAM present. Use UNIF if you hack the ROM image./n")); return(MMC5CartList[x].size*8); } return(8);}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:12,
示例28: Loadstatic int Load(const char *name, MDFNFILE *fp){ if(!(ngpc_rom.data = (uint8 *)MDFN_malloc(GET_FSIZE_PTR(fp), _("Cart ROM")))) return(0); ngpc_rom.length = GET_FSIZE_PTR(fp); memcpy(ngpc_rom.data, GET_FDATA_PTR(fp), GET_FSIZE_PTR(fp)); md5_context md5; md5.starts(); md5.update(ngpc_rom.data, ngpc_rom.length); md5.finish(MDFNGameInfo->MD5); rom_loaded(); MDFN_printf(_("ROM: %dKiB/n"), (ngpc_rom.length + 1023) / 1024); MDFN_printf(_("ROM MD5: 0x%s/n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); MDFNMP_Init(1024, 1024 * 1024 * 16 / 1024); NGPGfx = new NGPGFX_CLASS(); MDFNGameInfo->fps = (uint32)((uint64)6144000 * 65536 * 256 / 515 / 198); // 3072000 * 2 * 10000 / 515 / 198 MDFNGameInfo->GameSetMD5Valid = FALSE; MDFNNGPCSOUND_Init(); MDFNMP_AddRAM(16384, 0x4000, CPUExRAM); SetFRM(); // Set up fast read memory mapping bios_install(); //main_timeaccum = 0; z80_runtime = 0; reset(); return(1);}
开发者ID:Nukotan,项目名称:beetle-ngp-libretro,代码行数:39,
示例29: SetBoardNamestatic void SetBoardName(Stream *fp){ assert(uchead.info <= (SIZE_MAX - 1)); boardname = (uint8*)MDFN_malloc_T((size_t)uchead.info + 1, _("Board Name")); fp->read(boardname, uchead.info); boardname[uchead.info] = 0; MDFN_RemoveControlChars((char*)boardname); MDFN_printf(_("Board name: %s/n"), boardname); sboardname=boardname; if(!memcmp(boardname,"NES-",4) || !memcmp(boardname,"UNL-",4) || !memcmp(boardname,"HVC-",4) || !memcmp(boardname,"BTL-",4) || !memcmp(boardname,"BMC-",4)) sboardname+=4;}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:14,
示例30: DetectMMC1WRAMSizestatic int DetectMMC1WRAMSize(uint32 crc32){ switch(crc32) { default:return(8); case 0xc6182024: /* Romance of the 3 Kingdoms */ case 0x2225c20f: /* Genghis Khan */ case 0x4642dda6: /* Nobunaga's Ambition */ case 0x29449ba9: /* "" "" (J) */ case 0x2b11e0b0: /* "" "" (J) */ MDFN_printf(_(">8KB external WRAM present. Use UNIF if you hack the ROM image./n")); return(16); }}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:14,
注:本文中的MDFN_printf函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ MDIGetActive函数代码示例 C++ MDFN_Error函数代码示例 |