DIGIPLAY

Discuss PoP1 for DOS here.
Post Reply
User avatar
musa
Vizier
Vizier
Posts: 112
Joined: March 27th, 2011, 2:06 pm
Location: Nairobi, Kenya

DIGIPLAY

Post by musa »

DIGIPLAY plays Prince of Persia 1 digital sounds on the Sound Blaster.

Make sure your Sound Blaster port is at 0x220 and your DMA channel is 1. Also make sure that the sounds are extracted by PR with --raw option.

Note: May not work on all systems.
Attachments
DIGIPLAY.ZIP
First release.
(6.78 KiB) Downloaded 101 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: DIGIPLAY

Post by Norbert »

Apparently the backup that poirot gave me after the website went down didn't include this thread either.
Last 1 or 2 weeks of March 2013 didn't survive, I'm afraid.
However, surely we have everything relevant back now...
User avatar
musa
Vizier
Vizier
Posts: 112
Joined: March 27th, 2011, 2:06 pm
Location: Nairobi, Kenya

Re: DIGIPLAY

Post by musa »

What are you talking about? I released the tool today.
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: DIGIPLAY

Post by Norbert »

musa wrote:What are you talking about? I released the tool today.
I was talking about PCSPLAY.
Also PLAY by musa. This is something else though; missed that. :)
User avatar
musa
Vizier
Vizier
Posts: 112
Joined: March 27th, 2011, 2:06 pm
Location: Nairobi, Kenya

Re: DIGIPLAY

Post by musa »

I've released DIGIPLAY v1.1.

New:
Fixed bug with DSP so it should work with DosBox.
Attachments
DIGIPLAY.ZIP
version 1.1
(6.79 KiB) Downloaded 75 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: DIGIPLAY

Post by David »

I just tried it, it works in DOSBox.
The only bug I found is that the player seems to wait too long after the sound is played.

I'd guess that this line is wrong:

Code: Select all

	delay(size);
Size is in samples, but delay() expects milliseconds.
The line should be:

Code: Select all

	delay(size*1000L/rate);
(Or perhaps round up instead of down?)
I made this change, recompiled with Turbo C, and now it works correctly.

Some other things:
* i and count_values are declared but not used.
* fil could be an int instead of long.
* DIGIPLAY won't play sound 10015 (level door opening) because it begins with 0x81 instead of 0x01. That means that the sound is looped in the game.
User avatar
musa
Vizier
Vizier
Posts: 112
Joined: March 27th, 2011, 2:06 pm
Location: Nairobi, Kenya

Re: DIGIPLAY

Post by musa »

DIGIPLAY v1.2 is out! You can now play PoP2 sounds (but not compressed sounds).
Attachments
DIGIPLAY.ZIP
version 1.2
(6.98 KiB) Downloaded 74 times
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: DIGIPLAY

Post by Norbert »

I'm curious...
I understand that

Code: Select all

outp(dsp_reset, 1);
sets dsp_reset to 1, but what does, for example,

Code: Select all

outp(0xa, 5);
do?
Both of these seem to be values; neither are variables?
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: DIGIPLAY

Post by David »

Norbert wrote:outp(dsp_reset, 1); sets dsp_reset to 1
outp() does not set any variables.

outp(x,y) will output the byte y on the I/O port with address x. Both x and y can be any expression.
Its pair, inp(x) will input a byte from I/O port x and returns it.

The dsp_* variables contain I/O port addresses of the Sound Blaster. (Assuming base=0x220.)
Norbert wrote:but what does, for example, outp(0xa, 5); do?
That and the following outp() calls set up the DMA controller as needed for sound playback. (Using DMA channel 1.)
(PRINCE.EXE does exactly the same port writes, search for "set_dma" in the disassembly.)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: DIGIPLAY

Post by Norbert »

Oh, okay. :)
Post Reply