gerwin wrote:Wasn't 'Gods' from the Bitmap Brothers another one? I don't remember exactly why I did not like this issue much. […]
Show full quote
James-F wrote:Actually I think the use of A220+offset is very rare.
Wasn't 'Gods' from the Bitmap Brothers another one? I don't remember exactly why I did not like this issue much.
James-F wrote:388-220=168, so to reach address 388 for FM the games adds 168 to the base 220 address, very inconvenient.
These games don't send FM data to 220+168=388h and 389h at all, they send it directly to 220h+221h. It is a different set of I/O ports to the same FM chip. It is in the Sound Blaster I/O port specification. Seemingly Creative Labs did not want to rely on a port specified by Adlib.
There is one port address for each channel (left/right). In case of mono/OPL2 only the first port is used: 389h and 221h are then left unused.
No, that is not correct at all.
Adlib:
One OPL2 chip, two IO ports, register index port at 388h and register data port at 389h.
SB 1.X and SB 2 (not Pro):
One OPL2 chip, two IO ports, mapped at two areas, at 388h/389h for Adlib compatibility and 2x8h/2x9h in the SB area. CMS chips, if installed, are at addressess 2x0h/2x1h/2x2h/2x3h in the SB area, for GameBlaster compatibility (except that detection of GameBlaster won't work, have to detect SB DSP presence and version instead).
SB Pro (1): Two OPL2 chips, one for left speaker and one for right speaker. Adlib, SB1 and SB2 compatibility maps ports so that Adlib ports 388h/389h and SB FM ports 2x8h/2x9h actually writes to both chips to get same music from both speakers. Otherwise 2x0h/2x1h accesses the two ports of the left OPL2 chip and 2x2h/2x3h accesses the two ports of the right OPL2 FM chip.
SB Pro (2) and SB16: Single OPL3 chip, takes four IO ports. It powers up into mode where first two OPL3 ports are compatible with single OPL2 and the second two ports are only used for enabling and using the OPL3 mode. Therefore, it has Adlib, SB1 and SB2 compatibility again because ports 388h/389h and 2x8h/2x9h map to first two ports of OPL3 chip. Otherwise the four OPL3 ports are mapped to 2x0h/2x1h/2x2h/2x3h, but it is not SB Pro1 (dual OPL2) compatible in any way, because 2x0h/2x1h access the same OPL3 ports as 388h/389h and 2x8h/2x9h, and 2x2h/2x3h are the extension ports.
So a short summary:
-Games supporting only Adlib use only OPL2 at 388h/389h.
-Games that can detect and support SB 1 or SB 2 could use single SB driver for digital and OPL2 FM so it might just use 2x8h/2x9h for FM, but if a game has separate drivers anyway for music and digital, it might just use the already existing Adlib music driver so it uses ports 388h/389h.
-Games that can detect and support SB Pro (1) for music could use a separate music driver for dual OPL2 stereo FM, so this driver must use ports 2x0h/2x1h/2x2h/2x3h as two OPL2 chips. But it might still use 2x8h/2x9h for writing identical data to both chips simultaneously, and/or 388h/389h for detecting presence of any OPL chip and its type. And detecting second OPL2 at 2x2h/2x3h.
-Games that can detect and support SB Pro (2) or SB16 for music, could use a separate music driver for OPL3 4-op stereo FM, so this driver must use 2x0h/2x1h/2x2h/2x3h as single OPL3 chip. Again 2x8h/2x9h or 388h/389h could be used for detecting any OPL chip and type, but trying to detect OPL chip on 2x2h/2x3h will fail.
-Forcing to use dual OPL2 music driver on OPL3 card will sound wrong
-Forcing to use OPL3 music driver on dual OPL2 card will sound wrong