RST 30h

Page 3/7
1 | 2 | | 4 | 5 | 6 | 7

By gdx

Prophet (2869)

gdx's picture

09-10-2018, 17:31

Grauw wrote:

In the MSX2+ standard they "fixed" it by standardising the slot layout

I don't think it is related to RST 30. It was logical to put the internal RAM in slot 3 since MSX2 so that when inserting an extension, it is used as main RAM. Most manufacturers have realized this before the MSX2+. RST 30 routine has buggy. If Artrag wants support all MSX, he must do an alternative routine.

By Grauw

Ascended (8206)

Grauw's picture

10-10-2018, 00:02

From the MSX turboR technical handbook (autotranslate) (edit: link):

Quote:

2.1.6 Slots in MSX 2 + that have changed

As I have written so far, the thing that made MSX machine rich extensibility and characterized it is a slot. But this slot was also a weakness of MSX. That is, "In the conventional MSX, slot configuration differs depending on the model, software compatibility problems are likely to occur".
For example, the slot 1 and 3 are assigned to the cartridge slot, and certain software does not work. Also, if RAM is placed in the expansion slot of slot 3, you can not use sub-ROM function from DOS, etc. If you carefully make a program and check the operation on all MSX machines, It should be avoided. However, if you adapt to machines of all slot configurations, you will also experience the harmful effect that the program will be lengthened or the execution speed will be slow. It is a slot that is not straightforward.
This became MSX 2 +, finally some criteria regarding slot composition was decided. Figure 2.4 and Figure 2.5 show an example of the slot configuration of the MSX 2 +. Depending on the number of software installed in the main unit, only the slot 3 is expanded and the slot 0 and the slot 3 are expanded.

Probably the mapper cartridges were also a consideration, but the one does not exclude the other.

By DarkSchneider

Paladin (819)

DarkSchneider's picture

10-10-2018, 09:14

Grauw wrote:

Not sure why you’re calling it faulty. It’s just something that’s not supported by the BIOS, just like you can’t touch page 3. It also seems like a hard thing to fix, because subslot switching code can’t be in page 3, so it needs to be in another, which is page 0 which is why there’s this problem. Only way to fix it would be to check for this case and interslot call a support routine in page 1, but this isn’t functionality provided by the BIOS, probably due to space, overhead and complexity considerations.

Is there any document indicating that limitation? I think the MSX standard does not prohibit the inter-slot for page 0, then if a manufacturer put the RAM at slot 0, and the function does not work, is their concern and not the software programmer to modify the BIOS of that system to comply.

By Grauw

Ascended (8206)

Grauw's picture

10-10-2018, 09:36

The whole point of the MSX standard was so that manufacturers could just smack together some common chips and an ASCII-provided BIOS and Basic and not worry about creating their own stuff. This configuration of RAM in page 0 was allowed, several manufacturers did it and the MSX-ENGINE chips offer to expand slot 0. Can't expect them to have precognition about every possible issue that arises from a configuration that they made fully according to the standard. That the documentation is lacking in describing those issues (or that the BIOS has problems with it in the first place) is not their fault....

It's interesting that compatibility is always used as a big argument for the use of the BIOS, yet in cases like these the dogma of using the BIOS seems to be more important than compatibility. Note that the BIOS can't easily be replaced, whereas software can easily be adapted to maximise compatibility. For me, compatibility should be the first concern, the means by which it is achieved second.

By DarkSchneider

Paladin (819)

DarkSchneider's picture

10-10-2018, 09:54

Grauw wrote:

It's interesting that compatibility is always used as a big argument for the use of the BIOS, yet in cases like these the dogma of using the BIOS seems to be more important than compatibility. Note that the BIOS can't easily be replaced, whereas software can easily be adapted to maximise compatibility. For me, compatibility should be the first concern, the means by which it is achieved second.

That's not feasible. There is a standard, there are rules, so everyone can use the established and common way of doing things and they work. The BIOS is the standard for accessing system features, if it does not work, then is a bug of the system.
You simply can't program specifically for each system or configuration, because they can be infinite, and your software can work today, because you programmed (also increasing the program size, and complexity, more bugs sources), but tomorrow someone can launch another thing by its own and your software fails on it.

That's why wy have standards, HAL, protocols, and more. So it's their concern to do it to work by the standard established way.

Think on it like a manufacturer that releases a device with a faulty device driver for the OS. But in this case the device is the machine itself.

By Eugeny_Brychkov

Paragon (1079)

Eugeny_Brychkov's picture

10-10-2018, 09:58

I was watching this thread for some time, and now I want to contribute, finally Smile

@ARTRAG: your initial explanation in the very first post is understandable, but what is the actual problem?

Then, the issue must have been solved in the DOS. Operating system sets up slot switching routines in the CPU bank 3 RAM, and to avoid self-destruction CALLF jumps back and forth between bank 0 and bank 3. In addition, bank 0's visible RAM is still havig specific vital system call code set up (CALLF, ENASLT, RDSLT/WRSLT).
DOS2 goes even further, heavily using CPU bank 0, copying required important system calls into respective call addresses as well as its code and data, having its RAM in bank 0 almost always turned on when operating. However it is a good question if DOS2 will work on machines under consideration where RAM is in the same slot/subslot as main ROM.

Finally, if you are developing software, with the knowledge of this RST30 issue, just ensure that this back and forth jumping is properly handled, and called addresses are properly set up. Of course exact solution will depend on the type of software you are writing, and mode of its execution.

By Grauw

Ascended (8206)

Grauw's picture

10-10-2018, 10:49

Eugeny_Brychkov wrote:

Then, the issue must have been solved in the DOS. Operating system sets up slot switching routines in the CPU bank 3 RAM, and to avoid self-destruction CALLF jumps back and forth between bank 0 and bank 3.

You can’t set up slot switching routines in page 3 alone, because subslot switching requires page 3 to be swapped out. So the subslot switching code must always live in page 0, 1 or 2. However, this gives issues if that’s the page you want to switch. The fault for this really lies with the ever-so-slightly confusing & convoluted subslot system that ASCII built.

In the BIOS, the subslot switching code lives in page 0, but as we see that’s causing issues if you want to change the subslot for that page. The only solution is to also have subslot switching code in another page, then interslot call to that page if slot 0 is attempted to be switched. That isn’t going to be fast, obviously, and is not what ASCII did, so we have to live with the limitation and work around it. Either by not swapping out page 0, or using DOS, or write our own custom slot switching routine to use for swapping out page 0 and putting that in another page (not recommended by me in general).

By Eugeny_Brychkov

Paragon (1079)

Eugeny_Brychkov's picture

10-10-2018, 11:36

Ok, agree. Just tried modified VG8000 with 64K RAM in subslot 0.1. It commits suicide when writing SSSR.

Then questions:

  1. why programmer wants to call slot 0 subslot other than subslot 0 (ROM) on MSX1 machines and ones not supporting such calls?
  2. are there any MSX1/MSX2 machines which *may have* something user-defined (not exp ROM) in subslot to slot 0 - for example RAM or cartridge? Which machines are affected?

By DarkSchneider

Paladin (819)

DarkSchneider's picture

10-10-2018, 11:39

On 64KB machines, you have to put RAM on page 0 (or inter-slot call) or you will only have access to 48KB (page 1-3). All MSX2 are 64KB machines at least I think.

Then, if you can't ENASLT or CALLF the RAM at page 0...because the machine boots with BIOS at page 0.

By Eugeny_Brychkov

Paragon (1079)

Eugeny_Brychkov's picture

10-10-2018, 11:46

@DarkSchneider, I alreaddy did it to prove that issue exists. Can you answer my questions above?

Page 3/7
1 | 2 | | 4 | 5 | 6 | 7