Retro dev kits. Is SGDK unique?

The place for all discussion on gaming hardware
spmbx
Posts: 490
Joined: Sat Aug 01, 2009 5:22 pm
Location: The Netherlands

Re: Retro dev kits. Is SGDK unique?

Post by spmbx »

GameHut has some cool videos on how certain effects were done, check them out if you haven't already.
for example: https://www.youtube.com/watch?v=gRzKAe9UtoU
User avatar
Lander
Posts: 883
Joined: Tue Oct 18, 2022 11:15 pm
Location: Area 1 Mostly

Re: Retro dev kits. Is SGDK unique?

Post by Lander »

Prison language :lol:
Is it still a prison if incarceration runs on an honour system, and the facilities are five-star?
Image
My knowledge of real MD hardware tricks extends as far as idly perusing technical breakdowns on the internet, so don't take the examples as concrete. The intent is to illustrate specialized use-cases - ones complex enough to need expert human reasoning, and aren't practical to derive in a low level machine-oriented compiler - abstractly enough that you could apply the overall approach to Mega Drive, Game Boy, or any other mechanically-interesting platform given the appropriate hardware hacker wisdom.

Inline assembly in a compositional effect model would be expressed by drilling back down to the bottom level of abstraction, where the primitives correspond 1 : 1 with machine instructions, and are just a matter of calling some nice alias (let's say 'move(..)', instead of 'MOV ..' or a string of hex digits) that constructs backend data in the compiler (which ultimately becomes the relevant instruction, if it survives optimization.)
The full extent of machine expressibility is still there as the smallest building block, but is composed into progressively-coarser structures that each provide meaning to the compiler. Sounds somewhat like regular block structure, functions calling other functions and so on, but with the important caveat that the blocks encode domain-specific programmer intent as well as literal program code, with each progressively-coarser one containing the full extent of its contents.

So a "draw_sprite" invocation could translate directly to the naive sequence of instructions it composes (insofar as the full setup, draw, teardown process is practical for a single sprite on the hardware), but since it also means "draw sprite" in compiler speak, it could be modified or thrown out in favour of some higher-order design put in place by the backend. Or perhaps not, if wrapped in some explicit OiHandsOff(T) type comparable to the godbolt-friendly pragmas and intrinsics of the imperative world. Many possibilities.

That lets the compiler take a broad or narrow view, or anything in between, for any given subtree of the program, with full context of what a given part is supposed to mean.
Compare that to a general-purpose optimizing compiler, whose base context is "anything that might be expressed in this language on that machine" and needs to be cut down to something specific by recognizing patterns of granular structure, and you end up closer to the info available to a human expert trying to wring out every last cycle.
User avatar
orange808
Posts: 3212
Joined: Sat Aug 20, 2016 5:43 am

Re: Retro dev kits. Is SGDK unique?

Post by orange808 »

spmbx wrote: Thu Jan 25, 2024 9:56 pm GameHut has some cool videos on how certain effects were done, check them out if you haven't already.
for example: https://www.youtube.com/watch?v=gRzKAe9UtoU
That's an interesting link, but all I see is good use of the hardware and Genesis/MD "standard" capabilities. I suppose it boils down to how well you can juggle the VDP, as it serves both the the video ram and the Z80.

The spritework is good, but it's no different than Rare using high end machines to render assets like Donkey Kong Country.

When I think of a hardware trick, I'm picturing Sonic shifting the pallete in HBLANK to make everything below appear to be underwater.

Most everything you'll see outside the demo scene is a direct capability of the machine's VDP that Sega probably planned to have.
http://md.railgun.works/index.php?title=VDP
We apologise for the inconvenience
User avatar
SGGG2
Posts: 765
Joined: Thu Dec 31, 2009 1:03 am
Location: East Coast, US

Re: Retro dev kits. Is SGDK unique?

Post by SGGG2 »

It's great to see the Mega Dive homebrew scene take off. RheoGamer and ReySilveria28 are porting one of the Marvel fighting games over, it even supports two full size Juggernaughts on screen! :shock:

https://twitter.com/GabrielPyron/status ... 9278302627
Post Reply