VOGONS


I have an idea... Oh boy.

Topic actions

Reply 20 of 49, by ZanQuance

User metadata
Rank Member
Rank
Member

Cool project!
Doesn't PoP default to SoundBlaster mode and requires a special command argument for Adlib?
It's been so long since I've played that wonderful game.

[edit] Answering my own question: Yes it does.
Linky

Last edited by ZanQuance on 2016-08-29, 19:19. Edited 1 time in total.

Reply 21 of 49, by Scali

User metadata
Rank l33t
Rank
l33t
adalbert wrote:

Am5x86 @ 160 MHz.

This could be the problem.
OPL2 has very high latency. The programming manual says you need to do 35(!) dummy port reads between commands, to add enough delay.
It could be that the Prince of Persia music routine uses a different kind of layout, and your CPU might be too fast, so it sends commands to the OPL2 chip too quickly (Prince of Persia was released in a time when 10-16 MHz was the usual CPU speed).
Do you have a turbo button or some other way to slow down the system? See if it fixes the audio, or at least makes a change in how things sound.

An OPL3 chip is much faster. Since most people probably pair their 486+ system with an OPL3 or some fast clone, they might not notice the problem. I wouldn't be surprised if your card is fine and the problem is on the software side.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 22 of 49, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

Try a few BIOS settings to slow down the system if these exist:

-Increase 8-bit IO wait states. 16-bit IO wait states should not affect here, but try anyway if you want.
-Turn off external cache
-Turn off internal cache

If nothing else helps, hack the sound drivers to be slower 😀

I don't know if installing EMM386 might help, but it puts the CPU into virtual 86 mode where IO operations are slower, or virtualized even.

Yeah 35 IO reads should be enough, but I think it was applicable only up to maybe 286/12 MHz (appears to run ISA bus at 6MHz and 8-bit cycles take 4 wait states) so anything faster needs extra wait states. The write between register index and data must be at least 2.291 microseconds.

Reply 23 of 49, by adalbert

User metadata
Rank Oldbie
Rank
Oldbie

All right, so it was the PC 😀
Turbo button didn't help, but I disabled the cache and now it sounds perfect.
https://drive.google.com/file/d/0B2rbHIj6SMlF … iew?usp=sharing

I guess that this card isn't a perfect choice for this computer, but maybe I will install it to a 386, for example my Toshiba T3200SXC laptop 😀
Thanks for help everyone!

Repair/electronic stuff videos: https://www.youtube.com/c/adalbertfix
ISA Wi-fi + USB in T3200SXC: https://www.youtube.com/watch?v=WX30t3lYezs
GUI programming for Windows 3.11 (the easy way): https://www.youtube.com/watch?v=d6L272OApVg

Reply 24 of 49, by clueless1

User metadata
Rank l33t
Rank
l33t

Well done, that is incredible that you made that yourself. 😀 Sounds really good too!

The more I learn, the more I realize how much I don't know.
OPL3 FM vs. Roland MT-32 vs. General MIDI DOS Game Comparison
Let's benchmark our systems with cache disabled
DOS PCI Graphics Card Benchmarks

Reply 25 of 49, by Scali

User metadata
Rank l33t
Rank
l33t
adalbert wrote:

All right, so it was the PC 😀

Actually, it's the software.
Makes me wonder if it's easy to find the Adlib routine in PoP and patch it to add proper delays for your system.
Since other games work fine, whatever they use, should work.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 27 of 49, by adalbert

User metadata
Rank Oldbie
Rank
Oldbie

Nope, the same stuff happens when I select Adlib in setup menu or run it with adlib command. At least on 1.3 version.

Repair/electronic stuff videos: https://www.youtube.com/c/adalbertfix
ISA Wi-fi + USB in T3200SXC: https://www.youtube.com/watch?v=WX30t3lYezs
GUI programming for Windows 3.11 (the easy way): https://www.youtube.com/watch?v=d6L272OApVg

Reply 28 of 49, by clueless1

User metadata
Rank l33t
Rank
l33t

We discussed a similar issue in another thread. It seems some sound cards freak out more easily than others when playing old games on fast systems. Supaplex has issues on a 486 with the Audician 32 Plus (which get fixed when you disable L1 cache), but the SB16 and ES16** played sounds normally at 486 speeds without having to disable cache.

The more I learn, the more I realize how much I don't know.
OPL3 FM vs. Roland MT-32 vs. General MIDI DOS Game Comparison
Let's benchmark our systems with cache disabled
DOS PCI Graphics Card Benchmarks

Reply 29 of 49, by Scali

User metadata
Rank l33t
Rank
l33t
clueless1 wrote:

We discussed a similar issue in another thread. It seems some sound cards freak out more easily than others when playing old games on fast systems. Supaplex has issues on a 486 with the Audician 32 Plus (which get fixed when you disable L1 cache), but the SB16 and ES16** played sounds normally at 486 speeds without having to disable cache.

Yes, I had a similar issue with the Crystal Dream demo by Triton.
It had a buggy delay loop when initializing the Sound Blaster DSP.
On a fast 486, a real SB Pro would not initialize quickly enough, and the demo would conclude that there was no SB present. It will likely do the same on regular SB 1.0/1.5/2.0, because their DSPs are very similar, and probably about the same response time.
Take a modern clone however, such as an ESS AudioDrive, and it works fine, because its DSP responds much faster than a real SB, and it gets detected.
I ended up patching the SB detection/initialization code in the demo, and now it works fine on a real SB Pro.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 30 of 49, by Imperious

User metadata
Rank Oldbie
Rank
Oldbie

Very nice work indeed.

The only thing missing on adlib cards is a PC Speaker input, it sounds a lot better through a sound system than the tinny speaker.

Atari 2600, TI994a, Vic20, c64, ZX Spectrum 128, Amstrad CPC464, Atari 65XE, Commodore Plus/4, Amiga 500
PC's from XT 8088, 486, Pentium MMX, K6, Athlon, P3, P4, 775, to current Ryzen 5600x.

Reply 31 of 49, by Scali

User metadata
Rank l33t
Rank
l33t
Imperious wrote:

The only thing missing on adlib cards is a PC Speaker input, it sounds a lot better through a sound system than the tinny speaker.

Haha yea, when 8088 MPH was shown at Revision 2015 on the big screen (and big PA system), it was playing via a Sound Blaster Pro v2. The sound was HUGE 😀

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 32 of 49, by adalbert

User metadata
Rank Oldbie
Rank
Oldbie

I found that project, controlling AdLib with parallel port:
http://www.raphnet.net/electronique/adlib/adlib_en.php

I have already seen that mentioned on this forum, but i will post it here anyway. This project is meant to be used for playing tracker music by computers without ISA slot, but I wonder if that could be used to have music through LPT port in old MS-DOS laptops, without integrated soundcard?

I don't have much experience with low-level PC programming, handling ports, interrupts and stuff, but I understand that both 8-bit ISA and LPT ports can feed data through 8-bit outputs. LPT plug doesn't have address lines, it is fixed at BIOS level or by jumpers, but that shouldn't be a problem because Adlib can receive fake address bits just by pulling adequate levels on adequate pins. So, the question is, if we setup a game to use Adlib sound card at 0x378 address (which would be the address of parallel port), will it just start sending data through parallel port and the in-game music will work? If yes, then I would try to design a SMD version of Adlib with LPT plug and built-in speaker, which would make a nice addition to old laptops, more compatible than the Covox thing. But maybe there will be problems in supporting it directly by the games?

Repair/electronic stuff videos: https://www.youtube.com/c/adalbertfix
ISA Wi-fi + USB in T3200SXC: https://www.youtube.com/watch?v=WX30t3lYezs
GUI programming for Windows 3.11 (the easy way): https://www.youtube.com/watch?v=d6L272OApVg

Reply 33 of 49, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
adalbert wrote:

I found that project, controlling AdLib with parallel port:
http://www.raphnet.net/electronique/adlib/adlib_en.php

I have already seen that mentioned on this forum, but i will post it here anyway. This project is meant to be used for playing tracker music by computers without ISA slot, but I wonder if that could be used to have music through LPT port in old MS-DOS laptops, without integrated soundcard?

No, not without modifying the sound drivers.

adalbert wrote:

I don't have much experience with low-level PC programming, handling ports, interrupts and stuff, but I understand that both 8-bit ISA and LPT ports can feed data through 8-bit outputs. LPT plug doesn't have address lines, it is fixed at BIOS level or by jumpers, but that shouldn't be a problem because Adlib can receive fake address bits just by pulling adequate levels on adequate pins. So, the question is, if we setup a game to use Adlib sound card at 0x378 address (which would be the address of parallel port), will it just start sending data through parallel port and the in-game music will work? If yes, then I would try to design a SMD version of Adlib with LPT plug and built-in speaker, which would make a nice addition to old laptops, more compatible than the Covox thing. But maybe there will be problems in supporting it directly by the games?

Writing to Adlib port 0x388 gives the OPL chip the data, the address, and write strobe, from where the OPL chip knows the register index port is written. The LPT uses the data, address and write strobe just to load a 8-bit latch so it sets the 8 data pins on the connector.

Therefore, to use OPL chip through LPT port, you'd need at least three IO writes to LPT port to simulate a single data write to OPL chip - write data, write control port to enable write signal, write control port again to disable write signal.

So it is certainly possible and you can write music players for this, but modifying games may not be worth it.

However, building an Adlib clone to IDE connector could work better, it has all the necessary signals, and all it needs is changing the base port.

Reply 34 of 49, by adalbert

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the detailed information, now I understand more about how it works. I also found some schematics, claimed to be LPT to ISA converters, which contain some glue logic chips, but I don't know if they will be any good for adlib.

Here is one webpage https://translate.googleusercontent.com/trans … fM1o6SI1z3Wc88Q
and there are another schematics in the attachement.

You said that the IDE port should work so that's a good information. But I am thinking about games and base adressess, some games allow us to set the base address manually, but what about the others? Is there an SET variable that can be used to set Adlib address? Or maybe it would be possible to patch the executable file somehow?

I also thought about more "messy and destructive" option for laptops, which would be replacing hard drive with CF card or removing battery (to make the space), creating a small sized SMD soundcard, hiding it inside of the case and soldering some kynar wires directly to the chipset 😜 i have old Toshiba t1960cs with broken case and lines on the screen, perhaps I could try such experiment. It wouldn't really involve electronic skills, it would be more about craft and knowing how to fit big things when there's little space.

Attachments

  • isalpt.jpg
    Filename
    isalpt.jpg
    File size
    246.67 KiB
    Views
    1618 views
    File license
    Fair use/fair dealing exception

Repair/electronic stuff videos: https://www.youtube.com/c/adalbertfix
ISA Wi-fi + USB in T3200SXC: https://www.youtube.com/watch?v=WX30t3lYezs
GUI programming for Windows 3.11 (the easy way): https://www.youtube.com/watch?v=d6L272OApVg

Reply 35 of 49, by stamasd

User metadata
Rank l33t
Rank
l33t

Since this thread seems to become the gathering point of many AdLib projects, here's what I found. Attempt at a 1:1 reproduction of the original AdLib card, down to PCB art.
https://github.com/schlae/adlib

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 36 of 49, by matze79

User metadata
Rank l33t
Rank
l33t

do you share your files with us, so we can make copy's of your Card ? 😀

i also made a ISA Card:

IMG_20160831_061756.jpg
Filename
IMG_20160831_061756.jpg
File size
2.3 MiB
Views
1581 views
File license
Fair use/fair dealing exception
IMG_20160831_061738.jpg
Filename
IMG_20160831_061738.jpg
File size
2.29 MiB
Views
1581 views
File license
Fair use/fair dealing exception

its a SolidState Disk Drive.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 37 of 49, by FaSMaN

User metadata
Rank Member
Rank
Member

Considering that we have the schematic you might aswell add a internal mixer to mix in sound effects from a second sound card 😀

Something like: http://www.electroschematics.com/544/3-channel-audio-mixer/

Reply 38 of 49, by adalbert

User metadata
Rank Oldbie
Rank
Oldbie
matze79 wrote:

do you share your files with us, so we can make copy's of your Card ? 😀
i also made a ISA Card:
its a SolidState Disk Drive.

I just used the files from Sergey's project, mentioned earlier in this topic - http://www.malinov.com/Home/sergeys-projects/isa-opl2-card , so they are already available 😉
Anyway I attach the PDF file which I prepared for home-making that PCB (it's black and white and the vias are a bit larger, it also has some lines which helped me aligning the boards; image is mirrored).

By the way i found a method of making PCBs without using clothes iron or photochemicals - just print it on laser printer and transfer it with acetone to the copper.
here is someone that described it https://translate.google.com/translate?sl=pl& … t-text=&act=url

Your card looks interesting because I got such DiskOnChip for free some time ago and I didn't know what to do with it, if you would provide the files then I would be able to make use of it 😉

FaSMaN wrote:

Considering that we have the schematic you might aswell add a internal mixer to mix in sound effects from a second sound card 😀

Something like: http://www.electroschematics.com/544/3-channel-audio-mixer/

Thanks, that would be helpful, in fact it would be possible to create a mix of AdLib, Covox and PC-speaker - there are TSRs for Covox that can emulate Sound Blaster digital audio (i tried that and it works, but only with games that work in real mode), and AdLib would play FM music, so we would have a cheap fake SoundBlaster 😁 (isn't that the way how Covox Sound Master(II) worked)?

Attachments

  • Filename
    adlib22bw.pdf
    File size
    793.3 KiB
    Downloads
    67 downloads
    File license
    Fair use/fair dealing exception

Repair/electronic stuff videos: https://www.youtube.com/c/adalbertfix
ISA Wi-fi + USB in T3200SXC: https://www.youtube.com/watch?v=WX30t3lYezs
GUI programming for Windows 3.11 (the easy way): https://www.youtube.com/watch?v=d6L272OApVg

Reply 39 of 49, by stamasd

User metadata
Rank l33t
Rank
l33t

Since recently I became involved in a few vintage audio projects, and I had the PCB... why not.

20170125_142406.jpg

I do have all the parts, I just became bored and hungry so I stopped for now...
Also need to think how to place the volume pot. I do have one that's the right value but not the correct form factor. I'm thinking jumper wires and superglue. 😀

(also this thread is probably better served by moving to the new audio forum).

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O