Hi everyone,
How can I find out the available RAM on MSX?
I mean in the SLOT system and not MEMORY MAPPER.
I would like to include memory detection in the next version of my compiler and was looking for some ready-made code or something similar.
Do you mean the MSX's base RAM, with no possible expansions added but only in its internal slots?
You select the slots one by one and the pages one by one. Each time you write a sequence of say 32 characters in the first 32 bytes of the selected page in that slot. After writing the sequence, you read it and see if you actually find it. If you find it, it means that in that page of that slot you have RAM installed.
Then add 16K to your "amount of RAM" value and move on to the next page. After trying all four slots you will have in the "amount of RAM" variable the exact amount of RAM available. If I remember correctly there is a ready-to-use asm routine on the msx resource center wiki, which however checks all slots, even the external ones
