PCSPLAY
PCSPLAY
I'm releasing a tool for DOS: PCSPLAY!
It can play Prince of Persia 1 PC Speaker sounds & music.
Just type: pcsplay [whatever sound you want to play].
Bugs:
Speed is not very accurate.
It can play Prince of Persia 1 PC Speaker sounds & music.
Just type: pcsplay [whatever sound you want to play].
Bugs:
Speed is not very accurate.
- Attachments
-
- pcsplay.zip
- (6.05 KiB) Downloaded 68 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Re: PCSPLAY
Should this work under DOSBox?
With, for example, "PCSPLAY.EXE IBM_SND1.DAT"?
I tried that, but it doesn't play anything recognizable; after the second note it's stuck or something.
With, for example, "PCSPLAY.EXE IBM_SND1.DAT"?
I tried that, but it doesn't play anything recognizable; after the second note it's stuck or something.
Re: PCSPLAY
Extract them first and then play them.
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Re: PCSPLAY
Ah, yes, that works.
I've attached the .PCS files that can be used with PCSPLAY.
[Edit: (SND54.PCS = intro tune)]
I've attached the .PCS files that can be used with PCSPLAY.
[Edit: (SND54.PCS = intro tune)]
- Attachments
-
- pcs.zip
- .PCS files for PCSPLAY
- (10.61 KiB) Downloaded 67 times
Re: PCSPLAY
Hey musa, I have a question.
I checked the code and as I understand it, each tone has a frequency to generate (note.freq) and a delay (note.duration).
I don't understand what is being passed to 0x42... some kind of frequency? But we already have a note.freq for each note...
I checked the code and as I understand it, each tone has a frequency to generate (note.freq) and a delay (note.duration).
I don't understand what is being passed to 0x42... some kind of frequency? But we already have a note.freq for each note...
Re: PCSPLAY
I was trying set the speed according to the bps to PIT Channel 2.
More information on this can be found here: http://bespin.org/~qz/pc-gpe/pit.txt
More information on this can be found here: http://bespin.org/~qz/pc-gpe/pit.txt
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Re: PCSPLAY
Can you make a custom version for me that displays the following values while running:
- bps, after being read from the handle
- the two values being passed to 0x42
- while the tones are playing, their note.freq and note.duration
I tried porting your program to GNU/Linux and it almost works, but when I pass the intro tune (SND54.PCS) to it, it doesn't sound right, so I'm wondering what I'm doing wrong.
- bps, after being read from the handle
- the two values being passed to 0x42
- while the tones are playing, their note.freq and note.duration
I tried porting your program to GNU/Linux and it almost works, but when I pass the intro tune (SND54.PCS) to it, it doesn't sound right, so I'm wondering what I'm doing wrong.
Re: PCSPLAY
Why would you require that?Norbert wrote: - the two values being passed to 0x42
Does your PC have a PC Speaker? If so, is it properly supported?Norbert wrote: I tried porting your program to GNU/Linux and it almost works, but when I pass the intro tune (SND54.PCS) to it, it doesn't sound right, so I'm wondering what I'm doing wrong.
I have compiled my program with your suggestions except the second one which I'd like to know why you require it.
BTW you need Turbo C to compile the code.
- Attachments
-
- pcsplay.zip
- Update of the program
- (6.12 KiB) Downloaded 59 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Re: PCSPLAY
Not required, I was just curious.musa wrote:Why would you require that?
Well, as I wrote before, it almost works, but the port... "it doesn't sound right".musa wrote:Does your PC have a PC Speaker? If so, is it properly supported?
It still doesn't sound right. I've attached what I've got so far to this post.
Anyways, thanks for creating the custom version. At least it confirmed my suspicion about what's wrong with my code.
I'm not going to look into it any further, but it was fun for a while, looking into how this PC speaker stuff works.
- Attachments
-
- PCSPLAY.C
- GNU/Linux version of PCSPLAY.C; something is still wrong
- (1.35 KiB) Downloaded 66 times
Re: PCSPLAY
Musa, your player plays snd55.pcs too fast. (That is the music played when the "In the Sultan's absence" text is shown.)
Perhaps the value of "bps" is ignored?
I see you're using it to set the timer, but shouldn't you use it in the call to delay instead?
There is another topic about PCspeaker sounds: viewtopic.php?f=67&t=566
I made a player back in 2006 which is mentioned in that topic. I've attached it to this post.
I made the source more readable, and fixed a bug. The value of "whole" used to be 2000, but then it plays everything too slow. Now it's 1000.
Oddly, I remember listening to all the music with the correct speed.
Perhaps the value of "bps" is ignored?
I see you're using it to set the timer, but shouldn't you use it in the call to delay instead?
There is another topic about PCspeaker sounds: viewtopic.php?f=67&t=566
I made a player back in 2006 which is mentioned in that topic. I've attached it to this post.
I made the source more readable, and fixed a bug. The value of "whole" used to be 2000, but then it plays everything too slow. Now it's 1000.
Oddly, I remember listening to all the music with the correct speed.
- Attachments
-
- pcsplay_David.zip
- (75.37 KiB) Downloaded 65 times
Re: PCSPLAY
I've released a newer version of PCSPLAY.
Fixed:
The speed is now more accurate.
Fixed:
The speed is now more accurate.
- Attachments
-
- pcsplay.zip
- A newer release.
- (6.14 KiB) Downloaded 65 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com