OPL4 & MSX-Audio patch for Puyo Puyo and Gorby's Pipeline

by msd on 12-10-2014, 20:26
Topic: Music
Languages:

Back in 2006 Sonic_aka_T and msd made some patches to run Compile games on OPL4 or MSX-Audio cartridges without the need for the MSX-Audio bios the famous poke -54,35. These patches, for Puyo Puyo and Gorby's Pipeline have never been released. Until now, that is.

Because the OPL4 uses different ports for the FM, this patch changes the ports to C4 and C5 when the OPL4 is used. The patch requires the game disk to be in a physical drive. It can't patch dsk images. The patches can be downloaded from our Downloads database.

Relevant link: OPL4 & MSX-Audio patch for Puyo Puyo and Gorby's Pipeline

Comments (12)

By mars2000you

Enlighted (5047)

mars2000you's picture

12-10-2014, 23:30

Quote:

It can't patch dsk images.

Wrong ! It can be done on dsk images, if they are not in only reading mode. Just tested with blueMSX, and it works. It means also that IPS patches can be created !

By Jorito

Mr. Ambassadors (1725)

Jorito's picture

12-10-2014, 23:31

Heh, weird that msd (the co author of the patch) didn't mention that in his submit...

By msd

Paragon (1309)

msd's picture

13-10-2014, 11:56

@mars2000you: Right!! This patch is running on msx and it expects the disk to be inserted in the active drive. In the emulator you insert the dsk image in the emulator, but for the emulated msx this means it just sees a disk. This patch can't be used if you try to patch a dsk file which is on cf/hdd within the msx.

By mars2000you

Enlighted (5047)

mars2000you's picture

13-10-2014, 12:08

Thanks for the precision. Actually, we were speaking about two different things, as the limitation concerns using of dsk files within an 'advanced' MSX system ('advanced' means using of cf or hdd).

By msd

Paragon (1309)

msd's picture

13-10-2014, 12:33

what is so advanced about that..

By msd

Paragon (1309)

msd's picture

13-10-2014, 19:04

When you have a opl4 I don't consider having a HDD/CF/SD to be advanced Tongue

By Retrofan

Paragon (1211)

Retrofan's picture

13-10-2014, 19:41

@msd: what about your program SETOPL4 with option /O2? Will this also work with these games without patching? By the way, is there a way to block the ADPCM part in software when trying to use MSX-AUDIO software with OPL4? Maybe with a poke so it looks like the MSX-AUDIO is the HX-MU900 without ADPCM unit? Just guessing...

By Grauw

Enlighted (6173)

Grauw's picture

13-10-2014, 20:05

Retrofan: HX-MU900 does not have the sample RAM but the ADPCM hardware is there in the chip (part of Y8950 MSX-AUDIO). It being absent on the OPL chips, software hangs because they check for the data transfer ready flag and it isn’t there, so they keep waiting forever.

By karloch

Paragon (1957)

karloch's picture

13-10-2014, 21:50

Does this work with all Compile games or just with Puyo Puyo and Gorby's?

By msd

Paragon (1309)

msd's picture

13-10-2014, 22:19

@Retrofan: I give some background information about how this works.

First compile games use the msx-audio bios to check if there is a msx-audio device present. It uses the extbio call for this (-54 = ffca). Poke -54,35 destroys this call and the extbio is never really called and some registers content is not changed because of this making a calling program 'believe' there is an msx-audio device present. The problem with this is that it also destroys msx-dos2 which is also using the extbio in some cases. Using this poke it not preferred. This patch changes the msx-audio check by checking the ports of the msx-audio or opl4 instead of calling extbio. So poke 54,35 is not longer required.

Second the opl4 has 2 fm modes.. opl2 and opl3 mode. To make the registers compatible with msx-audio it has to be put in opl2 mode (this is also the default mode of the opl4). We added code in the patch to force the fm part in opl2 mode.

Third the opl4 is on different ports then that msx-audio, which is a good thing otherwise all programs on msx written for msx-audio will detect the opl4 as msx-audio and the adpcm part is not part of the opl family but only part of msx-audio. This path replaces all out instructions to port C0 and C1 to port C4 and C5.

The last thing is the minimum requirement to let a compile game run on the opl4 (unless on the moonsound you place some jumpers). Using setopl4 you can set the correct fm mode and apply poke -54,35.

I think most titles of compile can be altered this way. The only game I didn't succeed modifying was aleste2, but it does contain msx-audio code.

By Retrofan

Paragon (1211)

Retrofan's picture

13-10-2014, 22:24

Grauw wrote:

Retrofan: HX-MU900 does not have the sample RAM but the ADPCM hardware is there in the chip (part of Y8950 MSX-AUDIO). It being absent on the OPL chips, software hangs because they check for the data transfer ready flag and it isn’t there, so they keep waiting forever.

Thanks Grauw, I already thought so, but I always could ask Wink

By Retrofan

Paragon (1211)

Retrofan's picture

13-10-2014, 22:25

@msd: thanks for the information! Hopefully someone could help you with the MSX-AUDIO/OPL4 support for Aleste 2 Smile Don't know how it sounds with MSX-AUDIO...

My MSX profile