Size limits

For anything related to cart (SRAM, SF2 mapper, audio, CD mode 1, ...)

Moderator: BigEvilCorporation

metalforever
Newbie
Posts: 4
Joined: Wed Jul 04, 2018 7:04 pm

Size limits

Post by metalforever » Sun Jul 15, 2018 3:44 pm

Is it possible using any technique (such as perhaps implementing an SD card inside of a cart) to run a game over 8MB (incl bank switching)? For example, perhaps if a group of people were very clever, we could create a larger game and put it on a cart? Maybe an elaborate bank switching scheme could be used?

Sarah

cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Re: Size limits

Post by cero » Sun Jul 15, 2018 4:42 pm

Yes, the SSF2 mapper lets you go over the 4mb limit, and you could design a custom mapper too. Everdrives and emulators support SSF2, so you can test your game easily.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Size limits

Post by Chilly Willy » Sun Jul 15, 2018 7:26 pm

The standard SEGA mapper (often incorrectly called the SSF2 mapper as it was the only game to use it) allows up to 32MBytes of rom via bank switching. Most available flash carts don't go that high. For example, the current Mega Everdrive only allows up to 15MB. If you make the cart yourself and use the standard mapper, you could go to 32MB. If you don't care about standards, you could easily make your own flash cart that allowed GBytes of storage. It would be silly, but quite easy to do.

metalforever
Newbie
Posts: 4
Joined: Wed Jul 04, 2018 7:04 pm

Re: Size limits

Post by metalforever » Sun Jul 15, 2018 9:10 pm

Thank you for the answers. It wasn't clear which kind of restrictions I had to impose on the development of a homebrew game.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Size limits

Post by Sik » Mon Jul 16, 2018 5:43 am

For the record, I'm not sure where the 32MB limit comes from (as we don't have any actual official docs from the mapper - what we know is from reverse engineering I think?). But yeah, you can use the mapper to go over 8MB easily if you have a cartridge that actually provides that much memory.

In theory you could also use your own custom mapper too if you're willing to build the cartridge (and cope with the lack of support in emulators).
Sik is pronounced as "seek", not as "sick".

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Size limits

Post by Stef » Mon Jul 16, 2018 7:59 am

As far i remember the Sega mapper allow to remap bank of 512 KB with a register of 6 or 7 bit wide (it was in an official doc) so it means 64 or 128 banks of 512KB (so 32 MB or 64 MB at max).

Miquel
Very interested
Posts: 514
Joined: Sat Jul 30, 2016 12:33 am

Re: Size limits

Post by Miquel » Mon Jul 16, 2018 11:44 am

If you develop your own bank switching there is no limit of size other than what technology provides.

And you can use any type of storage as long as the worst case scenario in read response is smaller than a read cycle on the 68K. In the case of SD+FAT you will need a quite big fpga-like chip, not the best option.

Or another option is to have 2/4MB of RAM and reading consciously from the SD.
HELP. Spanish TVs are brain washing people to be hostile to me.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Size limits

Post by Chilly Willy » Mon Jul 16, 2018 2:40 pm

The mapper is fully documented in the 32X docs in the 32X Development Equipment section. It uses registers from $A130F1 to $A130FF as controls for eight banks of 512KB each. Bank 0 cannot be changed and it's register is a control register for save ram. The other seven use six bits to set the bank selected from the rom (or ram if using the dev cart). Six bits gives 64 banks of 512KB, or 32MB of space. While the mapper handles seven banks, SSF2 only uses banks 6 and 7, so some early flash carts don't support the full mapper spec.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Size limits

Post by Stef » Mon Jul 16, 2018 2:49 pm

Ok so it was indeed 6 bit :p

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Size limits

Post by Chilly Willy » Mon Jul 16, 2018 5:35 pm

Yes, but they show always setting the two upper bits to 0, so they could have thought about expanding it later. That never happened, of course, and roms on the Genesis/32X never reached 32MB, much less bigger. They did reach 64MB on the N64, so if the 32X had been a run-away success ( :lol: ), it might have gotten expanded. Since there's little chance of SEGA going back and releasing something new, you could make your own mapper using all 8 bits for backwards compatibility, but allowing 128MB. What I think would be more interesting would be make the banks 7 bits, and make b7 a ram/rom select line, allowing carts to have both ram and rom that can be bank selected.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Size limits

Post by Sik » Mon Jul 16, 2018 8:45 pm

It's possible that particular mapper only had enough pins to map 32MB. And yeah, if I recall correctly there's work to make one that can address up to 128MB (we should call it the GIGA POWER cartridge since it's 1 gigabit :v). And technically nothing prevents you from using the remaining 8 bits from the word (Mega Everdrive uses the upper bits for tagging, so it's doable).
Chilly Willy wrote:
Mon Jul 16, 2018 5:35 pm
What I think would be more interesting would be make the banks 7 bits, and make b7 a ram/rom select line, allowing carts to have both ram and rom that can be bank selected.
Or use bit 15 :​P
Sik is pronounced as "seek", not as "sick".

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Size limits

Post by Chilly Willy » Tue Jul 17, 2018 1:53 pm

Yes, I think a full word per bank would be better. They clearly wouldn't have had enough pins or gates for that at the time, but these days, why not? :D

At that point, amount of memory you can address gets silly.

mix256
Very interested
Posts: 189
Joined: Thu Jan 25, 2018 2:08 pm
Location: Sweden
Contact:

Re: Size limits

Post by mix256 » Tue Apr 16, 2019 6:54 am

Sik wrote:
Mon Jul 16, 2018 8:45 pm
And yeah, if I recall correctly there's work to make one that can address up to 128MB (we should call it the GIGA POWER cartridge since it's 1 gigabit :v).
I kind of need this, has put myself into a need-loads-of-ROM situation. Who's working on something like this?
I don't want to start on my own impl, it will most likely end up wherever Paprium is. :)

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Size limits

Post by Sik » Tue Apr 16, 2019 3:13 pm

Eh, it's just 64Mx16 Flash with the Sega mapper with 8-bit to specify the page numbers (enough to address 128MB). Any implementation that conforms to the Sega mapper interface should do (a CPLD should be good enough to implement the mapper). I'd suggest to commission such a board rather than wait on anybody.

Note that such large Flash is only available as 3.3V so remember, level shifters all over :​P Also that SGDK doesn't account for mapper support so far (not even for smaller sizes), which may be a bigger problem.


EDIT: also huh, I should probably mention that 128MB is unlikely to be cheap, so if you go with that then it better be something that's worth the size :​v (alternatively, pick a smaller size and keep the mapper, since filling up 128MB is going to be hard, I already barely manage to fill up 1MB usually)
Sik is pronounced as "seek", not as "sick".

mix256
Very interested
Posts: 189
Joined: Thu Jan 25, 2018 2:08 pm
Location: Sweden
Contact:

Re: Size limits

Post by mix256 » Tue Apr 16, 2019 3:40 pm

Sik wrote:
Tue Apr 16, 2019 3:13 pm
Eh, it's just 64Mx16 Flash with the Sega mapper with 8-bit to specify the page numbers (enough to address 128MB). Any implementation that conforms to the Sega mapper interface should do (a CPLD should be good enough to implement the mapper). I'd suggest to commission such a board rather than wait on anybody.

Note that such large Flash is only available as 3.3V so remember, level shifters all over :​P Also that SGDK doesn't account for mapper support so far (not even for smaller sizes), which may be a bigger problem.


EDIT: also huh, I should probably mention that 128MB is unlikely to be cheap, so if you go with that then it better be something that's worth the size :​v (alternatively, pick a smaller size and keep the mapper, since filling up 128MB is going to be hard, I already barely manage to fill up 1MB usually)
Thanks! I would be mapping in the extra mem at very specific situations, and it would all just be data no code. So I don't think SGDK will need to know about it. Do any emulator support 128MB, though?
Level shifters for all pins, cpld and rom might get too expensive, I guess.

Post Reply