Compiling an emulator for enhanced Megadrive

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

tryphon
Very interested
Posts: 303
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Compiling an emulator for enhanced Megadrive

Post by tryphon » Sat Apr 13, 2019 7:54 am

Yes, you can more or less see that as a fanboy wishful thinking :mrgreen:

Concerning costs, I want to remove Shadow/Hilight, I'd be surprised if it wouldn't compensate for added palettes.

The VDP would still produce less impressive images than the SNES one (apart the resolution), but I'd be very curious to see if it's really noticeable.

Also, existing games would be really easy to hack if they don't use HL. I think it'd be really interesting. You're free to think differently ;)

hotrodx
Interested
Posts: 31
Joined: Thu Mar 21, 2019 1:23 pm

Re: Compiling an emulator for enhanced Megadrive

Post by hotrodx » Sat Apr 13, 2019 9:28 am

You do you. You've contributed a lot to the community, so you can always go to the direction you see fit. You've earned it.

It's just that having changes that won't even run on actual Megadrives kinda dampen the impact. Imagine something like: "Here's a Megadrive that has 4096 colors, but won't run on your Megadrive". Or, "It will run but will look like shit on your stock Megadrive". I'm trying to learn programming on the MD now, and I realize how limiting the 4 palettes can be. But then you see some colorful good stuff like Treasure's games, or the Sonic games, and it's such an amazing achievement for those devs. Like a badge of honor.

While a MD+MCD or MD+32X aren't stock Megadrives, you aren't passing them as such. With an enhanced Megadrive, it's an MD and not an MD at the same time. Also, I think the 32x and MCD aren't represented as much as stock MD. These platforms could use their own Overdrive-esque demos.

I'll end my ramble here. :D Just throwing out my 2 cents.

As for compiling, might as well try out M.A.M.E. since it has integrated M.E.S.S for quite some time (so you can run arbitrary ROMs), but I believe they both have the drivers framework in there. Been quite a while since I last compiled M.A.M.E. but what I remember was mumbo jumbo macro magic.

Sik
Very interested
Posts: 879
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Compiling an emulator for enhanced Megadrive

Post by Sik » Sat Apr 13, 2019 12:00 pm

hotrodx wrote:
Sat Apr 13, 2019 5:12 am
I hear you. But the Megadrive+MegaCD combo is something that exists that SEGA themselves created, and in itself has its own set of constraints and restrictions. It's not a hypothetical Megadrive that has arbitrary improvements, which only emphasizes the stock MD's shortcomings.

A present day implementation of a MD+MCD would simply be in emulation, with the ROMs (cart or CD) in a cheaper SDHC or flash memory. But can be confirmed to run on an actual hardware (if you have the MD+MCD setup) without the need of soldering in mods. Plus, it will run on existing emulators, something that an EMD readily does not.
You missed the point though: I meant that nobody will make a CD-less Sega CD clone unless there's a good reason to. So before that can ever be considered somebody will probably need to make a tech demo or whatever that puts the Sega CD to good use but boots from cartridge. I imagine the ASIC would be the obvious target here, considering how much of a beast it is as a blitter.

But of course you'd also have to convince people to try a cartridge thing that requires a Sega CD… (admittedly, this is easier to justify for a tech demo than for a game)
tryphon wrote:
Sat Apr 13, 2019 7:54 am
Concerning costs, I want to remove Shadow/Hilight, I'd be surprised if it wouldn't compensate for added palettes.
And I'd punch you in the face if you removed that :​v (same goes for window plane) Once you figure out how to make good use of them you definitely won't want to lose them.

This is also why I had pushed for VDP decaps for years… I got tired of people saying "they should have removed <insert feature they don't like> so we could have more colors!" and wanted to show exactly how much would be gained from that. Spoiler: most of the die is taken up by the sprite renderer (which doesn't deal with any of the fancy features). I imagine that probably the only reasonable way to shrink it would be to drop H40 so the cache, linebuffers and the supporting circuit could be shrunk. But that's like telling SNES fans that Nintendo should have dropped mode 7 to cram in other features.

Also it's easier to say things in hindsight. Like all the people who say that they should have dropped Master System support while ignoring that it was still their biggest success so far (especially in Europe and Brazil) and they weren't going to risk losing that market by dropping the old console, not to mention that both the Master System and Mega Drive are part of the SG-1000 series which had always had backwards compatibility. Also, e.g. stuff like S/H, it's easy to say it should be dropped now that we know a lot of developers ignored it, but back then they probably assumed that developers would go crazy over doing some form of translucency (also, S/H seems to only take up a tiny space of the VDP die).

/rant
Sik is pronounced as "seek", not as "sick".

tryphon
Very interested
Posts: 303
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Compiling an emulator for enhanced Megadrive

Post by tryphon » Sat Apr 13, 2019 1:19 pm

Sik wrote:
Sat Apr 13, 2019 12:00 pm
And I'd punch you in the face if you removed that :​v (same goes for window plane)
Challenge accepted :twisted:
Once you figure out how to make good use of them you definitely won't want to lose them.
Same goes for extra palettes. And it's easier to figure out.
This is also why I had pushed for VDP decaps for years… I got tired of people saying "they should have removed <insert feature they don't like> so we could have more colors!" and wanted to show exactly how much would be gained from that.
I want more colors, fucker !*

If I say that, I'll be told that this would have brought extra-costs. So I'm forced to imagine a way to reduce them. I don't think duplicate palettes is so much transistor expensive, so I think removing the least useful feature of the VDP would have been enough. Of course, if it's possible to keep everything without raising the price too much, I'm okay with that.

So, sorry to be tiresome, but either way I put my idea, you'll find something against.

Let's make the point clear : I understand perfectly you don't like this idea, and I don't give a s... It's for my personal use, I'm just curious.

Yes, I think the MD would have performed much better with extra colors. The opinion about games at this era was built upon pictures in magazine, and either you want it or not, the lack of colors really penalized the console.

* just in case : its not an insult, it's a reference to Blade Runner movie ;)
(also, S/H seems to only take up a tiny space of the VDP die).
So would extra palettes.

tryphon
Very interested
Posts: 303
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Compiling an emulator for enhanced Megadrive

Post by tryphon » Sat Apr 13, 2019 1:27 pm

hotrodx wrote:
Sat Apr 13, 2019 9:28 am
As for compiling, might as well try out M.A.M.E. since it has integrated M.E.S.S for quite some time (so you can run arbitrary ROMs), but I believe they both have the drivers framework in there. Been quite a while since I last compiled M.A.M.E. but what I remember was mumbo jumbo macro magic.
I already tried to compile MAME. It took half a day to compile, there was an error at linking stage, and each new attempt I made took minutes.

The Megadrive drivers is quite straightforward to understand and I located easily what I should edit. Too bad.

Sik
Very interested
Posts: 879
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Compiling an emulator for enhanced Megadrive

Post by Sik » Sat Apr 13, 2019 2:48 pm

Extra palettes wouldn't be a small addition though. The logic would be indeed tiny on the die, but don't forget CRAM is also on the die, and that is what would eat up a signficant amount of space (every bit adds to the die usage, and it'd be 576 more of them if we still stick to 9-bit colors!). Essentially, anything that requires extra on-die memory is going to be a significant die space cost. (as said earlier tho, it's possible that they could have crammed in the second set of palettes without sacrificing anything if they had more time)

One could argue about external CRAM… but the VDP already can support that as it is (albeit it also needs separate DACs for the colors). So if you want to argue about that, well, the hardware was already there, they just decided to not use it. If you intend to keep the theoretical cost about the same for the time, this matters.

What they could have done easily and didn't would have been to provide some slot to connect VDP extensions (more VRAM and external CRAM). That shouldn't have affected much the cost of the base console and the add-on could have been easily done with stuff available at the time, and the improvements are noticeable enough to be worth it but not so big that it's hard to gracefully degrade (making it viable to have optional support in games, reducing the entry risk). That they didn't make room for this sucks, but oh well.
Sik is pronounced as "seek", not as "sick".

hotrodx
Interested
Posts: 31
Joined: Thu Mar 21, 2019 1:23 pm

Re: Compiling an emulator for enhanced Megadrive

Post by hotrodx » Sun Apr 14, 2019 3:34 pm

Sik wrote:
Sat Apr 13, 2019 12:00 pm
But of course you'd also have to convince people to try a cartridge thing that requires a Sega CD… (admittedly, this is easier to justify for a tech demo than for a game)
Then (old school) tech demo it is. :D

Interestingly, I noticed that the Revision 2018 Oldskool Demo category was limited to 8-bit machines, (maybe) disqualifying the Megadrive (Overdrive 2 was featured in 2017). Where would the MD (or SNES) demo be grouped at? Maybe they can combine the Amiga demos into 68000 (or 16bit) demos? A MD+MCD combo would really give it some extra oomph to compete with the desktop computers.

Sik
Very interested
Posts: 879
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Compiling an emulator for enhanced Megadrive

Post by Sik » Sun Apr 14, 2019 4:21 pm

Mega Drive has always been in the wild compos as far as I remember (where any systems that don't fall in existing categories go).
Sik is pronounced as "seek", not as "sick".

Huge
Very interested
Posts: 197
Joined: Sat Dec 13, 2008 11:50 pm

Re: Compiling an emulator for enhanced Megadrive

Post by Huge » Mon Apr 15, 2019 1:33 am

hotrodx wrote:
Wed Apr 10, 2019 8:38 am
cero wrote:
Wed Apr 10, 2019 7:36 am
There's little point to the "Tower of power" when a Saturn is better for all practical purposes.
Still being a Genesis is part of the constraint.
How about going backwards then: making something for the Saturn to run Megadrive games?

Obviously doing it in software alone would be near insanity, but perhaps it could be done in hardware, since the Saturn cart slot has audio/video input. Build a lock-on cart pcb with a 315-6123, convert its output to digital video for the Saturn, and add a boot rom to run on the Saturn that handles controller inputs and sets up the correct video mode on the Saturn side.

hotrodx
Interested
Posts: 31
Joined: Thu Mar 21, 2019 1:23 pm

Re: Compiling an emulator for enhanced Megadrive

Post by hotrodx » Mon Apr 15, 2019 6:21 am

Huge wrote:
Mon Apr 15, 2019 1:33 am
hotrodx wrote:
Wed Apr 10, 2019 8:38 am
cero wrote:
Wed Apr 10, 2019 7:36 am
There's little point to the "Tower of power" when a Saturn is better for all practical purposes.
Still being a Genesis is part of the constraint.
How about going backwards then: making something for the Saturn to run Megadrive games?

Obviously doing it in software alone would be near insanity, but perhaps it could be done in hardware, since the Saturn cart slot has audio/video input. Build a lock-on cart pcb with a 315-6123, convert its output to digital video for the Saturn, and add a boot rom to run on the Saturn that handles controller inputs and sets up the correct video mode on the Saturn side.
It's kinda like the Retro-Bit RetroGEN Adapter, which allows one to run MD carts on the SNES. I think it's possible, though that concept is more of MD compatibility, rather than MD extension (like what the 32x and MCD do) unless you let the adapter access the Saturn's internals.

It's kinda odd that SEGA took pains with SMD-to-MD compatibility, but not MD-to-Saturn, when the MD is their most successful console to date. I guess it'll just add more to the cost when they've already put in a lot of components haphazardly into the Saturn (in hindsight).

Stef
Very interested
Posts: 2976
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Compiling an emulator for enhanced Megadrive

Post by Stef » Mon Apr 15, 2019 8:18 am

Sik wrote:
Sat Apr 13, 2019 12:00 pm
This is also why I had pushed for VDP decaps for years… I got tired of people saying "they should have removed <insert feature they don't like> so we could have more colors!" and wanted to show exactly how much would be gained from that. Spoiler: most of the die is taken up by the sprite renderer (which doesn't deal with any of the fancy features). I imagine that probably the only reasonable way to shrink it would be to drop H40 so the cache, linebuffers and the supporting circuit could be shrunk. But that's like telling SNES fans that Nintendo should have dropped mode 7 to cram in other features.
Of course it's easy to say that today still it's obvious that removing half of the palette was a critical / terrible choice even back in time... I think the Highlight/Shadow doesn't require much transistors but the feature is so difficult to use that i think it's a bit wasteful, even if it doesn't cost much...
Also what about the interlace modes ? I'm certain they does require a bunch of transistors that could be spared as well. And as you said, looking at the die shots it looks like that a better / more optimized circuit design would had probably be enough to fit in the 4 extra palettes (and the 12 bit color).
Last edited by Stef on Mon Apr 15, 2019 2:05 pm, edited 1 time in total.

Sik
Very interested
Posts: 879
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Compiling an emulator for enhanced Megadrive

Post by Sik » Mon Apr 15, 2019 1:14 pm

Yeah, interlaced modes were a waste (given the lack of a way to double the horizontal resolution) and were indeed reportedly some of the most complex ones. But the fact they were so hard to implement may have meant they had some distorted view of it? Or that it was too tangled up with the non-interlaced circuit to remove easily.

Early titles seemed more likely to use S/H, so I can't see them having ever wanted to drop S/H (then SNES happened and killed any mood to do translucency on the Mega Drive when the SNES could do more advanced blending for less effort, hence S/H use becoming less common). Although, that may be a biased perception and we'd need a full list of games using S/H to know for sure.
Sik is pronounced as "seek", not as "sick".

hotrodx
Interested
Posts: 31
Joined: Thu Mar 21, 2019 1:23 pm

Re: Compiling an emulator for enhanced Megadrive

Post by hotrodx » Mon Apr 15, 2019 1:44 pm

If this site doesn't mind links from other forums:
http://www.sega-16.com/forum/showthread ... -Highlight

Post Reply