Concerning slots

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Concerning slots

Post by Rid »

As far as I know about it, we can divide the CPU memory area used to store ROM PRG into slots. These slots contains pages that are load from the cartridge.
Here is my question : considering a game that uses mapper technology. Can I say for sure that its ROM PRG is divided into slots of same size ?

For instance, lets take a game that allows 4 slots. Do these slots have have all a size of $2000 bytes?
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Not always.

Some mappers let you use multiple page sizes, such as MMC1, where you can use either 16K or 32K PRG pages.
Other mappers only let you use one size of page, such as MMC3, where all PRG pages are 8K in size.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post by Rid »

Thank you for your reply Dwedit.
But, do all slots have the same size once a configuration has been chosen?
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

Well, there's no technical requirement that the "slots" should be the same size, so your emulator/whatever shouldn't rely on that. In fact MMC5 for example has a mode (mode #2) where one bank is 16K and other two are 8K: http://wiki.nesdev.com/w/index.php/MMC5 ... .245100.29
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post by Rid »

Thanks thefox!
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Even if no existing cartridge had such a configuration, it would still be electronically possible to do, so you shouldn't impose that kind of restriction anyway.

The concept of banks and slots is something that makes easier for us programmers to grasp the concept of bankswitching, but down on the hardware level there is no such thing as slots, it's all about using the address supplied by the CPU to select which part of a memory chip (or chips) will be read. So technically you can even do crazy things like even addresses read from one chip while ood ones read from another.
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post by Rid »

So I was wrong in my thoughts.

I'm still working on the translation of a japanese ROM, and I've made a tool that represents the CPU memory state when displaying message on screen. I've coded the tool in order to it computes automatically the size of slots aocording to their number. It works for my case, but as you said, I'll have to improve my tool to applicate it on other projects :)
Post Reply