Using AOROM to make a 2 in 1 multicart of NROM games
Moderator: Moderators
Using AOROM to make a 2 in 1 multicart of NROM games
Hey all. I've been wondering if something like this is possible. Basically, I was thinking of making a 2 in 1 cart having a menu screen so you can pick your game and then having it load the game using the roms.
I currently have this situation:
-Both NROM roms without their ines header nor their CHR data embedded within them. Just the PRG data and each PRG is stored in a different bank of the AOROM game.
-In the "master" rom, I have it grab the appropriate CHR data and write that all to RAM and then I try to bank switch out everything into the appropriate game.
This actually kinda worked, but the games don't play. One game simply loads the music and the other loads nothing.
I tried clearing zero page with 0's, but that didn't seem to work either.
I don't know if there's a way to call the reset routine of the games or what, but is what I want to ultimately do possible? Thanks.
I currently have this situation:
-Both NROM roms without their ines header nor their CHR data embedded within them. Just the PRG data and each PRG is stored in a different bank of the AOROM game.
-In the "master" rom, I have it grab the appropriate CHR data and write that all to RAM and then I try to bank switch out everything into the appropriate game.
This actually kinda worked, but the games don't play. One game simply loads the music and the other loads nothing.
I tried clearing zero page with 0's, but that didn't seem to work either.
I don't know if there's a way to call the reset routine of the games or what, but is what I want to ultimately do possible? Thanks.
Yes it's possible but you'll have to hack your games so that they work fine with single screen mirroring, which is likely hard to do. You can modify AOROM to get a fixed mirroring (aka BNROM) easily tough.
Last edited by Bregalad on Sat Jun 14, 2008 12:43 am, edited 1 time in total.
Useless, lumbering half-wits don't scare us.
I made an SNROM-based multicart engine. I could probably have done it in BNROM as easily, but the theme of the compilation included an existing game that was on SNROM.
But yes, GNROM looks like it was almost made for multis. In fact, the mapper of SMB1 + Duck Hunt is just GNROM on a different board layout.
But yes, GNROM looks like it was almost made for multis. In fact, the mapper of SMB1 + Duck Hunt is just GNROM on a different board layout.
The source code for my Forbidden Four multicart engine has an example of how to make a RAM-based trampoline. It involves copying a piece of code to RAM that does the following:
- Set up the mapper to copy CHR.
- Copy or decompress CHR to CHR RAM. (Omit this step for CHR ROM boards such as GNROM or some MMC1 configurations.)
- Set up the mapper to run PRG.
- JMP ($FFFC) to start the game from its reset handler.
Well, I've got the CHR RAM part of things. The only problem I guess lies with doing the bank swap.
I know that if I bank switch, I'm immediately in the new bank, so in theory I could be anywhere in the program.
The way I'm doing the switch is like this:
The only thing is once I'm swapped, what do I do to JMP to $FFFC? Obviously JMP'ing to there before swapping will just constantly reset the game...
I guess I'm lost on the whole "copy to RAM and execute code" part of things. Do I just put code similar to what I have above somewhere in, say, $0500 and JSR there or is there more to it?
I know that if I bank switch, I'm immediately in the new bank, so in theory I could be anywhere in the program.
The way I'm doing the switch is like this:
Code: Select all
LDA #1 ;Bank 1 is game 1. Bank 2 is game 2. Bank 0 is the menu. Bank 3 is unused.
TAX
STA bankID, X
;I think JMP $FFFC would need to go here...
;----------This appears later in the program----------
;Things used for bank switching
bankID:
.db $00, $01, $02, $03
I guess I'm lost on the whole "copy to RAM and execute code" part of things. Do I just put code similar to what I have above somewhere in, say, $0500 and JSR there or is there more to it?
Ok. I got a menu and everything so you can pick a game and it switches to the appropriate bank and then performs the reset routine.
My final question is this: Whenever I use the emulator reset button, it doesn't reset back to the multicart's menu, but rather stays in the current bank as if you reset just that game. The power button of course works. Is there any good way around this or is it going to be power all the way?
My final question is this: Whenever I use the emulator reset button, it doesn't reset back to the multicart's menu, but rather stays in the current bank as if you reset just that game. The power button of course works. Is there any good way around this or is it going to be power all the way?
Three things:
- A*ROM and B*ROM don't support SRAM without adding an extra 74HC10 chip and a bit of analog circuitry to the board.
- This extra SRAM, the support circuitry, and the revised PCB cost money to replicate.
- Multicarts including one battery-backed game need to preserve the data in SRAM when switching games.
If you know that none of the NROM games use the last few bytes of PRG ROM for anything, you could just put identical entry point code in $FFF2-$FFFF of all banks:
In this case, your menu starts at $8000 of bank 0:
But then you'd have to copy the actual start of your game to RAM and JMP through that instead of ($FFFC).
Code: Select all
reset:
ldx #$00 ; you don't get a bus conflict if you
stx reset + 1 ; overwrite the immediate operand
jmp $8000
.addr nmi_entry
.addr reset
.addr irq_entry
Code: Select all
entry:
sei
; X is already 0 from the code in all banks
stx PPUCTRL ; disable NMI
stx PPUMASK ; disable rendering
dex
txs ; set stack pointer to $01FF
; etc.