Blog

A place where I can ramble about my projects.

Reverse Engineering a Dot Matrix Plasma Display

May 2nd 2012, 11:26:00 pm

Awhile back, I bought a lot of arcade parts from somebody on Craigslist with the intention of getting some parts and marquees for my house. I wanted to try my hand at reselling as well to see if I liked it. Most of the garage has been sorted, sold or thrown away at this point and in the back corner I found a box labeled "Betson Replacement Screen." I pulled it open and found a brand new dot matrix display. Remembering a post by a friend on his progress reverse engineering a LED display from the 80s, I decided that I had to get a picture on it.

The first thing I did when I got it upstairs was flip it over and google the model number, "APD-128G064A-1". My initial excitement was dashed when I realized that the copious links all pointed to the same 2-page PDF document that was almost entirely devoid of information (datasheet here). It did go over the theory of use at a very high level. Also, thankfully, it discussed voltage requirements. With that bit of information I decided that my best course of action would be to get power to it and see if it did anything, followed by attempting to trace the circuit and figure out what pins did what. Since the datasheet called out the method by which the screen could be updated, I just needed to get a good idea of which pin was for each of the six signals listed. Then I could experiment with a microcontroller and confirm my guesses.

There was a nice test fixture (possibly for probing converted voltages?) that mentioned Vcc, so I stupidly hooked 12V to that and ground to the gnd pin. Nothing happened, and I shut off the power supply and re-read the data sheet. I realized that it called out two different voltages, one for DC-DC conversion to run the plasma display, and one for the logic. With that bit, I re-examined the ignored 4-lead cable attachment and realized that it was probably the power connector. Vcc as labeled was traced to a pin, ground to two more, and I guessed that the last would be the 12-36V DC-DC input. I re-soldered to these instead of the test points and turned the power on. I was immediately greeted with a zapping noise and several of the dots lit up temporarily. Before I could congratulate myself, the power supply tripped. No matter, I knew I had the power lines connected right.

With a renewed excitement, I soldered wires to the used pins of what appeared to be the logic connector and began tracing the circuit out. Every chip on the circuit was a 7400 series chip with the exception of the shift registers. All of them had data sheets online. I managed to probe out several of the connections, concentrating on the circuits that fed the clock and data in pins on the shift registers. After a good hour or so of probing, I had the following crudely sketched schematic and was 99% sure as to the use of four of the six inputs. The other two were either row clock or row data, but I could figure that out by trying both combinations.


Backside of the display.


Schematic bits.

I hurried to Fry's to pick up an Arduino board and they had what they called "Arduino Compatible" OSEPP Uno boards. I got it home and after a bit of googling learned that you had to manually select a different board type. I burned the blinking light test binary on and it worked, so I was off throwing together a quick test application. Armed with a new, beefier power supply, I tried my code. The first thing I attempted was to display a test pattern to the screen. It failed outright. I figured that since the display claimed that the row needed manual resetting that I wasn't clocking the row line in properly. After a bit of time experimenting, I had a program that took the random garbage that showed up on the screen when it booted and stepped it down one line per second. I now knew which line was row clock and which was row data. After a few ore hours of throwing code together, I came up with this program. I powered on the display and below is what I was greeted with:

I had officially achieved liftoff! There was a pesky problem with wobbly pixels in some areas, and the screen refreshed so slowly that it flickered like hell. Also, there was garbage at the bottom of the screen that I couldn't account for. Now that I'd prototyped it, it was time to get rid of the Arduino libraries (they are very slow) and go to raw register accesses. Also, I wanted to create some sort of protocol by which I could update the display using the USB to serial connection provided on the Arduino. I briefly tried creating 3 color and 4 color grayscale images by displaying images 1/2 of the time, and then 2/3 and 1/3 of the time. The screen stopped lighting all the pixels when refreshed too quickly and when I slowed it down well enough to get a clean picture, it flickered, so that was out. Also, since there was only 2 KB of SRAM, I had to place half the image in EEPROM which meant that access times for the two frames were not in sync. I finally settled on a simple serial protocol by which the EEPROM could be rewritten, a 1KB buffer in SRAM could be rewritten, or text could be rendered onto the screen using the EEPROM image as a 128 character 8x8 font.

The program took me a few nights to complete, thanks to some setbacks with the Arduino programming environment. However, I got the column data clocking out via SPI instead of bit banging which drastically improved the refresh speed. I also converted to raw port accesses which helped. The images now displayed crisply and I could dump data to the screen using a test program in Visual Studio. I put my friends to work helping me format an 8x8 font bitmap and drawing black and white images to display, and the results are below:


Text rendering using font burned to EEPROM


A cat!


Milhouse is not a picture.

The current source code to the Arduino application is available here. The visual Studio application that I developed into a console application is available here. They're probably not much use to anyone who doesn't happen to have one of these screens available but I figured they would be educational to the curious. The serial protocol can currently accept a 128x64 image for display or burning into the EEPROM. It can accept text to be rendered. It can clear or invert the screen. It can force text to be drawn normal or inverted. It can also move the cursor. I plan to add several more functions to the serial API such as scrolling and scaling, blitting and other high level graphics operations one might expect from a nice display driver. I would take the easy route and just upload full processed images but unfortunately I can't push the serial past 57600 baud or the interrupt can't keep up with the image refresh.

That isn't all, however. I plan to pick up an old laptop from a friend and put Linux on it. From there, I'll need to port the console application and add a web server. I want to put up a simple PHP script that allows poeple to upload images or text to the screen from the internet. Possibly, I also want it to take twitter updates or texts on a google voice number. Basically, I want this to be an interactive toy that guests who come to my parties can interact with using their phones. Stay tuned for more development!

Wanted: Competent Video Game Sellers

November 12th 2011, 10:37:00 am

So you want to sell some video games on craigslist? Maybe you have a few games you don't play anymore. Maybe you are a reseller. Maybe you are cleaning out your parents garage and find something you think is rare. Do all of us a favor when posting and follow these simple instructions so that you don't waste everyone's fucking time with the written equivalent of a crayon drawing of your dick.

First things first. Tell us what you are actually fucking selling! You'd think this is business 101 but there's probably a reason you are selling this on craigslist instead of opening your own game store. If you want to attract anybody at all except for the lowest of low-ballers you will need to specify exactly what you have and what condition it is in! I am not even going to bother replying to you when you leave a vague, poorly worded one sentence post about your Atari and a few games. "Sweetening" the deal by mentioning that you have rarities and not mentioning what they are only makes us suspect that you have no fucking clue what you are doing. It helps to list what accessories come with a system as well as what condition it and the games are in. Also nice to know is whether manuals, cases, boxes or anything else interesting comes with your sale. By the way, brand new means just that: BRAND NEW. If something is opened but not played, it is LIKE NEW. If something is played, it is USED. Don't bullshit me with brand new when it is not factory sealed.

Please actually do some fucking research before claiming rarity on games or systems! I understand that not everyone is a collector but do realize that when you scream on about your super rare Atari 2600 with 40 games, what you probably have is nothing more than $10-$20 worth of garbage that nobody will want to take off your hands. I've noticed a direct correlation between people who think they have amazing sales and notices in the sale about ignoring low-ballers. There's a fucking reason people are low-balling the price you set, buddy! It's because its TOO FUCKING HIGH. Nobody is going to spend $20 to buy your worn copy of Tetris for game boy. It doesn't matter if the system is 20 years old; it isn't fucking rare unless people are looking for it and can't find it!

Also, pictures! Craigslist lets you post pictures for a goddamned reason. Its hard enough to trust a random anonymous stranger on the internet as it is. Provide photographic backup to your description! Don't want to post a picture? You probably have no fucking idea what you are selling anyway. Don't tell me to email you for pictures. If you were too fucking lazy to snap one goddamn grainy cellphone picture, that doesn't lend much to the belief that you will respond at all let alone with pictures that will help me make a decision on your sale! By the way, STOCK PICTURES DO NOT FUCKING COUNT. I know what an Atari Jaguar is supposed to look like. I want to know what YOUR Atari Jaguar looks like.

The condition of your games and systems ACTUALLY DOES MATTER! Believe it or not, there are some people that buy games who want their games to look good. I know for a fact that your copy of Chrono Trigger plays like new. Cartridges don't go bad! But if its covered in permanent marker and barbecue stains complete with a torn label I am not going to pay full price for it, no matter how rare you read that it is. Look at it this way: any of these old games that you are selling can be emulated near perfectly on a computer FOR FREE, so what do your games have that makes them better? I am buying something to own, to show off and to cherish. You wouldn't expect me to pay Kelley Blue Book on a car that has dents and peeling paint, even if it runs just fine! So don't fucking pull that horse shit with video games. This also goes for manuals, cases, boxes and the like. If you expect to fetch a decent price on a video game that isn't rare, have all the pieces that it comes with! If you don't, realize that it is WORTH LESS.

Also, you'd think this would be a no-brainer with something that needs to function, but test your fucking games! If you can't test them for some reason, tell us that you couldn't test them! Expect to get a lower offer unless you are willing to help us test them on the spot during the sale! Do understand that if you do not mention testing the games, it is assumed that THEY WORK. Take the car analogy again: if a car is listed and the seller makes no mention of problems it is a valid assumption to believe that everything works fine!

Now, lets touch on pricing. As with ANYTHING on the market, video games are only worth what somebody is willing to pay for them! This is another business 101 concept that I wish more people would figure out. Just because you saw it go for $300 once on eBay does NOT mean that your used copy of Final Fantasy VII is worth that much. You probably made a mistake in reading the condition of the sale! Was it a sealed copy? Was it a rare misprint? Was it signed by the developer? Chances are your copy is not worth what the most expensive games go for on eBay. Also, nothing infuriates me more than seeing somebody justify ridiculous prices by pointing out that eBay sells it for that much. If you want to sell it for eBay prices, then go sell it on eBay. I know you are a cheap-ass who doesn't want to pay fees, but I am also a cheap-ass who doesn't want to pay eBay prices! The point of exploiting a local market is that things tend to be cheaper! I am not going to go out of my way to drive to your house all the way across town to pick up something that I could have shipped to me for the same price!

With all that in mind, I look forward to purchasing from you! After all, I love video games and I love getting excited about the games you are selling if only you'd allow me to. A well written advertisement for stuff that I want will get me to jump on the sale immediately. That way you can take my money and I can take your games and we can both go home happy. After all, the whole point of doing business is so that both parties walk away happy. Otherwise, what's the fucking point?

Beta Site Raffle!

March 9th 2011, 10:52:00 pm

I'm holding a raffle to help kick-start interest in the arcade and game store search features on my beta site. Any time a site member adds a new game store or arcade to the database, they will be entered once into a drawing currently slated for the end of the month. If not enough people have entered the raffle to perform a drawing at the end of the month, the drawing will be delayed until the end of the next month. To keep this from happening, tell people you know to add stores or arcades they know about as well. After a drawing, the raffle will reset and another drawing will happen at the end of the next month. You can enter as many times as you would like by adding as many arcades and game stores you know about. The winner of the drawing at the end of each month will receive their choice in up to $50 worth of Steam gifts. Make sure you have a valid email set in your profile so I can contact you if you win!

DragonMedia Player 0.25

February 20th 2011, 12:44:00 pm

I have released another minor update to DragonMedia Player, this time with AAC/MP4/M4A support! Also included is the separation of your playlist and your file list. The interface remains the same, but files will continue to play while you browse other directories, and the next and previous track buttons will continue to work. Other minor changes included for stability and polish.

View the Wiki for More Information and a full changelist.

DragonMedia Player 0.21 Alpha

January 6th 2011, 9:20:00 pm

I have released a minor update to DragonMedia Player that addresses a few of the stability issues present in 0.20. I don't think I got everything, but it seems to be a heck of a lot more stable now. There have been more changes under the hood than are visible to somebody upgrading from 0.20 to 0.21 but these will hopefully enable me to quickly integrate streaming mp3/ogg soon! When I get that finished, I'm going to look into getting aac/m4a integrated and working and then allow aac streaming as well.

View the Wiki for More Information and a full changelist.

Newer Entries

Older Entries