Slashdot Mirror


Writing Kernel Drivers

There's a pretty cool article running on Linux.com about the how-to for writing kernel drivers - in this case, the PC speaker. Interesting case and it's interesting to see what's going on in there.

72 comments

  1. Re:Y'know, Mod Points aren't radioactive... by Anonymous Coward · · Score: 1

    I wouldn't say that mod points are radioactive, but they *could be* bits of jagged glass...

    I'm logged into a different account right now because I have mod points on another account but I'm stuck with Win98 at work. Those combo boxes quickly deplete the pool of Windows resource handles, causing all sorts of strange rendering problems, and occasionally cause a crash.

    AFAIK, it's only a problem for Win9x. It works just fine with NT systems, and I doubt that it would ever be an issue in Windows 3.1, simply becauase you'd crash long before then, thanks to its yet smaller pool of handles.

  2. Re:printer port dac by Anonymous Coward · · Score: 1

    Wolf3d supported it (as did any game that supported the "Disney Sound Source" or something to that effect).

    Yes, that means that Disney sold a sound card that hooked up to your parallel port and was nothing more than 8 resistors.

  3. Re:WHAT THE BLOODY FUNK? by Anonymous Coward · · Score: 2

    I was one of the ones who modded you down. The problem isn't with your post, it's that I've received moderator points 3 days in a row now. I've given up moderating on merit and just randomly assign mod points to the first few posts I see. Something's screwed up with the system...

  4. See Linux Journal, Issue 53, September 1998 by Anonymous Coward · · Score: 2

    The Linux Journal had a great article by Alessandro Rubini on how to build your own parallel port audio device for Linux with just a couple of chips. The article was on page 70 of LJ issue number 53, September 1998. There is a listing of the driver at available at the LJ website.

  5. Timer frequency by voidptr · · Score: 3

    A good portion of his article was over-riding the Scheduler interrupt vector to give control to his driver > 100HZ. Is there any better way to do this, since it seems like this method is a little suspect (And multiple drivers using this technique might not work together.)

    I'm developing a driver for a bit of cheap hardware that unloads a high-frequency counter onto the host processor and needs to be serviced at about 30kHZ.

    --
    This .sig for unofficial government use only. Official use subject to $500 fine.
  6. Re:Rediscovered a 20-year-old Technique by WWWWolf · · Score: 1

    There was also a hack by which you could place a normal audio casette into the Commodore C2n Datasette drive, and read the varying audio pitches as rudimentary digital data- and output it via the SID chip to play audio tapes. Boy did the quality suck! But you could recognize the tune being played, barely.

    Well, the lack of quality is due to the limitations of the tape drive, it wasn't meant to sample sounds...

    SID is well capable of playing sampled sounds at 8000 hz, 4 bits, mono. This is done by sending the stuff to the volume register - volume change makes a snap, and volume of the snap depends on the value.

    Theoretically, it'd be possible to sample something using a quality sampler (like PC or Amiga sound hardware), convert to SID-playable quality, and play it. When using normal C64, sample rate is limited to around 8000 hz, but when using "modern" hardware like PC with HardSID card or C64 with SuperCPU you might be able to get higher sample rate.

  7. Rediscovered a 20-year-old Technique by dschuetz · · Score: 5
    This is way cool, and it's coolness is not in the least diminished by the fact that something very much like this was used on my old TRS-80 Model I computer, back in, oh, 1981.

    There was no audio (hell, there was barely video) on that machine, and the original data storage medium was cassette tapes. Stored at about 300 baud, or so. The output of the cassette port was about the same +5v / 0v range, and people used the same approach to store data on the tape (I think it's called Frequency Shift Keying, but I'm not sure).

    Anyway, people also realized early on that you could hook an audio amplifier to the output, and do some rudimentary sound effects. People played with it more, got some very nicely done 'drivers' (as it were) that were easy to call from BASIC, and, volia!, you've added laserbeam sound effects to your Android Nim program.

    Then someone really got good with sound (I think it was Leo Christopherson's Ride of the Valkyries program, but it might have been Dancing Demon, too), with a lot more advanced and cool-sounding effects. Then it got really out of hand when someone figured out how to to speech synthesis. Still, to this day, some of the best speech I've heard from a computer.

    And this, ladies and gentlemen, was on a 1.77 MHz Z-80.

    This is yet another example of how, with all the advanced hardware we've got today, we've lost sight of how to "do more with less." Everyone could learn from this...

    1. Re:Rediscovered a 20-year-old Technique by DragonWyatt · · Score: 3

      Dude, the C64 (Commodore) was truly advanced. It had an awesome SID chip that could do all these wonderful things, and the machine was only 1mhz (.999082 in the UK b/c 50hz!).

      But I'm not here to talk about the C64.

      There was a program for the 5.25 disk drive that played "A bicycle built for two" by vibrating the heads at varying frequencies. It was a machine language program downloaded into the drive's 2kb buffer, which redirected the boot (IPL?) routine- the code was downloaded to the drive, then the drive was reset.
      Its last task after playing the music was to restore the original boot vector, and reset again!
      This was undoubtedly inspired by (written by?!!?) the same guys who would cause old IBM drum disks to walk across the floor.

      There was also a hack by which you could place a normal audio casette into the Commodore C2n Datasette drive, and read the varying audio pitches as rudimentary digital data- and output it via the SID chip to play audio tapes. Boy did the quality suck! But you could recognize the tune being played, barely.

      --
      Don't sweat the petty things. But do pet the sweaty things.
    2. Re:Rediscovered a 20-year-old Technique by Borogove · · Score: 1

      Ooh - that brings back memories of frantically switching cables over after the tape had finished loading so that you could get the full glory of the dramatic words 'ROBOT ATTACK'. Dancing Demon was great!
      -- Andrem

      --
      There has been a major scientific break-in
    3. Re:Rediscovered a 20-year-old Technique by ozbird · · Score: 3

      There was no audio (hell, there was barely video) on that machine, and the original data storage medium was cassette tapes. Stored at about 300 baud, or so. The output of the cassette port was about the same +5v / 0v range, and people used the same approach to store data on the tape (I think it's called Frequency Shift Keying, but I'm not sure).

      The TRS-80 cassette schematics can be seen here. Unlike the PC speaker output which is a simple square wave (bilevel), the TRS-80 cassette output was trilevel - default was 1V, with 0V and 2V pulses individually generated.

      Data output to the cassette was generated as a series of positive and negative pulses approximating a sinewave; from memory, there was a clocking pulse-pair followed by another pulse-pair for "1" or nothing for "0". (I may have misremembered this; there were several utilities that increased the data density on the cassette, and I may be remembering one of these instead.)

      Audio sound was generated by manually generating the cassette pulses at given frequencies. Some bright sparks also figured out that you could generate two-voice music by using positive pulses for one voice, and negative pulses for the other. Very neat!

      See also the TRS-80 Documentation Preservation Page - very handy since these computers last a lot longer than their manuals...

  8. Re:The kernel will tell you if anything went wrong by RedGuard · · Score: 1

    You can use WinDBG (a free download from MS) to
    investigate the memory.dmp file.
    HTH.

  9. Re:The kernel will tell you if anything went wrong by RedGuard · · Score: 1

    It's a kernel debugger (if you can't tell with the
    title) so you can get a stack trace, dump
    various kernel mode data structures, find out
    what the various threads were doing and so forth.

  10. Re:The kernel will tell you if anything went wrong by sharkey · · Score: 2

    You mean it won't spit out cryptic messages in white text on a blue background, displayed with a progress meter for the creation of todays incomprehensible MEMORY.DMP file? Seems like it's just not up to Microsoft's level.

    --

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  11. Re:the sound of a lone keyboard clicking away by sharkey · · Score: 2

    I think you're talking about Visual Basic. It does all that, but I haven't heard of any plans to port it to Linux.

    --

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  12. Re:The kernel will tell you if anything went wrong by sharkey · · Score: 2

    You can use Notepad, too. Does WinDBG give any useful info? Info that can be found in the Knowledge Base? Unlike many Event Log errors, that is.

    If it's useful, I'll have to give it a poke or two.

    --

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  13. WILLTELL.BAS by vherva · · Score: 1

    I think it was just a gwbasic proggie...
    10 PLAY "edabd...."
    etc.
    I think I have it somewhere. I also think there's a program to play those gwbasic PLAY "" things on linux...

    --
    -- v --
    1. Re:WILLTELL.BAS by TWX_the_Linux_Zealot · · Score: 1

      This was more that "play", for it had multiple harmonizing parts together, was a compiled .com file, and didn't have any libraries. all that I needed to set it was an app called "timing.com" which would change something in "willtell.com" to set the speed of the song for the computer. the problem is that it would max out how it could be set for a mid-grade 486, and wouldn't be able to be heard properly on any new PCs...
      "Titanic was 3hr and 17min long. They could have lost 3hr and 17min from that."

      --

      IBM had PL/1, with syntax worse than JOSS,
      And everywhere the language went, it was a total loss...
  14. Sovelein, Hannu Solvelein... by vherva · · Score: 5

    Come on, Savolainen can't be that hard to type... You could even cut'n'paste these days.

    Also there has already been one pcspeaker patch for ages - it would've been nice if that had been mentioned.

    Other than that, nice article.

    --
    -- v --
    1. Re:Sovelein, Hannu Solvelein... by Soruk · · Score: 1

      Thanks for the link. The program in the article refused to compile for me - LOADS of errors. I suspect that is related to trying to cut'n'paste from Netscape, but getting Lynx to dump the page out didn't help either...

      --
      -- Soruk
  15. Re:printer port dac by jfunk · · Score: 3

    Yes it was supported. Try using the "Covox Speech Thing" or "Disney Sound Source" drivers. They're all simple DACs that used the Dx lines on the parallel port for the data. ISA sound cards worked on the same principle, but were accessed directly on the bus.

    I built one of these and it was sweet. It also worked under Windows 3.x.

    A Linux driver would be simple as well, if it hasn't already been done.

  16. Hmmm... by Tower · · Score: 5

    From the article:
    "Suppose that you want to publish a Phd thesis on how to wash clothes using your brand of washing machine. You'd write a sequence of steps starting from:

    1) Insert the power cord into the wall socket and switch on the power"

    Now, if you happened to be writing a PhD thesis, wouldn't you make 'insert the power cord into the wall socket' and 'switch on the power' two separate methods, possibly expounding for at least half a page as to the meaning of 'switch on the power', which is rather vague - is that the circuit breaker, or is there some power switch on the washer that I haven't seen yet? (hint: there isn't). Granted, a graduate thesis doesn't need to state the obvious as often as undergrad work, but it sure doesn't hurt. Of course, why someone would write a PhD thesis about the operation (rather than the design) of a new washing machine is beyond me... that might be better covered in the patent ;-)

    --

    --
    "It's tough to be bilingual when you get hit in the head."
    1. Re:Hmmm... by nobody00 · · Score: 1
      >possibly expounding for at least half a page as to the meaning
      >of 'switch on the power', which is rather vague - is that the circuit breaker, or is there some power switch on the
      >washer that I haven't seen yet? (hint: there isn't).

      There's a power switch for every socket in India.

      --
      My .sig ran away!! Bad sig.
  17. Kernel Drivers? by p3d0 · · Score: 1

    "Kernel Drivers"? Does anyone call them that? I would have called them "device drivers". Is this because they don't all deal with devices?
    --

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  18. Re:PC Speaker driver... by mike750 · · Score: 1

    I remember some application that came with Netware 3.11 that would play music and realistic speech over the pc speaker. Sounded pretty good too.

  19. Re:He's in India; hardware limited by raptor21 · · Score: 2

    Please india has a very big market for PCs. You can buy a decent PC(600 celeron) with sound and speakers for $600(Rs.28000). Many people in India have PCs at home and many are able to afford it.

    Have you ever visited India to make that generalization? Are you aware of the buying potential of individuals in that country?

  20. Re:Not that there's anything wrong with it... by Snard · · Score: 1

    You forgot the cassette interface on the back of my original IBM Personal Computer.

    --
    - Mike
  21. Re:Voice Synth... by Emil+Brink · · Score: 2

    Yeah, actually (hold on) it's "Impossible Mission". A great game, but darn was it hard. I never got far. :(

    --
    main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
  22. Re:Excellent Books from guess who by selectspec · · Score: 3

    Both have sections "anticipating 2.4" which give you an idea of where to look for changes. The real problem is going to be with the next major revision, where jiffies might get tossed, the I/O api gets a new face. However, for someone without a clue on how to write a kernel driver, both books are a good start.

    --

    Someone you trust is one of us.

  23. Excellent Books from guess who by selectspec · · Score: 5

    There are 2 awesome books on kernel and driver development from our friends at O'Reilly.

    Understanding the Linux Kernel

    and

    Linux Device Drivers

    --

    Someone you trust is one of us.

    1. Re:Excellent Books from guess who by campgod · · Score: 3

      If you can wait a (few) month(s), "the second edition (due in June) covers Kernel 2.4 and adds discussions of symmetric multiprocessing (SMP), Universal Service Bus (USB), and some new platforms." (from http://www.oreilly.com/catalog/linuxdrive2/) No, I don't work for them, but found the book very helpful in writing a driver for the PLX 9050. It gets my newbie seal of approval.

  24. Re:Other sound support by Skuggan · · Score: 2

    Good.

    And now you know how-to make the driver part. Youre almost done...

    --
    http://www.millnet.se/ GO/U d- s+:+ a C++ UL++++ P- L+++ E W+++ N+ w++ M-- PE+ t+ X++
  25. Wow by jon_c · · Score: 2

    And i didn't think anything could sound crappier then the generic $9.95 speakers my work gave me.

    --
    this is my sig.
  26. Re:PC Speaker driver... by 13013dobbs · · Score: 4

    RIAA found out and sued over it.

    --

    No replies made to AC posts. Please log in.

  27. Re:The kernel will tell you if anything went wrong by andy@petdance.com · · Score: 3
    well...that's one way of telling you something went wrong....

    It's nature's way of telling you in a song.
    --

  28. Re:Not that there's anything wrong with it... by bharath · · Score: 1

    People develop free software to solve problems which they have or to learn about stuff. One very common thing you see in ee/cs labs in Indian engineering schools is that you get only the most neccessary equipment. PC sound cards are not considered that important. In this context such an effort makes a lot of sense.

  29. Re:He's in India; hardware limited by bharath · · Score: 1

    Why is the parent moderated as funny? I am most sure that the person making the comment was not attempting to be. The situation he describes is very true. A sound card is considered a luxury in many Indian schools!

  30. Re:Speak.dll by Hadlock · · Score: 1

    err, not a CD...3.5" diskette...whatever.

    --
    moox. for a new generation.
  31. Speak.dll by Hadlock · · Score: 2

    I remember waaaay back when, when HomePC used to still be around, which was eventually replaced with somthing else...but as an added "sign on bonus", you got a special utilities and fun CD...of the most interesting was some WAV files for windows 3.1 start up and shutdown sounds like "Good Morning", and"Elvis has left the building". Of course, that was back in the day when PC's rarely came with sound cards, and my 386 sx 15, salvaged from my dad's work scrap pile, certianly did not. To solve this problem, they had a nifty thing that allowed you to play .wav files through your PC speaker. That, combined with www.twistedtunes.com (this was long before napster), I was able to play 20 meg wav file songs off my hard drive. It would only play the first 45 seconds or so, of course, the computer couldn't handle the buffering or somthing. I tried installing the win3.1 driver on an old P90 last year that was void a sound card, and had no luck; I was hoping I'd be able to play MP3's off it, but no luck.

    Anyone know of a windowze 9x speak.dll, or equivlent? That would come in awfully handy occasionally.

    --
    moox. for a new generation.
  32. Re:Voice Synth... by ellem · · Score: 1

    No not Mission Impossible...

    Impossible "something or other"...
    ---

    --
    This .sig is fake but accurate.
  33. Bah.. Microsoft has already done this! by Quixote · · Score: 2

    Checkout http://support.microsoft.com/support/kb/articles/Q 261/1/86.ASP ; Microsoft has computers playing classical music all by themselves!

  34. Interesting by cr@ckwhore · · Score: 2

    This article is great for somebody that is already knowledgeable of PC internals that would like to get into the device driver world. One caveat... the writer assumes the ISR of the system is 100HZ... while this is true for most systems, its generally a good idea to calculate the ISR values and adjust the timer calculations from there. That way your driver will match the HZ value of the ISR.

    Subvert Reality.

    --
    Skiers and Riders -- http://www.snowjournal.com
  35. Voice Synth... by wodelltech · · Score: 1

    This has me thinking about a game called MissionImpossible on the C64 that included an impressive bit of voice synth running on some pretty modest hardware.

    If I remember it correctly...it said, "Stay a while...Stay Forever!"

    --
    Your monitor is staring at you.
  36. Re:Not that there's anything wrong with it... by The+Night+Watchman · · Score: 5

    Are you kidding? There's a HUGE market for PC speaker drivers! Personally, I'm waiting for Linux drivers for (1) dot matrix printers, (2) lightpens, (3) Laserdisc players, and (4) the human appendix. Come on, programmers, let's get coding! :-)

    /* Steve */

    --
    "Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of"-TMBG
  37. Re:PC Speaker driver... by pcidevel · · Score: 2
    great... how many ways do we need of sending "beep"? I remember that I used to have this app for an 8088 that played the complete tonal "William Tell Overture" out of the PC speaker... I wonder what happened to it?

    Well sir, if you were to read the article you would find that this has nothing to do with sending a beep, but if you had an mp3 version of the william tell overture you could send that right over your pc speaker.. his device driver is used to play wav's and mp3's over the pc speaker, not just beeping...

    --

    I thought someone said there was going to be free beer!

  38. TRS-80 Wireless speakers by Snotnose · · Score: 1

    Has everyone forgotten one of the neatest hacks of the trash-80? Someone (Christenson I believe) figured out how to write timing loops that used RFI to play tunes on a nearby AM radio. I bought the game just to see this puppy in action, towards the end of the TRS-80's life this was the main method of generating sound.

  39. The kernel will tell you if anything went wrong... by djocyko · · Score: 4
    "The kernel will tell you if anything went wrong. In many cases, it'll reboot the system for you."

    well...that's one way of telling you something went wrong....

  40. Why do they think it's about the speaker? by Spinality · · Score: 5

    Quite a few comments below seem to think this article was cited because of providing information about the speaker as a device. Sheesh! Obviously, it was instead seen as interesting because it was a simple example of driver implementation issues, without all the gory complexity of BitBlts or nasty interrupts or odd data structures. It's a simple example, using a hardware component every user already knows.

    I at least was happy to see it listed here. I like simple examples.

    /rant

    --
    -- We all have enough strength to endure the misfortunes of other people. La Rochefoucauld
    1. Re:Why do they think it's about the speaker? by Pembers · · Score: 1

      Plus which every PC has one of these speakers in it, so any Linux-using PC owner can try the driver straightaway. And if you make a mistake while you're hacking it, there's at least the possibility that it won't render your screen unreadable, or trash your hard disk ;-)

  41. Re:Not that there's anything wrong with it... by BlowCat · · Score: 1

    Both PC speaker and AWE 64 are ISA devices. Perhaps you meant more modern hardware.

  42. Re:printer port dac by Marcel+Waldvogel · · Score: 1
    A Linux driver would be simple as well, if it hasn't already been done.

    There has. Michael Beck/David Woodhouse's PC speaker patch also supports parallel port DACs (and has schematics on how to brew your own).

    -Marcel

  43. Re:He's in India; hardware limited by markom · · Score: 5

    Living in a economically disturbed environment when salaries often range around the price of a decent sound card (or equally fun device) teaches you one rather important lesson in life. Being a young engineer coming from an environment like that (Belgrade, Yugoslavia), taught me to do my best to solve the problems with the only thing I had - my brains. Not my wallet. When I moved out to one economically rather different and technically advanced place (Iceland), my hard time in doing so payed off.

    Effort to make working PC speaker kernel driver is not a waste, although it can be solved with a little bit of cash more eleganlty.

    Marko.

  44. the sound of a lone keyboard clicking away by Cephas+Keken · · Score: 3

    I am waiting for some genius in the linux community to write a /bin/writekerneldriver alias to vim that types everything in for me and then builds the make files, compiles and installs it, just it time for it to core and take down the system

    --

    Guttermouth is a really good band.
  45. PC Speaker driver... by TWX_the_Linux_Zealot · · Score: 3

    great... how many ways do we need of sending "beep"?

    I remember that I used to have this app for an 8088 that played the complete tonal "William Tell Overture" out of the PC speaker... I wonder what happened to it?

    Hiyo Silver... AWAY!!!!

    "Titanic was 3hr and 17min long. They could have lost 3hr and 17min from that."

    --

    IBM had PL/1, with syntax worse than JOSS,
    And everywhere the language went, it was a total loss...
  46. printer port dac by tempmpi · · Score: 2

    Now that we have an PCM capable pc speaker driver, who writes a driver for this nice printer port DACs some people made out of some resitors ?
    I read somewhere that they sounded better than the first pc sound cards. Now it is actually hard to belive that the simplest soundcard have cost $150 and up. They couldn't even do stereo. And at the same time a amiga had hardware wavetable-capable sound hardware.

    --
    Jan
    1. Re:printer port dac by snake_dad · · Score: 1
      > I read somewhere that they sounded better than the first pc sound cards.

      They did. Many early 'cheap' soundcards (read: affordable by a student) did only midi synthesized sound, not samples. This also was a fun, cheap toy to play with. Unfortunately it was not supported by any game, IIRC.

      --
      karma capped .sig seeking available Slashdot poster for long-term relationship.
  47. Re:Not that there's anything wrong with it... by stud9920 · · Score: 1
    The speaker, that is. But couldn't the author's spend more time focusing on development of stuff like AWE64 sound cards and the like? ;-)
    Wow dude ! That would be super high end hardware ! No one could afford these ! Let him write drivers for the Ad Lib that soundcard's bleeding edge !

    More seriously, I don't see what's wrong with the AWE64 linux drivers. I am using one right now.
  48. Re:Not that there's anything wrong with it... by RareHeintz · · Score: 5
    Well, there's always the fact that when you're writing a how-to for a novice audience (and many seasoned programmers would be novices when approaching the task of writing a kernel driver), you write an example that covers the necessary material, and as little else as possible. Doing an AWE64 or a 3Com 10/100 network card or a USB gadget driver might be a neat project, but would also involve a lot of particulars about the manufacturer's hardware that wouldn't have anything to do with what he's trying to teach.

    Anyway, it seems a fine approach to me. Between the knowledge in the article, available source code, and appropriate hardware specs, I imagine a determined hacker could start writing his first real device driver with this article as a starting point.

    OK,
    - B
    --

  49. Re:Not that there's anything wrong with it... by dexter1 · · Score: 2
    This may be obvious, but the ALSA driver has fairly decent documentation on how to add a specific piece of audio hardware to it.

    You can find it here.

  50. Re:Y'know, Mod Points aren't radioactive... by flash_48 · · Score: 1

    Sorry, but ive had 15 mod points in the last 4 days

  51. If you think this is a neat hack... by rebelcool · · Score: 2

    Check out One of the first computers to play music. The way it was done was amazing with what they had to work with.

    --

    -

  52. Other sound support by jmcneill · · Score: 2

    What I would really like to see is PCMCIA sound support -- no free OS so far has supported them, and unfortunately it's the only option I have for sound on my laptop.

  53. PWM is known method by hyrdra · · Score: 1

    I especially like the technique Matthews is using to overcome the lowly 1 bit DAC/timer tied to the PC speaker. However, he fails to mention it is a known method, called PWM, or pulse width modulation. It's a pretty cool and well known trick, but hardly genious as he accredits himself. Any "2nd year DSP student", as he self-admits, knows of this method.

    --


    "I'll just chip in a bit for RedHat: I actually have that installed on my university machine." - Linus, '95
  54. If only my college instructors had taken the time by Gruneun · · Score: 5

    I'd be interested to see this guy as a teacher in a university. To tackle subjects like audio, hardware, and device drivers in one, relatively short article is impressive. To make it sound simple and easy-to-follow is astounding.

    If we had more instructors take the time to explain this way, we would have more people stay and graduate in Engineering and Computer Science. This would result in more capable new hires, fewer unfilled positions, less demand for tech people -- Hey, wait a minute! -- get that article down! Where's the /. effect when you need it?

  55. It goes back further still... by CTho9305 · · Score: 1

    The first sound I heard about was some old beast like that, but it didn't have a speaker. What happened is that it created radio intereference at a frequency based on the data going across the bus, and the instructions could be set up to create crude sound effects. Unfortunately, I read this too long ago to remember the source or find a link :(

  56. Not that there's anything wrong with it... by Dancin_Santa · · Score: 2

    The speaker, that is. But couldn't the author's spend more time focusing on development of stuff like AWE64 sound cards and the like? ;-)

    Dancin Santa

    1. Re:Not that there's anything wrong with it... by MatrixManiac · · Score: 1

      What do the programmers here use to print out their code? Do I hear "dot-matrix printer"?

  57. I Need a Driver.. by Peridriga · · Score: 3

    Currently intrested in finding a Linux driver for my Furby... My Tux doll is lonely and needs something new and annoying to kill...

    --- My Karma is bigger than your...
    ------ This sentence no verb

  58. Goes back even further than that by freeweed · · Score: 2
    My Commodore PET (c1977) has a speaker hacked onto one of the serial ports (iirc). POKE and PEEK to your heart's delight! I'm not much of a hardware guru, but damn was this cool :)

    --
    Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
  59. Speakers and 2-bit sampling by snake_dad · · Score: 2
    Well, it does make me remember the time that a homemade 2-bit sound sampler connected to the userport of the cbm-64 enabled us to create samples, and play it back by manipulating the volume register in the SID ('sound' chip). Sound quality was horrible, but it was state of the art, and one could still understand quite easily how it all worked. Writing a playback driver in 6510 mnemonics sure was fun!

    Modern soundcards and lan devices are a lot harder to grasp, especially if it's the first time that you try to write something like a device-driver.

    --
    karma capped .sig seeking available Slashdot poster for long-term relationship.
  60. RTLinux Alternative PC Seaker control by castle_hawk · · Score: 1

    First: Kudos to Cherry for doing such a neat article!

    Second: Before everyone starts saying 'Win3.1 could do this' - it could but the driver was crap and went to 100% processor usage all the time.

    Third: Check out RTLinux (www.rtlinux.com) for a very cool mod to give real time scheduling to Linux (and now FreeBSD!) - I know the 2.0 version has an example PC speaker driver written as a Real Time kernel module, don't know about the new 3.0 - go get the patches, go have fun!

    This is something I would love to see integrated into the tree at some point.

  61. DOS Kernel Driver Tutorial by Waffle+Iron · · Score: 2
    This article jogged my memory. I actually did the exact same thing in 1987 under MSDOS in assembler. I dug out the ZIP file and took a look.

    Steps involved:

    1. Registering driver: run PULSMOD.COM
    2. Hooking Interrupt: CLI; [play whole sound file]; STI
    3. Stopping playback in progress: Activate the hardware non-maskable interrupt via your aftermarket debugger board
    That's it. It seems like DOS enabled a much simpler and more elegant PC speaker hack. :-P
  62. Re:The kernel will tell you if anything went wrong by Professor+J+Frink · · Score: 3
    I recently had a linux box auto-reboot. It was while testing DRI Rage128 acceleration. In the middle of running FlightGear the screen blanked, then it appeared the machine had quietly and cleanly rebooted.

    At first I found this amazing, then annoying, then ultimately quite useful.

    There's no doubt that eventually I would have crashed X, or the kernel. It might have taken some time, and a lot of effort, and not a little swearing along the way. At least this way I achieved the same success in a minimum of time. I never even had to reach for the reset button.

    A new feature for 2.5 perhaps...

    --
    "Don't get mad, get a monkey!"