*START HERE* SoftMPU 1.91 - Software Intelligent MPU-401 Emulator

Forum for discussion of bugs, code, and other aspects of SoftMPU.

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjwil1991 » 2014-5-29 @ 21:14

carlostex wrote:Hi again bjt!!

One question:

I took a look into the source code in the MIDI.C file and i'm wondering if you could add a new switch for better compatibility for the Yamaha FB-01. The only thing the switch needs to do is to chande the constant SYSEX_SIZE to something like 8192. From what i could understand from this thread: http://www.vogons.org/viewtopic.php?f=32&t=9555&start=20 such value should give SoftMPU better compatibility for the FB-01. Maybe just throw an if else type condition to define the SISEX_SYZE.

I would try this myself but i would have to download the proper compilers to build SoftMPU. Let me know if it's a viable option to include such an option for a new SoftMPU version, or maybe you can give me some proper links to download all necessary stuff to compile, and i'll change the source code myself.

Here's the compiled SoftMPU version with the updated SYSEX_SIZE from 1024 to 8192

Hope this helps. Plus, when I updated the SYSEX_SIZE from 1024 to 8192, EA Sports NHL Hockey 95 works with the MT-32. For some odd reason, the game requires a higher SYSEX_SIZE. In DOSBox, it works, but in SoftMPU, it doesn't work, unless your running Windows 3.11 and in the MS-DOS menu.

Edit: File removed: changing the build version for less confusion.
Last edited by bjwil1991 on 2014-5-31 @ 00:54, edited 1 time in total.
C64, WheelWriter 10 Series II QuietWriter 8, Pack-Mate 28 Plus, K6-2/300, Pavilion N3350, iMac G3 & G4, Socket 370, 2x Inspiron 600m, Athlon 64, Dimension 4550 & E510, ThinkPad R40, Presario C700, ASUS X54C, Raspberry Pi B+, 2B-3B+, Custom FX-6300
User avatar
bjwil1991
Oldbie
 
Posts: 1683
Joined: 2013-8-14 @ 03:10
Location: SE Michigan, USA

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-5-30 @ 09:47

Hi bjwil1991

Please could you recompile with a version number that makes it clear it's a customised build, to avoid future confusion.

This change nearly doubles SoftMPU's memory footprint, so it would be nice to get it working as a command-line option.
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjwil1991 » 2014-5-31 @ 00:53

bjt wrote:Hi bjwil1991

Please could you recompile with a version number that makes it clear it's a customised build, to avoid future confusion.

This change nearly doubles SoftMPU's memory footprint, so it would be nice to get it working as a command-line option.

Darn, I knew I forgot something...
C64, WheelWriter 10 Series II QuietWriter 8, Pack-Mate 28 Plus, K6-2/300, Pavilion N3350, iMac G3 & G4, Socket 370, 2x Inspiron 600m, Athlon 64, Dimension 4550 & E510, ThinkPad R40, Presario C700, ASUS X54C, Raspberry Pi B+, 2B-3B+, Custom FX-6300
User avatar
bjwil1991
Oldbie
 
Posts: 1683
Joined: 2013-8-14 @ 03:10
Location: SE Michigan, USA

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby carlostex » 2014-6-01 @ 17:48

Hey bjt, will you work on a version with a command line option?
User avatar
carlostex
l33t
 
Posts: 2045
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-04 @ 09:39

Had a quick look yesterday and it should be possible.
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby carlostex » 2014-6-04 @ 16:05

bjt wrote:Had a quick look yesterday and it should be possible.


Cool, i thought so too! I'll be waiting for the next release and provide some feedback!
User avatar
carlostex
l33t
 
Posts: 2045
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-04 @ 20:33

Cool, I think I've just about got it now. Do you have an FB-01 to test?
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-05 @ 10:03

If anyone would like to test this I've attached a version below. Please don't distribute this, an official release will follow shortly :cool:

The new command-line switch is /LARGESYSEX.
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Cloudschatze » 2014-6-05 @ 16:03

Why not just remove the SysEx string-size limitation from SoftMPU entirely? It's my understanding that DOSBOX' self-imposed limit is arbitrary to begin with (corresponding to the buffer size), and isn't reflective of an actual MPU-401 besides.
User avatar
Cloudschatze
Oldbie
 
Posts: 1007
Joined: 2005-6-16 @ 14:32

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-05 @ 16:25

The larger buffer bumps up conventional memory usage from 8K to 17K, so if it's only needed for the FB-01 it's best to keep it optional.
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Cloudschatze » 2014-6-05 @ 16:32

This is going to sound ignorant, but is the I/O such that a larger buffer is really needed though? The MPU-401 itself only has a 1700-byte buffer.
User avatar
Cloudschatze
Oldbie
 
Posts: 1007
Joined: 2005-6-16 @ 14:32

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby carlostex » 2014-6-05 @ 21:09

I tested with a FB01 and now Silpheed plays the music correctly. I tested Space Quest III and besides only the first SYSEX getting fucked up, the rest goes very well and plays correctly. Awesome.

I'll try to test more games.
User avatar
carlostex
l33t
 
Posts: 2045
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Great Hierophant » 2014-6-05 @ 21:33

carlostex wrote:I tested Space Quest III and besides only the first SYSEX getting fucked up, the rest goes very well and plays correctly.


In DOSBox compiled with an 8,192 byte sysex buffer size, you have to send the sysex twice (by starting the game, exiting and restarting the game) to only get dump/received! on the second attempt. Is it the same with the game you tried?
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Cloudschatze » 2014-6-05 @ 21:52

Would someone mind compiling either DOSBox or SoftMPU with the SysEx size restriction removed entirely, and with a fixed, 1700-byte buffer?
User avatar
Cloudschatze
Oldbie
 
Posts: 1007
Joined: 2005-6-16 @ 14:32

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby carlostex » 2014-6-05 @ 22:32

Great Hierophant wrote:
carlostex wrote:I tested Space Quest III and besides only the first SYSEX getting fucked up, the rest goes very well and plays correctly.


In DOSBox compiled with an 8,192 byte sysex buffer size, you have to send the sysex twice (by starting the game, exiting and restarting the game) to only get dump/received! on the second attempt. Is it the same with the game you tried?


I didn't need to exit and start the game again.The first MIDI message does make a dump/error but a dump/received will follow immediately. If you don't mind
the first couple of garbled notes before the sierra logo shows up, the rest of the music plays fine and polyphony seems to be quite correct.
User avatar
carlostex
l33t
 
Posts: 2045
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-06 @ 09:11

Cloudschatze wrote:This is going to sound ignorant, but is the I/O such that a larger buffer is really needed though? The MPU-401 itself only has a 1700-byte buffer.


Not at all :happy: DOSBox's MIDI code works by buffering each message in its entirety before sending it. In the case of SYSEX this means a buffer large enough for the largest SYSEX message.

This allows some cool stuff like discarding invalid SYSEX and the MT-32 SYSEX delay feature. In the case of the delay feature SYSEX can be buffered (transparently to the game) while any delay is counting down. This is good because we don't want to pause the game or cause it to give up sending.

However, it gives rise to this problem with FB-01 SYSEX (how come they're so big anyway?)

How about we keep the 1KB buffer, but just flush it out to the hardware when it becomes full? That would allow arbitrary-length SYSEX without too many changes to the existing code.
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Great Hierophant » 2014-6-07 @ 16:29

I tried it with the SYSEXFLUSH version of SoftMPU and the new /largesysex parameter. The first time I start a Sierra game with the FB-01 driver, the unit reports dump/error then dump/received. If I exit the game and restart it, all I get is dump/received. This behavior coincides with the behavior described years ago : viewtopic.php?f=32&t=9555&hilit=yamaha+sysex&start=20 (post 8 on that page)

Thus the workaround continues to work, but it would really be nice for SoftMPU and DOSBox to get it right the first time, like a real MPU-401. There must be some data the driver is sending that causes some issue the emulated MPU-401 .
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-08 @ 16:21

Just to confirm, does the workaround behaviour you describe above still happen with the DUMPSYSEX version without using /LARGESYSEX?
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby Great Hierophant » 2014-6-08 @ 22:04

bjt wrote:Just to confirm, does the workaround behaviour you describe above still happen with the DUMPSYSEX version without using /LARGESYSEX?


I never tried the DUMPSYSEX version, which I believe you may have posted and removed. If DUMPSYSEX just increases the sysex buffer size to 8,192 bytes, then it probably will behave exactly the same. The sysex transfer to the FB-01 will never complete without the /LARGESYSEX option.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: SoftMPU 1.8 - Software Intelligent MPU-401 Emulator

Postby bjt » 2014-6-08 @ 22:46

Sorry. I meant SYSEXFLUSH. Doh!
User avatar
bjt
Oldbie
 
Posts: 1430
Joined: 2013-2-06 @ 10:40
Location: UK

PreviousNext

Return to SoftMPU

Who is online

Users browsing this forum: No registered users and 1 guest