8088 MPH: We Break All Your Emulators

Emulation of old PCs, PC hardware, or PC peripherals.

8088 MPH: We Break All Your Emulators

Postby slacka » 2015-4-08 @ 10:33

There's a fascinating article on the magic behind the winner of Revision 2015 oldskool demo compo. Unfortunately it breaks all emulations. Does anyone have a good collection of x86 emulator to throw at this?

It creates a 1024-color mode by abusing CGA's 80×25 text mode + NTSC colorburst turned on. Any ideas on any emulators that might support this?
slacka
Newbie
 
Posts: 12
Joined: 2014-2-18 @ 08:37

Re: 8088 MPH: We Break All Your Emulators

Postby F2bnp » 2015-4-08 @ 12:16

God damn
User avatar
F2bnp
l33t
 
Posts: 3149
Joined: 2007-9-23 @ 10:19

Re: 8088 MPH: We Break All Your Emulators

Postby leileilol » 2015-4-08 @ 12:30

It does hang PCem after the first sine text bit. also complains about too many cycles at the XT 4.77MHz setting
User avatar
leileilol
l33t++
 
Posts: 8624
Joined: 2006-12-16 @ 18:03

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-08 @ 14:40

Don't bother... even a lot of real hardware doesn't run the demo 100% as designed. Including XT clones that actually have a real 8088 running at 4.77 MHz, and a CGA-compatible card from the 1980s.
They have speed differences that are barely measurable by conventional benchmark programs, but which throw off the timing in certain routines completely (and may actually damage your CRT monitor).

In fact, we have even encountered some later IBM CGA cards, which use a HD6845 chip rather than the original Motorola 6845, which also does not work properly (although we can probably change some settings in our code to fix that).
So you really REALLY need an early IBM PC (5150/5155/5160) and early IBM CGA card to run the demo as intended.
The capture was from a 1987 IBM 5160 with an early IBM CGA card with original Motorola 6845.
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby Great Hierophant » 2015-4-08 @ 16:58

Scali wrote:In fact, we have even encountered some later IBM CGA cards, which use a HD6845 chip rather than the original Motorola 6845, which also does not work properly (although we can probably change some settings in our code to fix that).
So you really REALLY need an early IBM PC (5150/5155/5160) and early IBM CGA card to run the demo as intended.
The capture was from a 1987 IBM 5160 with an early IBM CGA card with original Motorola 6845.


I have two late IBM CGA cards, one of which I converted by hand to function exactly like an early IBM CGA card. The untouched late IBM CGA card has an HD6845 and this caused the picture to jump noticeably during the screens where the large color palette was being used. It also lost sync on my CGA monitor when the developer's pictures were being displayed on one occasion. My "early" CGA card did not have a jumpy picture and it has an MC6845.
User avatar
Great Hierophant
l33t
 
Posts: 2323
Joined: 2003-4-27 @ 08:20

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-08 @ 17:05

Great Hierophant wrote:My "early" CGA card did not have a jumpy picture and it has an MC6845.


Yes, it really DOES work on the right hardware :)
We were not aware of the HD6845 issues, since apparently all the cards we used during development were using MC6845s.
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24


Re: 8088 MPH: We Break All Your Emulators

Postby mr_bigmouth_502 » 2015-4-09 @ 00:32

That was a crazy demo, although the last part where they drew those polygonal objects didn't seem that impressive for the 5150. I could swear there have been a number of games made back in the 80s for that thing that pushed more polygons at once, albeit probably at a lower framerate. XD
My NEW(ish) desktop:
Image
User avatar
mr_bigmouth_502
Oldbie
 
Posts: 1935
Joined: 2009-5-16 @ 19:43
Location: Canada

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-09 @ 05:49

mr_bigmouth_502 wrote:That was a crazy demo, although the last part where they drew those polygonal objects didn't seem that impressive for the 5150. I could swear there have been a number of games made back in the 80s for that thing that pushed more polygons at once, albeit probably at a lower framerate. XD


It's also the size of the polygons, the thing is almost fullscreen. And well, think again :)
Try starting a 3d game such as Jet or F29 Retaliator, they aren't all that hot on a 5150 :)
And I think we're the only ones to actually attempt shading them on CGA.
Yes, more polys were possible at lower framerate... but it's all about finding a good compromise between number of polygons, size of polygons, complexity of object (the donut is an inconvex object of course, more difficult than a convex one), quality of shading, and framerate.
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby F2bnp » 2015-4-09 @ 08:04

I think the segments that made my jaw drop were the one showcasing 16 colors to 256 colors, the kefrens bar effect and of course the credits.

This is a phenomenal demo, an amazing effort! Well done and thank you for pushing the machine that started it all to its limits!
User avatar
F2bnp
l33t
 
Posts: 3149
Joined: 2007-9-23 @ 10:19

Re: 8088 MPH: We Break All Your Emulators

Postby MobyGamer » 2015-4-10 @ 02:19

It was our pleasure, glad everyone enjoyed it.

The polygons seem to get 100% love or 100% hate. I'll say this: Showing large polys without any double-buffering at that framerate must mean something fishy is going on. It is -- only the deltas that need to be drawn are calculated and put into video RAM. That is actually quite a lot harder than just doing a full erase and full redraw of every polygon, but the end result is a much faster display speed. The average scene of Indy 500, a *VERY* optimized game and one of my favorite 8088 programming examples of all time, draws about 25 polys at 3fps. The donut in the demo has IIRC 25 polys but averages around 18fps.
User avatar
MobyGamer
Member
 
Posts: 168
Joined: 2006-1-18 @ 04:30

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-10 @ 07:16

MobyGamer wrote:The polygons seem to get 100% love or 100% hate. I'll say this: Showing large polys without any double-buffering at that framerate must mean something fishy is going on. It is -- only the deltas that need to be drawn are calculated and put into video RAM.


I'd like to add that because you don't have a backbuffer, you need to draw from top to bottom, where conventional rendering just draws the polygons in whatever order they come in ('polygon soup').
The donut shape makes it extra difficult, since is is an inconvex object (rarely seen in games). Which means you need to take care of the z-order as well (with convex objects such as the pyramid and cube, just backface culling is enough to ensure proper z-order, since the object cannot overlap itself anywhere by definition).

I have done plenty of software renderers over the years, but the one I came up for for this platform is very unique. I have never written anything like it before, and I don't think many similar implementations exist. I started out just trying to optimize a conventional renderer to the extreme (based on the code of my 1991 donut intro), but that didn't get me very far on the limited bandwidth of the CGA card, so I had to completely re-think how to render polygons.
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-10 @ 18:33

Here are two more articles on the demo, with background information on the 1k colour mode and the 16 KHz 4ch mod player:
http://www.reenigne.org/blog/1k-colours ... -its-done/
http://www.reenigne.org/blog/8088-pc-sp ... -its-done/
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby shock__ » 2015-4-11 @ 00:14

Scali wrote:
Great Hierophant wrote:My "early" CGA card did not have a jumpy picture and it has an MC6845.


Yes, it really DOES work on the right hardware :)
We were not aware of the HD6845 issues, since apparently all the cards we used during development were using MC6845s.
Tell that to CPC users who have to bother with 3 variants of the 6845 + 2 licensed clones :)
http://www.cpcwiki.eu/index.php/CRTC
User avatar
shock__
Oldbie
 
Posts: 725
Joined: 2010-12-22 @ 01:53
Location: Berlin, Germany

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-11 @ 11:09

shock__ wrote:Tell that to CPC users who have to bother with 3 variants of the 6845 + 2 licensed clones :)
http://www.cpcwiki.eu/index.php/CRTC


Yes:
HSync pulse width in characters (0 means 16 on some CRTC), should always be more than 8; VSync width in scan-lines. (0 means 16 on some CRTC. Not present on all CRTCs, fixed to 16 lines on these)


I think that is our problem: We rely on the CRTC to interpret a hysnc width of 0 as 16. This gave us the best colour quality on our capture hardware. Apparently not all CRTCs behave that way, so we could turn the width down to 15 or less, which should solve the compatibility issue.
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby VileRancour » 2015-4-15 @ 23:19

For interested parties... I've added my own rambling "illustrated guide" on how we squeezed 1024 colors out of CGA:
http://8088mph.blogspot.com/2015/04/cga ... rated.html
User avatar
VileRancour
Oldbie
 
Posts: 1542
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: 8088 MPH: We Break All Your Emulators

Postby HunterZ » 2015-4-16 @ 06:25

Just found out about this from a random google search. Congratulations and great work!

I was impressed by the framerate and shading of the polygons (that kind of shading just wasn't done back then) and of course the 1024 (and even 256) colors. The high-quality music at the end was great too; I remember barely getting 8kHz PC speaker MOD music playback on my 8MHz 286.
User avatar
HunterZ
l33t++
 
Posts: 6048
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-20 @ 06:56

Here is another blog on some of the technology in the demo. This time it's the sprite compiler and vertical scrolling: https://scalibq.wordpress.com/2015/04/1 ... d-sprites/
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby Scali » 2015-4-23 @ 21:20

And my final blog on this demo, about the polygon renderer: https://scalibq.wordpress.com/2015/04/2 ... -polygons/
Scali
l33t
 
Posts: 2831
Joined: 2014-12-13 @ 14:24

Re: 8088 MPH: We Break All Your Emulators

Postby idspispopd » 2015-4-24 @ 04:43

I can't even say which part impressed me most technically. The self-modifying MOD player at the end is awesome, but so is the sprite compiler.
The 1024 colour stuff is also great, but in a different way (less about coding, more artistically and exploiting the limited CGA hardware).

It's just a pity that you had to limit yourself to such a specific PC platform, there are probably more C64 today than PC's that could run this demo properly. But I understand why you had to do that.
idspispopd
Oldbie
 
Posts: 1177
Joined: 2012-2-15 @ 21:08
Location: Hamburg / Germany

Next

Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 4 guests