MAME Work In Progress - Polygonet Commanders (Part 7, Ordering - 7:23AM 25 June 2022)

Subscribers:
1,140
Published on ● Video Link: https://www.youtube.com/watch?v=rmC-VG4kuuo



Duration: 3:41
456 views
15


This video represents the present state of Polygonet Commanders in my MAME source tree, and is (at a minimum) how the game will look in the upcoming release of MAME 0.245, assuming my pull request is approved.

One of the consistently irritating issues that I kept circling back to was the apparently "missing" portions of the player's tank during the very beginning of attract mode, as well as the base portions appearing in front of the doors as they open.

The hardware is both old enough and simple enough to obviously not support depth buffering: Although it was a concept which was known in the computer graphics field for at least a decade prior, the necessary bandwidth and RAM was still out of throwing range for even the custom sort of hardware that could be found in arcades during their heyday. Moreover, based on getting the on-screen 3D to draw at all, it was clear that Konami's custom chips are little more than accelerated span fillers: Which is to say, the DSP56156 manages transforming the 3D vertices to "screen-space" vertices, i.e., 2D coordinates. It then simply emits a set of start/end coordinates for horizontal lines that, when filled, will form a flat-shaded polygon. By the time the hardware even knows about the polygons, there's no such thing as depth.

Finally, out of desperation, I tried treating the framebuffers themselves as a very limited depth buffer: If a pixel has already been filled, don't allow any spans later in the list to overwrite it until an entirely new batch is being drawn.

It turns out that this was the key, and makes sense in retrospect. While it would be awkward in actual silicon to iterate to the end of the span list and then work backwards, it would be fairly trivial to have framebuffer writes use a read-modify-write cycle that aborts the "modify" and "write" portions if the framebuffer contains a non-zero value at that point.

While I was in there, I also worked to square up the size and position of the framebuffer relative to footage from real hardware, kindly provided by MAME developer Phil Bennett.

As far as I can ascertain, the only significant graphical issue is that some geometry continues to drop out, but I believe this is still due to lurking DSP56156 issues. After inserting a significant amount of debug-drawing code, it would appear that when the player's own tank body disappears, it simply is just not there in any of the span lists.




Other Videos By Mog's Emulation Station


2022-07-15MAME Work In Progress - Rapid River (Namco System 23)
2022-07-13MAME Work In Progress - Fairlight CMI IIx - Classic Samples (ORCH5, SARARR1, BIGBAND1)
2022-07-13MAME Work In Progress - Fairlight CMI IIx - MIDI Input
2022-07-12MAME Work In Progress - Fairlight CMI IIx - MILLION.RS (Fixed)
2022-07-12MAME Work In Progress - Fairlight CMI IIx - ITCH.RS (Fixed)
2022-07-09MAME Work In Progress - Fairlight CMI IIx - WESTEND.RS
2022-07-03MAME Work In Progress: Fairlight CMI IIx
2022-06-26MAME Work In Progress - Poly-Net Warriors (In-Game)
2022-06-26MAME Work In Progress - Poly-Net Warriors (Attract Mode)
2022-06-26MAME Work In Progress - Polygonet Commanders (In-Game Footage)
2022-06-25MAME Work In Progress - Polygonet Commanders (Part 7, Ordering - 7:23AM 25 June 2022)
2022-06-25MAME Work In Progress - Polygonet Commanders (Part 6, Color - 2:46AM 25 June 2022)
2022-06-25MAME Work In Progress - Polygonet Commanders (Part 5, Geometry - 12:48AM 25 June 2022)
2022-06-25MAME Work In Progress - Polygonet Commanders (Part 4, Stability - 12:00AM 25 June 2022)
2022-06-20MAME Work In Progress - Polygonet Commanders (Part 3, More Polys)
2022-06-16MAME Work In Progress - Polygonet Commanders (Part 2, Fixed Polys)
2022-06-15MAME Work In Progress: Polygonet Commanders (Konami)
2022-04-28Story of Seasons: Pioneers of Olive Town playthrough, Week 2, Spring 8-14 (No Commentary)
2022-04-26Story of Seasons: Pioneers of Olive Town playthrough, Week 1, Spring 1-7 (No Commentary)
2022-04-17Silicon Graphics O2 - All Boot/Shutdown Chimes (+ 8 Unused)
2022-04-16MAME Work In Progress: SGI O2 Workstation