Switch RAM/ROM in page 1

Page 1/4
| 2 | 3 | 4

By ASK

Expert (66)

ASK's picture

29-05-2007, 10:48

Hi everyone,

I have been looking the next routine to switch RAM/ROM in page 1 without diskrom:

map.tni.nl/sources/raminpage1.php

Is it correct this for msx2?

I mean, in a msx2, are every ram pages in the same slot?

If the pages are in different slots, is there any search ram routine?

Thx !!!

Login or register to post comments

By Manuel

Ascended (15750)

Manuel's picture

29-05-2007, 22:12

RAM can be in any slot, so you need a RAM search routine. AFAIK that should be available on the net somewhere.

By ASK

Expert (66)

ASK's picture

30-05-2007, 08:23

Thx manuel

Do anybody know the link on the net about RAM search routine?

It would be interesting to post the code here, too.

Thx for your colaboration!!!

By Manuel

Ascended (15750)

Manuel's picture

30-05-2007, 09:31

AFAIK C-BIOS has such a routine, the source code of it is available under a BSD license.

By ASK

Expert (66)

ASK's picture

30-05-2007, 10:47

I have been looking that routine and it show this:

; Select RAM in page 2.
; This assumes the same slot used for page 3 also has RAM in
; slot 2.

And the same question:

Is it correct this for msx2?
I mean, in a msx2, are every ram pages in the same slot?

And another problem: in the source, there is labels that it has not "equ", for example:

; Initialize memory bank
xor a
out (MAP_REG4),a
inc a
out (MAP_REG3),a
inc a
out (MAP_REG2),a
inc a
out (MAP_REG1),a

Too, I have been looking a program's routine of some games called "test.bin".

This routine save in a variable the configuration for ram.

Would be correct the following procedure?

ENASLT: EQU #0024
RAMAD1: EQU "test.bin variable"

Enable_RAM: ld a,(RAMAD1)
ld h,#40
call ENASLT

Thx for your messages

By zeilemaker54

Master (246)

zeilemaker54's picture

30-05-2007, 13:35

It is not safe to assume RAM in page 1 has the same slotid as RAM in page 3 or page 2. For example the SONY HB-F500 has RAM for page 2 and 3 in slot 0-0, while RAM for page 0 and 1 is in slot 2.
Also the RAMAD1 variable which is at &HF342 is only set if the diskenvironment is active. If the MSX has no diskdrive or is booted with SHIFT pressed, this variable is not initialized.

So you better use a RAM search routine. I will look to see if I have such a routine.

By pitpan

Prophet (3131)

pitpan's picture

30-05-2007, 16:31

The same happens in several Toshiba models (HX-20, HX-22, etc.). And can also affect most MSX1 machines with less than 64 KB and using an external memory expansion.

By ASK

Expert (66)

ASK's picture

30-05-2007, 17:26

Thx zeilemaker54. The question about ram slot is clear now.

But the problem is when there the diskrom is not active, it is necessary a RAM search routine and modify the before procedure.

I will thank if you post the routine.

Thx pitpan, I know that in some msx1 models, but the question is in a msx2 with 64k.

About the "test.bin", I have posted before, do anybody know anything?

Would be correct the following procedure?

ENASLT: EQU #0024
RAMAD1: EQU "test.bin variable"

Enable_RAM: ld a,(RAMAD1)
ld h,#40
call ENASLT

Thank !!!

By coldbreeze

Expert (127)

coldbreeze's picture

31-05-2007, 10:28

zeilemaker54: Do you have a RAM search routine by now? This is something I have been looking for as well.

By ASK

Expert (66)

ASK's picture

31-05-2007, 11:27

I am waiting the answer, please.

Another question:

Is there any routine that active the slot pages without calling the BIOS ENASLT procedure?

I mean, to active ram page 0, it is not possible to call to BIOS, any routine?

Thx everyone !!!

By zeilemaker54

Master (246)

zeilemaker54's picture

31-05-2007, 20:42

I am waiting the answer, please.

Another question:

Is there any routine that active the slot pages without calling the BIOS ENASLT procedure?

I mean, to active ram page 0, it is not possible to call to BIOS, any routine?

Thx everyone !!!
Have patience, I am a busy man.....
Switching page 0 with ENASLT is indeed asking for trouble. In that case, you have to bend the rules a bit and directly read and write to the primairy/secundairy slotregister.
If you like, you can take a look in the msx system source files, diskkernel files (disk100 directory) at sourceforge.net/project/downloading.php?group_id=153762&use_mirror=heanet&filename=msxsyssrc.zip&87906982 and look for yourself. I am sure there is a memory search routine somewhere!

Page 1/4
| 2 | 3 | 4