Some 8088 action at Revision 2017

Discussion about old sound cards, MIDI devices and sound related accessories.

Some 8088 action at Revision 2017

Postby Scali » 2017-4-19 @ 07:02

Perhaps some of you were aware that this past Easter weekend, the world's biggest demoparty was on: Revision.
There was one release for 8088 there, it was a chipmod song using the sound routine that reenigne originally developed for the endtune of 8088 MPH. The rules required that the executable be 32 KB or less. Of course we can pack 3 minutes of music in there just fine
Perhaps you like it. This will run on a real IBM 5150 or 5160 provided you have enough memory (I suppose 256 KB should do it, perhaps slightly more).
https://www.youtube.com/watch?v=L2ppIrtcD3w

I also created a 'safe' version that requires a slightly faster CPU, but uses the PIT for timing, and is therefore not sensitive to the speed of the system. This makes it more friendly for clones and emulators.
Binaries can be downloaded here: https://www.dropbox.com/s/l6s4f3bigilko ... s.zip?dl=0
Last edited by Scali on 2017-4-19 @ 17:36, edited 1 time in total.
Scali
l33t
 
Posts: 4263
Joined: 2014-12-13 @ 14:24

Re: Some 8088 action at Revision 2017

Postby Stiletto » 2017-4-19 @ 15:39

I have a general Revision2k17 thread going here if you want to post about other cool things you saw there, general reactions, etc. :)
viewtopic.php?f=5&t=53469
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 4333
Joined: 2002-7-01 @ 21:57

Re: Some 8088 action at Revision 2017

Postby dr.zeissler » 2017-4-19 @ 16:04

DL does not work for me ? 404...

BadCat was a bad game, but on my Schneider EuroPC (8088/or upgraded to nec V20 9,54Mhz) it had Digisound in the Intro that was VERY nice (if you only knew PC-beeper) !

https://www.youtube.com/watch?v=Pby7dLQA08o But it's too fast here.
here is better https://www.youtube.com/watch?v=U7E--gBF2Gk
CPU: PII 133-333 MOBO: SNI-D981 RAM: 512- FDD: Dualfloppy 3,5"HD/5,25"HD - 3,5"HD - 5,25"DD ISA-Catweasel HDD: 2x40GB - DVD
ISA(3): Audician32-S2Dreamblaster - GusACE PCI(3): Monster3D- Intel NW AGP(1): 3dfx V3-3000
dr.zeissler
Oldbie
 
Posts: 1723
Joined: 2011-9-28 @ 15:33

Re: Some 8088 action at Revision 2017

Postby Scali » 2017-4-19 @ 17:37

dr.zeissler wrote:DL does not work for me ? 404...


Ah yes, I fixed the link now.
Scali
l33t
 
Posts: 4263
Joined: 2014-12-13 @ 14:24

Re: Some 8088 action at Revision 2017

Postby dr.zeissler » 2017-4-19 @ 18:00

Thx! DL works. I can use "safe" when running in dosbox and go down to cycles 600 (XT-speed),
so it should work on my XT too...great! I will test it...

I think it uses 100% cpu-time, so perhaps music playing while running a MDA/CGA/EGA slideshow
should not be possible, or am I wrong?
CPU: PII 133-333 MOBO: SNI-D981 RAM: 512- FDD: Dualfloppy 3,5"HD/5,25"HD - 3,5"HD - 5,25"DD ISA-Catweasel HDD: 2x40GB - DVD
ISA(3): Audician32-S2Dreamblaster - GusACE PCI(3): Monster3D- Intel NW AGP(1): 3dfx V3-3000
dr.zeissler
Oldbie
 
Posts: 1723
Joined: 2011-9-28 @ 15:33

Re: Some 8088 action at Revision 2017

Postby Scali » 2017-4-20 @ 07:48

dr.zeissler wrote:Thx! DL works. I can use "safe" when running in dosbox and go down to cycles 600 (XT-speed),
so it should work on my XT too...great! I will test it...


I've made a slightly more optimized version: https://www.dropbox.com/s/aldvo61jaygqn ... S.EXE?dl=0
This one works on my 8088 with 8 MHz turbo. The other version isn't fast enough for 8 MHz. Not sure how fast your system needs to be then.

dr.zeissler wrote:I think it uses 100% cpu-time, so perhaps music playing while running a MDA/CGA/EGA slideshow
should not be possible, or am I wrong?


The 'safe' version is designed to run as a 'background' player, running from the timer interrupt. So in theory you can do something in the foreground. A slideshow should be simple enough.
You'd just have to balance the background and foreground CPU time by adjusting the sound quality. You'd also want to avoid 'long' instructions like mul and div, because they cannot be interrupted, which would result in audible jitter.

The optimized version actually puts code in segment 0, so on top of the interrupt handlers. Currently only irq0 (timer) and irq1 (keyboard) are left in the table, the rest is used for code.
That means you won't be able to access DOS/BIOS routines, or hardware that uses interrupts (such as floppy and most HDD controllers).

I might be able to move them up far enough to at least get things up to int 21h working, but I'd have to see.
Scali
l33t
 
Posts: 4263
Joined: 2014-12-13 @ 14:24

Re: Some 8088 action at Revision 2017

Postby wbc » 2017-4-21 @ 15:45

pretty nice track! ;)

Scali wrote:The optimized version actually puts code in segment 0, so on top of the interrupt handlers. Currently only irq0 (timer) and irq1 (keyboard) are left in the table, the rest is used for code.

just a curious question, but what's the reason of overlaying interrupt table with player code (afaik can't remember that explicitly using segment 0 will give some benefits)?
--wbcbz7
wbc
Member
 
Posts: 134
Joined: 2015-3-14 @ 14:51
Location: Russia \ Omsk

Re: Some 8088 action at Revision 2017

Postby Scali » 2017-4-21 @ 16:46

wbc wrote:just a curious question, but what's the reason of overlaying interrupt table with player code (afaik can't remember that explicitly using segment 0 will give some benefits)?


The advantage is that you can assume that cs == 0. Therefore, you can directly access the interrupt vector for the timer interrupt, allowing you to install a new handler at each interrupt (mov cs:[int*4], handler).
That way you can make a 'chain' of handlers. In my case, most handlers play only a single sample (which is patched into the immediate operand of a mov al, nn instruction directly), and every now and then, I place a special handler that jumps to the mixing routine, which generates new samples into the chain of handlers.
So I need no extra playback logic whatsoever. No countdown timers, no compares, no branches, nothing.

If I didn't place the handers in segment 0, I would have the additional overhead of saving a segment register on stack, setting it to 0, updating the handler, and then restoring the segment register.
Since the actual sample playback is so optimized that it's pretty much this:
Code: Select all
push ax
mov al, nn
out 0x42, al
pop ax


The extra segment register stuff would be a significant impact, making it almost twice as slow. So putting the handlers in segment 0 give me a significant performance increase.

Edit: by the way, the other 'safe' version uses a similar trick: It uses 64k segment as a circular sample buffer, and places the interrupt handler inside this sample buffer. As a result, cs points to the sample data by definition, and you can use mov al, cs:[nnnn] to load the next sample, or cs:lodsb for example.
This version requires some periodic checking in the foreground thread to move the interrupt handler around periodically.
Scali
l33t
 
Posts: 4263
Joined: 2014-12-13 @ 14:24

Re: Some 8088 action at Revision 2017

Postby mr_bigmouth_502 » 2017-4-21 @ 23:53

dr.zeissler wrote:DL does not work for me ? 404...

BadCat was a bad game, but on my Schneider EuroPC (8088/or upgraded to nec V20 9,54Mhz) it had Digisound in the Intro that was VERY nice (if you only knew PC-beeper) !

https://www.youtube.com/watch?v=Pby7dLQA08o But it's too fast here.
here is better https://www.youtube.com/watch?v=U7E--gBF2Gk

That's literally the most 80s thing I've heard all day. XD I love it.
My NEW(ish) desktop:
Image
User avatar
mr_bigmouth_502
Oldbie
 
Posts: 1954
Joined: 2009-5-16 @ 19:43
Location: Canada


Return to Sound

Who is online

Users browsing this forum: Marmes and 3 guests