I need help on this stuff.. badly.. :) Please help me :) 
Author Message
 I need help on this stuff.. badly.. :) Please help me :)

        I need some sort of thing to take a 2 meg file, read it in to memory,
and shove it out of LPT1 at 22k/second.. Can you help me? :)
        If you want to know why, well, I built this thing called a DAC, it
hooks on the paralell port of your computer. Only a few things support
it, such as modplay pro, and some old crappy games. Well, I got a .WAV
to raw file converter the other day, and I thought "hey.. what can I
do with this?" So, right away, I converted some crappy windoze wav and
made a crappy program to play it out the paralell port.. it sorta
worked.. Only problem was that it was about 2000 times too slow and
every time it read off the disk it stopped for a millisecond or two,
making an annoying click. So, I guess I need some sort of buffer, and
something to speed up my paralell port so I can send out 22k a
second.. :)

If you have any clue on how to help me, PLEASE e-mail reply back to

:) Thanks..



Wed, 18 Jun 1902 08:00:00 GMT  
 I need help on this stuff.. badly.. :) Please help me :)

|>
|>   I need some sort of thing to take a 2 meg file, read it in to memory,
|> and shove it out of LPT1 at 22k/second.. Can you help me? :)
|>   If you want to know why, well, I built this thing called a DAC, it
|> hooks on the paralell port of your computer. Only a few things support
|> it, such as modplay pro, and some old crappy games. Well, I got a .WAV
|> to raw file converter the other day, and I thought "hey.. what can I
|> do with this?" So, right away, I converted some crappy windoze wav and
|> made a crappy program to play it out the paralell port.. it sorta
|> worked.. Only problem was that it was about 2000 times too slow and
|> every time it read off the disk it stopped for a millisecond or two,
|> making an annoying click. So, I guess I need some sort of buffer, and
|> something to speed up my paralell port so I can send out 22k a
|> second.. :)
|>
|> If you have any clue on how to help me, PLEASE e-mail reply back to

|> :) Thanks..
|>
|>

I leave the problem of loading 2MB of data in memory for others to answer...
I'll try some suggestion on the other part...

The solution to your problem is somewhat too involved to be solved by a
generic one.  Conceptually, what you need is to time how long it takes to
send 22K to LPT1.  Reduce this amount of time from one second and this is
the amount of delay you need for every 22K (or 1 sec) of data.  The problem
is where to put this delay.  If you put it all in one block, you would simply
hear a series of quick noise and pauses.  You would have to distribute the
delay all throughout your data.  The other question is, how many times are
you going to partition the delay.

An alternative solution is like this:  You could generate a fixed clock rate,
through programming the PIT.  Now, for each clock tick, you send an appropriate
amount of data onto LPT1 (you can compute how much data from your clock rate
-- i.e 22000 / clockrate).  You should select a clock rate which preferably
is closer to 22Khz (or better yet _exactly_ 22Khz).  Better also to have an
integer (whole) number of bytes to send every clock tick.  The next thing you
need is the handler to send the data -- you could probably do this with a hook
to a timer int (1Ch or 08h).

These are only suggestions.  I thinks other have other ideas as well...

YO!
--
Erwin D. Paguio
http://rh.iist.unu.edu/~ep/ydeeps.html
Pascal and ASM Enthusiast



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need Help BADLY Re: BDE and Windows 95 OEMSR2

2. i need help, badly

3. need help badly

4. Need help with Hailstone Sequence program please Help

5. need help on prcedures (please help)

6. Testers needed for badly needed Turbo Pascal DOS shell

7. I need help fixing this CASE Select code, please help

8. HELP ME PLEASE I NEED HELP ON PROGRAMMING THIS>>>>|||

9. Turbo Pascal 6 NEEDED BADLY!!!!!!

10. Need TP4 or TP5 badly!!!

11. Need Turbo Pascal 4 or 5 Badly!

12. C2Pas badly needed...

 

 
Powered by phpBB® Forum Software