Wednesday, May 23, 2018

The road to Dreamcast 480p YPbPr

When I set up my current retro gaming area around 2013, I grouped the Dreamcast with the rest of the consoles of the generation it kicked off - the Playstation 2, the Gamecube and the XBOX.  That particular area has a dedicated CRT TV which natively supports all of the best resolutions those consoles have to offer.  Most games of the era max out at 480p, and all of those consoles have official support for 480p via Component/YPbPr except the Dreamcast.  The Dreamcast is absolutely capable of it, but until this week, all of my attempts to get 480p Component video out of the Dreamcast could be measured in degrees of failure.  If you just want to know how I finally did it, skip to the end. In the middle is the journey.

1999
The Sega Dreamcast was born during the earliest days of the transition from Standard Definition TeleVision (SDTV) to High Definition TeleVision (HDTV).  DVD was an up-and-coming technology which was driving the adoption of cleaner analog video technologies such as RGB and Component (YPbPr).  Though most households did not have the means to take advantage of those technologies in 1999, Sega seemed to be hedging their bets when they designed the Dreamcast's video output, and indeed some of the technology locked inside that little white box was well ahead of its time.

Interlacing
As consumer-level video technology improved in the late 90's in an arc towards HDTV, the first quality leap involved moving  from mixed signals such as Composite, to increasingly discrete signal transmission first with S-Video which separated color from brightness, and Component which separated brightness from color and the colors from each other.  The next step was the leap from "interlaced" to "Progressive Scan".  To thoroughly explain those terms would probably require several paragraphs, but I will spend a little time explaining the basic premise.  In an ideal and simple world, a television picture would be formed by drawing one horizontal line at a time from top to bottom until a whole frame was complete before starting over at the top to draw the next one.  Once upon a time in the early days of Television, engineering compromises were made.  I'm not entirely sure whether these compromises were made to cut down on bandwidth or to deal with slow cathode guns, but the engineers discovered that instead of drawing an entire screen from top to bottom, they could get almost the same effect in half the time and half the bandwidth by only drawing every-other horizontal line from top to bottom, starting over at the top and drawing the opposite lines from top to bottom.  So instead of drawing a whole frame at a time, they could draw a "field" of all of the even lines, followed by another "field" of all of the odd lines. Each field left gaps like the spaces between teeth in a comb, but when laid over top of each other, the "teeth" would mesh to exploit a property of human sight called "persistence of vision".  The screen was flickering so quickly as the teeth of the combs were interlocked, your eyes would sort of glue the two fields together and to your brain you would see a whole picture.  This is known as interlacing, and it's the reason that a SDTV image looks like it's bobbing up and down rapidly if you look at it up close.

Progressive Scan
Progressive Scan was sort of bringing us back towards that ideal state where an entire image is drawn top-to-bottom before the next one is displayed.  This has the effect of making the image appear more stable because it doesn't have the bobbing effect caused by alternating fields.  Actually, most 80's and early 90's game consoles tricked the CRT televisions into displaying a progressive image by always drawing odd or or even lines instead of alternating between them.  While this was never a ratified standard, it is commonly referred to as 240p, and it's what allowed those consoles to display a stable image on a TV that wasn't meant to do so - it's also what causes those characteristic "scan lines".  But when we talk about the turn of the century, Progressive Scan almost universally refers to 480p - which was a real ratified standard that not only created a rock solid image without flicker, but (arguably) doubled the horizontal resolution of the image.  The switch to 480p was a dramatic picture quality improvement, however it did not qualify as "high definition" because that term had been reserved for 720p and above. For this reason a new designation was given for this in-between format: Extended Definition TeleVision (EDTV) - a term that never really saw popular use.

In 1999 when the Dreamcast was released, progressive scan Televisions were on the horizon, but hadn't quite hit the market yet.  However almost every computer monitor available at the time did support progressive resolutions, so Sega's solution was to design a video output that could be configured to work with a PC monitor via a special adapter.  In 2000, I purchased one of these "VGA adapters" and connected my Dreamcast to a 17" PC monitor and I have to say the picture was unbelievably good - colors were more vibrant than ever, the image was razor sharp and lightning quick.  But a 17" PC monitor didn't really fit well in my gaming setup so I found myself falling back on the S-Video output to play on my television.

Consumer televisions capable of supporting 480p wouldn't be widely available until after the unfortunate demise of Sega's hardware business and therefore the Dreamcast.  So while all of the capabilities were right there in the Dreamcast, no one ever made official hardware to connect the Dreamcast to an EDTV to enjoy 480p on a larger screen.  While some early 480p televisions provided VGA inputs, it was hardly a common feature.

The Problem:
While the Dreamcast technically outputs everything needed to display 480p over component, some translation has to happen to make it work.  Firstly the Dreamcast has to be switched into "VGA mode" by grounding one of the pins on the AV out.  When it does this, the Dreamcast outputs video in a format called RGBHV - the "HV" part refers to the fact that horizontal and vertical sync pulses are delivered on separate channels.  However Component video requires a C-Sync which is the two pulses combined into a single channel.  The Dreamcast uses C-sync for everything else BUT VGA mode.  Activating VGA mode deactivates C-Sync.  So the next stage in the process needs to combine the H and V sync into C-Sync.  Lastly the color transmission needs to be converted from RGB to YPbPr.

My First Solution:
This was my first attempt at a Dreamcast 480p "box".
I hesitate to call my first solution a "success", though it did result in outputting 480p YPbPr from the Dreamcast to my TV, the picture was awful.

The first stage was the Dreamcast to VGA portion.  I initially used the Naki Dreamcast VGA adapter I bought back in the day but ended up buying a new Dreamcast VGA cable because the picture was too dark and I thought the box might be at fault (it wasn't). - what these adapters basically do is ground the "VGA Select" pin of the av-out and put the Dreamcast into VGA mode (RHBHV).

When I initially connected the VGA adapter to the VGA-to-Component adapter, the picture was very dark and hard to see.  Aside from trying another VGA adapter for the Dreamcast, I also ended up inserting a device called a "Gamma-X" as the second stage.  The purpose of this device is to boost brightness - and it did help, though not as much as I needed it to.

The third stage was a Monoprice VGA to Component YPbPr adapter.  There were several things wrong with this setup.  I lay most of it at the feet of the VGA to Component adapter.  The device was designed for maximum compatibility, not for the simple task I needed.  In order to always output a working 480p/720p/1080i/1080p signal, every single signal input was run through a scaler and the sync was regenerated.  This effectively crushed the contrast and introduced completely unnecessary scaling artifacts.

No matter what I did, I could never get the picture to look right.  Aside from not being progressive scan, the picture over S-Video looked waaaay better.

Forlorn Hope #1
Round about the time I was wrestling with this, the guys at HDRetrovision teased an image of a Dreamcast outputting 480p component video along with a blurb that they were in the early stages of working on a product that did exactly what I was looking for.  Unfortunately that was 2015 and as of the middle of 2018 they still haven't even really begun work on it.
The HD Retrovision cable that no one can actually buy.


Forlorn Hope #2
A couple of years ago I learned about The Behar Bros. (www.beharbros.com) - a couple of guys from Spain that produce a variety of output adapters for the Dreamcast.  They have several different types of boxes, including some that output directly to HDMI for a great signal on modern TVs.  They also make a replacement VGA adapter that will add artificial scanlines, and a simple sync-combiner etc...  Since most of their designs were clearly purpose-built for several different uses, I didn't think it would be unreasonable to reach out to them and ask if they could produce a box that just provided a straight-up 480p YPbPr output.  The first time I asked they were in the process of designing several new items and they told me to check back because they would soon have just the thing.  The second time I reached out about a year later, this is the response I received: "No, we don't have a component video solution. RGB is always better."  Not really, guys.

My Second Attempt
Emboldened by several recent successes in modding and a dawning understanding of circuit analysis, I decided that it would no longer be overly ambitious to think I could build my own adapter.  So I studied the problem for a couple of weeks, studied solutions to various pieces of it, made a plan, made a parts list, placed an order and got to work when it arrived.    My plan was to build my own sync-combiner and switch to throw the Dreamcast into VGA mode, but use an HDRetrovision Genesis Component cable to transcode the signal from RGBs to YPbPr.  It actually came together quite beautifully until I made a mistake and ended up burning out the HDRetrovision cable.  Not only are those things pricey, but it seems like it takes ages for them to be restocked.  That was a huge letdown, and i'm still not entirely sure what I did wrong - which tells me I still have quite a lot to learn.


My Final Solution
Simple Dreamcast VGA Cable

(Retrotek VGACTV1) VGA to YPbPr transcoder.


Amidst crying over my burned out HD Retrovision cable, I started re-exploring my options.  A lot has changed over the last few years since I started trying to do this.  I started by thinking I could use a sync-combiner that the Behar Bros. produced along with an RGB to YPbPr transcoder.

I'm currently using such a transcoder for my older 240p/480i systems, but I wasn't sure what 480p would do to it, and the seller had no idea either.  That led me to Retrotek on Ebay.

They sell a handful of specialty devices, including a RGB to YPbPr transcoder - which is what I went looking for in the first place, but somewhere along the line they also added a VGA to YPbPr transcoder they call the VGACTV1.

Unlike my general-purpose Monoprice adapter, this one is just a sync-combiner and transcoder - it doesn't do anything to scale or otherwise alter the resolution.  It does exactly what I had been trying to achieve all along.   The picture comes through sharp and clean with no obvious degradation at all - the Dreamcast is now a proper 480p console on my TV alongside its peers.

The Retrotek box is a little on the expensive side, but compared to how much I've spent over the last three or four years trying to make this happen and the fact that it not only works but works perfectly, it was a bargain.





Monday, May 07, 2018

Attempting to Explain RGB

A few years ago, I discovered the dramatic visual improvement from using RGB for my favorite classic game consoles.   The basics of this are often so basic that no one wants to take the time to talk through them because, duh, you should know this!  But I find it useful to rehash what I think is obvious for those corner cases when some nuance of explaining it helps someone to understand it where they couldn't before.

Why RGB is so great
Let's take as read that all analog video pictures are made up of dots (call them pixels or phosphor groups or whatever you like, they're a string of dots).  All color displays, regardless of technology - CRT, LCD, OLED, or whatever, have to separate picture information into discreet red green and blue values before they can assemble it into a screen full of colors.  All picture information starts as RGB and winds up as RGB, but the fewer transitions it has to go through along the way, the more faithful it will be to the original image.  RGB is pretty close to being the fewest transitions needed.

An Analogy:
Think of it like you have a mosaic picture made with thousands of red, green and blue painted marbles, and you want to move your mosaic to the other end of town.  The mosaic is too big to move all at once so you have to pack the marbles up, put them in a truck, drive to the other side of town and then reassemble the mosaic.  Let's say you only have one box to carry the marbles in, so you have to put them all into a big funnel that mixes them together.  In the act of mixing them together, the marbles rub against eachother scratching them and causing their paint to rub off on eachother so that now some of the green ones have red paint streaks and some of the blue ones have red paint streaks etc... When you get to the other side of town you have to sort them back out into red, green and blue using another hopper which also scratches them and gets some of them mixed up.  Now when you put the mosaic back together, the colors are recognizable but the picture is duller because all the marbles are scratched and some of the colors are smeared with streaks from other colors, and others are just in the wrong place.  That's the (grossly oversimplified) gist of how Composite video (the yellow RCA cable) works.  Now, if instead, you put the red, blue and green marbles neatly into their own separate boxes, when you got to the other end, you wouldn't have to scratch them or sort them, you would just simply reassemble them in the same order and the mosaic would barely be scratched all and every marble would be clean and in its proper place.  That's RGB.

Where RGB comes from.
RGB refers to the three primary colors - Red Green and Blue, of which all pixels on a color television are comprised.  By combining and using different values of these colors, a TV can produce a nearly complete spectrum of other colors. The values of these colors are also known as "saturation".  Irrespective of how it gets there, color information is separated into these three channels before being displayed on the screen.  In old school CRT displays this was because there were separate emitters for each of the three colors.  In LCD televisions this is because light is pushed through red green and blue layers of LCD, and the image processor needs to know how opaque to make each pixel in each LCD layer.

Brightness/Luma:
In addition to knowing the relative intensity of red green and blue, the TV also needs to work out how light/dark a pixel should be.  The relative brightness of a pixel is also known as its "Luma" value.  This is essentially the black white version of the picture.  In fact before color television, this signal was by itself.

Sync:
After figuring out what color and how bright a dot is, the TV needs to know where to draw it.
This is accomplished by something known as "sync".  The picture is transmitted as one continuous line.  Think of it like a machine constantly pushing out a colored string that's meant to be chopped up into pieces of a certain width and laid down one line at a time until it forms a rectangle that we'll call a "frame".  If we do our job right, the frame will be a picture of something recognizable.  But the machine doesn't stop moving, so as soon as we're done with one rectangle/frame, we immediately start snipping lines and drawing the next one.  We'd have to have some way of knowing precisely when a new rectangle was supposed to start, and when to snip the string to begin laying down the next line.  Suppose then that to help us along the machine spewing out the string also had two different with distinct sounds to them.  One whistle would blow when we were supposed to start a whole new rectangle, and the other would blow when we were supposed to snip each string and start a new line.  This is basically how sync works - one type of pulse tells the TV to begin drawing lines at the very top of the screen, the other tells it when to end the line and begin drawing on the next line down.  If that wasn't clear, I have one more analogy - think of it like a clock with hours minutes and seconds.  At the top of each hour, you begin drawing the screen at the top left corner.  Each movement of the second hand draws a pixel across the screen from left to right.  When the second hand reaches the top of the next minute, that's the signal to move one row down and begin drawing pixels from left to right again.  When you get to the end of the hour you've drawn a 60x60 grid of pixels.  Each movement of the minute hand is like an H-Sync pulse, and each movement of the Hour hand is like a V-Sync pulse.

A Tale of Two RGBs:
There is a 5-channel type of RGB known as RGBHV (Red, Green, Blue + Horizontal Sync + Vertical Sync) that was commonly used by personal computers and, if I'm not mistaken, some arcade monitors, but not really used by home televisions.  The RGB commonly used by game consoles in the 80's and 90's, and the topic of this article is also called RGBS (Red, Green, Blue + Sync) which only uses 4-channels.  The H and V sync channels are merged into something called "Composite Sync".  While RGBS was a common output format of retro game consoles and a common input format for consumer Televisions in Japan, Europe and Austrailia, it was not featured on consumer TVs in North America. (More on that below).

In a perfect world:
To ensure the best possible picture and the fewest transitions, it would be necessary to transmit all of the needed attributes of a picture on separate wires, or channels.  That would mean Red, Green, Blue, Luma, V-Sync and H-Sync for a total of 6 channels.  And that's all before you start talking about sound - can you imagine having to plug in 8 RCA plugs for a single device to get a picture and stereo sound?!  In a commercial sense, simplifying connections was much more important that image quality.  It didn't make any difference how awesome the picture quality was, if Grandma couldn't figure out how to hook up her VCR.  This led to a huge number of compromises.

RF Back in the Day
When analog TV signals were broadcast over the air back in the day, both the chroma and luma were combined into a single waveform (composite) and then modulated into a radio frequency (RF), and it was up to the TV circuitry to catch the radio signal, demodulate it back into a composite signal then figure out which part of the signal was originally luma and which part was chroma, then which part of the chroma was red, which was green, and which was blue.  The picture information was basically put in a blender and the TV had to sort it all out - problem is, it's impossible to assemble the original picture this way - just like the earlier analogy with the marbles only worse.  Each transition compromised the fidelity.  The colors appear smeared, sometimes light and color information is mixed, the sync signal had numerous errors and the result is a blurry semi-stable approximation of what the original signal looked like.

Composite
As TV technology advanced - particularly with the advent of the VCR, it became possible to skip the RF encode/decode by plugging a "composite" signal (the luma/chroma combined) directly into the TV - the standard marked by the yellow RCA connection.  Cutting out the RF modulate/demodulate step meant more of the original picture was intact and the result was a more stable correct image.  But the TV still had to guess about which information was luma and which was chroma, and then sift the chroma into RGB.

S-Video
While Europe, Austrailia and Japan began incorporating full RGB connectivity in their televisions by means of a standardized SCART cable, the standard was not adopted in the U.S.  Instead we were given an awkward half-way solution called S-Video, sometimes also referred to as "SVHS" for its association with the short-lived Super Video Home System videocassette standard for which it was seemingly created.  S-Video dramatically improved picture quality by separating Luma and Chroma into their own channels.  The TV no longer had to "guess" as to which part of the signal was light and which was color, and the result was a remarkable jump in image clarity.  The distinctiveness of the Sync signal from Luma made them very easy to accurately separate which also meant a super stable image.  The television still had to sift red green and blue values from a combined signal, but the improvement in contrast improved overall image quality so dramatically that many argued full RGB separation was ultimately unnecessary.

RGB(S)
RGB, as the name suggests keeps the color information separated into three distinct channels, with a fourth channel dedicated to C-Sync.  Each of the three color channels also carry Luma (lightness/darkness).  This is about as close as it gets to a perfect picture, but unfortunately it was never adopted as a standard for Televisions in North America.

Component a.k.a. Once Upon A Time in North America
And then things got weird.  When DVD started to become popular, it was clear that the pure digital format was capable of much higher fidelity than even S-Video could provide.  In countries using the SCART standard, this wasn't really an issue because that connector was perfectly capable of transporting the full spectrum of what DVD had to offer.  In the U.S. however we were wrestling with what to do about high definition content because we didn't have an existing connection type that would support it.  S-Video was insufficient, and the all-digital "firewire" being used by digital camcorders and specialty VCRs terrified the copy-averse MPAA.  While RGBS was perfectly equal to the task of both DVD playback and HD content playback, in North America we went a different way.  Instead of the decades old RGBS(Red, Green, Blue + Composite Sync) standard, we adopted something commonly referred to as "component" video, but more accurately described as "YPbPr" or "Color Difference".  (Component technically refers to any video signal where the colors are transmitted separately). Before getting into what that means, the important thing to know is that it is fundamentally incompatible with the already-existing RGBS signal standards in use and consequently supported by many older game consoles.

Component vs RGB
There's a lot of opinion out there about the image quality difference between RGBS and Component (YPbPr), but mathematically they produce images of identical fidelity.  Most opinions to the contrary are anecdotal and based on invalid test procedures.  You'll find a lot of people who think that RGBS is fundamentally superior to YPbPr, but they're wrong.  If anything, there's a slightly stronger argument to the contrary.  Ordinarily, combining color information into fewer channels involves modulating, multiplexing, or otherwise mashing it together to be sorted out later.  The clever thing about YPbPr is that it can effectively transmit three channels worth of data over two channels without compromising the fidelity of either by essentially using triangulation.  By knowing the difference between Blue and Green and the difference between Red and Green, you can mathematically figure out the exact original values of Red Green and Blue without any sifting or guesswork like what happens when Composite or S-Video gets untangled.  Another major difference between the two which is inconsequential in practice is the fact that each of them transmit Luma and Sync differently.  RGB uses a separate channel for C-Sync, whereas Component combines it with Luma.  All things being equal, this would seem to be an advantage for RGB, however sync is such a distinctive portion of the signal that, in practice, separating it from Luma can be done with nearly 100% accuracy (the only reason this isn't 100% is because nothing truly is).  On the flip side, RGBS carries Luma information over all three color channels, this part of the signal is completely redundant - the brightness of a pixel is not changed by its color value (saturation), so the Luma on each channel is exactly the same as that of the others.  While it's considerably easier to separate Luma from a single color than it is to separate Luma from a combined Chroma signal, this is still more error prone than separating C-Sync from Luma - thus the slightly stronger argument that Component/YPbPr can yield a more accurate picture.

Of course, all things are not equal, and the quality of your experience will definitely be more impacted by the quality of the source (game console, DVD player etc...), the quality of the cables (shielded/unshielded, quality conductors/cheap conductors), and the quality of the display (TV, monitor, BVM etc...) than it will by the differences between RGBS and YPbPr transmission methods.



Tuesday, March 27, 2018

Sega CD Model 2 Repair Notes

From time to time I like to fire up my disc based systems to keep the grease viscous and make sure everything is in good working order.  Well last night I fired up my Model 2 Sega CD and discovered that all was not well.

The disk tried to spin up and this horrible grinding and scraping noise came from the drive.  After several attempts the disk finally loaded, but it was painful and I shut it off immediately to prevent damage.  I managed to do some damage getting the silly thing apart, but everything is back in working order now.

Problem: Grinding

The grinding noise from a Sega CD Model 2 is evidently a pretty common issue.  There's a laser limit switch which the system uses to tell that the laser assembly has reached the center of the CD spindle.  Over time this switch stops working as desired.  The switch is essentially just two thin strips of copper inside a plastic shell.  When the sled touches the switch, the two strips are supposed to make contact and inform the mechanism to stop the motor.  Most people seem to think this switch gets bent out of shape from repeated use, and they will gently "bend" it back into place so it begins working again.  While that definitely works, I believe oxidation is also a factor, so I also used a pipette to drop a dab of Deoxit into the switch for good measure. 

Solution

Gently bending the limit switch "forward" for a few seconds and applying a drop of Deoxit cured the grinding problem.


Problem: Scraping

After I got everything back together and got the drive spinning again, I noticed there was a persistent scraping/scuffing noise.  At first I thought this was some issue with the magnetic clamp on the drive door.  (There's a circular magnet on the door which helps to lock the CD in place when the door is closed).  With the top of the CD unit removed and the magnetic clamp attached independent of the door, everything seemed to work normally, however when I reassembled it, the scraping persisted.  I eventually noticed that if I held the unit upside down while it was reading the disc, that the noise disappeared.  Upon closer examination, the CD drive landing was almost flush with the disc well.  This was causing the disc to scrape the well.  I noticed too late it was scratching the disc - my copy of Ecco Tides of Time now has a ring scratched in it :( It was also causing the magnetic clamp to scrape inside its assembly.  The problem was caused by the four rubber shock dampening grommets that hold the CD drive in place.  They were simply too old and had mostly collapsed, causing the CD assembly to sit too low.  Since I could not find replacements for them, I did the next best thing and rigged it.  

Solution

I cut some crude plastic washers out of some large heat shrink tubing and placed them on top of each of the four shafts that hold the drive in place.  This gave the collapsed rubber grommets enough support to lift the drive correctly. When it was reassembled the drive plane was now sitting about 2mm above the disc well, giving the disc plenty of clearance to spin freely.  In hindsight, I think leaving a disc in the drive may have contributed to the collapse of the original grommets, so I would recommend leaving the disc drive empty when not in use.


Problem: Door Switch

I'm not sure if this one is self-inflicted or not, but when I got everything apart, the door switch was twisted.  My recommendation here is to always take the top of the unit off with the door open.  Doing so with the door closed means that the top is contacting the door switch as you're working it off.  The reason I'm not sure if I did this was because the bend looked old, if that makes any sense.  

Solution

I ended up removing the clear plastic cover of the door switch and gently bending everything back into place. (To remove the cover you need to use a thin tool like a small screwdriver shaft to press the back of the cover forward while you pull it up away from the board).  It took quite a lot of trial and error to get it bent back to working normally again, so, like I said, always take the top off with the door open.


Problem: The System says "Checking Disk" but the drive is lifeless

This happened sort of in the middle of all of the troubleshooting and taking apart and putting back together.  The short version of the story is that the "Checking Disk" message appears when the system cannot communicate with the drive.  About the only way to tell this is what's going on is that "Checking Disk" stays on the screen even when the door switch indicates that the drive door is open (so it shouldn't be checking anything).  It took me a little while to figure out what had happened, but the system was extremely dusty when I disassembled it.  Evidently a piece of fuzz had gotten into the connector and was preventing good contact.

Solution

I ended up blasting the ribbon connector slots on both the mainboard and the CD drive with Deoxit and allowing them to dry completely (about 5-10 minutes).  After reconnecting everything the system started telling me to close the drive door again - which meant it was talking to the CD drive again.

Friday, March 16, 2018

Review: NESRGB Mod on an AV Famicom

Short story long, most 80's and 90's era game consoles used off-the-shelf integrated circuits for video/picture processing, and most of those integrated circuits generated RGB as well as composite video.  As a result, even when the console manufacturers didn't bother to connect the RGB lines, RGB could still be enabled by tapping the RGB lines from the IC directly and connecting an amplifier to drive them.  The best example of this is the Turbo Duo/PC Engine Duo.

When it comes to the NES/Famicom, things become a bit more interesting.  Nintendo used a custom "PPU" chip to drive video, and as a result, RGB is not exposed, and can't simply be "tapped and amplified".

Enter the NESRGB.  Rather than trying to tap RGB from somewhere on the board, the NESRGB actually hijacks the entire PPU chip. You literally have to desolder the PPU from the board and place a device in between it and the system.  I mean, look at this thing, it's crazy.



NES RGB Mod - the whole light-green PCB in the middle with all of the wires coming off of it is the mod.  It's about 1/3 the size of the whole mainboard!

My grasp of the science going on with this thing is somewhat rudimentary, but the gist of it is that the NESRGB board is intercepting certain signals from the CPU and generating its own picture in RGB space.

Which Console To Mod?

The NESRGB kit is pretty universal, so it can be applied to pretty much any version of Famicom/NES that I'm aware of.  I made my decision based on two things.

1. I did not want to cut plastic.  The NES does not have a suitable port to output RGB.  The common solution to this is to add such a port.  Classically this has meant drilling a hole and mounting a mini-din 8, but more recently this has shifted towards installing a multi-out matching the SNES/N64/Gamecube port to maintain compatibility with existing cables.  While this is a good solution, it still involves cutting plastic.

2. The Famicom has additional sound capabilities not enabled in its international counterparts.  I'm fuzzy on the specifics, but certain games contain their own sound chip used to add additional channels of "high quality" sound.  There aren't a ton of games that have it but it's used by some major ones like Doki Doki Panic (the original game from which the western version of Super Mario Bros. 2 was made), Zelda No Densetsu (The Legend of Zelda), Akumajou Densetsu (Castlevania III: Dracula's Curse).

So I settled on the AV Famicom, because it's the only one of any of the versions of the console which already uses the Nintendo multi-out connector, and it happily happens to support the FM sound from the cartridge.

The Instructions

https://etim.net.au/nesrgb/installation-famicomav/

Tim Worthington - the guy who developed the NESRGB mod, has put up very nice instructions on his website.  This is the most complex mod I've ever attempted in terms of invasiveness and the sheer number of points that have to be touched. For the most part the instructions are great.  Just read them thoroughly...

RTFM

The first problem that I encountered was my own failure to read the instructions.  One of the very first things you need to do after desoldering the PPU from the board is fitting an IC socket in its place.  Before actually soldering anything together, you're advised to insert pin-strips into the adapter board and then plug them into the socket - by waiting to solder anything until it's all pushed together, you make sure the pins are properly aligned for when you need to unplug and replug the board into the socket later.  The problem is that there are two different kinds of pin strips provided - round ones and square ones.  You want to solder the round ones to the adapter board in this step, but the square ones come taped to the adapter board - which confused me.  This took me a while to figure out but it was clearly spelled out in the instructions.

Palettes? What?

A palette in this context is the complete set of colors that the NES can produce.  There are a total of 64 colors in that palette.  Because the PPU is generating these colors internally in composite space there is no (good) direct translation to RGB.  The actual values of those colors have to be reverse engineered.  My understanding is a little fuzzy on what the specific challenges are but the short version is that games don't look right if the pallet isn't right, and it's difficult to get RGB to match the look of the original composite output of the NES.  Because opinions vary on the correct approach, the NESRGB provides multiple options and comes with a switch which you can wire up to change between three pre-loaded palettes.

The Business End

The instructions are a little vague when it comes to wiring up video output connections and what cables to use.

TTL vs 75 ohm (What Cables You Can Use)

The instructions make reference to the need to use Gamecube SCART cables.  This was not explained very thoroughly, but it basically comes down to the signal strength being driven on the output lines.  My understanding of this is also somewhat limited but from what I've been reading, TTL is a lower voltage output level, whereas "75 ohm" describes a higher voltage output level.  The SNES outputs video at the higher voltage level, so it's necessary to add resistors and capacitors to the output lines to bring the signal back down to TTL before it gets connected to the display.  Evidently the Gamecube outputs TTL, so the SCART cable made for it is a straight connection without resistors and capacitors - ergo the recommendation to use Gamecube cables.  It seems like Tim had enough requests to accomodate 75 ohm output that the current versions of  NESRGB default to 75 ohm output making them compatible with SNES cables.  You now have to solder a jumper closed to change to TTL output.

I understand why 'TTL' is recommended/preferred - because it seems silly to ramp up the voltage, only to ramp it right back down at the plug end, but cable compatibility is more important to me so that's the method I went with. 

Edit: Evidently my understanding of TTL was backwards.  TTL actually refers to a higher voltage level - around 5Vpp (5 volts peak-to-peak) whereas ideal 75-ohm output is closer to 700mVpp (.7 volts peak-to-peak).  Setting the output to TTL requires capacitors and resistors in the cable to pull the voltage down to the correct levels.  If you output 75 ohm and have capacitors and resistors in the cable, you're needlessly diminishing the signal.


Sync

In one part of the instructions it vaguely refers to cutting the original composite video trace...or not.  It doesn't really explain what this decision means - probably because this should be obvious.  It was not obvious to me.

AV-pinout2_small.jpg (19568 bytes)Firstly the point of this step is to disconnect the original signal path of composite video.  I *thought* this was because the original composite video was still being driven and you don't want to push two signals at the same time.  So the first time I tested this, I did so by just connecting the R, G and B lines and leaving the original composite video path intact.  With a composite cable, the picture was the wrong color and missing elements.  From some additional reading on the way the NESRGB works, there is evidently some "dummy" data being passed into the PPU to make it behave normally and I *think* that's what I was seeing - so while there was still a picture of some description, it definitely wasn't right.

Next, I desoldered one leg of resistor R106 (this should have the same effect as cutting the trace but it's reversable) and then connecting the composite video line from the NESRGB to the output port.  The result was a perfectly normal looking output with composite video cables.

When I tried to connect an RGB SCART cable to with just these four lines connected, it resulted in a wavy distorted picture, and it took me a little while to figure out why. (Hint: I was using a Sync-on-Luma cable).

In the instruction images you only see the R, G, B and Composite video lines connected, and this is exactly what I did.


From the instructions on Tim Worthington's Website


I knew the wavy distorted picture was happening because of a lack of sync signal, but I didn't immediately understand why.

I had 3 different SNES SCART cables and I was fortunate enough that all three of them used a different method of obtaining sync - fortunate because one of them actually worked when I tested it, and that was the breadcrumb I needed to figure out what was going on.

If a video signal is a single long line of pixels, the sync signal is a timing pulse which explains to the display how to assemble it into a rectangle.  One part of the pulse tells the display when to start the first line at the top of the display, the next tells it when it has reached the end of a line and to start drawing pixels on the next line down.  This requires two types of signal - horizontal sync and vertical sync.

In composite video, the horizontal and vertical sync signals are mashed together with the color and light/dark information.  In S-Video, horizontal and vertical sync are carried on the Luma (Y) channel along with the light/dark information.  Pure RGB has the option of a separate conductor dedicated just to the horizontal and vertical sync - confusingly, this is called "composite sync" (c-sync).  It's called "composite sync" because it is composed of  both horizontal and vertical sync in a single signal, whereas composite video gets its name from the fact that it is composed of the color, light/dark and sync information all combined into a single channel.

Since the sync signal should theoretically be the same no matter how the video is being transmitted, it's possible for RGB to draw sync from other sources when c-sync isn't available.  This makes for a total of three options for getting a sync signal for RGB:

Sync-on-Composite
The sync signal is taken from the composite video signal.  This is the least desirable method because it involves sending the whole composite video signal through the cable.  The composite video signal is "noisy" and can cause crosstalk with the other signals.

Sync-on-Luma
The sync signal is taken from the Luma (Y) S-video channel.  This is a sort of middle-ground as it's cleaner than composite. It's sending less additional information that might cause crosstalk, but it's still sending some.  It's necessary for systems that do not natively output c-sync (such as the original Playstation).

C-Sync
The dedicated sync signal is the cleanest way to get sync, but it's not necessarily available everywhere.

The NESRGB actually offers all of these connections, but the instructions showing only the four wires connected will only enable the worst quality option: Sync-on-Composite.


For reference: the Multi-out pins (Not an AV Famicom, but the pinouts are universal). Image taken from https://gamesx.com/wiki/doku.php?id=av:nintendomultiav

To enable C-Sync, connect the "CS" on the NESRGB to pin 3 (labeled S/12V).
To enable Sync-on-Luma (and S-video), connect the "Y" on the NESRGB to pin 7 (labeled Y) and "C" on the NESRGB to pin 8 (labeled C).

In the end I needed to connect 7 conductors to fully enable all output options.

Bottom of the mainboard.  All connection options wired up.
From the Left:
Brown: Composite Video
Red: S-Video Chroma
Orange: S-Video Luma
Yellow: RGB Blue
Green: RGB C-Sync
Blue: RGB Green
Purple: RGB Red


NESRGB end of the video out

Using Different Palettes


Tim doesn't provide instructions on his website for using additional palettes (at least that I could find), but instructions are available here: http://www.firebrandx.com/nespalette.html

(Update: I did eventually stumble across a page on Tim's website which describes how to flash firmware and swap in new palettes, but Google seems to be the only way to reach it - I couldn't actually find where it was linked from on the site itself: http://etim.net.au/nesrgb/background_fault/)

Basically, you need to connect to a custom J-Tag header on the NESRGB and use a programmer like an Altera USB Blaster to reprogram the EEPROM with the new palettes.

I happened to have some JTAG sockets lying around.  Since I'm not punching holes in the plastic, I just used a short segment of cable so the connector can be tucked inside the case.  I'm not going to be flashing palettes all that often.
JTAG socket wired up for USB Blaster


I also wired the toggle switch but left it internal in the case, covered in a plastic sleeve to make sure it doesn't cause any shorts.  This does mean that I have to open the case to switch palettes, but again, I don't plan on doing so very often.  With the amount of time and passion that FirebrandX put into his "Smooth" palette, I'm pretty sure I'm just going to leave it there, but it's good to have the option.

Final Thoughts


I'm pretty happy with the way this turned out.  The installation effort basically took me an entire day, but that was mostly because I've never done it before, didn't really know what I was doing, and my desoldering tools left a lot to be desired.  But the effort was well worth it.  NES/Famicom games never looked so good.  The main reason I did this was to be able to run it through the OSSC and play on a modern TV with perfect integer scaling, absolutely clean graphics and no perceptible lag, but it also cleaned up the image on my CRT displays.  It blows the NES classic out of the water.

Saturday, December 23, 2017

NeoSD NeoGeo AES Flash Cart review

In the 00's emulation was the rough draft of a love letter from technology to classic console gaming.  Emulation made it possible to play an entire library of console games with just a PC and a modest amount of know-how.  More than that, it provided a venue for fan localization of titles that were never released in our native tongue. I will never forget the hours I spent trying to get Final Fantasy V to play on my PC, or the hours I sunk into actually playing Seiken Densetsu 3 (Secred of Mana 2).  Console emulation is praiseworthy by the fact of its existence alone.  Be that as it may, emulation has always been an approximation of the original experience.  Even with the fastest and most powerful computers, emulation doesn't seem to be able to re-create the experience with complete fidelity - often it gets close enough to scratch the itch and it's a great deal better than nothing at all, but with input lag, screen tearing glitches and a whole other litany of nitnoid issues, emulation is far from an ideal way to experience the games of yesteryear.

In the '10's that love letter to classic console gaming seems to be more fleshed out with the advent of widely available flash carts for just about every console with a cartridge slot.  These cartridges allow you to play ROM images directly on original hardware - an experience indistinguishable, in practice, from playing the original cartridge.  Usually they work by inserting an SD card with ROMs into a specially made cartridge.  When the console is powered up with the cartridge there's usually a menu where you can select a game to play from the SD card and away you go.

Not all flash carts are created equal, and the relative sophistication of specific consoles can cause compatibility issues.  In general the systems which used their cartridge slot exclusively for data storage enjoy flash carts with high compatibility, whereas other systems which used the cartridge as an extension of the hardware itself have a bit rougher of a time.  For example the SNES used several "enhancement" chips, the "SuperFX" being the most obvious one. To date there aren't any flash carts that can simulate the SuperFX (though theoretically the SD2SNES might be able to one day).  


Another example of this is the SNK NeoGeo.  The NeoGeo was primarily an arcade platform which was extended to the home market.  The arcade version is called Multi Video System (MVS) and the home version is called Advanced Entertainment System (AES) except for additional copy protection applied to the AES versions of games the systems and software are identical. This is noteworthy because SNK emphasized function over mass market economy - i.e. they did whatever it took to make the games look and feel the way they wanted even if it wasn't cost-effective.  For this reason the NeoGeo sported some of the most audibly and visually impressive games of its time, and was the most expensive console of its generation.  The original retail price of some of the games sold for the AES were more than it costs to buy a whole PS4 system these days - and that's not even accounting for currency inflation.

The NeoGeo is a massively over-engineered system. It's like if, prior to the invention of the automobile, someone decided to make horse-drawn carriages faster by strapping a hot air balloon to the top to minimize friction, attaching a foot petal mechanism for the passengers to assist driving the wheels, and harnessing a dog sled team in front of the horses for additional pulling power. Whereas most flash carts just have to mimic a single ROM chip and feed a single bus, a NeoGeo flash cart would have to mimic multiple separate chips and feed 5 buses, which requires FPGAs (basically re-configurable circuits) which are not cheap. 

For this reason a lot of people had written off the possibility of a NeoGeo flash cart ever existing.  But true to the nature of the NeoGeo itself, pragmatism has proven to be no barrier to possibility.  After years of hearing that it couldn't be done, we've got not one but two flash carts for the NeoGeo.  The NeoSD came out late 2016 and has just picked up a U.S. distributor in June of this year.  And someone named "Darksoft" on atariage.com and arcade-projects.org is nearing completion on a similar and ostensibly even better NeoGeo flash cart.


While I initially wanted to wait for the "Darksoft" cart, the old adage "a bird in the hand is worth two in the bush" won out so I recently purchased a NeoSD and wanted to share my impressions. 

The product description really doesn't do enough(for me anyway) to explain why these carts are so expensive ($400-$500) and how they differ from flash carts for other systems, so I wanted to at least share a little of what I've learned before I explain my impressions. 

I'll try to relate my experience and impressions in relatively the order I experienced them.

Getting Games
Getting games for this cart was annoying. Unlike most flash carts where ROM sets are usually available in a single archive using a common format, NeoGeo games were primarily arcade games and this cart was developed to use MAME ROMS. My attempts to just get a complete set of NeoGeo games were stymied by the fact that MAME is not packaged that way - all of the ROMs for everything are in the same giant directory and there is no way to "filter by NeoGeo" when downloading. Mildly annoying is the fact that the ROMS have to be reformatted specifically for the NeoSD. However, the NeoBuilder software which performs this function provides two additional conveniences that kind of make the whole thing a wash. Firstly the tool verifies that the ROM you have will actually work - without exception every other flash cart I've used has had at least one ROM not load because the dump was wrong, or some snowflake artist decided to write his name on the splash screen and borked the checksum. It was nice to be forewarned that a ROM was not going to work so I could replace it. But perhaps the best thing about the tool is that it compares what you have against a set of known ROMs and tells you what you're missing so you can be assured of having everything. In the end I had to go to 4 different places to get a complete set that the NeoBuilder was happy with. I would mention them here but I have a feeling that it would get censored or fall afoul of some site policy. Assuming you're like me and don't already have a complete MAME ROMS lying around, one way you could approach it is: search for "Neo Geo Set Part", get those, run them through the tool, then find a MAME torrent and download just the zip files that match the names in the "missing" column. There will still probably be one or two that don't check out properly and you can just search for those specific zip files and try what's available until you get one that NeoBuilder likes. Also - a complete set of ROMs clocks in at around 10GB so a 16GB MicroSD is more than adequate.

Packaging
This is the first time I've purchased a "Complete Edition" of a flash cart from Stone Age gamer. The overall presentation is very nice. The design is nicely conservative and the included manual turned out to be really helpful. Was a little surprised that this one did not come with a Micro SD card, but I'm guessing the margins were pretty thin. While the custom case is cool and matches the aesthetic of North American AES games, for some reason they made the case the better part of an inch taller than the standard Neo Geo cases so it won't fit on the shelf next to my other Neo Geo carts. Were these cases actually made for something else and just happened to work for AES carts? Otherwise this seems like a bizarre choice. Each cart has a serial number which is printed on a sticker. On my cart this sticker was placed on the right side (opposite the Micro SD slot) right where the cartridge inserts into the AES, so one of the letters had been marred from scraping the side of the cart slot and I couldn't tell which letter it was. I don't know if it's that way on all of the carts or just mine, but that was also kind of a bizarre choice. Otherwise the cart shell is a very nice injection-molded piece. It doesn't feel quite as substantial as the real thing but it's close.

Firmware Update
The cart I was sent was not on the latest firmware. I noticed this when the included manual mentioned options that I didn't see when the cart booted up. The manual didn't include any instructions for this, but with www.neosdstore.com plastered on the splash screen it wasn't difficult to work out. Just go to www.neosdstore.com and click the downloads link. I think the developers are very worried about clone/copycat products because they require you to create an account and register your serial number in order to get firmware updates. The firmware update file itself has the serial number in its name, and I wouldn't be surprised if the serial number is embedded in the payload as well. Anyway, the update comes with instructions and I didn't have any issues with it.

Playing Games
So, after hunting down ROMs from several sources, converting them to the required format, copying them to a Micro SD and performing a firmware update I was ready to get my NeoGeo on.

When you power on the system you're presented with a list of games and some basic options mapped to controller buttons. One thing that confused me at first was the fact that there are two separate options menus. There's a systems options menu that you get by hitting "B" (I think), and there's a game options menu that you get to by hitting "Start" with the game highlighted.

What I liked:

-The Menu
The system menu was more robust than most flash carts I've used. Each game has an image of its title screen when highlighted (I believe these are embedded in the ROM for use with MVS) as well as a nicely formatted title for the game itself (It doesn't just use the ROM file name like most flash carts). From what I've seen, Darksoft's upcoming cart is going to be more involved, but the NeoSD is already more than adequate.

-The Options
As an AES owner without a hacked console (i.e. no UNIBIOS) I've basically always been stuck with the default settings on each cartridge. Since some of these games were designed to require a ton of quarters to complete, the difficulty coupled with the inability to add more credits made it impossible for me to fully enjoy them. By setting the BIOS mode to "MVS" on the system options menu, the game options menu now allows for "Soft DIP" settings and I can set unlimited credits, adjust the difficulty maximize lives etc... This is by far my favorite feature because it has made all of my games more accessible without requiring hardware modification to my console.

What I didn't like so much:
-Load Time
When switching between games, the system will go into an "erasing/writing" phase which can sometimes take minutes. There have been video comparisons of Darksoft's cart doing this much more quickly than the NeoSD for certain games, and, in fairness, the NeoSD loading certain other games more quickly than Darksoft's. My layman's understanding of this is that not only is some kind of flash NVRAM being re-written, but certain of the FPGA circuits need to be reprogrammed as well, so this all comes down to an unavoidable consequence of the NeoGeo's complexity. While it's completely understandable, it may come as a bit of a shock just how long you're required to wait to switch games - especially newer ones like Samurai Showdown V. Once the cart is programmed, loading is instant because the NeoSD basically becomes the game that you designated until you erase it and write another game to it. If you like you can even remove the SD card and set the NeoSD to boot the game directly so it behaves exactly like an original cart.

Conclusion
It has been a blast getting re-acquainted with my AES and trying out a ton of games I never had the opportunity to play before. While it's possible to play all of these games via emulation basically for free, nothing beats the responsiveness and presentation of the real thing. My wife and I have already spent about 12 hours this weekend playing old favorites, sampling random new stuff and just having an all-around great time with this. While Darksoft's upcoming cart will arguably be better in some respects, the NeoSD has everything I want or need from a NeoGeo flash cart and I'm very happy I went with it when I did.

Monday, October 30, 2017

Seiko TV Watch

Nothing can ruin art and inspiration like money can.

When I was in 3rd or 4th grade, our science textbook at school featured a picture of the Seiko T001.

https://museum.syssrc.com/artifact/mobile/900/

I can't recall if that's the first place I laid eyes on one, but I remember becoming almost obsessed with it.  I later saw the watch featured in the movie Dragnet, and much later (though it was a much older film) in the film Octopussy.

There are plenty of sites such as the one above that tell the story of the watch much better than I can, so I'm not going to duplicate that effort.  The truth is I didn't really know the history of the watch and it didn't much matter to me either.  The fact of the matter is that in 1982 Seiko made a working television screen the size of a wristwatch face.

When I was young, the miniaturization of technology was awe inspiring.  It opened our eyes to what was possible and made an incredible promise out of the future.  It felt like every year we were closer to flying cars and wearing computers on our wrists.  Pleasure cruises to the moon were a mere generation away.

But something happened on the way to the future.  Maybe every generation looks at this progression and formulates a similar sentiment, but what the heck happened?  And the answer is simple.  Money happened.  There was no follow-up to the Seiko T001 because progressing the state of the art was not as profitable as maintaining the status quo.  Sure 30-some odd years later we have "smart" watches now - but those aren't the successor to the T001 - they're the product of an entirely different way of thinking.  The technology doesn't exist now for its own sake, it exists to keep us paying for services.  Am I being cynical?  Probably, but am I wrong?

Enough grousing about the good ol' days that never were and back to story time.

What's really weird about looking these up on Ebay is that the term "Seiko TV Watch" yields a lot of results that aren't what you're looking for.  Evidently there is a style of analog watch face that resembles the shape of an old TV set, so the vast majority of your results will be these.  Even so there is almost always a T001 up for sale on Ebay.  Don't let anyone tell you they're rare - they definitely aren't.  They're expensive because they're desirable, not scarce.

I recently had the pleasure of acquiring a Seiko T001 and it's everything I ever hoped it would be.
Buying it was actually kind of a fun experience with a couple of twists.

The whole thing consists of the watch, a pair of headphones and a receiver unit.  Most of the listings I had seen for these were missing the black foam pads from the headphones, making them look neglected and incomplete.  Occasionally the seller would offer some verbiage to the effect that the foam had disintegrated with age.  The one I bought had the foam intact in the images, and I was looking forward to getting a truly complete set.  Well, I got my foam pads alright...  Whatever material was used to make the foam back then becomes brittle over time and the vibration from being shipped caused what was left of the foam pads to basically explode in black grit all over the interior of the package.  It was pretty comical when it arrived.  I spent the first 20 minutes with the watch carefully extracting black crumbs from all its crevices.

After getting everything cleaned up, I decided to throw some batteries into it and see what it did. That's when I discovered that someone had left batteries installed into the receiver and they had predictably leaked.  Fortunately only one of the battery contacts was corroded and after a good scrubbing with some Deoxit and a toothbrush everything seemed to work just fine.

As many articles about the watch will attest, you can't really do a lot with it now because there are no more over-the-air analog TV broadcasts, and the receiver for the watch doesn't have video-in ports.  This has led a lot of people to state in the listing that it doesn't actually work anymore.  Apparently some people buy these just to collect them, and that's cool, but I bought mine to USE it. (This despite the fact that it's so wildly impractical).  So step two was figuring out how to get a video image onto the screen.

Like most portable radio receivers from the era, the headphones do double-duty as an antenna loop.  Searching around the Internet I came across a couple of accounts where people had managed to pipe a video signal into the watch by means of a cheap RF Modulator and a couple of plug adapters to convert the coaxial (type F) connector to RCA and then RCA to the phono plug used by headphones.  After fiddling around a lot with different connections, I eventually got the whole RF Modulator+adapters thing to work work by soldering a "matching transformer" (like this one https://www.amazon.com/RCA-VH54R-Matching-Transformer-VH54R/dp/B00005T3EY) inline.  I'm guessing the lower resistance of the direct connection was overpowering the tuner.  But even with that setup, the picture was very fiddly and I could never get it stable for more than a second or two.

Which led me to plan B.  Rather than wire something directly to the receiver and possibly shorten it's operational life in the process, I thought "How hard could it be to broadcast a TV signal?"   The simple answer is that it would have been a lot easier had I been trying to do it 5 to 10 years ago.  At one point in the recent past there were plentiful cheap supplies of devices like this: https://www.radiomuseum.org/r/unknown_video_sender_ut_66.html, (it's basically a box that takes an AV signal and broadcasts it very short range on a UHF channel) but I couldn't find one anywhere for love or money in the couple weeks I searched.

There are a lot of similar looking devices which only transmit between a sender and receiver and not directly to a TV, so it would be very easy to accidentally buy the wrong thing.  Several times I came across a similarly-described device and had to spend an hour trying to figure out what it actually does.  Because there are so many listing aggregators, the Internet has basically become one big echo chamber of product descriptions.  I have a feeling that the supposedly questionable legality of some of these devices led to their function being word-of-mouth only so the FCC had to guess whether or not to prohibit its sale.  Most people who knew how they worked have likely just moved on.  I did finally stumble across a compact device that sends a UHF TV signal here: https://www.ebay.com/itm/55-1190-Zealous-Analog-Audio-Video-Sender-TV-Wireless-Transmitter-Receiver/142267182316?hash=item211fc8ecec:g:n9AAAOSwA3dYlOD9 but I managed to find something a bit better (in my opinion) beforehand.

Phil's Old Radios: https://antiqueradio.org/HomeTVTransmitter.htm is an old-timey website dedicated to the preservation of old electronics and he happened to share his solution for getting a picture onto these sets after the fall of analog television broadcasts.  I have a lot of admiration for people who do this sort of thing.  Phil's website describes using a Blonder-Tongue modulator and an antenna to send a TV signal that will cover a small area.  While this is functionally equivalent and much bulkier than the all-in-one unit I saw on Ebay, it occurred to me that a piece of professional equipment was probably going to be more reliable, adjustable and repairable.  As far as I can tell the original use of these Blonder-Tongue devices was to push internal CATV channels to multiple TVs in schools and hotels, so the output is quite strong to push a signal across long cable runs.  It took some time to sort through the available listings to find the right thing and a decent price.  The original MSRP on these was nearly $2000 but they're frequently sold for between $30 and $100.  I found one for around $40.

When the modulator and antenna arrived in the mail, I assembled them and configured the modulator as well as I could work out how, got out my watch and started tuning.

After that it only took a couple of minutes fiddling with the tuner to get a solid picture on the watch.  The range was only around 20-30 feet but that was more than enough to fulfill my longtime dream of watching The Transformers on a Seiko TV watch.  It just doesn't get any more 80's than that.


Sunday, May 28, 2017

Nintendo Switch vs. Atari Lynx Which is Better

The Showdown


The Nintendo Switch has been in the hands of players for a couple of months now.  The gaming press has carried stories of shortages and stock flying off the shelves, but when you strip away the hype and marketing, how does it hold up against one of the best handhelds of all time, the Atari Lynx?

Don't let the fact that both machines feature horizontal orientation with controls on the sides fool you, these are very different devices.  We'll rank each system according to a series of 6 crucial criteria to see how they really stack up.


1. Size

Top: The Atari Lynx featuring ergonomic contouring, and ambidextrous controls. Bottom: The Nintendo Switch featuring a more stylish, but somewhat ergonomically compromised design exclusively for the right-handed. 

The Switch takes up a 9.5x4 inch surface area and is .55 inches thick, while the Lynx is 10.75x4.25 inches and 1.5 inches thick.  At first glance they are similar enough in size that it may seem like neither would enjoy a significant advantage but with a larger surface-to-screen ratio and nearly 3 times the thickness, the Lynx allows for a much sturdier and comfortable grip and more room to place your fingers while Switch players need to keep their digits much nearer the edge and pinched at a much more acute angle to grip the thinner handheld.

Advantage: Lynx


2. Erogonomics


The Lynx features a D-Pad and allows the screen to be inverted to accommodate left-handed players as well as right-handed players.  Sound volume is controlled with an analog potentiometer, allowing for an infinite range of adjustment.  The Switch also features multiple controller orientation options, but sadly none are designed with lefties in mind. The Switch tries to make up for its lack of a D-Pad with numerous buttons, analog control sticks.  The stick placement of the analog stick on the right joy-con was chosen to allow the right joy-con to operate as a standalone controller or as the right-side controls for the console when attached.  Some users find the right-analog stick placement to be an uncomfortable unwelcome compromise.  Volume control on the switch is digital, limiting the adjustment to a stair-step range of 30 different volume settings.

Advantage: Lynx


3. Screen


The Lynx sports a color 3.5 inch screen with a resolution of 160x102, while the Switch has a 6.2 inch color screen with a resolution of 1280x720.  If you do the math you'll notice pixels on the Lynx are 5x the size of pixels on the Switch!  This means more visible surface per pixel and better pixel definition.

As you can see from these direct comparison screenshots, the pixels are clearly visible on the Lynx screen, but basically impossible to see on the Switch.

With it's enormous pixel size, each individual pixel on the Lynx is clearly visible.

Shown at actual resolution, the Switch pixels are practically microscopic.


Technical details

Switch
pixel width 0.0042
pixel height 0.0042

Lynx
pixel width 0.0203
pixel height 0.0184

Advantage: Lynx

4. Power and Battery Life


The Lynx has its power socket on the top, so the unit can be placed flush on the table while it is connected to wall power.  Lynx average battery life is 4.5 hours.  The switch places its power socket on the bottom of the unit, so it cannot be placed flush on a table while connected to wall power.  Average battery life for the switch is 4.25 hours putting it nearly on-par with the Lynx, however the Lynx has changeable batteries making practical battery life infinite provided you bring enough spares.

Advantage: Lynx

5. Game Packaging

Left: Switch games come in a protective plastic clamshell for safe and easy storage. Right: Lynx games are shipped in fragile cardboard boxes which do not provide reusable protective storage.
While the game packages for both handhelds offer artwork of similar size and quality, the Switch packaging doubles as a somewhat durable and reusable storage case while Lynx owners are expected to provide an alternative means of storing games.

Advantage: Switch

5. Inside the Package - The Games

Lynx cartridges are 2.4x2.2 inches in size allowing for labels with artwork that don't require a magnifying glass to read, and they also taste pretty neutral.  While the Switch uses extremely easy to misplace cartridges 1.25 x .86 inches in size with microscopic artwork and they taste fantastically awful.  Lynx cartridges feature the pin connectors on the front side so it is very easy to tell when/if they have become dirty or need cleaning.  The pins on the Switch cartridge are hidden on the back side.  Nintendo's solution seems to have been recessing the pins to prevent surface dirt accumulation, but this also makes them extremely difficult to clean should the need arise.

Left: Switch cartridges are too small to read unassisted.  Center: Lynx Cartridges feature legible artwork and easy to inspect and clean pins.  Right: Lynx is the only one of the two to ship all of its games with helpful instruction manuals.

Also once we get into the package we discover another corner cut by the big N - switch games do not come with manuals.  In contrast every Lynx game ships with a manual.

Advantage: Lynx

6. Cartridge Selection

At present this is a no-contest category.  With it's massive selection of 74 game cartridges the Lynx completely eclipses Nintendo's plucky upstart which is still flagging behind with fewer than 10 titles available as of this writing.  It should be noted, however, that the number of titles offered for the Switch is expected to increase and may even eventually be on-par with the vast selection available to Lynx owners today.

Advantage: Lynx


Conclusion

After winning 5 out of 6 categories, it's no surprise that Atari's powerhouse comes out on top of this one.

Tuesday, April 11, 2017

Pioneer LaserActive PAC-S10 Capacitor Replacement

   The 90's were a very interesting time in the world of video games - at least they were through my rose-colored glasses.  No one had a clear picture of where the future would take us but it seemed like everyone had a picture.  This gave rise to a ton of innovation that companies these days wouldn't dare risk trying.

   One such innovation was the Pioneer LaserActive.  Basically Pioneer worked with video game companies to create a Laser Disc player with a pluggable modules that contained entire video game consoles.  At $1000 for the LD player and $600 per module, it was a contender for the crown of fiscal masochism, easily beating already prohibitively expensive enthusiast-only platforms like the SNK Neo*GEO AES.

   Pioneer managed to get both Sega and NEC onboard, so LaserActive offered both a Genesis and Turbografx-16 module.  Not only did you get the world's most expensive working Genesis or Turbografx-16 inside your Laser Disc player, plus the functionality of the CD-ROM addons offered for both consoles, you also got access to an exclusive library of games released on Laser Disc.  All of the games tried to capitalize on the playback of full motion video (which was really the only reason to use the platform in the first place) and none of them were "killer apps", but they still fetch pretty high prices because most of them are still exclusive to this specific hardware platform.  

   That's right kiddies, playing LaserActive games on an emulator is pretty much not a thing.  This is mostly due to the analog nature of Laser Disc, but more specifically how some LaserActive games used it.  Games on Laser Disc aren't exclusive to the LaserActive platform - the original Dragon's Lair arcade machines used LDs, for example.  And many if not all of the old arcade LD games can and have been emulated - hell Dragon's Lair can be played on any standard DVD player.

   Because LD's aren't digital, they can't be "ripped" in the traditional sense. The material has to be "digitized" (i.e. played back and captured in a digital format like MPEG) in order to be used by an emulator.  But with LaserActive it's not a simple matter of digitizing the analog video and re-incorporating it into the program code.  In many cases, to speed up scene transformations multiple video streams were recorded on top of one another, taking advantage of the nature of analog interlacing.  Scenes were conditionally played back as odd or even scanlines by the LaserActive software.  In other words, if you played the raw video into a capture device you'd get an indecipherable visual mess.  It's theoretically possible to either "trick" the LaserActive device into playing the properly decoded scenes into a capture device, or building a special capture device capable of decoding the specific method used to encode the video, but all things being equal, it would be extremely difficult to simply "dump" a LaserActive game, and to date I'm unaware of anyone having devoted the time and energy to attempt it.

   A couple of years ago I was able to get one of these players at a pretty reasonable price on Ebay.  Mine came with the "PAC-S10" which is the Genesis/Sega CD module.  It played "Mega LD" titles, and Sega CD titles just fine, but wouldn't recognize games in the cart slot.  While I had never heard of this particular problem, it wasn't hard to guess what it was.  The electrolytic capacitors used in electronics in the 90's are hitting an age where their failure rate is spiking.  Even the ones that weren't cheaply made or defective have reached the end of their operational lifespan.

   Any electrical engineer who would like to chime in and correct me should feel free, but from what I've been able to glean capacitors work sort of like power reservoirs.  It's my understanding that this serves a couple of purposes - firstly to "rectify" power - that is keep the amount of power moving steadily between components even when the power given off by the power supply is fluctuating.  This is particularly important when dealing with integrated circuits and data processing because the difference between a 1 and a 0 is actually measured by differences in voltage.  It may be okay if starting your washing machine in the next room makes your lights dim a fraction, but it would not be okay if your computer started mistaking 1's for 0's because of it!  Capacitors determine the amount of power that gets delivered to things like audio and video amplifiers, drive motors etc...  When they start to go bad, meaning that they're no longer delivering power at a regular expected level, all sorts of weird things start to happen.

   Electrolytic capacitors actually contain liquid electrolyte (yes, what plants crave), which is corrosive and eventually either evaporates (if you're lucky) or leaks out all over the circuit board (if you're not lucky).  The failure is based solely on age.  New in box or rarely used consoles seem to fail at the same rate as old workhorses. These ticking time bombs are unfortunately super-common because they're cheap and manufacturers don't exactly care if they only last 30 years.

   The increasing failure curve of Electrolytic capacitors has brought this problem roaring into the consciousness of classic gaming culture because most of us old guys still gaming on 30+ year old consoles are going to be affected by it sooner rather than later.  Now the common remedy to this is to replace all of the electrolytic capacitors in a given console with newer and presumably higher quality electrolytic capacitors - hopefully getting at least another 30 years out of them before they start failing all over again.

   When I bought the LaserActive it was with the knowledge that the game modules were notorious for capacitor failure, so I wasn't exactly surprised to find out that my PAC-S10 wasn't completely functional.  In fact, alongside it, I acquired a nice soldering rework station against the day I would eventually have to replace the capacitors.

   Now, the idea of replacing all of these capacitors with more that would just fail again did not sit well with me.  Fortunately not all capacitors are electrolytic.  There are quite a few different compositions.  Ceramic polymer capacitors were pretty limited and expensive in the 90's but not so much nowadays.  But would these really be compatible?

   All capacitors are rated for capacitance (imagine that!), voltage and temperature.  In this sense one is as good as another irrespective of composition.  They do have different properties, however.  For example, my quest to determine if ceramic capacitors would be a compatible substitute led me down the rabbit hole of DC Voltage Bias.  There's also the fact that most of the ceramic capacitors I found were bipolar - that is to say that polarity does not matter.  Almost all of the electrolytic capacitors in the PAC-S10 were polarized.

   Firstly, bipolar capacitors are interchangeable with polar capacitors.  In fact, you can build a bi-polar capacitor by simply connecting opposing poles (anode and cathode) of two polar capacitors with the same capacitance rating.  So there is no problem replacing a polarized capacitor with a bi-polar capacitor.

   As for the DC Voltage Bias, that's a trickier subject to tackle.  The question is will the DC Voltage Bias property of the ceramic capacitors cause issues if they're used in place of the original electrolytic capacitors.  The answer is that it depends greatly on what the capacitor is meant for.  For example, audio circuits use capacitors to regulate the frequency of signals based on a constant capacitance value.  The higher DC Voltage Bias of a ceramic capacitor causes capacitance to fluctuate when voltage is higher and can actually degrade the quality of the audio signal by altering the signal outside the desired frequency.  I'm nowhere near skilled enough to tell which circuits on the board have to do with audio with any degree of reliability, so this is a bit of a problem.  The solution seems to be relying on the voltage rating of the capacitor itself.  The DC Voltage Bias is expressed as a curve - the variation of capacitance increases exponentially as you reach the capacitor's maximum voltage value.  If that maximum value is considerably higher than the voltage is ever likely to get, the frequency variation should remain inconsequential.  By selecting a ceramic capacitor of a higher voltage value (say, double) you can minimize fluctuation by keeping the DC Voltage Bias on the low end of the curve.

   Using these assumptions I decided to go ahead with the capacitor replacement using ceramic capacitors.  I found a list of capacitors on the system and ordered the replacements from Mouser.

  Having never worked with surface-mount components before there was a bit of a learning curve.  I had never used a hot-air workstation before so I had to browse around YouTube for some pointers and examples.  The basic idea is that you blow super-hot air onto the component and the heat passes through and under the component to melt the solder.  The fact that components survive being cooked like this was somewhat amazing, but evidently they're all expected to endure that level of heat for short periods of time.  After a little experimentation I was able to get an idea of how long I needed to hold heat to a SMD capacitor before it would come loose from the board.  Just hold on the component, wave it slightly to make sure the heat is applied evenly to both sides, nudge with the tweezers every couple of seconds until it moves then pluck it off and repeat.  After the better part of 100 capacitors I went after the board with a de-soldering braid to clear off any excess solder, then used alcohol and cotton swabs to scrub melted flux and what I assume was leaked electrolyte from the board.  There was a similar learning curve with installing the replacement capacitors.  By the time I got to the end, I had to re-do the first 10 or 15 to make them look nicer.

   Replacing 90-some odd capacitors is a lot of work - especially if you're learning as you go.  By the time I put the last one in, my concentration was a little frazzled, but I was really anxious to see the fruits of my labor.  I quickly and, I thought, carefully reassembled the PAC-S10, popped it into the LaserActive player, popped a cartridge in and turned it on.  I was delighted when the screen lit up and the game actually started playing from the cartridge - that part was fixed.  But then I noticed there was no sound and my heart sank as I checked and re-checked all of the audio cables and the receiver.  As I sat down to think through what might have gone wrong, I realized I had no memory of re-attaching the daughter board when I reassembled the PAC-S10.  I went back to my work area, and sure enough, the daughter board was still sitting there waiting patiently for me to figure out what had gone wrong.  With the unit _completely_ re-assembled the sound was back.  I played through about 3 stages of Lightning Force, 2 stages of The Terminator on Sega CD, and 2 stages of Hyperion on MegaLD before I was satisfied that everything was working.

   A couple of weeks later I was playing around with Laserdiscs and decided to pop in one of the Star Wars Definitive Edition discs and I noticed a low buzzing noise when the sound was turned up.  After poking around I noticed that the buzz went away when the Laserdisc was played with the PAC module ejected, so the buzz was definitely coming from it.  Problem is I didn't really do any before and after testing so I don't really have any way of knowing if this was a result of using ceramic capacitors, or if it was just poor shielding of the PAC module causing some minor noise.  No way I'm replacing all of the capacitors again to find out!