RST 30h

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

By ARTRAG

Enlighted (6247)

ARTRAG's picture

02-10-2018, 07:47

I was almost sure that CALLF was able to call routines in any page but....
maybe it a matter of aging, I am facing an unexpected issue with CALLF

It seems that in certain machines I can do interslot calls in page 0 (i.e. CALLF does not switch itself out), in others CALLF commits suicide by swapping the rom page where it is.

From the msx red book the it seems that RST 30h should work on any page, but maybe it is not guaranteed on any msx 1 machine or on msx2 and upper. Is there anyone who has investigated the point?
What does the standard say on RST 30h?

Login or register to post comments

By DarkSchneider

Paladin (869)

DarkSchneider's picture

02-10-2018, 08:47

It should work.
https://www.konamiman.com/msx/msx2th/th-5b.txt
Look for "List 5.14 Using the hook". I already used in the ISR to call at page 0 with no problem.

I think the most safe way would be create an inter-slot call routine at page 3 like the used by RS-232 (i.e.):

MEXBIh = RST 30h (0F7h)
MEXBIh+1 = Slot ID
MEXBIh+2 = Address
MEXBIh+4 = RET (0C9h)

Then when required set Slot ID and Address and call it. That should work on any system.

By ARTRAG

Enlighted (6247)

ARTRAG's picture

02-10-2018, 09:08

I know, it should, but some bios seem not be supporting calls to page 0
One is sony HB-F500P where the code swaps out itself. Another is the Victor HC-95A.
It seems that interslot calls in page 0 are not supported by all machines

By gdx

Prophet (3037)

gdx's picture

02-10-2018, 09:55

I think the only conditions to use CALLF are Main-Rom (bank 0) and Main-Ram (bank 3) must be present in corresponding banks.

By ARTRAG

Enlighted (6247)

ARTRAG's picture

02-10-2018, 10:50

gdx wrote:

I think the only conditions to use CALLF are Main-Rom (bank 0) and Main-Ram (bank 3) must be present in corresponding banks.

Have you coded something with a routine in ram in page 0 called with CALLF?
If yes, can you run it in one of the above machines
Otherwise I can pass my code

By gdx

Prophet (3037)

gdx's picture

02-10-2018, 12:14

ARTRAG wrote:

Have you coded something with a routine in ram in page 0 called with CALLF?

Rarely because we must write the slot ID in RAM.

ARTRAG wrote:

If yes, can you run it in one of the above machines

No, I do not have these machines but I think slots are well emulated. I can try it on emulator and on my MSXs.

By ARTRAG

Enlighted (6247)

ARTRAG's picture

02-10-2018, 13:49

Pm sent

By DarkSchneider

Paladin (869)

DarkSchneider's picture

02-10-2018, 19:26

I already had my problems with page 0, links:

This works (ENASLT at page 0)
https://www.msx.org/forum/msx-talk/development/enaslt-for-page-0-in-msx-dos
The last routine here also works.
https://www.msx.org/forum/msx-talk/development/safe-set-bios-and-restore-ram-on-page-0-from-msx-dos?page=3

The problem was on computers that had the RAM at slot 0, the same than BIOS (another subslot).
Using RST I’d not detected problems, but put it on another page than 0.

By Grauw

Ascended (8454)

Grauw's picture

02-10-2018, 21:19

ARTRAG wrote:

I know, it should, but some bios seem not be supporting calls to page 0
One is sony HB-F500P where the code swaps out itself. Another is the Victor HC-95A.
It seems that interslot calls in page 0 are not supported by all machines

Indeed, looks like both of those have RAM in slot 0.

https://www.msx.org/wiki/Category:Sony_HB-F500
https://www.msx.org/wiki/Victor_HC-95

The MSX2+ standardises that built-in RAM should be in slot 3, so for software targeting MSX2+ or higher there should be no issue.

By ARTRAG

Enlighted (6247)

ARTRAG's picture

02-10-2018, 20:46

DarkSchneider wrote:

I already had my problems with page 0, links:

This works (ENASLT at page 0)
https://www.msx.org/forum/msx-talk/development/enaslt-for-page-0-in-msx-dos
The last routine here also works.
https://www.msx.org/forum/msx-talk/development/safe-set-bios-and-restore-ram-on-page-0-from-msx-dos?page=3

The problem was on computers that had the RAM at slot 0, the same than BIOS (another subslot).
Using RST I’d not detected problems, but put it on another page than 0.

That has to be the problem: the bios does not guarantee that you can enable ram in page 0 or call code in ram at page 0 on machines with rom and ram in the same primary slot....

By gdx

Prophet (3037)

gdx's picture

07-10-2018, 09:07

Because if works on HB-700P but not onHB-500P , I compared the both Main-Roms. These are exactly same so if there is a bug, it is common (and probably with all the MSX Bios too.
Sony HB-500P and Victor HC-90/95 have RAM in an extended Slot 0. Maybe RST 30h routine can not call to RAM in the area 0000h~3FFFh of an extended Slot 0. We should find the other MSX that have RAM in this area to confirm. A memory extension should fix it. This problem should not occur under MSX-DOS.

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