iNES emulator by Marat Fayzullin

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Re: iNES emulator by Marat Fayzullin

Post by James »

You can convert binary pal files to iNES format with hexdump (on Linux, etc.):

Code: Select all

hexdump -ve '3/1 "%02X " "\n"' bin.pal > ines.pal
get nemulator
http://nemulator.com
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: iNES emulator by Marat Fayzullin

Post by tepples »

The palette consists of 64 lines, one for each value of $3Fxx. Each line is 3 hex bytes, case insensitive, separated by a space ($20), terminated by a UNIX newline ($0A) or CP/M newline ($0D $0A). A full 64-entry palette file is thus 576 bytes (UNIX) or 640 bytes (CP/M).

The above translated into Python (untested):

Code: Select all

#!/usr/bin/env python3
# By Damian Yerrick; license: WTFPL
with open("bisqwit.pal", "rb") as infp:
    p = infp.read(192)
p = bytearray(p)  # for compatibility with old Python where str is bytes
with open("bisqwit.ines.pal", "w") as outfp:
    outfp.writelines("%02X %02X %02X\n" % (p[i], p[i + 1], p[i + 2]) for i in range(0, 192, 3))
User avatar
Eugene.S
Posts: 310
Joined: Sat Apr 18, 2009 4:36 am
Location: Russia (UTC+3)
Contact:

Re: iNES emulator by Marat Fayzullin

Post by Eugene.S »

iNES 4.8 released.
- fixed triangle channel
- improved DPCM channel (but still need some work)
- added support of binary PAL files (iNES can remember last palette now)
- added classic 4:3 display aspect ratio
- fixed bug when 44kHz audio + 50 Hz video output was selected.
screenshot

Android-version updated to 4.8.1 as well.
Post Reply