USB CopyNES for Linux

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

USB CopyNES for Linux

Post by crade » Sat Apr 25, 2009 10:11 pm

Hello All,

I have released the beginings of copynesl, which is a program that uses Wookie's libcopynes library to interface with the USB CopyNES in a more portable way. In was of course written and tested on Linux. If someone could test it on other platforms for me, that would be great too! Windows has serious POSIX compliance issues, so it would probably not work as is on Windows.

I have tested it successfully with NROM and UNROM games, but MMC1 games have issues at the moment. Anyway, heres the info:

requires:
Wookie's libcopynes version 0.3 from http://www.linuxprogrammer.org/

release:
http://copynesl.googlecode.com/files/co ... 0.2.tar.gz
svn:
svn checkout http://copynesl.googlecode.com/svn/trunk/ copynesl-read-only

example usage:
(dump cart using plugin unrom with mapper 2 to contra.nes)
copynesl -d unrom.bin -m 2 -o contra.nes

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Sat Apr 25, 2009 11:24 pm

next release is out!
(ok I noticed the install for the manual was busted. Fixed now.)
http://copynesl.googlecode.com/files/co ... 2.1.tar.gz

User avatar
Wookie
Posts: 76
Joined: Sat Mar 01, 2008 5:06 pm
Location: Seattle, WA
Contact:

Post by Wookie » Sun Apr 26, 2009 8:06 am

I haven't looked at your code yet but did you wind up inverting the mirroring bit when writing out ines files? I've been dumping carts with my command line tool and carts that are listed as known to be vertical mirroring come back from the copynes with a horizontal mirroring bit value and vice versa.

This could be a bug in my libcopynes but it seems easy enough to just invert it.

User avatar
Wookie
Posts: 76
Joined: Sat Mar 01, 2008 5:06 pm
Location: Seattle, WA
Contact:

Post by Wookie » Sun Apr 26, 2009 8:07 am

good work BTW.

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Sun Apr 26, 2009 9:35 am

Hi wookie, you are right on the mirroring stuff.. I didn't invert it, but I should have.. I made the mistake of assuming the copynes gave me the mask in a format I could just dump into an iNES file :)
Latest version has MMC 1 support. I am going to start plowing through some carts to see if I can break it now.
(you can dl all versions from here:)
http://copynesl.googlecode.com

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Sun Apr 26, 2009 8:05 pm

The current version of copynesl appears to work well, and should be usable.
I have tested alot of different carts now, including mmc5 and action52, and I haven't been able to find a cart that wouldn't work properly.

Please let me know if anyone successfully uses it on any platforms other than linux (or. of course, if you have any problems) I am interested in fixing any portability issues, especially on POSIX compliant platforms like max OSX or solaris (I know there are tons of you who have been itching to use your sun servers for this!) :)

User avatar
Jon
Posts: 47
Joined: Fri Apr 03, 2009 10:55 pm
Contact:

Post by Jon » Sun Apr 26, 2009 9:16 pm

Man and I already sold off my Ultra 5. And my Sparc Classic doesn't have any USB ports. But seriously, I appreciate the work people do on getting CopyNES and other goodies working on Linux. I don't own a working Windows machine (I have this weird Atom-based eeeBox thing, but little works on it so I don't use it much)

User avatar
Wookie
Posts: 76
Joined: Sat Mar 01, 2008 5:06 pm
Location: Seattle, WA
Contact:

Post by Wookie » Mon Apr 27, 2009 3:13 pm

Crade,

I'm going to correct the mirroring bit inversion problem in libcopynes so that the values that are returned from the library are correct. Just a heads up.

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Mon Apr 27, 2009 4:12 pm

Ok, but it wasn't that the mirroring was reversed...
here is the code that works successfully that I used to create the iNES format mirroring from the one I grabbed from libcopynes

Code: Select all

#define CART_FOUR_SCREEN_VROM 8
copynes_read(cn, &copynes_mirroring_mask, 1, &t);         
/* mirroring bit is the same */         
ines_mirroring_mask |= (copynes_mirroring_mask & 0x01);        
if (copynes_mirroring_mask & 0x02) {  
   ines_mirroring_mask |= CART_FOUR_SCREEN_VROM;            
} 
The battery bit is added later during dumping if wram is found since the battery bit is unreliable. The trainer bit is not used.

User avatar
Wookie
Posts: 76
Joined: Sat Mar 01, 2008 5:06 pm
Location: Seattle, WA
Contact:

Post by Wookie » Tue Aug 04, 2009 10:06 am

FYI, the libcopynes project has switch over to mercurial and is now hosted on bitbucket.org here: http://www.bitbucket.org/wookie/libcopynes

(IMO, mercurial is easier to use that git, and it does pretty much the exact same thing.)

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Wed Aug 19, 2009 9:46 am

Hello all, copynesl has also moved to sit near libcopynes on bitbucket.
http://bitbucket.org/crade/copynesl/

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Wed Oct 14, 2009 9:36 pm

Hey guys,
In case anyone is using this, I just packaged a new release of copynesl.
Added support for format shifting to / from prg / chr / nes as well as some cleanup / fixes.
http://bitbucket.org/crade/copynesl/downloads/

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Thu Oct 15, 2009 2:11 am

Any chance of parallel port version?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
crade
Posts: 69
Joined: Thu Aug 03, 2006 2:31 pm

Post by crade » Thu Oct 15, 2009 6:33 am

Yeah, there is some chance. I think most of the code would be reusable, The communication with the copynes is all in wookie's libcopynes library, and I wouldn't mind making a parallel version of that but I fried my parallel port copynes somehow quite a while ago and I need to purchase a new host for it and migrate the chip before I could start looking into a parallel version.

User avatar
famitek
Posts: 9
Joined: Sun Nov 23, 2008 3:27 am

Post by famitek » Thu Oct 22, 2009 9:03 pm

I have been following this project, and I hope to try it out soon. Please keep up the good work!

Post Reply