Final Smash

Página 4/7
1 | 2 | 3 | | 5 | 6 | 7

Por aoineko

Paladin (1004)

Imagen del aoineko

11-04-2021, 21:49

Guillian wrote:

The problem seems related to wrong slot/subslot selection. Probably the subslot is not correctly set.
The game works using /U option (disabling the subslots).

You are right, I only set the Slot (not the Sub-slot). But if the problem came from there, my 32KB ROM should also not work. Question
Game cartridge aren't always in a main-slot?

Por Grauw

Ascended (10768)

Imagen del Grauw

11-04-2021, 22:07

No, I can just as well put a game cartridge in a slot expander.

The MegaFlashROM SCC+ SD is internally expanded to offer the boot ROM, DiskROM and RAM expansion in other subslots.

You should be able to reproduce it in openMSX by using “-ext slotexpander -cart filename.rom” on the command line.

Is there a particular reason not to use the BIOS slot selection routines? I assume you don’t need to switch slots all the time which would warrant a custom solution for optimal performance… If it’s about switching out page 0, ENASLT won’t work but you can CALSLT to a routine in page 0, and then jump back to your code in the other pages. Subslot selection is a tricky little dance to get right so in my experience it’s better to rely on the BIOS for it in order to avoid compatibility issues like this.

Por Daemos

Prophet (2066)

Imagen del Daemos

11-04-2021, 22:13

Custom slot switching stuff is complicated and requires some nasty tricks to get it right. I once uploaded a romloader that did the switching using the bios nicely but it disapeared from the database.

Best to switch slots using the bios. you propably need page0 so badly in ram because of the custom interrupthandler?
There is another trick for that which costs a little bit of clocktime. Write a hook that jumps out of the bios int handler into your custom int handler but I would not go into those tricks.

All these heavy techniques are only utilized by projects that are squeezing the MSX out like a sour lemon to get every chip into overmode. Stcik with the bios and trow whatever that needs to be done into the proper hooks.

Por aoineko

Paladin (1004)

Imagen del aoineko

11-04-2021, 23:06

As the sub-slot being configured in RAM at address FFFFh, it seems to me quite easy to recover the sub-slot of page 1 (where my header is) and to apply it to pages 0 and 2. Going through Bios seems more complicated to me. Unless there is something I don't understand... which is quite possible. ^^

EDIT: I saw the trick of first selecting the right primary slot in page 3 before changing subslots (http://map.grauw.nl/resources/msx_io_ports.php#subslot). It make the change less trivial but still easy.

Por aoineko

Paladin (1004)

Imagen del aoineko

11-04-2021, 22:43

Grauw wrote:

You should be able to reproduce it in openMSX by using “-ext slotexpander -cart filename.rom” on the command line.

My game works fine with this command line, but maybe it's just the luck of having the right subslots values at FFFFh.

Por Grauw

Ascended (10768)

Imagen del Grauw

11-04-2021, 23:36

At least this crashes for me on a blank screen:

openmsx -machine Panasonic_FS-A1WSX -ext slotexpander -cart fs0211.rom

And this does not:

openmsx -machine Panasonic_FS-A1WSX -cart fs0211.rom

You could also add more to the slot expander before the game. E.g.:

openmsx -machine Panasonic_FS-A1WSX -ext slotexpander -ext ram2mb -ext Yamaha_SFG-05 -cart fs0211.rom

Putting RAM in the same expander on any machine other than the turboR (because it always uses internal RAM) is probably a good way to make sure the subslot register changes.

And of course openMSX also emulates the MegaFlashROM SCC+ SD, so you should be able to reproduce the exact set-up. You’ll have to flash the ROM from the MSX-DOS2 command line with OPFXSD just like on the real hardware.

Por aoineko

Paladin (1004)

Imagen del aoineko

11-04-2021, 23:49

Thank you. I'm now adding subslot support in my crt0. I'll test my new version on OpenMSX.

That said, I wonder if all the cartridge games supporting being launch from an extended slot?
At least, I've never seen a crt0 that supports this feature.

Por Grauw

Ascended (10768)

Imagen del Grauw

12-04-2021, 00:23

The games mentioned with /U here have errors in their slot routines. Though probably all of them use the BIOS for slot selection (most commercial games do), but mess up in their slot ID calculation.

On another note;

aoineko wrote:

EDIT: I saw the trick of first selecting the right primary slot in page 3 before changing subslots (http://map.grauw.nl/resources/msx_io_ports.php#subslot). It make the change less trivial but still easy.

Also, make sure to only access the register at 0FFFFH when the slot is expanded, which you can determine from EXPTBL.

In VGMPlay I have custom slot routines because I switch slots very, very frequently, and I naively thought there would be no need for this check (“it’ll just write to upper memory right, nothing uses that”), and months later I had to track down a very obscure bug which only occurred when a secondary mapper was in a primary slot while playing a track that was long enough to use it, because it corrupted the data in whatever bank was active in page 3. This kind of edge case issues is why I recommend the BIOS :). It is nigh impossible to thoroughly test all the possible slot configurations that one could be using.

Por aoineko

Paladin (1004)

Imagen del aoineko

12-04-2021, 01:27

I made a new version that now work well when launch from an extended slot (according to OpenMSX).

Problem... it still don't work on my real MSX using MFR SCC+ SD without the /U option.
I'll try to investigate using OpenMSX, but I'm not used to MSX extensions and I don't really know how to debug them.
Let's try...

EDIT: Can you please explain that?

Grauw wrote:

Also, make sure to only access the register at 0FFFFH when the slot is expanded, which you can determine from EXPTBL.

If a given slot is not expanded, its corresponding FFFFh value doesn't matter, no?

Por gdx

Enlighted (6215)

Imagen del gdx

12-04-2021, 02:17

There are routines for slots management ready to use in the wiki.

https://www.msx.org/wiki/Develop_a_program_in_cartridge_ROM

The selection of pages 0 and 3 must be made by direct access to the slot registers. And don't forget that you must always select the primary slot on the page 3 to be able to access its secondary slots.

Página 4/7
1 | 2 | 3 | | 5 | 6 | 7