• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

open-rom-nes: JAVA 的FC(NES)游戏镜像解析(含INES ,INES2格式)

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

open-rom-nes

开源软件地址:

https://gitee.com/omuao/open-rom-nes

开源软件介绍:

open-rom-nes

介绍

NES游戏镜像解析,分析NES镜像文件,获得NES游戏镜像的相关信息。

支持文件格式: INES INES2.0

支持VROM 提取(GraphicsRom) 提取图片。

支持自定义数据渲染。

使用方法

        //需自行下载NES 文件镜像测试        NesFile nesFile = new NesFile("roms/mario.nes");        //获得MMC类型        System.out.println(nesFile.getMapperType());        //获得MMC类型的名字        System.out.println(nesFile.getMapperTypeName());        //镜像是否包含金手指        System.out.println(nesFile.isHaveTrainer());        //镜像是否为垂直镜像        System.out.println(nesFile.isVerticalImage());        //获得程序镜像的数量        System.out.println(nesFile.getRom().getProgramRomCount());        //获得图形镜像的数量        System.out.println(nesFile.getRom().getGraphicsRomCount());        //NES 文件大小        System.out.println(nesFile.length());        //是否为 INES2.0 格式        System.out.println(nesFile.isNes2Rom());        //NES 文件2.0        NesFile2 nesFile2 = new NesFile2("roms/mario.nes");        //获得控制台类型名称        System.out.println(nesFile2.getConsoleTypeName());        //获得硬件名称        System.out.println(nesFile2.getHardwareName());        //获得PPU 类型名称        System.out.println(nesFile2.getPpuName());        //获得扩展设备名称        System.out.println(nesFile2.getExpansionDeviceName());        //获得CPU/PPU 时序类型名称        System.out.println(nesFile2.getTimingTypeName());

字模数据打印

        // A 字模的数据        int[] data = new int[]{                0x1c, 0x36, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x00,  //模型数据                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   //辅助配色数据        };        //创建格子(Tile)        GridImpl grid = new GridImpl(data);        //获得格子的渲染图像        BufferedImage image = grid.getRenderingImage();        //创建输出流        FileOutputStream fos = new FileOutputStream("test3.png");        //输出图像        ImageIO.write(image, "png", fos);        fos.close();

提取CHR-ROM 中的图像

        //需自行下载NES 文件镜像测试        //创建NES 文件        NesFile nesFile = new NesFile("roms/mario.nes");        //载入镜像        nesFile.loadRom();        //获得图像ROM 数据Bank        int[] graphicsRom = nesFile.getRom().getGraphicsRoms()[0];        //创建绘制表        GraphicsTable graphicsTable = new GraphicsTableImpl();                //根据图像ROM创建绘制表        graphicsTable.valueOfGraphicsRom(graphicsRom);        //绘制CHR 图像        BufferedImage image = graphicsTable.getRenderingImage();        //创建输出流        FileOutputStream fos = new FileOutputStream("chr.png");        //输出图像        ImageIO.write(image, "png", fos);                fos.close();

NES1.0结构图

NES1.0结构图

NES2.0结构图

NES2.0结构图

MOS6502程序模拟结构说明

MOS6502程序结构说明


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Smoothly: 基于irrlicht的多人第一人称沙盒游戏发布时间:2022-03-25
下一篇:
XGF: 基于Direct3D11 的 2D/3D 游戏渲染框架发布时间:2022-03-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap