It is currently Tue Nov 21, 2017 3:27 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 564 posts ]  Go to page 1, 2, 3, 4, 5 ... 38  Next
Author Message
PostPosted: Sun Jun 26, 2011 11:02 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
Hey guys the recent topics of rom dumpers and dev cart programmers motivated me to complete a project I've been thinking about lately the "kazzo": http://sourceforge.jp/projects/unagi/wiki/kazzo_intro_en

It's a pretty nifty little device, with USB ability to dump carts and flash dev carts. It does it with only two chips and a few discrete components. I ended up using 3 chips so I could use through hole D flip-flops because they were what I had sitting around. Turned out to be a blessing though because for some reason the software uses CHR /A13 as an active high signal. Not sure if it was some sort of bug in the supporting software or what though because the schematics have it all labeled as active low. It was an easy fix though since my flip-flops had inverted outputs available, I just swapped the wire over from the Q to /Q. I used the atmega164P, it's possible this bug was fixed in the later surface mount atmega16 layout who knows.

I know, I know, it would have been a LOT easier to do a PCB or give myself a LOT more room to work with. But I happened to have this board left over from other projects and was pre-cut to the size you see. Once I saw all the parts could fit I couldn't resist. I get some sort of sick enjoyment out of slamming circuits into as small as possible spaces as I can. Consider it practice for the NESDEV cart prototype. It definitely requires a lot of planning on paper before touching the soldering iron. But it was a success, worked first dump with a UNROM, but I had to make the CHR /A13 bug fix before I could dump other carts. I've successfully dumped UNROM, CNROM, MMC1: SLROM, MMC3: TLROM, TKROM.

I tried to dump a MMC1 SEROM but wasn't successful. They haven't supplied "dumping files" for every board so if I can't find them looks like I'll have to write a few but it doesn't seem too complex.

I also haven't tried the battery ram back up or flash dev cart abilities yet, but I'm looking forward to playing around with those options a little more.

Oh yeah and I had some 2.50mm pitch (40 something) pin connectors sitting around so I was able to slice em in half (or so) and take the ben heck approach to the 72 pin connector works great!

Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 5:02 am 
Offline
User avatar

Joined: Wed Oct 15, 2008 11:50 am
Posts: 939
That's pretty awesome man :D Is that a spliced-up IDE cable you're using to wire everything together?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 6:48 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
qbradq wrote:
That's pretty awesome man :D Is that a spliced-up IDE cable you're using to wire everything together?


It's very similar, normal IDE cable is around a 24 gauge, and is really good for bigger projects. I stopped hacking up old wires awhile ago though and just buy it in bulk from digikey. Just search ribbon cable if your looking for some.

This wire is a lot finer at 30 gauge. It's trickier to deal with stripping/separating and all but good for stuff like this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 8:37 am 
Offline
User avatar

Joined: Thu Oct 21, 2004 4:02 pm
Posts: 210
Location: San Diego
Beautiful infinitelives, this is exactly the way I had imagined CopyCart working, and you've done it with less parts. This should be a very low cost device, and no need to rip parts out of an existing machine. I think that the feature set is good enough for this to replace CopyNES for most people. Well done!
How does the logic work with just the 8 bit D flip flop? Looks like you're using the output of that to provide about 20 or so signals to the cartridge. Could you explain how that works a little bit?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 9:42 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Pretty cool! I definitely want to build one of these too. Please share more information if you can! Like, what parts you used and how they're wired up.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 12:18 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
teaguecl wrote:
Beautiful infinitelives, this is exactly the way I had imagined CopyCart working, and you've done it with less parts. This should be a very low cost device, and no need to rip parts out of an existing machine. I think that the feature set is good enough for this to replace CopyNES for most people. Well done!
How does the logic work with just the 8 bit D flip flop? Looks like you're using the output of that to provide about 20 or so signals to the cartridge. Could you explain how that works a little bit?


Yeah it ended up being around $10.

The kazzo link and download has most of the info you need. The schematic is a little hard to read. Look at the readme.txt it has a better list of the pin outs. You'll have to convert to 72 pin layout though if you're going to the NES.

The plans call out for a surface mount tristate output octal Dflipflop. You don't need the tristate though because as you can see in the schematic /OE is tied to ground. So I used a pair of quad D flipflops. Mine have a clear available but it's not used. I didn't have tristate output because I didn't need it like I said. I did have the dual Q and /Q outputs though that I would recommend because of the bug I explained with the CHR /A13 signal being active high. You could get around this though if modified the code. I'll post up my specific schematics this evening for you all.

Basically though it ties both CHR and PRG data busses together and that is also fed into the 8 D flip flops. Then the AVR has an "AHL" signal that clocks the flipflops to latch onto the value on the data bus. The output of the 8 flipflops are then used for the upper address bits Combined: A8-A13, CHR /A13, and PRG A14. The lower address byte (A0-A7) of the PRG and CHR busses are tied together and driven directly from the AVR. And all the control signals are driven directly off the AVR (PRG /CE, M2, CIRAM etc.)

There are even a few extra unused pins on the dip packaged Atmega164. So you could use them for additional features if you had more signals for sound or add another D flipflop to acess the EXP pins if you had some auxiliary function that you were using them for on a dev cart or something.

I really like the ease of the USB interface, it's always been a thorn in my side to get something like this working with USB.

Like I brought up before, it looks like the greatest room for improvement on this is the script files that allow you to dump/program all the different mappers and board configurations. There may be more available somewhere, but I'm not seeing them at the moment. I've also yet to compile the GUI and try that out. It's pretty easy to run from the command prompt though.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 1:48 pm 
Offline
User avatar

Joined: Thu Oct 21, 2004 4:02 pm
Posts: 210
Location: San Diego
infiniteneslives wrote:
Like I brought up before, it looks like the greatest room for improvement on this is the script files that allow you to dump/program all the different mappers and board configurations. There may be more available somewhere, but I'm not seeing them at the moment. I've also yet to compile the GUI and try that out. It's pretty easy to run from the command prompt though.

I think the scripts you are referring to are the CopyNES plugins, which are in the copynes.zip file here:
http://kevtris.org/Projects/copynes/copyware.html


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 2:04 pm 
Offline
User avatar

Joined: Wed Oct 15, 2008 11:50 am
Posts: 939
This has inspired me to build a ROM burner using this method. It's a lot better than my usual approach of using a low pin-count MCU and shift registers.

Hrm... I wounder if I could come up with a cart that re-purposes some expansion pins so I could program the ROMs while still in the cart using something similar to this setup.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 3:35 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3484
Location: Indianapolis
Looks nice, MCUs sure are great. CopyNES is what I was thinking when I saw it, on the PC-side (or in the MCU?) you could emulate a 6502 to run the CopyNES plugins as a script in the "virtual machine". Then it would be cheap, and support everything, and sound fancy while doing it, heh.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 6:47 pm 
Offline

Joined: Wed May 04, 2011 2:41 pm
Posts: 421
Location: Montréal, Canada
I think you have a shot at DIY kit that many people would be interested in Infiniteneslives. If I were you, I would consider having a pcb made and sell it in your shop! I would definitly buy a pcb from you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 10:18 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
teaguecl wrote:
infiniteneslives wrote:
Like I brought up before, it looks like the greatest room for improvement on this is the script files that allow you to dump/program all the different mappers and board configurations. There may be more available somewhere, but I'm not seeing them at the moment. I've also yet to compile the GUI and try that out. It's pretty easy to run from the command prompt though.

I think the scripts you are referring to are the CopyNES plugins, which are in the copynes.zip file here:
http://kevtris.org/Projects/copynes/copyware.html


It's a little different animal than what the copy NES is running. Those scripts appear to be assembly written for the NES to dump the carts.

If you download the unagi client software from the bottom of the kazzo page you can see what I'm looking at. The dumping engine is the unagi software that gets ran on your PC. I'm running it in the command prompt and you need to supply it script files (.ad) for what type of MMC and board you're dumping. Here's an example of a generic MMC3 script that's provided:
Code:
board <- {
   mappernum = 4,
   cpu_romsize = 2 * mega, cpu_banksize = 0x2000,
   ppu_romsize = 2 * mega, ppu_banksize = 0x0400,
   ppu_ramfind = true, vram_mirrorfind = false
};

function cpu_dump(d, pagesize, banksize)
{
   for(local i = 0; i < pagesize - 2; i += 2){
      cpu_write(d, 0x8000, 6);
      cpu_write(d, 0x8001, i);
      cpu_write(d, 0x8000, 7);
      cpu_write(d, 0x8001, i | 1);
      cpu_read(d, 0x8000, banksize * 2);
   }
   cpu_read(d, 0xc000, banksize * 2);
}
function ppu_dump(d, pagesize, banksize)
{
   for(local i = 0; i < pagesize; i+=4){
      cpu_write(d, 0x8000, 2);
      cpu_write(d, 0x8001, i);
      cpu_write(d, 0x8000, 3);
      cpu_write(d, 0x8001, i | 1);
      cpu_write(d, 0x8000, 4);
      cpu_write(d, 0x8001, i | 2);
      cpu_write(d, 0x8000, 5);
      cpu_write(d, 0x8001, i | 3);
      ppu_read(d, 0x1000, banksize * 4);
   }
}


I don't have a copyNES but I'm thinking this may make things a lot easier to play around with. For starters the USB plans aren't proprietary...
It appears to me they've really made the whole USB interface really transparent and the helper functions they're written make it really easy to write your own scripts. It seems refreshingly simple way to do whatever you wanted with an NES or dev cart.



qbradq wrote:
Hrm... I wounder if I could come up with a cart that re-purposes some expansion pins so I could program the ROMs while still in the cart using something similar to this setup.


This is the kind of stuff I'm talking about. I think there may be plans for a kazzo flash cart I saw something about somewhere. Depending on what type of memory you're using I think you could get away without using any of the EXP pins. You definitely could with battery backed SRAM or flash, and EEPROM or UVEPROM would depend on whether or not you needed greater than 5V signals. What signal (chips) were you thinking you'd need the extra pins for?

Memblers wrote:
Looks nice, MCUs sure are great. CopyNES is what I was thinking when I saw it, on the PC-side (or in the MCU?) you could emulate a 6502 to run the CopyNES plugins as a script in the "virtual machine". Then it would be cheap, and support everything, and sound fancy while doing it, heh.


That would be really nice to see, a little above my head on emulating the 6502 at the time being. It would solve the issue of supporting everything, but it would seem easier to write more of the scripts than the emulator to me.

Here's a list of what's already supported FYI guys:
CNROM, UNROM, UOROM,
mmc1 SLROM
mmc3, mmc5
VRC4, 5, and 7

There may be more I just haven't realized or will see in the GUI. It was a little confusing to figure what was going on between the unagi and anago softwares and the language barrier didn't help much.

SkinnyV wrote:
I think you have a shot at DIY kit that many people would be interested in Infiniteneslives. If I were you, I would consider having a pcb made and sell it in your shop! I would definitly buy a pcb from you.


I might consider it. If there was enough interest I may draw up my own boards and make a small order. there's too many crossing connectors for me to easily etch my own single sided PCB that would be friendly that's why I just used protoboard.

Is there a lot of interest in a kit that included all the components? If so I may consider putting a kit together with everything needed:

*Atmega164PA I would flash the kazzo firmware onto it for you (that way you don't have a need to buy your own AVR programmer)
*72 pin connector 2.50mm pitch - wrong pitch but I've fully tested them to work and discussed it in the related post.
*6ft USB cable
*discrete components (resistors, zeners, cap and resonator)
*2x quad flip-flops
*3"x4" protoboard (about twice the size of what I used)
*interconnecting wireing similar to IDE cable style
*optional IC socket strips for the MCU (as seen in my picture)
*optional male header for flashing the MCU

Going out and buying everything on your own would easily be over $20 plus shipping. You'd also have to invest in an AVR programmer if you don't have one already.

I think I could do the kit for around $30 shipped. If people would rather buy it all themselves I can put a detailed supplier list together. My goal isn't to make money off the deal, I would really like to see more of these out there so we can work on things like the scripts and other things sharing all the code with eachother. I know a lot of you have copyNES though, so I really don't know how much interest there would be for this stuff.

As far as protoboard vs. printed circuit board goes there are pros/cons:

protoboard- quick availability of kits but more difficult to assemble and cheap. With protoboard and a detailed assembly insturctions I could have kits available in a couple weeks. Here's the protoboard I'm looking at: http://www.radioshack.com/product/index.jsp?productId=2103800# the extended traces would make soldering 3-4 wires to a single pin much easier.

printed circuit board - long turn around time, potentially expensive, easy to assemble. We'd be looking at more like the end of the summer to for me to beable to ship these at a low cost that is still around $10 compared to the $3 protoboard.

This is really all up to you guys. If there's something I can do to help those without the skills of finding all the right parts and flashing an MCU, I'm more than willing to help.

Side note:
There appears to be a PCB rev 2 that includes 72 pin connector and a smaller MCU with more D flipflops seen and linked below. I'm not sure if they're available somewhere or if the board cad files are available.

http://sourceforge.jp/projects/unagi/wiki/pcb2.1_place_ja

[Wide picture]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 10:45 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
Sorry for the double post but I wanted to deliver what I had for pinouts and board layout:

Here's the pinouts of all the chips I used. I stole the Atmega164 pinout from the readme.txt in the kazzo.zip download from the site. You have to convert things from FC to NES but it's pretty simple (VIRAM to CIRAM etc...) Note the chips are top view and 72 pin is bottom view so pay attention if you're using this to solder up your own
Image

EDIT: I also made the change to the pinout for the CHR /A13 bug, and there's an arrow showing the change below.

Before I build anything with protoboard I draw everything out on graphing paper including exact size of my PCB and everything. If you do this be sure to do it all as a bottom view because that's where you're soldering...
Image

If enough people ask me for kits, I'll put together a better assembly document along with things to check along the assembly process to make sure you don't mess anything up badly enough to let magic smoke out.

Hopefully this helps make sense of how I put it together. Let me know if you're confused about anything.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 11:43 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3484
Location: Indianapolis
qbradq wrote:
Hrm... I wounder if I could come up with a cart that re-purposes some expansion pins so I could program the ROMs while still in the cart using something similar to this setup.


Look in this thread, something like that is standardized already on EXP0.
http://nesdev.com/bbs/viewtopic.php?t=7313
If it's high, writes at $8000+ go to mapper, if it's low, mapper writes are disabled and writes go to the memory chip. I made a UNROM flash cart that requires that for rewriting, I believe the PowerPak-Lite might use that too but I haven't checked.

My custom mappers put the registers at $5xxx to avoid that whole issue (for rewriting without extra hardware).

infinite: All the CopyNES sources in 6502 and QBASIC (and a drawn schematic) are available on kevtris' site, Retrozone's USB version is sorta just a clone version. Parallel ports suck though, in practice, heheh.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2011 11:55 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1925
Location: WhereverIparkIt, USA
Memblers wrote:

infinite: All the CopyNES sources in 6502 and QBASIC (and a drawn schematic) are available on kevtris' site, Retrozone's USB version is sorta just a clone version. Parallel ports suck though, in practice, heheh.


Yeah I've seen that stuff, but I was just trying to say the 6502 assembly and QBASIC doesn't directly port over to the scripts needed for the Kazzo like I though people may have been implying.

I thought about doing the parallel CopyNES but decided not to after not getting a reply from Kevin and deciding I didn't want to play around with the parallel ports.

I was about to break down and buy the USB version but had a hardspot with the price and not being able to play around with the source code myself. I would have liked to be able to buy a kit and assemble everything myself as well.

The kazzo has been everything and more than I was hoping to solve these issues including the joy of making it myself :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2011 9:41 am 
Offline

Joined: Wed May 04, 2011 2:41 pm
Posts: 421
Location: Montréal, Canada
My main interested is the PCB, but depending on the price I would also buy a full kit with component to save hassle. But the most important for me is the PCB as it is usualy the only stuff hard to produce for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 564 posts ]  Go to page 1, 2, 3, 4, 5 ... 38  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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