I made a MMC3 test cartridge with two 256KB FLASH memory (Am28F020). Can I put a NROM in that board?
For SMB1, I tried repeating PRG 256/32=8 times and CHR 256/8=32 times, but I the program hangs (the garbage in the screen it's always the same each time I restart the console):
http://img218.imageshack.us/i/marioonmmc3.jpg/
Here are few pictures of the cartridge (it's a NASA famiclone cartridge with a MMC3 mapper):
http://img190.imageshack.us/i/progflash.jpg/ and
http://img130.imageshack.us/i/1002123x.jpg/
Thanks in advance
PS: If anyone wants the pinout of that MMC3 clone to make his own cartridge, ask me
You must hack the game to make it switch in the correct banks at bootup, then it will work. Make sure it works in Nestopia first.
I don't think Nestopia is the best emulator to test this: that hacked game worked in Nestopia (even when I manually modified the iNES Header to 16 PRG banks and 32 CHR banks and set the mapper to 4)
Anyway, can you provide a example of the routine to do this? I never programmed anything in 6502 assembler (I programmed once in assembly for the 68k on the MD, but that's a completely different world)
Thanks in advance
SMB1 is a very tightly packed game, and I'm not entirely sure there are 32 consecutive free bytes in $E000-$FFFF. You might even need to move one of the subroutines to a different bank to make room; if anything, I'd choose something reasonably self-contained like the music engine.
It'd look like this (untested; corrections welcome):
Code:
reset:
sei
ldx #7
loop:
stx $8000
lda mmc3initbankdata,x
sta $8001
dex
bpl loop
; by now A has a value 0 which corresponds to h arrangement/v mirroring
sta $A000
sta $E000 ; also turn off mapper IRQs
jmp original_reset
mmc3initbankdata:
.byt 0, 2, 4, 5, 6, 7, 0, 1
What's the first and the second bank that MMC3 shows on startup? Because if it's not the last chunk of memory, can I do the following?:
- ORG the MMC3 control code you made to RAM space (MMC3 control code)
- Put another code in the first or the second data bank to copy the MMC3 control code to the RAM (bootloader)
- Change program start address to the bootloader
- Jump to the MMC3 control code stored in the RAM
So I don't need to change anything in the original ROM. Is it possible?
socram8888 wrote:
What's the first and the second bank that MMC3 shows on startup?
In theory, the bank numbers in $8000-$DFFF at power on depend on the revision of the MMC3 IC. So the init code has to run from $E000-$FFFF, the only truly fixed bank in the mapper.
Quote:
Because if it's not the last chunk of memory, can I do the following?:
- ORG the MMC3 control code you made to RAM space (MMC3 control code)
- Put another code in the first or the second data bank to copy the MMC3 control code to the RAM (bootloader)
But what part of the game program would you move out of the way to make room for this copying subroutine?
Here is what i'm refering to:
AT STARTUP:
-8000-
Bootloader+compiled MMC3 control code
-DFFF-
-E000-
Upper part of the game
-FFFF-
Then change program startup address to 8000. That bootloader copies the MMC3 control code to RAM, then jump to it. That program changes bank to:
-8000-
Lower part of the game
-DFFF-
-E000-
Upper part of the game
-FFFF-
and then jumps to the real start address of the game
When the power is turned on, nobody knows what is in $8000-$DFFF until your code writes to those registers. There is no defined initial bank number. Your code still has to work even if random numbers are loaded into the bank registers at power on.
I see D:
That's why I asked about banks selected on startup
Well, I think I'll try to get two 28C256 to put them on one of my two Hogan's Alley cartridges
Thanks anyway
tepples wrote:
SMB1 is a very tightly packed game, and I'm not entirely sure there are 32 consecutive free bytes in $E000-$FFFF.
Maybe not 32, but isn't there enough to at least select the bank with the bulk of the initialization code and jump to it?
I am confused. He wants a 32K game to play on a MMC3. Why not just make a menu to select a game and then once the user selects it, upload the CHR-RAM with the CHR-ROM for that game, and then just swap in the ROM swap to RAM, and then also run the RAM code to switch the ROM and JMP [FFFE]....Would that not work?
EDIT:
Also, You'll need a 27256/27128(Program ROM) and a 2764(CHR-ROM) for NROM games. Hogans alley is a NROM-128 so use a 27128. Catching the drift of the NROM board? XD
65024U wrote:
I am confused. He wants a 32K game to play on a MMC3. Why not just make a menu to select a game and then once the user selects it, upload the CHR-RAM with the CHR-ROM for that game, and then just swap in the ROM swap to RAM, and then also run the RAM code to switch the ROM and JMP [FFFE]....Would that not work?
EDIT:
Also, You'll need a 27256/27128(Program ROM) and a 2764(CHR-ROM) for NROM games. Hogans alley is a NROM-128 so use a 27128. Catching the drift of the NROM board? XD
A menu to select game is useless, since the MMC3 can only swap lower bank but not upper bank. A multicart must be able to swap both banks
Also in the Hogan's Alley I want to put a wire and two switches to be able to use one game with 256kB or two games with 128kB each one. That's why I said 28C256
Ohhhh, okay! Sorry, I never delt with MMC3 but thought it would allow swapping of both banks. My bad! You could tie some CHR-RAM to the upper 16K of CHR-ROM, Use a pin on the MMC3 as CE and enable it and copy it to CHR-RAM? Just an idea if you'd like to mak it a multicart.....And if so, maybe use a MMC1 game.
There is no problem with swapping CHR ROM on an MMC3. The problem is with swapping PRG ROM. It's nothing that a little bit of rearrangement with the help of Doppelganger's disassembly can't solve, but it may be beyond the abilities of someone who admits that (s)he "never programmed anything in 6502 assembler".