It is currently Thu Oct 19, 2017 4:55 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Jul 03, 2013 3:06 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
Hello,

I am planning on designing on a flash programmer. My only experience with this level of digital electronics was when I built the official GB Flasher, which actually uses an FTDI chip to do serial communications UART over USB to the micro controller.

I heard about those native USB microcontrollers out, the AT90USBxxx devices. What I was wondering is, would I want to investigate more into this device or some different way of flashing a memory chip? Are there any different ways besides serially? Or should I just stick to the FTDI method. Either way, I have to learn entirely about the method.

Moving on, one of my gripes with the flashing of the memory is how long it takes to do so. Is the FTDI and baud rate responsible for such slow operation? I'm talking, not out of my ass, but a little outside my knowledge. Either way, I am keen on finding a faster method of flashing the memory, I just hope it is not outside the scope of my time and learning.

Thanks for the help dudes,
anything works, appreciate it!


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:00 pm 
Offline
User avatar

Joined: Wed Oct 15, 2008 11:50 am
Posts: 939
This should probably go in the hardware forum. There's a lot of folks here that can help you more than I, but here's a few points:

1. Flash takes a long time to overwrite due to the speed of the memory, communication port shouldn't be your bottleneck.
2. AVR micro controllers with USB support are teh bomba. You should check them out.
3. If you want to workbench something without a lot of soldering, check into the Arduino (SparkFun has a wide selection). It's an AVR micro controller hooked up to, powered by and programmable through a USB port, and has tons of I/O pins attached to pin headers. Many folks (myself included) have made chip programmers with nothing more than an Arduino, a few shift registers and a breadboard. In fact, there's not much you can't do with those parts ;)


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:13 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
Ok, well I want to cover 2 things :

1) I was originally designing a plan for designing an Eprom Emulator for a SNES cart. It would use SRAM. Now I have the following question on that:

If I had an SRAM chip the same specifications as a flash chip. Would it still program faster? The reason I ask is because I was planning on designing an Eprom Emulator for when I do real design of a snes game. Using the emulator would allow me to never have to unplug the game from the SNES. I'm getting a little more into design, but I was wondering if people were saying about Eprom Emulators that they save time only because of not having to unplug the flash rom to program it. is it actually also faster in itself to send the same bits to SRAM? I am asking in the case of the chip being the same speed in ns as the flash chip. However, I am of course also aware that SRAM chips appear to be available at much higher speeds than what I see for flash (in what, the 1 time I searched. I believe I have plans with a 20ns chip(s)) Either way, it's most definitely going to be faster since I plan to design it to be able to stay in a powered SNES even when re-programming, using the Soft-Reset capabilities of SNES (something I vaguely studied here on nesdev forums, about grounding the reset pin on SNES cart).

2) The answer to #1 will help me answer #2.. If I cannot hope to find satisfactory / near instantaneous times with the SRAM chip, I wonder what other mediums are available to me?

I must also take note that the size of the ROM to upload has a positive effect on this. With a game like SMW being 4Mbit, I imagine how could I make my own game bigger than that. And in that case, what would that load time be?? The answer to that question, if unsatisfactory, would mean I definitely want a faster approach. But if load times for 4Mb are satisfactory, perhaps I could put up with it.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:15 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
qbradq wrote:
This should probably go in the hardware forum. There's a lot of folks here that can help you more than I, but here's a few points:

1. Flash takes a long time to overwrite due to the speed of the memory, communication port shouldn't be your bottleneck.
2. AVR micro controllers with USB support are teh bomba. You should check them out.
3. If you want to workbench something without a lot of soldering, check into the Arduino (SparkFun has a wide selection). It's an AVR micro controller hooked up to, powered by and programmable through a USB port, and has tons of I/O pins attached to pin headers. Many folks (myself included) have made chip programmers with nothing more than an Arduino, a few shift registers and a breadboard. In fact, there's not much you can't do with those parts ;)


My issue with Arduino were the lack of I/O. I don't know anything about shift registers, except for the fact you use it to expand your i/o?

My other reason is that I would have to purchase lots of break-out-boards or sockets, ne?
They are expensive, and until I have a job, that is kind of screwing with me.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6283
Location: Seattle
It takes a certain amount of time to "burn" the bits into the 'PROM. Here's some examples:
  • Atmel's AT28C64 : 8.2s (1ms/byte × 8192 bytes)
  • Catalyst's CAT28C64 : 1.3s (5ms/page × 256 pages of 32 bytes).
  • Atmel's AT28C040 : 20.5s (10ms/page × 2048 pages of 256 bytes)
  • Microchip/SST's SST39SF040 : 8s (per the datasheet) to 10.5s (100ms/erase + 20µs/byte × 528244 bytes)

bazz wrote:
If I had an SRAM chip the same specifications as a flash chip. Would it still program faster? [...] Is it actually also faster in itself to send the same bits to SRAM?
Yes, but in practice you will be spending much more of your time iterating than waiting for the 'PROM to absorb the data.
Quote:
However, I am of course also aware that SRAM chips appear to be available at much higher speeds than what I see for flash (in what, the 1 time I searched. I believe I have plans with a 20ns chip(s))
20ns is overkill. For the SNES, you won't need to buy anything faster than 140ns.
bazz wrote:
If I cannot hope to find satisfactory / near instantaneous times with the SRAM chip, I wonder what other mediums are available to me?
FLASH and EEPROM, as you surmised. New old stock DRAMs, if you can find fast enough and 5V-tolerant ones and are willing to add some simple circuitry to add hidden refresh. and UVEPROMs.
Quote:
I must also take note that the size of the ROM to upload has a positive effect on this. With a game like SMW being 4Mbit, I imagine how could I make my own game bigger than that. And in that case, what would that load time be?
EEPROMs (and SRAMs) bigger than 512KB (4Mb) are no longer available at 5V (i.e. SNES voltage) For anything larger, you'll either need to gang multiple PROMs together, or to use voltage shifters. Either way, you should get your feet wet before you reach for something larger.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:38 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
bazz wrote:
If I had an SRAM chip the same specifications as a flash chip. Would it still program faster?

In theory, SRAM and PSRAM* program as fast as the CPU can access it. In practice, you're limited by the speed of the serial link between the EPROM emulator and the host computer. That can be fast if you use Hi-Speed USB, but not if you're trying to get in through controller port 2.

* PSRAM, or pseudo-static RAM, is DRAM with its own refresh circuit to make it appear as SRAM to the rest of the system.

Quote:
I must also take note that the size of the ROM to upload has a positive effect on this. With a game like SMW being 4Mbit, I imagine how could I make my own game bigger than that. And in that case, what would that load time be??

The speed depends on how you plan to connect the EPROM emulator to the computer and to the memory: whether it's a device that sits on the A bus, a device that sits on the B bus, or a device that takes the memory off the bus entirely. The PowerPak Lite for NES, for example, is an SRAM cartridge that uses the CopyNES, an A bus peripheral soldered into the NES, to transfer information over a cable.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:44 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
I have a lot to learn. Since the most important thing to me now is the transmission from computer to memory device, tepples, you mentioned that if I used a high-speed usb transmission. What could I use to achieve such high speeds? The current 2 possibilities I have chosen to flirt with are FTDI FT232R, and AT90USB series micro controllers.

I do not yet know enough to derive the best solution.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:46 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
lidnariq wrote:
20ns is overkill. For the SNES, you won't need to buy anything faster than 140ns.


Well, I thought it would necessary for fast pc->sram r/w, but please do correct me if I am wrong. I will have to see.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 6:51 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6283
Location: Seattle
bazz wrote:
Well, I thought it would necessary for fast pc->sram r/w, but please do correct me if I am wrong. I will have to see.

Doing the math: 140ns × 524288 bytes = 73ms. Also, the SNES can't read from anything in its cartridge slot in less than 140ns. (one read cycle at fastest is 3.6MHz; half of that is 140ns)

Pretending for the moment that you wanted to build a 12MB/95Mbit SNES RAM cartridge, that would still only be 2 seconds. Anything faster is entirely wasted.

edit: fix math; lost track of decimal place, specified too fast by factor of ten.


Last edited by lidnariq on Wed Jul 03, 2013 9:23 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 8:30 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
lidnariq wrote:
bazz wrote:
Well, I thought it would necessary for fast pc->sram r/w, but please do correct me if I am wrong. I will have to see.

Doing the math: 140ns × 524288 bytes = 7.3ms. Also, the SNES can't read from anything in its cartridge slot in less than 140ns. (one read cycle at fastest is 3.6MHz; half of that is 140ns)

Pretending for the moment that you wanted to build a 12MB/95Mbit SNES RAM cartridge, that would still only be 1/5 of a second. Anything faster is entirely wasted.


I don't understand your point, after I stressed the fact that I am focusing on minimal upload time from the PC. You answered with focus on the SNES again :shock:


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 8:41 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
How "minimal" do you want it? In theory, a 32 Mbit upload can complete in under a second using less than 10% of the 480 Mbps bandwidth of Hi-Speed USB.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 8:45 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
Hi Tepples,

I would prefer 1-2 seconds,


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 8:51 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6283
Location: Seattle
bazz wrote:
lidnariq wrote:
Doing the math: 140ns × 524288 bytes = 73ms. Also, the SNES can't read from anything in its cartridge slot in less than 140ns. (one read cycle at fastest is 3.6MHz; half of that is 140ns)

Pretending for the moment that you wanted to build a 12MB/95Mbit SNES RAM cartridge, that would still only be 2 seconds. Anything faster is entirely wasted.
I don't understand your point, after I stressed the fact that I am focusing on minimal upload time from the PC. You answered with focus on the SNES again :shock:
Please reread my post. I have put in boldface everything that does NOT pertain to the SNES.

If you're going to tell me that you're working with a format that is larger than 12MB, you're working with a format that requires a substantially more complicated controller than just flat memory. (GBA, DS, PSP, N64, &c) You will need programmable logic for any of them to work. Furthermore, for amounts of RAM noticeably larger than 512KiB you will either be spending a gazillion dollars for it, or will need a huge beefy power supply, or you'll need voltage shifting logic, or some combination.

If you're going to tell me that you think that you will care about the difference between uploading a full image in 200ms and anything less, you're wrong. It will take longer to group the data for upload.

I answered things giving you answers pertaining to the SNES because you'd asked about the SNES.

edit: fix same math as above in quite (lost track of decimal place, specified too fast by factor of ten)


Last edited by lidnariq on Wed Jul 03, 2013 9:25 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 9:04 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
slow down. I never wanted to transfer anything near 12MB! Actually, I just want to start testing with 4Mbits now.


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 9:08 pm 
Offline
User avatar

Joined: Fri Sep 02, 2011 8:34 pm
Posts: 476
I'm just looking for the fastest and easiest way to get a ROM over USB to a flash chip and/or SRAM chip(s). Unless there are better ways unknown to me. Please shine the light on me.


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

All times are UTC - 7 hours


Who is online

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