Skip to content

Commit

Permalink
Merge pull request #15 from bjt42/wip
Browse files Browse the repository at this point in the history
Release 1.8
  • Loading branch information
bjt42 committed Feb 20, 2014
2 parents 50af63d + def378d commit f646e24
Show file tree
Hide file tree
Showing 15 changed files with 661 additions and 222 deletions.
53 changes: 32 additions & 21 deletions README
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-----------------------------------------
SoftMPU 1.7 - Software MPU-401 Emulator
-----------------------------------------
Copyright (C) 2013 bjt, elianda
Copyright (C) 2002-2013 The DOSBox Team
-----------------------------------------
----------------------------------------
SoftMPU 1.8 - Software MPU-401 Emulator
----------------------------------------
Copyright (C) 2013-2014 bjt, elianda
Copyright (C) 2002-2013 The DOSBox Team
----------------------------------------

Release Notes (12/12/13)
Release Notes (20/02/14)

WHAT IS IT?

Expand All @@ -16,28 +16,40 @@ Sound Blaster and other common sound cards.
WHY'S THIS USEFUL?

Games from the late 80s and early 90s that support music via the Roland
MT-32/CM-32L often expect to find a hardware MPU interface that supports
MT-32/CM-32L often expect to find a hardware MPU-401 interface that supports
'intelligent mode'. These are now expensive and difficult to find.

By supporting the 'intelligent mode' features in software, these games will
work with the basic MIDI interfaces found on sound cards.

REQUIREMENTS

- EMM386 4.46+ (MS-DOS 6.2) or QEMM 7.03+ must be loaded
- Sound Blaster (or compatible) sound card
- Roland LA synth (e.g. MT-32, CM-32L) or a sound card with MT-32 emulation
- EMM386 4.46+ (MS-DOS 6.2) or QEMM 7.03+
- Sound Blaster (or compatible) sound card (MPU-401 & SB-MIDI mode)
- Serial port (Serial MIDI mode)

USING SOFTMPU
USING SOFTMPU: MPU-401 & SB-MIDI MODE

Run SoftMPU specifying the base I/O port address and interrupt of your Sound
Blaster, and the base I/O port address of the MPU interface, e.g.
Run SoftMPU specifying the base port address and interrupt of your Sound
Blaster, and the base port address of the MPU-401 interface, e.g.

SOFTMPU.EXE /SB:220 /IRQ:5 /MPU:330

The optional /SBMIDI switch forces Sound Blaster MIDI to be used. This mode
is intended for use with the Sound Blaster Pro 2 and other sound cards
without a hardware MPU interface. Game compatibility may be reduced.
The optional /OUTPUT:SBMIDI switch forces Sound Blaster MIDI to be used. This
mode is intended for use with the Sound Blaster Pro 2 and other sound cards
without a hardware MPU-401 interface. Game compatibility may be reduced.

USING SOFTMPU: SERIAL MIDI MODE

Run SoftMPU specifying the serial interface to be used and the base port
address of the MPU-401 interface, e.g.

SOFTMPU.EXE /MPU:330 /OUTPUT:COM1

A Sound Blaster base port address and IRQ can optionally be specified if
MPU-401 interrupts are required.

FURTHER OPTIONS

The optional /DELAYSYSEX switch enables small transmission delays to prevent
buffer overflow with the Rev.0 MT-32.
Expand All @@ -56,12 +68,11 @@ Solution: Use a mouse driver that supports direct hardware access e.g.

Problem: Some games expect to find an MPU interface on IRQ 2, but my sound
card doesn't support it.
Solution: Use IRQ 9 instead. This is supported by Yamaha YMF71x sound cards,
maybe others too.
Solution: Configure your sound card to use IRQ 9.

Problem: SoftMPU can't find a hardware MPU interface when using a Sound
Blaster Pro 2 or older sound card.
Solution: Run SoftMPU with the /SBMIDI switch.
Solution: Run SoftMPU with the /OUTPUT:SBMIDI switch.

Problem: My Rev.0 MT-32 displays "EXC. BUFFER OVERFLOW". Music playback
sounds incorrect.
Expand All @@ -73,7 +84,7 @@ Solution: Restart your PC. Software that reprograms the Real-Time Clock will

FURTHER INFO

For game compatibility information, please see
For compatibility information and serial MIDI cable pinouts, please see
http://github.com/bjt42/softmpu/wiki.

BUILDING SOFTMPU
Expand Down
Binary file modified SOFTMPU.EXE
Binary file not shown.
56 changes: 48 additions & 8 deletions SRC/APPSTR.ASM
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;
; Copyright (C) 2013 bjt
; Copyright (C) 2013-2014 bjt
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
Expand All @@ -20,13 +20,53 @@
; SoftMPU by bjt - Software MPU-401 Emulator
; ------------------------------------------
;
; App ID substrings
; App ID hashstrings
;

; Disable SB interrupts for these intelligent mode apps
AppIDStrings DB 'FB.E' ; Flashback
DB 'MM3.' ; Might and Magic III
DB 'SOC.' ; Sensible Soccer
DB 'UNVG' ; Waxworks
DB 'WC2.' ; Wing Commander II
; Enable SB interrupts for these intelligent mode apps
AppIDStrings DW 0EEC5h ; A-10 Tank Killer (A.EXE)
DW 0D893h ; A-10 Tank Killer (A10.COM)
DW 04787h ; A-10 Tank Killer (PS.EXE)
DW 0423Dh ; Companions Of Xanth (XANTH.EXE)
DW 07676h ; Curse Of Enchantia (CURSE.EXE)
DW 04769h ; David Wolf (AGENT.EXE)
DW 040CBh ; Ecargxus (TPC.EXE)
DW 0F60Bh ; Eric The Unready (ERIC.EXE)
DW 093C4h ; Eric The Unready (ERICMAIN.EXE)
DW 0DE4Fh ; Gateway (GATE.EXE)
DW 05C63h ; Gateway 2 (HOME.EXE)
DW 00E1Ch ; Gateway 2 (HOMEMAIN.EXE)
DW 0BC52h ; Innocent Until Caught (INNOCENT.EXE)
DW 0DE19h ; It Came From The Desert (CHICKEN.EXE)
DW 02A3Eh ; It Came From The Desert (HGAME.EXE)
DW 0AC2Fh ; It Came From The Desert (HUGE.EXE)
DW 04C14h ; It Came From The Desert (INIT.EXE)
DW 0D514h ; It Came From The Desert (SHELL.EXE)
DW 0A7B7h ; It Came From The Desert (SUBS.EXE)
DW 025BCh ; It Came From The Desert (UNDER.EXE)
DW 0AB4Dh ; It Came From The Desert (WGAME.EXE)
DW 017E9h ; Laser Squad (INTRO1.EXE)
DW 02F6Ah ; Laser Squad (INTRO2.EXE)
DW 046EBh ; Laser Squad (INTRO3.EXE)
DW 0702Fh ; Laser Squad (LASER.EXE)
DW 0DF0Ch ; Laser Squad (LSQDBCC.EXE)
DW 0121Eh ; Laser Squad (SQUAD.EXE)
DW 02717h ; Princess Maker 2 (MMD.COM)
DW 03A59h ; Princess Maker 2 (PM2.EXE)
DW 04B38h ; Princess Maker 2 (PMDL.COM)
DW 0586Bh ; Sabre Team (SABRE.EXE)
DW 0F843h ; Spellcasting 101 (S101.EXE)
DW 0B9FCh ; Spellcasting 101 (S101MAIN.EXE)
DW 045E4h ; Spellcasting 101 (SB-SOUND.COM)
DW 03384h ; Spellcasting 201 (S201.EXE)
DW 06CBDh ; Spellcasting 201 (S201MAIN.EXE)
DW 06EC5h ; Spellcasting 301 (S301.EXE)
DW 01F7Eh ; Spellcasting 301 (S301MAIN.EXE)
DW 02F68h ; Shadoworlds (SW.EXE)
DW 01893h ; Superhero League Of Hoboken (SLH.EXE)
DW 07B01h ; Timequest (TQ.EXE)
DW 09E0Ah ; Timequest (TIMEMAIN.EXE)
DW 0F1F6h ; Wonderland (GAME.EXE)
DW 0C490h ; Eric The Unready & Gateway 2 & Spellcasting 201/301 (RTLINKST.COM)
DW 0703Dh ; Gateway & It Came From The Desert (MAIN.EXE)
DB 00h ; End
6 changes: 4 additions & 2 deletions SRC/EXPORT.H
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2012 The DOSBox Team
* Copyright (C) 2013 bjt, elianda
* Copyright (C) 2013-2014 bjt, elianda
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -36,6 +36,7 @@ typedef unsigned int Bitu;

typedef enum bool {false = 0,true = 1} bool;
typedef enum EventID {MPU_EVENT,RESET_DONE,EOI_HANDLER,NUM_EVENTS} EventID;
typedef enum OutputMode {M_MPU401,M_SBMIDI,M_SERIAL} OutputMode;

/* SOFTMPU: QEMM interface parameters */
typedef struct {
Expand All @@ -46,8 +47,9 @@ typedef struct {
/* Interface functions */
void PIC_Update(bool blocking);

void MPU401_Init(void far* qpientry,Bitu sbport,Bitu irq,Bitu mpuport,bool sbmidi,bool delaysysex,bool fakeallnotesoff);
void MPU401_Init(void far* qpientry,Bitu sbport,Bitu irq,Bitu mpuport,Bitu serialport,OutputMode outputmode,bool delaysysex,bool fakeallnotesoff);
void MPU401_SetEnableSBIRQ(bool enable);
void MPU401_SetEnableMPUVerFix(bool enable);
Bitu MPU401_ReadStatus(void);
void MPU401_WriteCommand(Bitu val);
Bitu MPU401_ReadData(void);
Expand Down
Loading

0 comments on commit f646e24

Please sign in to comment.