Thread: c gurus, I need some info.

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    4

    Question c gurus, I need some info.

    Hi all,

    I'm in need of some answers, I'm hoping to find them here =)

    I want to write a program that runs under dos, can browse my hd, play mp3 files, browse my hd while playing mp3 files =), and, even more important, can access my parallel/serial ports.

    Could you help me out on the choice of compiler, maybe even some libraries I would find very usefull? I'm fairly new to c programming, did some school stuff some years ago, was very good at it =), but offcourse, that was only very very very simple c. For this one, I could use some serious advice.

    Thanks in advance!

    Regards,
    mr. joe

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    I'd choose a better operating system
    That looks like some serious multi-tasking, and DOS simply isn't up to that without a lot of extra work on your part.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    yes, i agree with Salem, however, if you are really intent on doing it in DOS, i could give you some advice....

    of course DOS cant really do multitasking, and any multitasking it might be able to do is unknown to me and is probably very hard to do....but that is no matter...multitasking is irrelevant...just use an event loop...

    if you have ever programmed in Windows, you know what an event loop is. unfortunately i dont think you have...

    this is really going to take some serious work...

    first of all, you will need to find out the format for mp3 files. go to www.wotsit.org for that. then you have the daunting task of figuring out how to send the data to the speaker...

    i cant tell you how to do that, I use API's like SDL for that....i dont know how to do it on my own, I am sure you can find it somewhere though.

    To browse your hard drive you will need to create some libraries and a GUI that will allow you to view files. however, this is only to browse the hard drive, not to access files. if you want to actually access files from your program, I suggest moving away from DOS immediately. you might also need to know some assembley for this part of it.

    finally, if you wanna send data to stuff like the serial port...i am pretty sure you use the function outport(). i have no idea exactly what port it is, however, you will have to find that out on your own, maybe by use of the internet.

    this is a pretty daunting task you are undertaking....i suggest some serious research into some of these topics at:

    www.google.com
    My Website

    "Circular logic is good because it is."

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    Thanks for the replies.

    About the operating system.. I would like the pc to boot as fast as possible... for me this is a very important point. And as far as I know, DOS still stays the best platform for this.. please tell me if there is an other sollution!

    And thanks for the tips on DOS programming. Btw, google is the only way I search for *anything*

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Why is booting so quickly so important?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    Well, to give a short summary of the whole story...

    If you didn't get this from my first post... I want to make an advanced audio system for my car (plz don't think omg no, another one..) ... let me explain myself: I'm in need of a decent way of bringing music from my pc to my car. Well, I was thinking about several ways and devices to do so.. but in the end, I stumbled on some websites of people who had been thinking in somewhat the same way as myself, and came up with the idea of making an mp3 player thereself, from an old pc. Thinking up all the possibilities of this idea... I got really interested. If I could write my own program the possibilities are endless. Actually, there would be *no* sollution what-so-ever by which I could see all the details in my head realised, as I possibly could do with being able to use a program I wrote myself. Because when you have e.g. a very large number of musicfiles, you can start thinking of categorizing them in several ways, and make random-on-category modes and so one.

    I've been researching and thinking about this for 2 weeks now.. and I know it is possible to use a remote on the serial port in DOS, control an LCD on the parallel port in DOS, play MP3 files in DOS, read ID3 tags... it's all possible, I'm just going to have a very hard time figuring it all out.

    But as you can imagine, I don't want the car music system to be booting for minutes =) I already have spoken with electronics engineers to design a scheme for giving the pc the protected power it needs, in which I can even boot the pc befóre I start my car, so that would already help, I would startup the pc even from a distance, like opening your doors with the remote before you're there.

    One thing is for sure. I'm not giving this idea up before 2004 or something Having less programmed for years (except in school), I'm now picking up where I was and I really want to realize this, because when I have, I'll have an old boysdream fulfilled. I know pc's, why not let them do what I want?

    Btw, forgot to mention, I'm planning on using a wireless lan under DOS, seems to be possible, to transfer files from my desk to my car. I like comfort It's possible, so why not do it?

    Anyone who has ideas on this, plz feel free to comment
    Last edited by mr. joe; 11-11-2002 at 06:53 AM.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Some ideas

    For the hardware, have a look at this
    http://www.linitx.com/
    The good thing about this is that its an entirely solid-state box - no fans, no hard disk (it uses a flash card), so you don't have to worry about a HD head crash as you drive over a hole. Since it boots from solid-state memory, its probably a bit quicker than a HD.

    For an OS better than DOS for multi-tasking, have a look at this
    http://www.qnx.com/nc/
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Registered User
    Join Date
    Nov 2002
    Posts
    46
    you could use allegro to play your music, I know theres at least one mp3 add-on for it. Djgpp could be the compiler.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    hmz for this project I'm not going to use other but standard hardware en standard dos. But tnx for the links anyhow, they seem very interesting for future projects.

    I was thinking about allegro to. I know someone has programmed a dos mp3 player with it, and if he can do it, I can

    The output via character LCD with HD44780 controller, linked to parallel port can be done fairly easy it seems. Remote control with a receiver on the serial port is even more easier. Mp3 playing is possible with allegro, although on this subject I still need to do a lot of research/learning. And the dos wireless lan... well I know it is possible.. but have put little research in to it untill now.

    Anyone else who feels like contributing... be my guest!

    tnx & greetz

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help displaying info from structure
    By kisiellll in forum C Programming
    Replies: 6
    Last Post: 04-04-2009, 12:51 PM
  2. Question about getting an info class from another Form
    By Joelito in forum C# Programming
    Replies: 0
    Last Post: 10-16-2006, 01:02 PM
  3. Help doing an e-mail program in c...
    By Tyler_Durden in forum C Programming
    Replies: 88
    Last Post: 01-02-2005, 03:12 PM
  4. Binary trees search problem...
    By Umoniel in forum C Programming
    Replies: 2
    Last Post: 02-22-2004, 02:29 PM
  5. Replies: 3
    Last Post: 12-06-2001, 05:30 AM