Huge rom is possible on real hardware?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
Bubel
Posts: 2
Joined: Fri Sep 14, 2012 8:07 am

Huge rom is possible on real hardware?

Post by Bubel »

Dear friends! How production cost of real NES cartridges affects by ROM size?
Or it`s does not matter with modern technology?
It`s is possible to make a game with 8-24 megs ROM (1-4mb) running on real NES?
(I`m in graphical department so I don`t know about hardware stuff, I just curios it game with lot`s of content could be produced at reasonable cost on cartridges)
Thank you! :?:
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Huge rom is possible on real hardware?

Post by rainwarrior »

With two 74161s as a mapper you could make a 4MB variant of AxROM with single screen mirroring, or even an 8MB BNROM.

I dunno how easy it is to get large programmable ROMs though; I've never tried to find anything bigger than a 27C020 (256k). Action 52 did 2MB with 4 x 512k chips.
Bubel
Posts: 2
Joined: Fri Sep 14, 2012 8:07 am

Re: Huge rom is possible on real hardware?

Post by Bubel »

rainwarrior wrote:With two 74161s as a mapper you could make a 4MB variant of AxROM with single screen mirroring, or even an 8MB BNROM.
I dunno how easy it is to get large programmable ROMs though; I've never tried to find anything bigger than a 27C020 (256k). Action 52 did 2MB with 4 x 512k chips.
Thank you for your reply!
So technically it`s not a problem but how about production cost of cartridges?
How price changes from 256kb to 2Mb?
I don`t need exact numbers but I feel it`s should be like:
256kb = X
512kb = X (same price as it`s same method of production)
1Mb = 4X (price 4 times bigger because it`s exceeding limit where production is starting to be tricky)
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Huge rom is possible on real hardware?

Post by tepples »

rainwarrior wrote:I dunno how easy it is to get large programmable ROMs though; I've never tried to find anything bigger than a 27C020 (256k).
On #nesdev, kevtris maintains that it's easy to find affordable 32 Mbit (4 MiB) flash chips. He recommends deploying them with an oversize-UxROM mapper, which needs a 74HC377 and a pair of 74HC32s.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Huge rom is possible on real hardware?

Post by Shiru »

Prices are all under $10, however, flash chips larger than 512K are 3.3v, and most of them has serial interface. Largest parallel interface flash chip that I found is 2Mx8, TSOP48.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Huge rom is possible on real hardware?

Post by tepples »

In that case, it might be time to design an FDS- or PowerPak-like architecture in which a small BIOS present at power-up loads the game from a serial flash chip into a 128 KiB PSRAM. That'd allow the use of cheap serial flash in the microSD form factor, at capacities up to 2 GB.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Huge rom is possible on real hardware?

Post by tokumaru »

Here are some prices for EPROMs. The largest they have is 2MBytes for $9.90, while 512KBytes is $5.90 and 256KBytes is $3.90. Even if this particular store isn't the cheapest one, it should still give you an idea of how the prices vary.

So yeah, the biggest limitation is not the NES architecture, but the price of the memory itself. Most existing mappers can't access large amounts of data, but like rainwarrior said they can easily be modified. If you don't mind a bit of loading time, you could use the PowerPak approach of reading data off a CF card (which can hold up to several GigaBytes) into a moderately sized RAM chip.

EDIT: What tepples said.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Huge rom is possible on real hardware?

Post by Shiru »

Actually, having a mapper with WRAM and CHR-RAM, it should be possible to make a very simple partial solution by connecting a serial flash or a SD card to a few bits of a register. Code will be in the PRG ROM, but levels data and graphics - usually the largest things - will be loaded into RAM from the serial storage when needed.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Huge rom is possible on real hardware?

Post by tokumaru »

Shiru wrote:Actually, having a mapper with WRAM and CHR-RAM, it should be possible to make a very simple partial solution by connecting a serial flash or a SD card to a few bits of a register. Code will be in the PRG ROM, but levels data and graphics - usually the largest things - will be loaded into RAM from the serial storage when needed.
Sure, that's the idea, but IMO the normal sizes for WRAM and CHR-RAM are not enough to make things really interesting... Games would hardly be much better than they can be on NROM. I'd much rather have a small boot ROM and a large WRAM (as opposed to a large PRG-ROM and small WRAM, which is the common setup) and be able to load larger chunks of data from the memory card.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Huge rom is possible on real hardware?

Post by Shiru »

That would be limiting for sure, but may be enough for some purposes.

More interesting things that could be done with a huge storage would probably require more complex hardware, though. The first things that come into mind are audio and video streaming. For first thing a huge RAM and/or fast data access in needed, for second - some kind of CHR mapping, or a way to fill 2-3 CHR RAM pages with new data like 25 times per second.
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Huge rom is possible on real hardware?

Post by infiniteneslives »

tokumaru wrote:Sure, that's the idea, but IMO the normal sizes for WRAM and CHR-RAM are not enough to make things really interesting... Games would hardly be much better than they can be on NROM. I'd much rather have a small boot ROM and a large WRAM (as opposed to a large PRG-ROM and small WRAM, which is the common setup) and be able to load larger chunks of data from the memory card.
Even if it were 32KB WRAM and VRAM? That's normal/cheap by today's standards. Serial flash is ridiculously cheap compared to paralllel, could even be effectively free or save money if you could have a small PRG-ROM that only stored the engine and loading routines. Never thought about something like that before... It might make more sense to have WRAM available to be mapped to more than just $5000-7FFF too.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Huge rom is possible on real hardware?

Post by tepples »

True, a 32 KiB working set would probably be enough CHR RAM except perhaps for fighting games. But I was under the impression that games later in the NES's lifetime used more than a 32 KiB working set of PRG ROM for a single level, which is why I recommended 128 KiB of RAM for the PRG side.

The mapper would need these features:
  • Switch RAM bank into CPU $8000-$BFFF
  • Nametable mirroring control
  • Enable or disable the boot ROM at $C000-$FFFF
  • CHR RAM banking
  • SPI clocking for byte-at-a-time access to the microSD card
  • Scanline counter (maybe)
What kind of CPLD would be needed for that?
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Huge rom is possible on real hardware?

Post by infiniteneslives »

tepples wrote:True, a 32 KiB working set would probably be enough CHR RAM except perhaps for fighting games. But I was under the impression that games later in the NES's lifetime used more than a 32 KiB working set of PRG ROM for a single level, which is why I recommended 128 KiB of RAM for the PRG side.
Yeah I was thinking 128KB as well. Which saves several dollars if you'd otherwise be using 512KB or more of parallel memory. Seems like a lot compared to standard games, but you'd also be looking to store your hearts content worth of graphics there as well since you'd be on VRAM.
What kind of CPLD would be needed for that?
The only thing on the list I can't be sure of at the moment is the amount of logic required to feedbyte-at-a-time to the NES. But the rest surely fits in ~108MCells which would be one 36 and one 72 XC9500XL. I'd estimate stepping up to two 72MCells on my INL-ROM boards would be enough room for the byte feeding as well... I'll have to look further into this when time permits.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Huge rom is possible on real hardware?

Post by lidnariq »

Currently on Digikey, the largest cheapest parallel EEPROM is 1M×8 for $2.74 (MX29F800CBTI-70G or MX29F800CTTI-70G). The cost of the boot ROM (smallest 5V parallel ROM we can find) is 64K×8 for $1.24 (AT49F512-90VC).

As soon as you give up on sticking with the NES's ancient memory bus, everything gets kinda awful:

To interface with any kind of serial and most NAND FLASH, you'll need some kind of PAL; Mouser seems to have the cheapest 16V8 at 55¢/1. Serial load speeds on the NES are going to be lousy without a hardware assist (see also joypad reads), so unless you throw enough CPLD/FPGA at the problem, using some kind of parallel flash is greatly desirable. (e.g. Compact Flash, 3V parallel NAND FLASH, 8 SPI EEPROMs ganged up in parallel) 1bit serial read speed results will be comparable to the FDS, so not terrible but nothing I'd be proud of.

Large-banked parallel-accessed NAND FLASH that isn't CompactFlash isn't available in 5V, but it at least has enough fewer lines (17) that a 5V↔3V logic converter is reasonable. (e.g. the MT29F16G08CBACAWP, a 3V 1G×8x2 for $6.59)

Coprocessors to load data into CHR are fine once you spend enough money on a CPLD.

So, to break it down:
A giant BNROM-like game will cost $1.2 for the CHR RAM, 20¢ for the banking logic, and $2.7 for the ROM ($4/1MB, $7/2MB, $10/3MB or so); larger than that will cost 30¢ more and $2.7 per megabyte
A giant FDS-like game will cost $1.24 for the boot rom, $2.4 for two RAMs, 55¢ for the glue logic, 50¢ for voltage regulator and conversion, and 45¢ per 1MB SPI EEPROM (digikey, W25Q80BV): $5.3/1MB, $5.8/2MB, $6.3/3MB &c
A gargantuan FDS-like game will cost $1.24 for the boot rom, $2.4 for two RAMS, 55¢ for the glue logic, 50¢ for a socket, and $4-10 for any commercial flash format (CF, SD plus voltage regulator+shifting): $9…15/1,2,4GB

TL;DR:
  • Less than 1MB of data: Don't bother trying with anything funny.
  • More than 2MB but less than 9MB, consider 3V SPI EEPROMS.
  • More than 9MB, consider SD.
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Huge rom is possible on real hardware?

Post by infiniteneslives »

In the context of this discussion I would agree with what you're saying. I'll move my discussion back where it belongs.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
Post Reply