Page 1 of 1

Maximum size of the Game

Posted: Wed Oct 01, 2014 2:17 pm
by faeldaniel
What is the maximum limit in MB that the lib supports the creation of a game to run on real console? I am developing on game for Snes in C too and I will port it for Sega Genesis becouse this lib is fantastic.

Posted: Wed Oct 01, 2014 2:49 pm
by TmEE co.(TM)
4MBytes without banking, 32MBytes with SSF2 banker (no emulator supports as much from what I know) and unlimited with a custom banker.

Re: Maximum size of the Game

Posted: Wed Oct 01, 2014 7:17 pm
by Stef
faeldaniel wrote:What is the maximum limit in MB that the lib supports the creation of a game to run on real console? I am developing on game for Snes in C too and I will port it for Sega Genesis becouse this lib is fantastic.
Thanks for the nice comment about the lib :D
About the size TmEE give you the point.
I just want to add you can go higher than 4MB without bank switching (i did 8 MB for the BadApple demo) but then you won't be compatible with any add-on (Sega CD nor 32X) and also as far i know only the everdrive and MegaEverdrive support rom > 4MB.

Posted: Thu Oct 02, 2014 4:14 am
by r57shell
Here is 8 MB Rom cart scheme (no support for SEGA CD nor 32X)

Posted: Thu Oct 02, 2014 11:41 pm
by Chilly Willy
If you have a MegaEverdrive, you can do up to 14MB with SSF2 type banking. It also supports up to 10MB linear if you don't have CD or 32X plugged in. That's the best you'll get on existing flash carts.

Posted: Sun Oct 19, 2014 5:55 pm
by Zontar
You should also consider making your game require the Mega Everdrive, and store heavyweight assets in files on SD that your ROM can access in game. With an Everdrive, your game has a theoretical limit of 32GB with a maximum individual file size of 4GB. Your ROM size will still be capped at roughly 14MB, but your external assets will not be part of the ROM.

With a FAT32 driver and reading some Everdrive docs/examples, I could make a theoretical movie player that only uses some 1MB of code if even and plays a gigabyte-sized file off the SD. The idea being, segment your code in the ROM, and use SD for all game assets. This also gives you the added bonus, and a rather cool feature, of having a game that is extensible without needing to recompile the ROM. I have plans to build a feature like this into Mega Swirl, where bitmaps can be loaded off SD and used as game backgrounds without ever needing to recompile the ROM.

In brief, you'd just need to write "SEGA EVERDRIVE" in your header instead of "SEGA MEGA DRIVE" and that will unlock all the hardware features available on the Everdrive. Then, see SGDK or the ED utils for a FAT32 example, write a subsystem that accesses files off the SD, and you're golden.

Posted: Sun Oct 19, 2014 6:21 pm
by sega16
What if you don't have a mega everdrive? How about making it unlock bonus features? Or a sega cd version? Maybe better compression will get you enough space?

Posted: Sun Oct 19, 2014 6:56 pm
by Zontar
sega16 wrote:What if you don't have a mega everdrive? How about making it unlock bonus features? Or a sega cd version? Maybe better compression will get you enough space?
I personally have thought of this and you could detect and enable Mega Everdrive specific features. However, I would imagine most people who play these games use one of two options: Emulators, and the Everdrive. So my personal suggestion would be to compile two versions: an emulator version that is a large ROM without limit, and an Everdrive version that uses external assets and runs on real hardware.

Additionally, some flash carts (including the Everdrive) use 32MB DRAM as their ROM, however, I'm not sure if there is a mapper that will enable you to run the full gambit and your practical limit may be 14MB.

Posted: Sun Oct 19, 2014 8:25 pm
by Chilly Willy
With the MED OSv10, you need to use "SEGA SSF" to get the extended mode. That allows access to ALL DRAM in the cart (16 or 32 MB depending on the DRAM used when the board was made), a multiplier/divider, and access to the SPI port for SD read/write.