Why is 32Kb of RAM is wasted in MSX1 and maybe MSX2 as well?!

By eimaster

Master (220)

eimaster's picture

07-02-2018, 00:22

Back in the days I had Sakhr AX-170 which has 64KB of RAM as stated. I was trying to copy some ROMs and in the process I found that RAM begins at 0000 and ends at &HFFFF. Knowing that the BIOS is from 0 to &H3FFF and BASIC is from &H4000 to &H7FFF. Then the user have only less than 32Kb starting from &H8000 to &HFFFF (minus some system informstion kept from &HF380 to &HFFFF.
So, why the designers didn't make use of the first 32Kb of RAM (from 0 to &H7FFF)?
SVI-3x8 made a use for it by using the SWITCH statement. You can switch between the 2 blocks of 32Kb which are all mapped to be starting at &H8000 to &HFFFF?!!!

Login or register to post comments

By Piter Punk

Master (202)

Piter Punk's picture

07-02-2018, 06:10

It's not wasted. Some MSX1 models can use this "hidden" RAM as a RAMdisk, there are games that uses it and, I believe is the most common use, if you use MSX-DOS that extra RAM will be always available for your programs.

By Manuel

Ascended (15600)

Manuel's picture

07-02-2018, 09:32

It would have been nice however that MSX-BASIC would have offered ways to use it in programs, like on the SVI and many other home computers. Even worse: the memory mapper isn't even supported in MSX-BASIC. That's a missed chance, IMHO... other computers like the Enterprise 128 offer all that memory to BASIC.

By Piter Punk

Master (202)

Piter Punk's picture

07-02-2018, 13:45

Yes, having an easy and standard way to use the first two pages inside MSX-BASIC would be nice. Matching some kind of "SWITCH" command with the Memory Mapper flexibility would be very nice. I already saw some programs at magazines (or books?) that did this, changing two or more BASIC programs in memory, but using small machine code snippets.

When MSX2 was designed by ASCII/Microsoft they should included some Mapper manipulation commands in MSX-BASIC. AFAIK, the Mapper is the only MSX2 enhancement that didn't have any support from MSX-BASIC.

By TomH

Champion (327)

TomH's picture

07-02-2018, 15:29

Given that it's wasted only in the sense of not being used by BASIC, an off-the-cuff guess might be that (i) of course, BASIC requires itself to be in memory in order to run; (ii) it uses the BIOS, so it needs that in memory too; but (iii) the Spectravideo probably either has a more flexible paging mechanism or else just a different default slot population that allows it to change which RAM is visible in the 8000—FFFF range. So switches are a light task.

Being largely unfamiliar, I had a quick look for SVI-3x8 specs, but came up lacking. Other than that it looks like memory paging is via the AY-3-8912's IO ports rather than through a PPI, but that doesn't really confirm or deny guess (iii). Can anybody who actually knows things comment?

By santiontanon

Paladin (807)

santiontanon's picture

07-02-2018, 15:47

I think it's as TomH says, it's not that it's wasted, it's just "wasted if you use BASIC". You can make full use of the 64KB of RAM from assembler (paging out the BIOS is a bit tricky, but it's doable).

By TomH

Champion (327)

TomH's picture

07-02-2018, 18:49

To follow-up on my SWITCH theory of earlier; it looks like the SVI differs from the MSX in that the the SVI-318's built-in memory appears in slot 0. So that first slot is 32kb ROM in the lower half and 32kb RAM in the upper half. That's unlike on an MSX where slot 0 is just 32kb ROM and all RAM is in its own slot. It's therefore perfectly plausible that the 64kb SVI-328's additional 32kb of RAM is split between slots and that the one with the other 32kb either only partially decodes or else deliberately puts the memory at the top of the address space.

By eimaster

Master (220)

eimaster's picture

08-02-2018, 00:18

It is wasted. Most of those who bought an MSX at that time was a newbie to computers and we all got to learn BASIC and it was the only way to program the computer. So those companies printed "64Kb Personal Computer" on the computer case, while actually the newbie user get only the half unlike the SVI. So it is wasted. Not all the users got experienced to make use if that wasted 32Kb of RAM, right?!

By Grauw

Ascended (8307)

Grauw's picture

08-02-2018, 00:38

TomH wrote:

So that first slot is 32kb ROM in the lower half and 32kb RAM in the upper half. That's unlike on an MSX where slot 0 is just 32kb ROM and all RAM is in its own slot.

Both configurations exist in the MSX world actually. (The machines with 64K RAM split between two slots have a few compatibility issues, the standard allows it but some software makes too many assumptions.)

By Piter Punk

Master (202)

Piter Punk's picture

08-02-2018, 02:45

eimaster wrote:

It is wasted. Most of those who bought an MSX at that time was a newbie to computers and we all got to learn BASIC and it was the only way to program the computer. So those companies printed "64Kb Personal Computer" on the computer case, while actually the newbie user get only the half unlike the SVI. So it is wasted. Not all the users got experienced to make use if that wasted 32Kb of RAM, right?!

If you ran any pirated 32KB game (those that come in two blocks: GAME1.BIN, GAME2.BIN and a usually a loader GAME.BAS or GAME.LDR) then you used this "hidden" RAM. You can't load this games in a MSX with only 32KB RAM

As stated before, if you used the MSX-DOS, you also used this "hidden" RAM. Many applications like programming languages, text editors, databases and spreadsheets (and even some games) run under MSX-DOS.

So, the first two pages of RAM are "unavailable" only under MSX-BASIC. Of course, I believe that none of us got happy with this reality when we were writing our BASIC programs in our childhood, but we also used this same "unavailable" RAM whenever we play 32KB games or when loading ".COM" programs from MSX-DOS, transparently.

Usually, when someone was annoyed by this RAM limitation, that was the time to learn and use other languages like Pascal or Assembler.

By TomH

Champion (327)

TomH's picture

08-02-2018, 05:07

Grauw wrote:
TomH wrote:

So that first slot is 32kb ROM in the lower half and 32kb RAM in the upper half. That's unlike on an MSX where slot 0 is just 32kb ROM and all RAM is in its own slot.

Both configurations exist in the MSX world actually. (The machines with 64K RAM split between two slots have a few compatibility issues, the standard allows it but some software makes too many assumptions.)

I obviously need to stop trusting that ancient Portar document so thoroughly.

eimaster wrote:

It is wasted. Most of those who bought an MSX at that time was a newbie to computers and we all got to learn BASIC and it was the only way to program the computer.

I certainly never wrote a BASIC program that was anywhere near 32kb in size, but that might just be me. I was the flighty type. My programs were little sketches, each thing quickly replaced by the next.

Piter Punk wrote:

Usually, when someone was annoyed by this RAM limitation, that was the time to learn and use other languages like Pascal or Assembler.

I wish I had found Pascal, or another compiled high-level language, a lot earlier than I did: size was never an issue for me with BASIC, but speed certainly was. I remember I used to experiment with 3d graphics, but I'd get most of the details wrong because I was very young and there wasn't much of a community at the time. So actually more speed might have been detrimental — I think that one of the things most enjoyable about the period of our entry into computing was just that programming was one of the main things you did through a lack of other uses for the machine, and you mostly had to use your own invention to progress in that.