It is currently Sat Oct 21, 2017 8:00 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat May 04, 2013 1:24 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
I'm looking to build an SNES cart reader powered by a Teensy++ 2.0 board, and I'm trying to figure out which of the cart pins are actually necessary/useful for this purpose, as I don't have enough I/O pins for every cart pin. For instance, since I just want to read/write to the cart directly, I don't think I have any need for the IRQ signal (pin 18). Or the stereo audio output pins, I have no use for those. The SNES cart has 58 I/O signals , and the Teensy++ has a maximum of 47 I/O pins, though it would be nice if I didn't have to use them all, since some of them are wired up for specific purposes. So I'm trying to figure out which signals I don't need to connect if I'm just concerned with reading/writing to the cart (maybe the expansion bus as well). If nothing else, I can always break out the full 62 pins to a standard IDC header so I can tap into any additional lines later. Anyway, this is the list of what I *think* I can omit, feel free to comment if I actually need these or if there are others I could leave off as well.

Pin 1 - 21.477MHz Clock
Pin 18 - /IRQ
Pin 24 - CIC Data Out (p1)
Pin 25 - CIC Data In (p7)
Pin 31 - Left Audio
Pin 55 - CIC Data Out (p2)
Pin 56 - CIC Clock (p6)
Pin 57 - CPU Clock
Pin 62 - Right Audio

That leaves me with 49 I/O's. I could maybe add in a pair of 8-bit latches for, say the upper 8 bits of the address bus and the 8-bit expansion address bus, which would get me down to 42, which is totally doable. Any thoughts?


Top
 Profile  
 
PostPosted: Sat May 04, 2013 1:53 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
A Super NES Game Pak can have a a 62-pin connector with extra sets of pins at the sides (1-4, 28-35, 59-62) or a 46-pin connector with only the long row of pins in the middle. The majority of Game Paks have either no coprocessor or an ordinary DSP, and these use the 46-pin connector. Are you intending to include compatibility with the coprocessors used in Super Game Boy, Super FX, and SA-1 games? If not, you can leave the side pins off. Leave the power, ground, and CIC pins out, and you're down to 40 or fewer.


Top
 Profile  
 
PostPosted: Sat May 04, 2013 2:02 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
I'll be using a connector off an old broken SNES, so I'll have access to the expansion pins, I figured I might as well connect them to something. Do I need the /WRAM signal (pin 32)? IIRC, WRAM is on the console, not the cart, right? From the documentation I've read, the /WRAM signal just indicates that a WRAM access is using the A bus, so my setup won't ever need that signal, right?


Top
 Profile  
 
PostPosted: Sat May 04, 2013 2:48 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
I'm not sure what the /WRAM signal means in the Super NES, and wiki.superfamicom.org appears unspecific: "/CART and /WRAM are the two auxiliary lines." But at least on the NES, the name "WRAM" was used for "work RAM" in a Game Pak mapped at $6000-7FFF (more commonly called PRG RAM nowadays). Actual work RAM is far less needed on the Super NES than it was on the NES because internal RAM is 64 times as big as it was on the NES. But Super NES Game Paks often have battery-backed RAM at $xx6000-$xx7FFF or at $700000-$7DFFFF for saved games, and boards with the expansion pins may use /WRAM to decode addresses like those.


Top
 Profile  
 
PostPosted: Sat May 04, 2013 3:07 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6293
Location: Seattle
Nocash says that /WRAM and /CART are
nocash wrote:
/WRAMSEL - Work RAM select (00-3F,80-BF:0000-1FFF, 7E-7F:0000-FFFF)
/ROMSEL - Cart ROM select (00-3F,80-BF:8000-FFFF, 40-7D,C0-FF:0000-FFFF)


Top
 Profile  
 
PostPosted: Sat May 04, 2013 3:21 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
So /WRAMSEL lets coprocessors snoop on CPU writes to the console's internal RAM; you can probably just pull this up to +5V. /ROMSEL aka /CART, on the other hand, is essential to the ROM decoder on the PCB.


Top
 Profile  
 
PostPosted: Sat May 04, 2013 4:13 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
I think you can get away with A0-A23, D0-D7, /RD, /WR, /CART for virtually all carts. That comes to 35. Reset could be an RC if you don't have an I/O pin.


Top
 Profile  
 
PostPosted: Sat May 04, 2013 6:28 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
Do I actually need to connect /CART to an I/O or can I just pull it low, since I will always be addressing the cart? Also, if I do hook up the expansion pins, are PA0-PA7, /PARD, /PAWR, EXPAND, and REFRESH(??) sufficient? That's another 11 or 12 pins, depending on whether or not I need REFRESH, but if I use latches for A16-23/PA0-7, I'm still within my pinout limitation...


Top
 Profile  
 
PostPosted: Sat May 04, 2013 7:02 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
/CART should be low if and only if the entire address (A23-A0) is valid, or at least if A23-A15 is valid.

Things that use the expansion pins probably rely on the 21.5 MHz clock signal. How is the Teensy++ itself clocked?


Top
 Profile  
 
PostPosted: Sat May 04, 2013 7:34 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
If I need the 21MHz clock signal, I can put an oscillator on the board I'm making, that's not an issue. I'm just working out the cart<->Teensy connections.


Top
 Profile  
 
PostPosted: Sun May 05, 2013 2:13 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1905
Location: WhereverIparkIt, USA
qwertymodo wrote:
Do I actually need to connect /CART to an I/O or can I just pull it low, since I will always be addressing the cart?


What's your goal? Are you looking to dump carts and saves? If you want to dump battery ram on HiROM carts you'll need to set /ROMSEL high to access battery ram (what I assume you're calling /CART).

It's really pretty clean to put some 74HC374 flipflops on there for expansion on the upper address bit lines. If you're dumping in sequential byte access (not random access) it really won't even slow you down. It's kind of a waste to suck up all those pins for upper address lines if you think you might be able to make use of those pins in the future. I'd say have A7-0 directly connected, and A15-8, A23-16, behind 8x flipflops. It's actually less PCB routing as well.

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Sun May 05, 2013 5:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
N64 and GBA cart bus protocols put most of the address bus behind binary counters.


Top
 Profile  
 
PostPosted: Sun May 05, 2013 11:00 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
infiniteneslives wrote:
What's your goal? Are you looking to dump carts and saves? If you want to dump battery ram on HiROM carts you'll need to set /ROMSEL high to access battery ram (what I assume you're calling /CART).

It's really pretty clean to put some 74HC374 flipflops on there for expansion on the upper address bit lines. If you're dumping in sequential byte access (not random access) it really won't even slow you down. It's kind of a waste to suck up all those pins for upper address lines if you think you might be able to make use of those pins in the future. I'd say have A7-0 directly connected, and A15-8, A23-16, behind 8x flipflops. It's actually less PCB routing as well.


Mostly, yeah I'm wanting to dump carts and read/write saves. Eventually, I'm hoping to finish up my from-scratch dev cart PCB (not a "real" flashcart, just a 1A3M/1J3M clone with a flash ROM onboard instead of donor carts), and I'd like to use this for flashing ROMs to it. Correct me if I'm wrong, but I believe I should be able to connect the flash ROM /WE line to the cart /WR line without issue, because flash ROMs require specific commands before they actually begin writing anything.

I'm using this pinout for my signal names: http://www.caitsith2.net/snes/flashcart ... nouts.html

Using FF's/latches for A23-16/A15-8 sounds good. How does the expansion bus work, is it just an 8-bit address, or is it combined with the normal address bus? I don't really care are about leaving spare pins, I just want to avoid using the pins that are intended for specific purposes (like the secondary clock inputs, or the bootloader enable pin) if possible, and it would also be nice to avoid the port that's broken out to a 2x4 header in the middle of the board, instead of the DIP rows on the edge of the board (PORTA). However, the Teensy++ has a crapload of I/O pins, so I may as well use them, no need to be stingy.

EDIT: Do these look like they'd work in place of the HC374? From the datasheet, it supports 5V Vcc, the output voltages look compatible with CMOS logic levels (Voh 4.0V min, Vol 0.25V max), and on one of the other 74*574 parts (though not on this one, not sure why, I'd think it would be true across all of the '574 lines), the descriptions said that the 74*374 and the 74*574 are functionally identical, with different pinouts.


Top
 Profile  
 
PostPosted: Mon May 06, 2013 11:14 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1905
Location: WhereverIparkIt, USA
Not only does the flash require a specific command sequence, but it also requires /CE low and /OE high. The game shouldn't really be trying to write to ROM anyways. So you've got several means of write protection, you should be fine to connect it directly.

Yeah any D-flipflop should work. The pinout of the '574 is a little nicer to deal with for PCB routing purposes. I'd be surprised to see any issues with Voh/Vol. The Voh/Vol for most parts will satisfy the Vih/Vil of the part it's driving, there may be an exception but I've yet to find it...

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Mon May 20, 2013 4:12 pm 
Offline

Joined: Mon Jul 02, 2012 7:46 am
Posts: 759
How's this look? I have every pin on the cart edge connected except /IRQ (18), REFRESH (33), CPUCLK(57) and the CIC lines. I have all of the pins broken out to a 2x31x0.1" header, just in case I ever need to tap into the pins for something. I have footprints for a 741GX04 clock generator and a crystal, to generate the 21.47727MHz signal, and a 3.5mm headphone jack connected to the L/R audio pins. I also added a Pickit header for programming SuperCICs on-board (Vpp on the PIC doesn't connect to a cart pin, so I left a pad for it and I can use a jumper wire for that 1 pin.

Image


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot], melanokardios and 13 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