What is the right way to search for FM-Pak and its RAM?

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

By sd_snatcher

Prophet (3480)

sd_snatcher's picture

05-10-2021, 00:40

Yes, as long as the ROM can be found, the cartridge will be detected. You could even load the ROM on a flash cart, or in some rare cases, in RAM (wouldn't work with most disk software as it would be overwritten).

But then, what's the point of having a crippled cartridge like this? The ROM is the cheapest part of the whole circuit. LOL!

By gdx

Enlighted (4801)

gdx's picture

05-10-2021, 02:37

sd_snatcher wrote:

It's not possible to build a functional MSX-Music cartridge without the ROM. The YM2413 chip is write-only, and this is why the procedure to detect an MSX-Music cartridge is based on looking for the ROM signature on the slots.

If the I/O ports are still always enabled, it works unless there is an auto-detection which plays music with the PSG when the FM ROM is not found.

st1mpy wrote:

There is also one cartridge without the ym2413 but with fm-pac rom, it is the PAC-V cartridge by sharksym. It uses the sram utility program from fm-pac for pac-v sram.

This does not make sense unless there are cartridges with ym2413 without ROM.

sd_snatcher wrote:

But then, what's the point of having a crippled cartridge like this? The ROM is the cheapest part of the whole circuit.

And why do people make cartridges without the contacts golden ? They are probably doing everything to have a maximum profit margin.

By st1mpy

Paladin (838)

st1mpy's picture

05-10-2021, 03:03

I wanted a fm chip only solution because I wanted its own sound out (actually one line out for melody tracks, and another line out for the drums). So simpler circuit without a rom.

It's a little different but I think the midi pac is also similar in that it would listen to the same io ports as fmpac. I don't know if midi pac works on machines without fm. then I guess it might have the fm rom to be detected by msx so it thinks it's using a fmpac?

Also it is interesting that rom is checked for fm but I think the purpose is detect the case of internal fm existing when fmpac is inserted. For other purpose why bother detecting when controlling by io, as if there was no fm it simply won't sound. And can't control which slot receive it as all slots will receive the io. The memory mapped io is also available on official fmpac (clones would need more logic to do this) so it could have multiple fmpacs inserted and controlled individually.

Anyway regarding the original post about sram. The LAST WAR game supports saving to sram and the source code is available (printed in msx fan 1989 May issue). There is also a msx fan issue that shows a small basic/machine code source to detect the pac/sram. (This is on page 34 of 1988 May isdue).

By Meits

Scribe (6456)

Meits's picture

05-10-2021, 03:33

@st1mpy: midipac has msx music rom built in to be detected.
@gdx: what's with the golden contacts?

By gdx

Enlighted (4801)

gdx's picture

05-10-2021, 12:40

Meits wrote:

what's with the golden contacts?

Just a question of quality.

By gdx

Enlighted (4801)

gdx's picture

25-10-2021, 10:07

Grauw wrote:

For software there’s no point in ignoring good practice and writing blindly, since they need detection anyway in order to enable the FM-PAC I/O.

I looked the detection method in the datapack and to see the I/O ports status at launch and it says something like that:

MSX Datapack 2 wrote:

To find the MSX-Music ROM, you must search for the text "OPLL" in all slots at 401Ch (401Ch-401Fh).

Then you can determine whether it is a cartridge MSX-Music or an MSX-Music integrated into the comtuter by the text at 4018h (4018h-401Bh) in this slot. If the text is "APRL", it is an MSX-Music integrated into the computer. If it is "PAC2", it is the FM-PAC cartridge.

When it is an MSX-Music integrated into the computer, only the I/O ports 7Ch and 7Dh can be used to access the OPPL registers.

In the case of a MSX-Music cartridge, it is possible to access the OPPL registers via the I/O ports 7Ch and 7Dh, or the addresses 7FF4h and 7FF5h.

To prevent two MSX-Music from being active at the same time, an external MSX-Music searches for the text "APRLOPLL" in all slots and activates its I/O ports when not found so that the volume is not not twice as loud since the two FM sound sources played at the same time add up.

http://ngs.no.coocan.jp/doc/wiki.cgi/datapack?page=3%2E1+MSX...

The internal MSX-Music is not disabled at launch. The 4 characters at address 4018h is the MSX-Music ID. It may be different from one cartridge to another.

It seems that the case of inserting two external MSX-Music was not foreseen. Can someone confirm it?

Anyway the wiki needs to be fixed.

By Grauw

Ascended (10135)

Grauw's picture

25-10-2021, 10:48

The internal MSX-MUSIC can not be disabled, where did you get that impression? The external MSX-MUSIC (FM-PAC) is disabled initially, and should not be enabled if an internal MSX-MUSIC is found. This matches the description on the wiki, so I’m not sure what needs to be fixed there?

As for the case of two external MSX-MUSIC, I would disassemble the FM-PAC ROM to make sure what it checks exactly, there could be inaccuracies in the datapack description for brevity. People have used multiple FM-PACs simultaneously so it should work, although I don’t know if the FM-BIOS supports more than one MSX-MUSIC.

By gdx

Enlighted (4801)

gdx's picture

25-10-2021, 11:58

Grauw wrote:

The internal MSX-MUSIC can not be disabled, where did you get that impression?

What you said above.

Grauw wrote:

The external MSX-MUSIC (FM-PAC) is disabled initially, and should not be enabled if an internal MSX-MUSIC is found.

The datapack says that external MSX-MUSIC is disabled only if an internal MSX-MUSIC is found.

Grauw wrote:

This matches the description on the wiki, so I’m not sure what needs to be fixed there?

At least the description about "APRL", "PAC2" and "OPLL". For the rest, it depends on the exact behavior of the FM-PAC at start-up.

Grauw wrote:

As for the case of two external MSX-MUSIC, I would disassemble the FM-PAC ROM to make sure what it checks exactly

Thanks.

By Grauw

Ascended (10135)

Grauw's picture

25-10-2021, 13:02

gdx wrote:
Grauw wrote:

The internal MSX-MUSIC can not be disabled, where did you get that impression?

What you said above.

Can you quote where I said it, because it must’ve been a typo and I want to correct it.

gdx wrote:
Grauw wrote:

The external MSX-MUSIC (FM-PAC) is disabled initially, and should not be enabled if an internal MSX-MUSIC is found.

The datapack says that external MSX-MUSIC is disabled only if an internal MSX-MUSIC is found.

It only does that when the FM-BIOS INIOPL function is called. This can be easily confirmed in MSX-BASIC: I/O to the FM-PAC ports has no effect until after you call _MUSIC.

So the I/O will remain disabled until the software enables it.

gdx wrote:
Grauw wrote:

This matches the description on the wiki, so I’m not sure what needs to be fixed there?

At least the description about "APRL", "PAC2" and "OPLL". For the rest, it depends on the exact behavior of the FM-PAC at start-up.

I think the current description is fine. PAC2 does not need to be mentioned in the detection section, since it is not relevant for the detection and enabling procedure.

The important part is to recognise “internal” MSX-MUSIC by the APRLOPLL signature and prefer it over other external cartridges (*OPLL). And if the selected device is not internal, I/O needs to be enabled.

gdx wrote:
Grauw wrote:

As for the case of two external MSX-MUSIC, I would disassemble the FM-PAC ROM to make sure what it checks exactly

Thanks.

To be clear, I’m not going to do that Smile.

But if you’re interested in the precise handling of that case that’s what I suggest to do.

By gdx

Enlighted (4801)

gdx's picture

25-10-2021, 13:37

I read somewhere that the "internal" MSX-MUSIC could be deactivated and in this case even the ROM disappears and therefore it is no longer reactivable.

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