megadrive/genesis -> video hardware/devkit/demo related questions

category: general [glöplog]
after reading many things over the web, crawling in about retro-gaming shops and so all,
I'd thought it could be cool to ask you guys, what are your compromises to get working a sega genesis (I will try to get model 1 // PAL t a decent price), on modern hardware like a hdmi-pc screen ?

As info, I have read that buying cheap scart (pal-ntsc) -> hdmi converters wouldn't work with genesis/mega drive 1 because of lack of rgb output signal from the console..right ?

Let's give you an example :
https://www.amazon.fr/MPTECK-Convertisseur-p%C3%A9ritel-Adaptateur-soutien/dp/B0 1IMWQ4P2/ref=sr_1_11?ie=UTF8&qid=1505302963&sr=8-11&keywords=Converti sseur+P%C3%A9ritel+vers+HDMI

So I dig a bit more and found on a UK reto gaming shop this cable, which is built to give rgb output to the genesis 1.
https://www.retrogamingcables.co.uk/sega/sega-mega-drive-1-sega-genesis-1-stereo -rgb-av-scart-cable-tv-lead

As both products are still affordable, I thought the combination could work.
Also as we are generally speaking not kings of money, I wanted to be sure.
Can someone confirm please ? :)

And that brings me straight to the other question, that doesn't lack of interest either (maybe even for a Nes programmer ^^ don't shot), what you guys are using as hardware devkits when time comes to test your code from emulator to real hardware.

I have seen the 64kb joystick port solution. (pretty small amount of memory, hard to play games, but that is not especially what I am aiming for.. emulators exist with many comfortable options)

The pretty generous new homemade cartridge solution which doesn't seem to be available for sell already built. (open electronic schemes and software)

And, the pretty expensive Everdrive cartridge (what model would you recomend me to buy
please ?). That seem the best way to not keep on tripping over the cables, and not finish burnt in a mountain of solder. (at least if burnt, I'd be buried with the console also burnt..)

I'm curious to know if cheaper clones from Everdrive do exist ?

I profit from this post to recall useful links I found over the web about the megadrive asm/C programming. Mainly for starters like me I guess.

Big Devil Corp. also the creator of 'tangled Wood' on the real sega genesis/cd32 dev machine you certainly know about : Plus useful links inside.

Marc Haisenko website :

Hugues Johnson :

Kaneda's forum (Gens KMod , demos and tools)

SGDK devkit : cross platform linux & winadose (of money)

Interesting article from Jinx's blog :

Hacking Cult :

Chris Shrigley's webpage (with 3 games source code released, and also source code for Nes games -> underligned as a sign of peace ! so you were right not to shot :) )

Sega4ever's website from X-death (french) with SGDK devkit

Titan's genesis hardware notes (seen link in this BBS, thanks)
https://docs.google.com/document/d/1ST9GbFfPnIjLT5loytFCm3pB0kWQ1Oe34DCBBV8saY8/ pub

Markey Jester's motorola 68k tutoriial :

Megadrive Wi-ki :

Fra's planet (french) : (with Github sources, Thank you)

Sure, there must have been a bunch of many other links I passed-through or forgot (maybe useful links for dev/ graphical tools), and be sure, I'd be glad to hear about.
Mystery surrounding them has it's charm too.

Sorry I you almost slept reading this long post ;)
Thanks for eventual advices.

Hold tight 'moussaillons' !

added on the 2017-09-13 16:09:40 by nemka nemka
My 2c: We (as in, Limp Ninja) borrowed an Everdrive (from Felice) to show our intros on real hardware at Sundown/NOVA demoparty. Dev is mostly done on pc/emulator. I'm making the graphics in an Atari ST paint prog (running in emu on pc) because it uses the same palette and because I have ~25 years experience with those tools :)
added on the 2017-09-13 18:11:42 by havoc havoc
Ah maybe also useful, for the signal conversion stuff: Those really cheap HDMI converters are far too often quite shitty when used in combination with random oldskool hardware- if they work at all. So I wouldn't advise to buy such a thing without the option to return it if it doesn't work as intended. FrameMeister is really nice but perhaps overkill and a bit on the pricey side. Gonbes GBS-8200 or GBS-8220 is cheaper than your proposed solution and will do the trick better than most cheap HDMI converters but you'll need some soldering skills to hook it up.
added on the 2017-09-13 18:25:42 by havoc havoc
everdrive is the best one around afaik
having some issues plugin the megadrive to modern displays myself but i just been lazy to look into it for real to tell you the truth, i'm sure there is a way to retain quality as long as you have the right cables
added on the 2017-09-13 18:26:19 by psenough psenough
Get a free CRT for the real one, will be better even if smaller/bigger.
Use emulator on lcd, if you really want to.
added on the 2017-09-13 19:56:45 by skarab skarab
MD1 works with RGB just fine, I use mine all the time.
Only negative is that you will very easily have some jailbars on blue/purple hues, this can be mostly fixed by physically removing the composite video trace if you really want to go there.
I recall that it's only MD3 or some newer ones where they removed it.

Reason why most cheap converters don't work that well is that older systems use a tweakmode where they force "240p / 288p" progressive fields instead of properly interlacing, one side effect is that these commonly don't get processed properly and the off-spec refresh rate that results from this can throw many devices off.

If you want to convert to HDMI with the absolute best picture then you can use this: https://www.videogameperfection.com/products/open-source-converter/
Note that your LCD needs to sync with slightly below 59.94Hz (Most have no trouble) as while this is probably the best way to digitize analog RGB/YPbPr, it still is just a dumb linedouble and has no framebuffer. This won't be 100% compatible with all displays but MD is generally a safer bet.

One thing you might want to keep in mind when going with RGB is that while you get a way sharper picture, you lose the rather unique (and quite big) horizontal color bleed that can be abused for transparency or perceived greater palette. It's a bit of a cheap trick that was very commonly used back in the days and you can notice that many games have alternating pixel strips (like shadows/sonic1 waterfall) to pull off nearly flawless transparency.
added on the 2017-09-13 20:15:15 by oasiz oasiz

havoc, thanks, yes atari and amiga gfx tools are very usable with an emulator.
I tend to like http://pulkomandy.tk/projects/GrafX2 which is friendly with old machines formats. And I should have mentioned in the list of link the mega-happy-sprite tool, it's never too late, so... http://theadesilva.com/mega/#

I though buying the rgb cable from the uk shop, would help to correct the poor quality of the hdmi converter with a clean input signal, since it is clearly said the cable is built with 'high quality and durable panasonic components'. Anyway, that's why I asked you advices or day-use experience.
Since I also own atari and amiga machines, I should think twice about it.
I still need to check if oasiz's solution is the whole solution for this little troup of 68k fellows. I think The A600/500 can't be plugged with this solution.

So Everdrive seems to be the best choice for now, I guess I'll buy some day the cheaper one as I don't really need a battery for games, and CD ram cart features.

CRT suggestion, I thought about it, but I was afraid to buy something that would work 6 months and finally failed. It would be the cheaper option so far.

Thanks for the explanations and link oasiz, it may avoid lots of frustration :)
Sorry, I still don't understand if you use the adapter you pointed out, or a cheap hdmi converter though, saying it works with your MD1. Or did you only say rgb is natively supporting scart rgb output in contrario from what I said/read in my previous post ? Tenebraes in my mind !

I have read customers comments within web stores sections and some seem to have problems with master systems and megadrives. (black screens with sound only, or grey screens). Never with Nes systems. (they usually said it does the job not mentioning quality)

If anyone got an experience with cheap hdmi converters + PAL MD1 working all together, it could be nice to tell me what adapter brand they bought, so I can be sure it could work.
I need to think about that, I also like to see stuff on real hardware and comptatibility from emulator to hardware is *important for me :)

added on the 2017-09-13 23:04:44 by nemka nemka
MD1 supports RGB. Generally that cable you linked carries RGB through the scart connector.
SCART != RGB on it's own, it can carry composite/svideo/RGB. Kind of a hacky connector.
That OSSC thing works or you can get anything really. Keep in mind that most cheap converters are hit & miss. Few match a framemeister or OSSC in quality. Image might be nice and sharp but flickers wont look good.
added on the 2017-09-14 21:41:47 by oasiz oasiz
Note that your LCD needs to sync with slightly below 59.94Hz

Don't you mean slightly above/below 50 Hz since it's PAL? Not sure how LCDs handle that.
added on the 2017-09-14 22:02:25 by absence absence
Always seems to be slightly below.. 240p/288p "tweaks" seem to detect as slightly lower than interlaced modes with video equipment. Not sure how true that is (haven't measured with a scope).

50.00Hz could be hypotetically around 49.92Hz for example when using only a single field.
Compatibility is generally quite poor with PAL to begin with so doing some research on your monitor/TV is a must regardless.
added on the 2017-09-14 22:16:21 by oasiz oasiz
Enlighting ! thanks,
I am looking for infos because I am still a bit stranger to those concepts in electronics.
And so found this doc, sorry it is french speaking, but it's exactly detailling your last posts.
http://www.segakore.fr/index.php/2004/08/07/mega-drive-modifiez-votre-cable-rgb- fr-vers-pal-ntsc#.WbrisdSLRmM
added on the 2017-09-14 22:19:05 by nemka nemka
Always seems to be slightly below.. 240p/288p "tweaks" seem to detect as slightly lower than interlaced modes with video equipment.

The progressive scan hack works by emitting only top fields or bottom fields, unlike a normal interlaced signal where they alternate. Their timing differs, resulting in either above or below the interlaced 50 Hz, depending on the choice of field. It's possible that long fields is a more popular choice, but at least Amiga can use short fields (it's decided by software).
added on the 2017-09-14 22:49:00 by absence absence
Pretty interesting video for upscalers/ converters
added on the 2017-09-14 23:22:35 by nemka nemka
Hi there,

For GrafX2, you can use http://grafx2.tk which is a shorter URL and points to the website, not the development pages :). Let me know if there are specific tools needed for MD graphics (I'm still rather unfamiliar with the system)

For video conversion, usually the sync rate for progressive PAL is 50.08Hz (15625Hz / 312 lines) but could be 15625Hz / 313 lines (49.92Hz). I have good success rates with various machines (except the ZX Spectrum) using the GBS8200 with a custom driver board (not much soldering required, just a 4 pin connector on the GBS8200, and the mod is reversible by just unplugging the board): http://github.com/pulkomandy/gembascan. The main problem with the GBS8200 stock firmware is that the output is always 60Hz. So if your Megadrive is PAL/50Hz, the framerate conversion creates some artifacts and lags. With the replacement controller, the GBS8200 runs as a scandoubler, basically it will double each line so it outputs a 624 lines signal, still at 50.02Hz, and with 31.625KHz horizontal freq. This is similar enough to VGA modes that any display with a VGA input should handle it fine. I have a Megadrive and a modded GBS8200 so if you want I can check wether this works fine with the Megadrive (I don't expect any surprises, but better be safe).
Hi guys.

The actual refresh rate that the Mega Drive outputs is 49.7 Hz. No TV that I've had had a problem with this refresh rate on SCART.

The Mega Drive outputs RGB on the back with Composite Sync and Mono Audio. The headphone output is stereo.

Mega Drive Graphics can be created with any tool that you're familiar with and then converted. No actually decent tools natively output the tiled format required by the MD. We wrote our own tools for that which I cannot share, but it is very easy to write a script for it, and there is also a tool called "ImaGenesis" that is a bit buggy but gets the job done.

A good pixelling tool that handles palettes is Cosmigo Pro Motion.

As for DevKits, there are quite a few around, but most are quite *meh*.

EverDrive is the most common solution, with the top of the line models boasting an USB port which you can load your code from. Unfortunately it is rather expensive.

Whatever you do, stay away from the UMDK. While it does provide a gdb bridge and thus an actual debugger, it does strange things on the bus, doesn't work properly on some models, has a metric fuckton of DMA bugs and is even reported to be able to kill the ASICs inside your MD.

I've developed my own low-cost USB development cartridge to make Overdrive II. Unfortunately I lack the time and funding to make a full-fledged product out of it.

Hope that answers some of your questions. :)
added on the 2017-09-15 09:22:26 by oerg866 oerg866
ehee, oohoo,

thanks PulkoMandy for pointing out the modded GBS8200, it seems a fine one to get advantages with minimum risk of fail, at least for those who aren't solder experts.

Like Oasiz tried to make me understand, plus what I've clearly seen in images in the video ^,
not also clean image, but clean sync, are very much important to get a good return from what's running. I mean even if I can definitively not pretend it is sooo usefull for me with demo (I am clearly a noob coder), I just want a decent simple system on which I can be sure I will get a trusty visual return, for the reasons I mentioned before (not games, but quality for demos). VGA screen is so far the best solution for me, so I found this link while documenting (again french speaking, sorry, very well explained though) http://obligement.free.fr/articles/gbs8200.php

So practically, GBS8200 + electronic mod brings us ~50htz sync + avoid from leaks or bad surprises on vga monitors, right ? Reflecting fairly, how demos or some advanced programming games were coded for ? Even with hardware programming tricks ?

I can't forget the Oasiz's recommendations though, but it seems a pretty fair priced and practical solution. The OSSC has it's x5 line multiplier that is not joke at all. (incompatible with some 'source hardwares' sometimes, it is just a good combination of hardware to buy)

Also Graphfx is a great tool, I didn't find the way to edit the link in the post, sure I'd be glad to report if some feature would lack, but it is enough a straight forward tool to use as is.

@oerg866, yes it does actually, on many interesting points.
oh, I didn't know UMDK had such problems.
I use myself asm68k (with the '-p' option as pointed out in the 'big devil's tutorial')+ some kind of a notepad, and Regen0972D.
Thanks for this info. Anyway, for those interested, if I remember well (I didn't dig enough that thing, not sure I kept the link), I have seen posts from people who got it working (asm68k) on win64 machines. (which is mainly the big pb for this one, only 32bits machines).
I forgot to mention nasm68k, which is pointed out in big devil's tut.
A quick try on a test project (headers and init only) compiled as well as asm68k.

thanks that was a 'cool infos' shot ! ;)
added on the 2017-09-15 15:17:50 by nemka nemka
On the modded GBS8200: it works great as long as the output is clean with fixed timings. This is not a problem on most platforms, but it can be for example on Amstrad CPC if the developers were not careful with keeping the timings right. In that case the GBS8200 blacks out for a few frames and then resumes.

When developing a demo, I think this is a feature: you do want to know when your timings are bad (on a plain old TV this could either be handled fine, or could cause the screen to jump out of sync for a frame).

I don't know how flexible the megadrive video out is and if you can even make it ouptut an improperly synchronized signal at all. So it may not even be possible to get into that situation.
ok, so I guess it is a cool thing to get.
For sure no demo without sync matters (which is a bit scary while learning I confess)
So i guess everything would work the good way.

I'm gonna try to find videos about that.
Sure it would be great to see that working well, if one day you're in the mood, and you wanted to test that on your hardware. Thanks.
I'll put the link here if I find a good video those next days anyway.
added on the 2017-09-15 17:05:40 by nemka nemka
Ok, here we go:

Test setup:
BB Image

- GBS8200 converter
- SCART to VGA adapter (passive)
- TI Launchpad board to reprogram the GBS8200

Results with my hacks:
BB Image

- Pixel perfect (produces a 726x572 VGA signal or so)
- Good sync (no black borders on any side)
- Stable image

With stock firmware:
BB Image

- Resized to 1360x768 by the converter
- Extra black border on the side
- Always 60Hz so not frame-perfect
- Has a lot of trouble syncing to the image so it jumps vertically all the time (to be fair, this can be fixed by using the OSD menu and tweaking sync settings - but you need to adjust these each time you use a different device).

As you can see, the parts where you need to do some soldering:
- Adding the 4 pin connector to the GBS8200 to connect the other board
- Building the cable to connect the MD (you would get better picture quality by making a Megadrive DIN to VGA cable, as it will avoid the electronics in the cable which slightly alters the picture)
Wow, it works very nicely !
Colors are nice and in a good range to be tweaked if needed.
Third photo clearly shows the need for something in between, sure.
Aladin was a fun game to play. I liked the Disney's color mood (even on pc).

I already got a vga to scart cable from an A2000;
Only need a SCART female/female adapter then.
Maybe I'll have to revise the cable since it has already lived a first live in younger ages.

DIN to VGA cable is not that complicated for me though, I presume.
I'll go that way.

And watching your photo,
then getting back to your https://github.com/dooklink/gbs-control, i wonder :
Do my rpi2 and serial2usb cable (to plug to gpio ports) would help then ?

I shall find in my mess a good universal AC adpater for the GBS8200.
And I know I got a good hdmi/vga adapter somewhere if needed.
(used for the rpi precisely)

So, the only thing I need is the GBS8200, which sounds pretty easy and affordable at the moment.

photo1 : What is the cool strange yellow fishy thing ?
I'll say a usb extender that has nothing to do in this case ? :)

Thank you for the quick return.
Wonderfull, really.
added on the 2017-09-16 16:26:24 by nemka nemka
Ok, the page you linked in your Github

Gave me the rpi2 answer. cool
added on the 2017-09-16 16:42:56 by nemka nemka
Yes, there are ways to use a Pi or an Arduino to achieve the same.

And yes, the fish is an USB hub and unrelated to the video conversion. I was just too lazy to clean my desk and move these wires out of the way.
Does this fish have a name ?? :)

Ok, so stepping ahead a little bit,
i had like to buy the original one, so Version4,
It seems to be priced around 23/26 euros.
(I have read different pbs with cheaper clones reading customers comments)

Would you confirm this choice is ok, please ?
https://www.amazon.fr/Andoer-Portable-V%C3%A9ritable-Convertisseur-Moniteur/dp/B 00W3460UU/ref=sr_1_1?s=electronics&ie=UTF8&qid=1505574031&sr=1-1& keywords=gbs8200
It may read a bit priced, but quickly calculating the price with shipping (+ shipping delay), is ok. whatever..

Also one guy, says it is configured in Chinese language, a video gives the trick to change it.
https://www.youtube.com/watch?v=LqaIqsVnahc (~ 4'45)

Please notice, I am not precisely in hurry for all of this, but I have time for now, and I just spotted a PAL MD1 in pretty decent condition and at a 'fair' price I will get next week.
Considering my actual situation is not obligatory yours, so there's no pb at all.
added on the 2017-09-16 18:36:32 by nemka nemka
Yes, pictures look the same as mine. And yes, the OSD is in chinese in factory setup but you can switch to english. There aren't this many menus anyway.

When you drive it with another board as I do, there is no OSD at all anyway (the other board is doing all the work).

Just an update,
mission megadrive acomplished, it was the most easy part (getting that fellow)
I am actually following the big evil tutorial to start, but beware for beginners,
there are a bunch of corrected mistakes at start (mainly the hello world part 4)
Which needs concentration & research, which it is not bad at all in a sense.
(whenever interested, you should read all comments/answers from the users to get rid from mistakes along the tutorial) https://bigevilcorporation.co.uk/2012/03/23/sega-megadrive-4-hello-world/

I wonder why, I had some dark colors (as mentionned in the last comment from hello world's tutorial) with Regen emulator. So I switched to another emulator, gensKmod which also has a debugger. Maybe it has something linked to the shadow/highlight feature the megadrive as.

Now I have to get the GBS8200 and make/revise the vga/scart cable.
Which will need a bit of time, because I'll also need the everdrive, so it is a bit of a budget all added together.

BB Image
added on the 2017-09-20 21:53:25 by nemka nemka