Hacker News new | past | comments | ask | show | jobs | submit login
8088 PC Speaker MOD player: How it’s done (reenigne.org)
120 points by mmozeiko on Apr 10, 2015 | hide | past | web | favorite | 26 comments



Reading this account brought back memories.

I had a Tandy 2000 when I was a kid. I tried to get polyphonic sound output out of the thing's beeper via PWM, by taking advantage of the fact that the machine's 80186 CPU had three internal very high res timers in addition to the onboard 8253 timer used to drive the speaker (the same timer is used on the PC, but at different I/O locations; the T2K ran DOS but was one of those rare machines that were NOT "100% IBM compatible"). By grabbing a spare timer, programming it, and setting the cpu to halt until it got a timer interrupt and toggle the speaker line when it did, I was able to get a very rough out of tune approximation of multiple tones, as well as rudimentary volume control.

The system clock froze after I ran my experiments but it was worth it... FOR SCIENCE!


I was excited everytime I've heard Mach-3 digitized music back on the PC (DOS) - http://www.mobygames.com/game/dos/mach-3 - then later came all mods/s3m/ft/etc. trackers (I did not had Commodore/Amiga/Atari, just PC and Apple ][)



Oh, yes! Thank you! Even today is sounds cool....


For some reasons this reminds me of the somewhat common hack of soldered together resistors attached to the parallel port used as a simple DAC. Anyone else who burned their fingers doing this?


Yes! (Without the burned fingers). I used this resistor ladder digital to analogue convertor with the NO$ gameboy emulator.


The Covox Speech Thing it was called. At least the official product. But the design was so simple and the parts so cheap people started building them themselves.


This is amazingly elegant. I remember showing off the fact that my laptop had a sound card because I made a parallel port DAC for it.


Geez. I remember doing that as well but completely forgotten about that. Must have been in the very late 80's.


Heh, me too. I even made it stereo. However, in practice it wasn't very useful as it's hard to do anything else when you need to carefully control timing of the output.

OT: Using the parallel port for networking (PLIP) was moderately more useful.


Slightly off topic -- does anyone remember a boot disk in the late 80's or early 90's that would play voice from the PC speaker, saying something to the effect of, "Help, I'm trapped inside the computer"? I can't remember if it was on my 8088 or something later...


I've got an old file named HELPME.COM taken from my family's XT. My father pranked me with it for April Fools, 87 or 88 - he added it to the shutdown script that parked the hard drive. The complete phrase was "Help, somebody get me out of here, I'm trapped in this computer! Help, somebody!" It still works in DOSBOX, although you've got to turn the emulation speed way down - the program does use a timing calibration loop, but it doesn't handle the massive changes in instruction timings since then.


That's the one! Would it be possible for you to upload that file somewhere?


Yes, that would be great! I remember running it over and over listening to the miracle of speech through a ibm pc speaker, wondering how they did it. I also faintly remember some kind of fantasy sports game, with quirky characters kicking a ball or something (it's very vague at this point), which had the most amazing (to me at the time) polyphonic music coming out of this simple speaker on its title screen. I've been looking for that HELPME-file and the title of this game for years.



Thanks so much! Looking forward to the memory trip! Wish I still had my IBM PC XT to run it on, but DOSBOX should do...


It worked! Thanks again. It's also playable in Audacity at ~4000hz sampling rate...


I don't remember that bootdisk, but there was Inertia Player that could play mod files on the PC-Honker.

http://www.pouet.net/prod.php?which=29208


The classic Mac text to speech used to have an Easter egg that said something like "I sure like being inside this fancy computer".


It's still there in OS X! Go to System Preferences -> Dictation & Speech, change your voice to Fred or Bruce and press Play to test the sound. The different voices say different phrases.


To be fair, playing back MOD files on an XT through a PC speaker _has_ been done before -- pretty sure it was ModEdit, but there might have been something else (also). When I lost my Atari ST and only had an XT it was all I had =)


I just tracked down MODEdit at http://www.pouet.net/prod.php?which=50179 . The documentation claims it needs a 10MHz CPU. I tried it on DOSBox and it was able to play through the PC Speaker, but when slowed down to 4.77MHz-equivalent speed it just failed to make any noises at all. If you have a link to another program (or different version of MODEdit) that can play on PC Speaker at 4.77MHz I'd love to check it out and see their techniques.


I'm not sure ModEdit was able to play back at 4.77mhz though...


...as the post acknowledged.


"Playing back a MOD through PC speaker on such a slow machine has never been done before. Here is how we did it."


MODedit didn't work on machines that slow.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: