It is currently Thu Sep 19, 2019 3:53 pm

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: flash cart development
PostPosted: Wed Oct 22, 2008 12:04 pm 
Offline

Joined: Tue Jan 04, 2005 7:31 am
Posts: 35
hi everyone..

a short preface ...

for years I've been interested in console programming. Poked around
here and there on different platforms sometimes I didn't go much
further than just some silly text scrolly and sometimes i spent some more
time. The SNES however remains close to my heart hehe ;--)

Now while I can get along on the software side of things I just suck
with hardware and electronics. Nevertheless I've always wanted to
build my own snes devcart. Apparently a lot of people have gained
a lot of knowledge and understanding on this topic and I was hoping
to pick your guys brains for a bit on this matter ..

Warning : This posting could get pretty long :)

What I wish for ..

... is a snes flash cart that allows for quick test cycles and ..

1. does NOT use the parallel port but serial or ethernet or..
2. allows for communication with the PC at runtime (small overhead)
3. lets me reset the SNES from the PC

What I don't care about ..

1. I don't care about commercial game compatibility
2. It doesn't have to be massive in ROM size (no need for 64mbit)
3. I don't really care if it is LoROM or HiROM


My limited perspective ...

So as I said before I am not into hardware/electronics stuff, still
I am hoping to get a somewhat clearer understanding of how
a hardware solution with the aims I laid out above would/should be
approached/implemented.

First things first.. downloaded code needs to be stored somewhere.
So instead of the ROMs used on SNES carts one needs to use
EEPROMs. Furthermore I assume these have to be pin-compatible
in order to remain compatible to the snes addressing logic - right? OK.
As I understand it various such EEPROMs are available which are
suited for this.

So the code will be stored on and run from those EEPROMs but it
needs to get there somehow. As I mentioned in my wish list I really
want to stay away from using a parallel-port. Nowadays computers
just don't come with 'em anymore and especially my laptop which I
use most of the time lacks one. I would not mind serial because
serial<->USB adapters work just fine. (Considering that nowadays
there are chips doing all the TCP-mambo-jumbo in hardware for you
I wouldn't mind ethernet either... ;])

Through my job i've gathered some experience in programming
AVR micro-controllers from ATMEL. So I thought one of those 8bit
AVRs would be just fine to handle communication with the PC side
and writing of EEPROM data. Does that make any sense ?

So the dev-cart would have a serial port which is connected to the PC
and the on-board UART of the AVR. The AVR is connected to the
EEPROM -- I don't know how the EEPROMs in question would
be accessed from an AVR. Certainly not as comfortable as accessing
some i2C-interfacable-EEPROM but I am sure it can be managed (?).

Now as for communication between SNES and PC at runtime.. That's
somewhat beyond me. I think I'd have to fiddle with the snes memory
addressing scheme and map some memory area to .. say pins
on my AVR. How exactly would this be achieved? I have no idea...
Someone please enlighten me!

Being able to reset the SNES from PC prett much falls under the same
category and is just a matter of connecting an output pin of the AVR
to the RES signal of the cart I assume.

So that's it for now. It would be very nice to get some feedback
and help. Maybe there are others that are interested in building
a dev cart but don't quite know how. Maybe they could profit from
this thread as well. I wish there was something like "Everything
you always wanted to know about building a snes dev cart but
where afraid to ask" .. or "snes dev cart building for dummies" :)

thanks for reading this far..
-gilligan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 7:02 am 
Offline

Joined: Sat Sep 20, 2008 8:50 pm
Posts: 57
Location: Canada
Well you arn't going to get very far without any electronics experience :(

For rapid development, SRAM would be the best. A single 1MB chip would work perfectly

Since it needs to be powered to hold data, leaving it in the SNES would be perfect. You can hold the system in reset while it is programming using a pin on the cart, and you can insert a buffer so you can isolate the RAM from the SNES bus

Now to get the data to the cart you don't even need a micro, and serial ports are a pain in the arse. Using a FT245R chip and a CPLD you just need a state machine to read from the USB chip and it should have enough pins to access the RAM.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 2:59 pm 
Offline

Joined: Tue Jan 04, 2005 7:31 am
Posts: 35
cybertron wrote:
Well you arn't going to get very far without any electronics experience :(

For rapid development, SRAM would be the best. A single 1MB chip would work perfectly

Since it needs to be powered to hold data, leaving it in the SNES would be perfect. You can hold the system in reset while it is programming using a pin on the cart, and you can insert a buffer so you can isolate the RAM from the SNES bus

Now to get the data to the cart you don't even need a micro, and serial ports are a pain in the arse. Using a FT245R chip and a CPLD you just need a state machine to read from the USB chip and it should have enough pins to access the RAM.


I see.

Indeed SRAM would suite me just fine.

And i've had a look at the datasheet of the FT245R - quite
nice. As for a micro I guess I really would not need it, but
on the other hand I at least know how to use that one hehe.

Of course i'd be totally lost will all of this if I attempted doing
this on my own. I do know some people that know about
electronics, they know nothing about snes/videogames tho hehe.

Maybe I shouldn't even get into this as it might be beyond me
anyhow but.. how could I go about say mapping some pins of
a micro (if I was indeed using one) to some unused address range
(around $21c0 or so) on the B-bus ? (or CPLD pins if not micro ..)

_________________
gilligan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 4:05 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3725
Location: Indianapolis
Hey gilligan, it's been a while. :)

Sounds like what you want is much like my Squeedo, but for SNES. I didn't care about compatibility with existing stuff, just a nice dev system with no plugs or sockets to mess with.

I'll tell you right off though, the best way (unless the hardware is what you're wanting to do) is just to plop down maybe $200-$400 for an 8-bit EPROM emulator. That will take care of points 1 and 3. It may be a big purchase, but you could very easily spend more than that by developing a devcart. Usually (at least mine does), there will be a reset line you could wire up to the CPU.

Point 2 could be accomplished with the controller port to RS232 (or a USB one). I remember it being a huge pain in the ass to get the timing to work for that, but I can almost swear that I've heard of someone else (blargg?) managing to make it work. If not, I'm sure it wouldn't be too hard to make an synchronous-to-async adapter with a microcontroller on the controller port.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 4:32 pm 
Offline

Joined: Tue Jan 04, 2005 7:31 am
Posts: 35
Memblers wrote:
Hey gilligan, it's been a while. :)

Sounds like what you want is much like my Squeedo, but for SNES. I didn't care about compatibility with existing stuff, just a nice dev system with no plugs or sockets to mess with.

I'll tell you right off though, the best way (unless the hardware is what you're wanting to do) is just to plop down maybe $200-$400 for an 8-bit EPROM emulator. That will take care of points 1 and 3. It may be a big purchase, but you could very easily spend more than that by developing a devcart. Usually (at least mine does), there will be a reset line you could wire up to the CPU.

Point 2 could be accomplished with the controller port to RS232 (or a USB one). I remember it being a huge pain in the ass to get the timing to work for that, but I can almost swear that I've heard of someone else (blargg?) managing to make it work. If not, I'm sure it wouldn't be too hard to make an synchronous-to-async adapter with a microcontroller on the controller port.


Hey memblers! I was hoping to hear from you in this thread sooner
or later :)

I still have that joypad-to-serial adapter cable from you here somewhere.
For some reason I never got that to work.. maybe I was just too dull or
.. I dunno :) at least on the paper my timing seemed to be alright hehe

EEPROM emulator.. Hm.. valid point I guess. Could you make any
suggestions for a specific item ? Then I can check what the price
is like and if I can maybe spot something on ebay.. Which one do you
have ?

_________________
gilligan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 7:21 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3725
Location: Indianapolis
Yeah, the timing I had working on NES and an SNES clone, but it wouldn't work on a real SNES no matter what I tried.

My ROM emulator is a "TurboROM" from 1993 or so, made by Parallax. Long out of production. I did a google search just now and found this one: http://www.eetools.com/index.cfm?fuseaction=product.display&Product_ID=9, which looked pretty decent (it's $300). It does up to 1024kB.

For NES it seems like you might need to add resistors on the datalines, but my ROM emu worked OK when I borrowed an SNES dev cart (as far as I could tell).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 25, 2008 3:46 am 
Offline

Joined: Tue Jan 04, 2005 7:31 am
Posts: 35
Memblers wrote:
Yeah, the timing I had working on NES and an SNES clone, but it wouldn't work on a real SNES no matter what I tried.

My ROM emulator is a "TurboROM" from 1993 or so, made by Parallax. Long out of production. I did a google search just now and found this one: http://www.eetools.com/index.cfm?fuseaction=product.display&Product_ID=9, which looked pretty decent (it's $300). It does up to 1024kB.

For NES it seems like you might need to add resistors on the datalines, but my ROM emu worked OK when I borrowed an SNES dev cart (as far as I could tell).


I came across that eetools website as well. $300 ain't exactly cheap x_X
and no mention of linux support which is a must-have in my case.

Weird also that I cannot find a single EEPROM Emulator on ebay. Is that
so obscure an item nowadays? :)

Hm.. I wish there was some electronics nerd like kevtris working
on something like CopySNES .. *sigh* ;)

_________________
gilligan


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 25, 2008 1:40 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1668
ROM emulators always were obscure items. Really to make your own wouldn't cost you very much, the only significant cost would be the PCB. But if you do make your own, you can tailor it to the SNES, or generic ROM, or both. I have designed some (not built) as exercises in the past, and for a simple single 8-bit ROM emulator you could get by on $3 of logic, paired with a <=$40 PCB, and <=$3 parallel port connector, <=$2 CR2032 cell, <$1 analog to build one from $50 of parts before the SRAM.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 25, 2008 4:25 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3725
Location: Indianapolis
Yeah, I got my EPROM emulator off of ebay and they very rarely turn up on there (I had a saved search on there for a long time). I didn't know how to design/build stuff at the time, all the info available was for a 32kB one and the ones for sale were generally overly complex ones at way higher cost. I paid $200, but was able to just get it and go.

I doubt you'll find any of them with linux support. I'd bet a USB one uses an FT2xx chip, which I'd imagine has linux drivers if the protocol could be figured out.

kyuusaku: Good point, but for someone who isn't familiar with PCB design, there is a learning curve to overcome with whatever software is used. Depending on goals and value of time, you could also wire one up by hand. I forgot that there are places where you can order 1 PCB, I'm more used to the ~$100 setup/shipping fee for production - I never made a one-off.

Another little annoyance is the lack of available IDC-to-DIP32 adapters. Anyone found any? I can find DIP28 and DIP40 adapters all day long. So that requires some cutting and gluing.

Then not wanting to do parallel port (which I've had so much trouble with myself, I've grown to loathe it), means doing serial, a MAX202 will do the trick. USB will need surface-mount parts, might not want that. With manual control of enough output lines from the PC, maybe one can get by without a microcontroller.

I think 512kB is the biggest SRAM you can get in through-hole. So if you don't want SMT you can use as many of those as you want, saving on wiring/board-space you could even stack them and wire up the extra address line(s).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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