It is currently Fri Nov 17, 2017 8:00 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Dec 22, 2016 10:21 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
You can convert binary pal files to iNES format with hexdump (on Linux, etc.):

Code:
hexdump -ve '3/1 "%02X " "\n"' bin.pal > ines.pal

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
PostPosted: Thu Dec 22, 2016 11:16 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19221
Location: NE Indiana, USA (NTSC)
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:
#!/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))


Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 6:52 am 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 259
Location: Russia
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group