MIDI-PAC utilities fixed for Turbo-R

by WORP3 on 24-07-2011, 15:48
Topic: Software
Tags: Utilities
Languages:

WORP3 has been actively working on improving the MIDI-PAC support, a device that allows you to play MSX MUSIC through a MIDI device. Since the first release, Turbo-R users were unfortunately forced to turn off turbo mode in order for most of the applications to work. Those days are over now WORP3 has added R800 support to all his utilities. The updated versions and manual can be found in the download section of WORP3's website.

Relevant link: WORP3

Comments (29)

By Retrofan

Paragon (1231)

Retrofan's picture

26-07-2011, 11:21

Thanks Tjeerd! Well done. Looking forward to your next release.

By WORP3

Paladin (806)

WORP3's picture

26-07-2011, 11:30

Probably you don't have to wait too long for that version as i'm already working on that. I only had to wait for my new scope to arrive, so i can think up a better way on how to discriminate some events that are occurring.

By Louthrax

Prophet (2167)

Louthrax's picture

10-02-2014, 16:34

First, thanks a lot WORP3 for this amazing product ! (bought this in Nijmegen 2 weeks ago and only had the opputunity to test it this week-end).

Everything works great, I just need to re-finish all FM-PAC games to enjoy the difference :-) And maybe try to create custom .MPC files for each game (having a little batch file that checks for existence of a .MPC file when running a .DSK file).

Just a question : the MIDI PAC does seem to have the same speed-limitation as FM-PAC when running games in R800 mode. If I launch Aleste 2 in R800 mode for example, I have the same sound-glitches as with a real FM-PAC (so the emulation is quite good :-)). Is there a way to prevent that ?

By WORP3

Paladin (806)

WORP3's picture

10-02-2014, 20:41

Hi Louthrax,

Always nice to hear that you like the MIDI-PAC and are having some good retro times, thanks Wink

Can you give me some more information on what kind of glitches you are experiencing while playing Aleste 2 on a R800 ?
Are those glitches gone when you are playing it while in z80 mode ?

By Louthrax

Prophet (2167)

Louthrax's picture

10-02-2014, 22:30

Thanks for quick answer, everything is perfect in Z80 mode. In R800 mode, it's like some notes are ignored or skipped. It really reminds me what's happening when you run a game on a normal FM-PAC in R800 mode.

I have this configuration :
- TurboR FS-A1 ST expanded to 512Kb RAM.
- MegaFlashRAM SCC+ SD.
- I'm using RunIt with the R800 flag enabled to launch Aleste 2.
- I've checked that I have the latest (0.80) BIOS installed on the MIDI-PAC.
- Midi device is the Roland Sound Canvas SC-155.
- I'm launching the game in 60Hz mode.

I can make an audio-capture of the problem if you need it.

Thanks,

Laurent

By Louthrax

Prophet (2167)

Louthrax's picture

10-02-2014, 23:22

Some more informations: Aleste 1 works better in R800 mode, there are still some glitches but they are hardly noticeable. Maybe another R800 mode is used in this case (R800 ROM instead of DRAM ??). I'll check that.

Undeadline in R800 is almost perfect, except at the end of a level (when you beat the boss): in Z80 mode, the music is stopped, in R800, a note keeps playing until start of next level (like if the music hasn't been stopped).

By WORP3

Paladin (806)

WORP3's picture

10-02-2014, 23:25

For the development of the MIDI-PAC 've used the original ym2413 timing, so in fact it's no wonder that the MIDI-PAC will loose some data when it's received data to quickly, in fact just like the FMPAC. I know that it can handle data a bit faster then the YM2413 but it's still depends on the timing of the original ym2413 timing. I've got no idea which games will fail on a turbo-r running in the rom and/or dram mode ?
Don't know for sure if I can overcome this problem, in fact making it somewhat faster or increasing the data buffers. But I will look into it when i've got some spare time. Could you send me a recording of a music including a glitch and one without it ?

BTW, don't forget to reset your soundcanvas to the default GM settings so once in a while. It will remember all kind of settings while playing for example midi files. No need if you are only using it with your MIDI-PAC.

By Louthrax

Prophet (2167)

Louthrax's picture

11-02-2014, 00:48

OK, that explains it all :-) !

I think some games are making their out(#7c),a (or equivalent) faster than other. Undeadline does it in a routine:
push af
add a,044H
ld (X01A4),a
ld (X01B2),a
pop af
out (07CH),a
ret

So the delay between 2 "out (07CH),a" is OK most of the time, even in R800 mode. I suspect Aleste 2 to do this in a faster way, that's why the problems are more important in this game.

Maybe the timing could be set as a parameter of the MIDI-PAC (with MPCONFIG ?). So we could set the MIDI-PAC to FM-PAC compatible mode, or to Turbo mode ?

Anyway, the other solution would just be to patch the problematic games with extra-delays between 2 out(7c),a. This has already been done for UndeadLine (unfortunately the patched version does not work with RunIt). I'll give it a try for Aleste 1 & 2, it shouldn't be so hard with some luck. The XAK games would be interesting to patch too.

I'll record the glitches and send it to you this week.

Regards,

Laurent

By WORP3

Paladin (806)

WORP3's picture

11-02-2014, 10:11

During the development of the MIDI-PAC i've measured the response time of the data handler or the time it will take for the MIDI-PAC to handle the data. It will flip handshake (HANDSH) when data has been handled. Writing a new register adres (07Ch isn't a problem)

As you can see it's will take around 35uS for the MIDI-PAC to handle a special MIDI-PAC register.


As you can see, the YM2413 will need 84 clk cycles or around 297uS to handle it's data, so far no problem.

Now the downside and probably the reason it's glitching is that all the incoming data has to be handled and converted to MIDI data which is taking some time, in the meantime new incoming data is buffered. I know that some games are updating all of the ym2413 registers in one go at the end of it;s irq routine. So as all of the data is written as a block of data, and the MSX is running in a fast mode I can only assume that this data buffer is running full which is resulting in a loss of data.

Maybe I can make a special test version to verify to above, this means if you are willing to test it ?

Changing the game is off-coarse an option but not always the best solution as their are a lot of games out there ;)

By Louthrax

Prophet (2167)

Louthrax's picture

11-02-2014, 13:54

WORP3 wrote:

Maybe I can make a special test version to verify to above, this means if you are willing to test it ?
Changing the game is off-coarse an option but not always the best solution as their are a lot of games out there Wink

Of course, I'll be very happy to test that ! It would be great if this could work (and could interest lots of TurboR users : exta sound quality + all games in R800 mode without hacking Running Naked in a Field of Flowers ).

By Louthrax

Prophet (2167)

Louthrax's picture

11-02-2014, 23:30

WAIT !!! I noticed something : the TurboR FM-PAC still seems to be active behind the MIDI-PAC on my FS-A1 ST ! (I plugged the MSX audio output into the sound canvas input to have PSG sounds too).
So both FM-PAC and MIDI-PAC are playing the same thing at the same time !

I don't think there's a way to mute the internal TurboR FM-PAC only (and keep the MIDI-PAC only active), as port 07Ch is shared by both. This smells like soldering here ! Please let me know if there's a software solution for this, if I can avoid opening my precious A1ST it will be better Smile

Also, I've tried R800 mode without plugging the TurboR audio-output on my sound-canvas : there are still sound glitches, less as when the FM-PAC is still active, but some notes are missing.

By WORP3

Paladin (806)

WORP3's picture

12-02-2014, 08:48

Big smile
I don't think you can change this with some software as the YM2413 is directly connected to the adr/data bus. So probably you will have to cut the audio output or better add an additional switch for it.

I will make an addition version, just to verify the reason of those glitches.

By Louthrax

Prophet (2167)

Louthrax's picture

12-02-2014, 10:27

Yes, having a separate PSG + SCC (external) only output seems difficult, a switch solution on the ym2413 sound output looks better !

By WORP3

Paladin (806)

WORP3's picture

16-02-2014, 20:34

Sorry for keeping your waiting, but because Philips is still staling the replacement of my HDTV I still got my MSX monitor stuck at the living room Sad Will send you the new version as soon as my monitor has returned to my MSX.

By mesiasmsx

Prophet (3189)

mesiasmsx's picture

17-02-2014, 10:27

Thanks!

By mesiasmsx

Prophet (3189)

mesiasmsx's picture

17-02-2014, 10:43

Louthrax wrote:

Thanks for quick answer, everything is perfect in Z80 mode. In R800 mode, it's like some notes are ignored or skipped. It really reminds me what's happening when you run a game on a normal FM-PAC in R800 mode.

I have this configuration :
- TurboR FS-A1 ST expanded to 512Kb RAM.
- MegaFlashRAM SCC+ SD.
- I'm using RunIt with the R800 flag enabled to launch Aleste 2.
- I've checked that I have the latest (0.80) BIOS installed on the MIDI-PAC.
- Midi device is the Roland Sound Canvas SC-155.
- I'm launching the game in 60Hz mode.

I can make an audio-capture of the problem if you need it.

Thanks,

Laurent

Lol, i have the same config, a exception in midi device, i have Yamaha MU50 .

By luppie

Paladin (854)

luppie's picture

17-02-2014, 22:40

Tjeerd, if you need a spare MSX monitor, just let me know Wink
I've got some spares.

By WORP3

Paladin (806)

WORP3's picture

18-02-2014, 09:54

@Luppie, thanks for the offer but I will stick to my own lcd monitor.
It's just that's it all connected now in the living room and I'm a bit lazy in disconnecting it there, connecting it again on my msx and after the test do it again to get it back again to the living room. The rep. department of Philips assured me that my replacement TV has been ordered and can be expected very soon now.
Then better deliver soon as my TV is already gone for around 5 weeks and i'm loosing my patience Sad

By Louthrax

Prophet (2167)

Louthrax's picture

18-02-2014, 11:08

mesiasmsx wrote:

Lol, i have the same config, a exception in midi device, i have Yamaha MU50 .

Well, that's not a bad config Big smile How are the sounds with the MU50 ?
The only drawback with the SC-155 is that the controls are on top, so you can't stack it when you have litte space left on your MSX desktop !

By Louthrax

Prophet (2167)

Louthrax's picture

18-02-2014, 11:17

WORP3 wrote:

@Luppie, thanks for the offer but I will stick to my own lcd monitor.
It's just that's it all connected now in the living room and I'm a bit lazy in disconnecting it there, connecting it again on my msx and after the test do it again to get it back again to the living room. The rep. department of Philips assured me that my replacement TV has been ordered and can be expected very soon now.
Then better deliver soon as my TV is already gone for around 5 weeks and i'm loosing my patience Sad

Not an emergency anyway !

I've been playing Dragon Slayer 6 for some hours these days on MIDI-PAC, and then switched back to FM-PAC to test the difference, and... OMG ! It's like switching from FM-PAC to PSG Tongue
The MIDI-PAC sounds are really flawless in DS6, I think they composed the music on a MIDI device and transposed that to FM-PAC for MSX. In some other games, FM-PAC sound effects sound a bit weird on MIDI-PAC (like explosions in Aleste 2) , but DS6 is just perfect !

By WORP3

Paladin (806)

WORP3's picture

18-03-2014, 13:01

@Louthrax, i've made a new test version for you, could you test this version and verify if this version performs a little bit better when using the turbo-r ?

http://www.worp3.com/midipac/programs/MPA_V081.bin

Thanks for the nice dragon slayer message ;)

By anonymous

incognito ergo sum (109)

anonymous's picture

18-03-2014, 13:29

DS6 is definitely one of those games that almost seem to be made for the MIDI-PAC. Smile Though I tend to crank up the TV sound along with it, because else the (PSG) drums are amiss.

By WORP3

Paladin (806)

WORP3's picture

18-03-2014, 16:23

Indeed DS6 is really beautiful and luckily i've got my msx connected to my synths line in, so psg is always mixed with my synth Wink

By JohnHassink

Ambassador (5423)

JohnHassink's picture

18-03-2014, 16:34

Does that work? Shocked! Please tell me more!

By Louthrax

Prophet (2167)

Louthrax's picture

18-03-2014, 17:04

JohnHassink wrote:

Does that work? Shocked! Please tell me more!

I'm taking the PSG sounds from the "Monitor" output of my VG8235 (it could also work from the SCART plug I guess, maybe with a bit more noise), and plug it in the line-in of my SoundCanvas. The result is just perfect, PSG and MIDI volumes are well balanced with default settings.

By Louthrax

Prophet (2167)

Louthrax's picture

18-03-2014, 17:06

WORP3 wrote:

@Louthrax, i've made a new test version for you, could you test this version and verify if this version performs a little bit better when using the turbo-r ?

http://www.worp3.com/midipac/programs/MPA_V081.bin

Thanks for the nice dragon slayer message ;)

Thanks a lot, I'll test this tonight. I'll still need to add a switch to disable integrated FM-PAC if it works !

By JohnHassink

Ambassador (5423)

JohnHassink's picture

18-03-2014, 17:33

@ Louthrax:
Nice solution! I guess it helps that you're using a machine with no internal FM. IIRC, I did get the 'normal' FM along with the PSG.

By WORP3

Paladin (806)

WORP3's picture

18-03-2014, 17:37

@Louthrax, Don't forget that this is an unreleased version and in generally only intended to verify if this version is behaving better or maybe even worse on the turbo-r in turbo mode.

By WORP3

Paladin (806)

WORP3's picture

31-03-2014, 13:46

@Louthrax, Any news on the test ?