Detecting most common memory mappers

Страница 2/2
1 |

By gdx

Enlighted (6221)

Аватар пользователя gdx

28-12-2022, 01:15

aoineko wrote:

It would be surprising if there wasn't already assembly code to check for the presence of a RAM mapper in all slots/subslots, without using DOS.

Of course there are, but it first detects the RAM in the slots.
https://www.msx.org/wiki/The_Memory
I've never seen an all-in-one routine though. Except the one in Nextor.

aoineko wrote:

By the way, are all the existing mappers visible on the 4 pages of the memory space?

This is explained here. All segments of the same page switch at the same time.
https://www.msx.org/wiki/Memory_Mapper

By aoineko

Paladin (1004)

Аватар пользователя aoineko

28-12-2022, 08:07

gdx wrote:
aoineko wrote:

By the way, are all the existing mappers visible on the 4 pages of the memory space?

This is explained here. All segments of the same page switch at the same time.
https://www.msx.org/wiki/Memory_Mapper

I mean, are there any mappers where some pages (I don't mean segment/bank) are not accessible. For example, like for MegaROM, with only page 1 and 2 (4000h~BFFFh) accessible.

By gdx

Enlighted (6221)

Аватар пользователя gdx

28-12-2022, 09:23

The Musical Memory Mapper uses the same mapper as the Memory Mapper with the write protect possibility in extra. So this is a mix of the Memory Mapper and a Rom mapper.

By ro

Scribe (4964)

Аватар пользователя ro

28-12-2022, 10:33

In essence, you would just check every slot combination for RAM. If RAM is present, and its MSX2, you can use my earlier function to count how many segments are present in that RAM slot.

If a primary slot is extended with secondary slots, you have 4 slots. Else only 1 (prim). Use bit 7 of EXPTBL (+0 - +3) to see if a slot is extended.

Look at my SCC search routine, for example, which does exactly that, here: https://www.msx.org/forum/msx-talk/development/how-detect-sc...
It loops through all available slots and if it's enabled, checks for SCC in that slot. So, "FSCC.3:" is like that memorycount function I pointed to earlier. See if this inspires you to write your own :)

By BadWolf359

Resident (37)

Аватар пользователя BadWolf359

28-12-2022, 11:33

Good stuff, good stuff! You've all been very helpful! 🥰 Thanx!
Once I have my new routine, I'll post it here.

Страница 2/2
1 |