how to create x-in-1 game ?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
hoit
Posts: 28
Joined: Sun Dec 24, 2017 10:16 am

how to create x-in-1 game ?

Post by hoit »

Good afternoon,

I would like to develop a X-in-1 game (like super mario all stars) to compile good titles.
I develop with PVsneslib and don't have difficulties to create user interface.
But to load the real game (chosen by user), i don't know how to develop this.

I used bin2h to convert rom and include it in my project. Using asm, i thought read rom table header until reset vector and jump to this address.
But i don't know if i am on the right way then how to realize it.

Do you have some informations to give me on how to realise X-in-1 game ?

Thanks in advance
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: how to create x-in-1 game ?

Post by tepples »

There are two ways to do it. One way, used in All-Stars and SEGA's 6-Pak, is to relink each game into different banks and point interrupt vectors at long jump trampolines in RAM that JML to the appropriate game's ISRs. This requires either each game's source code or its relocatable object code, and it may require juggling data to fit appropriate into the appropriate banks of low memory. The other way, used in Super Mario Bros./Duck Hunt, Action 52, Action 53, and pirate multis, is to bankswitch PRG ROM with one bank per game.

I'm not entirely sure which method Retro-Bit's 16-bit Jaleco and Data East multis use, but it works flawlessly (see review).
hoit
Posts: 28
Joined: Sun Dec 24, 2017 10:16 am

Re: how to create x-in-1 game ?

Post by hoit »

Lot of these terms are still unclear for me and i have to read informations about it.
I think the best for me is the 2nd solution because the 1st one "requires either each game's source code or its relocatable object code".

I am looking on internet to find more informations and sample code.
I found this link about bank switching on NES using MMC3:
https://nesdoug.com/2016/01/15/24-mmc3- ... hing-irqs/

Is it possible to develop X-in-1 directly on a computer and try it in SNES emulator ?
or i have implement it in a cartridge to test on the real hardware ?

Thanks
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: how to create x-in-1 game ?

Post by tepples »

You can test in an emulator provided that you modify the emulator to support whatever bank switching hardware that you design.
User avatar
whicker
Posts: 228
Joined: Sun Dec 13, 2009 11:37 am
Location: Wisconsin

Re: how to create x-in-1 game ?

Post by whicker »

The really simple way to create multiple games is to use a very large NOR flash rom chip.
Then use DIP switches with pulldown resistors to set the state of the highest address lines.

For example if the games fall in the range of using A20-A0, then map A21 and above of the flash rom to the switches. In this way you select a a whole different game depending on the combination of on's and off's. (Switches all off = the first game, switch 1 on = second game, switch 2 on = 3rd game, switch 1 and 2 on = 4th game). Do not, of course, in this example connect A21, A22, A23... and so on to the actual cartridge connector, just the ROM chip.
Post Reply