Memory Mapper Segment availability/allocation under MSXDOS/Nextor

Page 2/3
1 | | 3

By Grauw

Ascended (8202)

Grauw's picture

08-05-2019, 12:06

gdx wrote:

Mapper function (Extended BIOS) is available in the BIOS/BASIC environment when booting with Disk-ROM v2.00 but not in "DOS1 mode". When we press [1] at boot the Disk-ROM v1.xx is set instead of the v2.xx.

Ok thanks for the elaboration, your earlier remark could be interpreted two ways so I just wanted to make sure that is what you meant Smile.

By DarkSchneider

Paladin (819)

DarkSchneider's picture

08-05-2019, 12:10

Yes but concerning memory mapping, the only thing I can find for accessing it is the Extended BIOS number 4 that specifies MSX-DOS2. At least, that is the only official documentation I have found about memory mapping entry point, and is only specified on DOS2.
All the other, unless mentioned in official documentation, is more a try and failure way. It works, nice!, but is not mentioned in those documents.

By Grauw

Ascended (8202)

Grauw's picture

08-05-2019, 12:32

DarkSchneider wrote:

Yes but concerning memory mapping, the only thing I can find for accessing it is the Extended BIOS number 4 that specifies MSX-DOS2. At least, that is the only official documentation I have found about memory mapping entry point, and is only specified on DOS2.
All the other, unless mentioned in official documentation, is more a try and failure way. It works, nice!, but is not mentioned in those documents.

Note that the extended BIOS is a standard and extensible system to host modular BIOS extensions outside the system BIOS. If an extended BIOS entry is available, you can use it regardless of environment. The mapper support routines are provided as part of the DiskROM v2.0, but they are an independent entity.

If they were not an independent system, they would surely be implemented on the BDOS entry point and not separately as it is. And even if they had implemented it on the BDOS entry point, the DiskROM v2.0 functions are accessible in both the DOS and BIOS/BASIC environments. So why would the mapper support routines be an exception to that, especially when they went through the effort to separate them from the BDOS as much as they did.

Secondly, in the documentation it literally says in the first sentence:

Quote:

MSX-DOS 2 contains routines to provide support for the memory mapper. This allows MSX application programs or MSX-DOS transient programs to utilize more than the basic 64k of memory, without conflicting with the RAM disk or any other system software.

Relevant part highlighted. I don’t know how much more clear you want it to be. Why are you wishfully thinking that it is not supported without any explicit statement that it’s not?

By gdx

Prophet (2868)

gdx's picture

08-05-2019, 12:26

MSX-Datapack 3 does not specify that Extended BIOS comes from MSX-DOS2 probably because even if it was never the case an MSX could have been sold with a Disk-ROM v2.00 but without MSX-DOS2. In addition the method given to know if the extended BIOS is installed or not is not based on the presence of the MSX-DOS2. It is even indicated that we can add it ourselves.

By DarkSchneider

Paladin (819)

DarkSchneider's picture

08-05-2019, 13:08

Umm I think is precisely the other way:

Quote:

MSX-DOS 2 contains routines to provide support for the memory mapper. This allows MSX application programs or MSX-DOS transient programs to utilize more than the basic 64k of memory, without conflicting with the RAM disk or any other system software.

I marked it. It is something like saying that programs until then used the memory mapper by their own, and now MSX-DOS2 provides support for it. Because the programs for DOS or DOS2 are basically the same, with some extensions on DOS2, but the same. So they are saying "if you want to program for MSX-DOS but with support for memory mapper, use DOS2". The phrase begins with "MSX-DOS2", so is part of it. It is like mentioning MSX application, that is more generic, we could extend that to any MSX program.

Extended BIOS is not something of DOS2, but the memory mapping support routines entry point are.

They specify the safe environment in which you will find it (MSX-DOS2 if you look for number 4 memory mapping support routines). Something different is that in other environment, depending what you have attached to the computer, you could find it too. But as mentioned, that is something more in the style of try and failure.

By Grauw

Ascended (8202)

Grauw's picture

09-05-2019, 09:10

It literally says there that you can use them with MSX application programs (=non-DOS) and MSX-DOS transient programs. The sentence makes no sense otherwise.

And even if it didn't, it still doesn't say you can NOT use it. Nowhere does it say use outside of DOS is not allowed, there is also no reason why it would not be allowed, or why it would not work. It is clearly built as an independent entity with an access method unspecific to the DOS runtime environment. Otherwise it could've been built much simpler, as part of the BDOS calls, without requiring separate detection.

p.s. I apologise for the pre-edit version of this post, I got frustrated and used harsh words.

By Grauw

Ascended (8202)

Grauw's picture

08-05-2019, 19:58

Further evidence:

Quote:

This allows MSX application programs or MSX-DOS transient programs to utilize more than the basic 64k of memory, without conflicting with the RAM disk or any other system software.

It uses the general term of “MSX application programs”, meaning all application programs for MSX. If that meant “only DOS programs” then it would be saying “only DOS programs or DOS programs”, which makes no sense.

Quote:

To use the extended BIOS, the program should test "HOKVLD" flag at FB20h in page-3. If bit-0 (LSB) is 0, there is no extended BIOS nor the mapper support. Otherwise, "EXTBIO" entry (see below) has been set up and it can be called with various parameters. Note that this test is unnecessary for the applications which are based on MSX-DOS (such as the program which is loaded from the disk), and the program may proceed to the next step.

Ergo use in non-DOS programs is permitted, otherwise it would not need explaining.

Quote:

The slot address of the primary mapper returned by the extended BIOS is the same as the current RAM slot address in page-3, and, in the ordinary environment (DISK-BASIC and MSX-DOS), the same RAM slot is also selected in page-2. In MSX-DOS, this is also true in page-0 and page-1.

Lastly, here use from the BIOS/BASIC environment is simply explicitly mentioned.

And finally, in case there was doubt:

Quote:

The calls are provided because these addresses may be changed in the future version, or to use mapper routines other than MSX-DOS mapper support routines.

This means MU.COM is a perfectly legit solution absent the routines provided by the DiskROM v2.0.

By konamiman

Paragon (1028)

konamiman's picture

09-05-2019, 10:33

So, just to summarize:

1. Extended BIOS is a mechanism provided by the MSX system, regardless of MSX-DOS being present or not.

2. The mapper support ruotines is a standarized memory management mechanism that uses extended BIOS for discovery (extended BIOS tells you if the routines are present, and where).

3. MSX-DOS 2 implements the mapper support routines natively. Other implementations may exist, e.g. MU.COM.

4. Mapper support routines, when available, can be used in any environment (MSX-BASIC or MSX-DOS).

*mic drop* Smile

By DarkSchneider

Paladin (819)

DarkSchneider's picture

09-05-2019, 11:28

What I see is that from the 1st phrase, they join all DOS systems and talk about them without distinction. Let's see some sentences:

Quote:

When the DOS kernel is initialized it checks that there is the memory mapper in the system, and that there is at least 128k of RAM available

The DOS kernel at MSX-DOS level does that? Or it relies on the RAM selected by the MSX boot system? They are talking about MSX-DOS, or DOS, indistinctly when referring to BDOS, or booting from disk environment, call it as each one likes.

This is supported also by the next one:

Quote:

or to use mapper routines other than MSX-DOS mapper support routines.

What MSX-DOS mapper routines? I mean, what appendix to MSX-DOS specification defining memory mapping routines. If it is not defined on MSX-DOS specification, it is not part of the system. Because one could say "go to the MSX-DOS2 specification to see it", no, if I want to do something for strictly MSX-DOS, I have to close only to MSX-DOS specification, and not some other things from here or some others from there.
If using some part of the specification only present in something, you are doing something for that system, even if you don't use all the features. Probably this is creating confusion.

About the environment, yes, I mentioned already, booting from the MSX-DOS2 COMMAND.COM is not a requirement, maybe this is creating confusion too and not sure why this has been understood. But, the MSX-DOS2 memory mapping subsytem must be present in any way and installed into its Extended BIOS place, can be with MSX-DOS2 ROM attached, or installed as a driver, with a RAM device implementing it, or who knows.

About the MU.COM, I think this is a case of habit converted into norm. I haven't used it, but what I read is:

Quote:

The memory mapper BIOS can be used with MSX - DOS 1. Since it is compatible with DOS 2's, programs created for DOS 2's memory mapper BIOS can be made to work with DOS 1 + MU with some additional code

"With some additional code"?, if that is the case, then no, it is not supported. The official method is clear: MSX-DOS2 memory mapping subsystem present, mapped into its Extended BIOS place, ask for Extended BIOS, if present ask for the table, use the table.
Not used MU but if you have to get out from that, it is not supported officially.

Because, let's return to the sentence:

Quote:

The calls are provided because these addresses may be changed in the future version, or to use mapper routines other than MSX-DOS mapper support routines.

That means that you can have installed other implementation of memory mapping routines, but they must be compliant to the MSX-DOS2 memory mapping subsystem specification.

We are talking about specifications not implementations. Standard means everyone using the same method and it works to everyone that meets the specification. The middle steps (AKA implementation) are not a concern. Then, the only official specification I have found concerning memory mapper is MSX-DOS2 one.

By Grauw

Ascended (8202)

Grauw's picture

09-05-2019, 13:28

DarkSchneider wrote:
Quote:

When the DOS kernel is initialized it checks that there is the memory mapper in the system, and that there is at least 128k of RAM available

The DOS kernel at MSX-DOS level does that? Or it relies on the RAM selected by the MSX boot system? They are talking about MSX-DOS, or DOS, indistinctly when referring to BDOS, or booting from disk environment, call it as each one likes.

The MSX-DOS2 kernel and the disk driver together form the DiskROM v2.0. The MSX-DOS2 kernel gives us an implementation of the mapper support routines. It does not rely on the RAM selected by the MSX boot system, it decides for itself which mapper will be the primary.

DarkSchneider wrote:
Quote:

or to use mapper routines other than MSX-DOS mapper support routines.

What MSX-DOS mapper routines?

The MSX-DOS2 implementation of the mapper support routines.

DarkSchneider wrote:

If using some part of the specification only present in something, you are doing something for that system, even if you don't use all the features. Probably this is creating confusion.

Ok, maybe this is just about semantics, but I simply mean to say that using the mapper support routines (as implemented by the MSX-DOS2 kernel) from the BIOS/BASIC environment is legal and supported. You are not limited to the DOS environment.

And to be absolutely explicit, by "BIOS/BASIC environment" I mean the runtime environment in which BIN and ROM files execute, where the BIOS is in page 0 and page 1-3 contain the transient program and optionally the BASIC interpreter. By "DOS environment" I mean the runtime environment in which COM files execute, where pages 0-3 are all RAM for the transient program, only the first 100H is used for a few system entries.

DarkSchneider wrote:

About the environment, yes, I mentioned already, booting from the MSX-DOS2 COMMAND.COM is not a requirement, maybe this is creating confusion too and not sure why this has been understood. But, the MSX-DOS2 memory mapping subsytem must be present in any way and installed into its Extended BIOS place, can be with MSX-DOS2 ROM attached, or installed as a driver, with a RAM device implementing it, or who knows.

Yes, this is how I see it Smile.

DarkSchneider wrote:

About the MU.COM, I think this is a case of habit converted into norm. I haven't used it, but what I read is:

Quote:

The memory mapper BIOS can be used with MSX - DOS 1. Since it is compatible with DOS 2's, programs created for DOS 2's memory mapper BIOS can be made to work with DOS 1 + MU with some additional code

"With some additional code"?, if that is the case, then no, it is not supported. The official method is clear: MSX-DOS2 memory mapping subsystem present, mapped into its Extended BIOS place, ask for Extended BIOS, if present ask for the table, use the table.
Not used MU but if you have to get out from that, it is not supported officially.

I don’t know where this text came from, but I think you should not draw that kind of conclusion if you haven’t at least read the MU.COM documentation.

What the sentence may be referring to is that when an MSX-DOS2 program terminates, MSX-DOS2 tells the mapper support routines to free all the user segments that were allocated. However the MSX-DOS1 and BIOS/BASIC environments do not have knowledge of the mapper support routines so it falls to the application program to clean up after itself. So, you must make sure to free all user segments that you’ve allocated before terminating (just like you are responsible to restore all the slots and active mapper segments, even in MSX-DOS2).

Because this is an MSX-DOS2 feature, not a mapper support routine feature, and even with MSX-DOS2’s mapper support routines the BIOS/BASIC environment also does not provide this feature, MU.COM is fully compliant to the mapper support routines extended BIOS standard (it does provide a few extensions in its own namespace for convenience btw).

Page 2/3
1 | | 3