⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zsnesjma.cpp

📁 linux下的任天堂模拟器代码。供大家参考。
💻 CPP
字号:
/*Copyright (C) 2004-2007 NSRT Team ( http://nsrt.edgeemu.com )This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseversion 2 as published by the Free Software Foundation.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include <vector>using namespace std;#include "zsnesjma.h"#include "jma.h"extern "C" {extern unsigned char *romdata;extern unsigned int curromspace;extern unsigned int maxromspace;}void load_jma_file(const char *filename){  try  {    JMA::jma_open JMAFile(filename);    vector<JMA::jma_public_file_info> file_info = JMAFile.get_files_info();    string our_file_name;    size_t our_file_size = 0;    for (vector<JMA::jma_public_file_info>::iterator i = file_info.begin(); i != file_info.end(); i++)    {      //Check for valid ROM based on size      if ((i->size <= maxromspace+512) && (i->size > our_file_size))      {        our_file_name = i->name;        our_file_size = i->size;      }    }    if (!our_file_size)    {      return;    }    JMAFile.extract_file(our_file_name, romdata);    curromspace = our_file_size;  }  catch (JMA::jma_errors jma_error)  {    //No need to do anything  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -