Question on: Flashing memory for placement into SNES Cart

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
bazz
Posts: 476
Joined: Fri Sep 02, 2011 8:34 pm
Contact:

Question on: Flashing memory for placement into SNES Cart

Post by bazz »

Hello all,

long long time, it's been a couple years since my project I brought here a couple years ago:
http://4.bp.blogspot.com/-oiEzxCcY_3k/T ... G_0584.JPG

It was the GB Flasher to SNES prototype I was working on.

I'm a little older now, and more organized, less hackish, I want to potentially mass market a new SNES game. That's quite down the road though. Let me just ask my question.

I was going to buy a TSOP flash to DIP package that I will placing into a pre-existing SNES cart that I gutted the ROM from. I plan on getting the TSOP shipped with Mario World ROM or some SNES ROM (without emulator header).

My question is this: Is there anything that should be noted of the flash process? Is the ROM simply stored linearly into the flash chip? what about the ROM header, anything special with that? Or can I simply send a raw ROM to the gents and tell them to "throw that on there"

Thanks in advance,
Bazz

p.s. any insight at all helps!
User avatar
whicker
Posts: 228
Joined: Sun Dec 13, 2009 11:37 am
Location: Wisconsin

Re: Question on: Flashing memory for placement into SNES Car

Post by whicker »

You don't do anything with a header.
headers were for floppy disk copiers.

Let's say you have a 1 MB image you want to put onto a 1 MB NOR flash chip... The ROM image had better be exactly 1045876 bytes. That's why they're called ROM images, byte for every byte they're a 1:1 copy (an image).
User avatar
bazz
Posts: 476
Joined: Fri Sep 02, 2011 8:34 pm
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by bazz »

Excuse me, when I said header i meant that end of the ROM that depicts the ROM name, checksum, etc..
as in: http://romhack.wikia.com/wiki/SNES_header

but you are helping me clarify that it's probably just a linear smack of the bits into the flash chip. Is there any problems if i only flash 4mb or 16mb on a 32mb cartridge?? If that area of the ROM is not even going to get mapped to the SNES cart yet (address decoded) I think it will be fine.
User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: Question on: Flashing memory for placement into SNES Car

Post by mikejmoffitt »

bazz wrote:Excuse me, when I said header i meant that end of the ROM that depicts the ROM name, checksum, etc..
as in: http://romhack.wikia.com/wiki/SNES_header

but you are helping me clarify that it's probably just a linear smack of the bits into the flash chip. Is there any problems if i only flash 4mb or 16mb on a 32mb cartridge?? If that area of the ROM is not even going to get mapped to the SNES cart yet (address decoded) I think it will be fine.
In such a case you will want to mirror 4mb repeatedly until it fills 32mb. In other words 4mb copied 8 times sequentially. Or, 16mb copied twice to fill 32mb.
Markfrizb
Posts: 540
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: Question on: Flashing memory for placement into SNES Car

Post by Markfrizb »

mikejmoffitt wrote:
bazz wrote:Excuse me, when I said header i meant that end of the ROM that depicts the ROM name, checksum, etc..
as in: http://romhack.wikia.com/wiki/SNES_header

but you are helping me clarify that it's probably just a linear smack of the bits into the flash chip. Is there any problems if i only flash 4mb or 16mb on a 32mb cartridge?? If that area of the ROM is not even going to get mapped to the SNES cart yet (address decoded) I think it will be fine.
In such a case you will want to mirror 4mb repeatedly until it fills 32mb. In other words 4mb copied 8 times sequentially. Or, 16mb copied twice to fill 32mb.

Why? I have never understood this.... The game is only going to look for data in specific places, why fill data in places the Snes will never look at.... Please help me understand this.

Mark
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Question on: Flashing memory for placement into SNES Car

Post by qwertymodo »

If the upper address lines are left floating, they may lead to accesses intended for lower addresses to occur in higher addresses instead. Also, some games may have copier checks that will fail if the ROM is not mirrored. The alternative would be to ground the upper address pins, then you wouldn't need to mirror the ROM.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by tepples »

Never leave an address line floating. If you can't find a small enough flash chip, ground the upper address lines.

In the game itself, you could do what GBA games ended up doing: Just design the program to never look at the upper memory. For example, a 4 Mbit LoROM would look at only $008000-$0FFFFF or $808000-$80FFFF (for fast ROM). That's why, for example, most GBA games could still work after being "trimmed" to less than a power of two and put in a flash multicart. To be sure, put an emulator breakpoint on memory areas you're not using.
User avatar
whicker
Posts: 228
Joined: Sun Dec 13, 2009 11:37 am
Location: Wisconsin

Re: Question on: Flashing memory for placement into SNES Car

Post by whicker »

or, 3rd option:

load multiple games of the same fractional size on the bigger flash chip: if you have a 4 MB chip, load four 1 MB games in it.
Then use a selector switch or dip switches with pulldown resistors on the uppermost address lines to choose what game to play.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by blargg »

Floating lines can cause a chip to overheat or behave erratically. Always tie them low or high.
Markfrizb
Posts: 540
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: Question on: Flashing memory for placement into SNES Car

Post by Markfrizb »

Ah, I understand now. My game designs incorporate pull up/down resistors or solder pads.

Has anyone actually witnessed a floating address issue? I know the SRAMs are real picky about floating addresses but didn't realize that the flash roms would be too.

Love this forum!

Thanks
Mark
User avatar
infiniteneslives
Posts: 2102
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by infiniteneslives »

Markfrizb wrote:Has anyone actually witnessed a floating address issue?
I've seen it on several occasions, and not just with floating address pins. Any input that's not internally pulled up/down will cause issues for the chip.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: Question on: Flashing memory for placement into SNES Car

Post by mikejmoffitt »

blargg wrote:Floating lines can cause a chip to overheat or behave erratically. Always tie them low or high.
Does the Famicom have pullups or pulldowns on the data lines from the cart slot, or is having no cartridge in actually bad for it then?
User avatar
TmEE
Posts: 789
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by TmEE »

Untied lines toggle between high and low, and that will cause unneeded switching action in the chips which takes power, possibly lot more than normal operation. Power = heat.
User avatar
bazz
Posts: 476
Joined: Fri Sep 02, 2011 8:34 pm
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by bazz »

thanks for the replies guys. I definitely make sure to tie down my unused lines to Ground.
User avatar
infiniteneslives
Posts: 2102
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Question on: Flashing memory for placement into SNES Car

Post by infiniteneslives »

mikejmoffitt wrote:
blargg wrote:Floating lines can cause a chip to overheat or behave erratically. Always tie them low or high.
Does the Famicom have pullups or pulldowns on the data lines from the cart slot, or is having no cartridge in actually bad for it then?

Data lines are designed to be tri-stated by nature of being a bi-directional bus so I wouldn't imagine it's that big of a deal to leave them floating. Address lines and CMOS inputs are not designed to operate in that manner though.

But there's something to it I'd say since how Nintendo came up with an elaborate mechanism on the original SNES that wouldn't allow you to remove a cart without turning off the console first. That whole rig certainly wasn't cheap, so they must have seen some value in it.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
Post Reply