Lab Updates and Posts

My lab journal chronicles the work and experimentation I do in my electronics lab. Older lab journal posts, created before the new posting format (pre August 11th 2014), can be found here. 

Otherwise all newer posts will now be in the post feed below.

SMS Flash Carts - Function SRAM Save Feature

posted Jul 21, 2015, 1:56 PM by René Richard   [ updated Jul 23, 2015, 10:31 AM ]

After several months of not actually working on this project I decided enough is enough and was quite curious to see if my SRAM save feature would be operational on this PCB. The 32KB SRAM is mapped into slot 2 16KB at a time. In fact, my CPLD mapper thus far is a recreation of the Sega Mapper because being able to support existing games is crucial. Also, this will help development transition from emulators on PC to real hardware when games are released in physical form (using my carts hopefully!).

I picked a game which supported SRAM saves, Phantasy Star (english SMSPower translation) because this particular version has the FM soundtrack unlike the english North American version.

On my first test, the save feature didn't work; turns out I had forgotten to assign the SRAM WE pin on the CPLD (always assign your pins!). After this quick fix it worked like a charm! I guess it shouldn't be surprise, this mapper is about as simple as VHDL design gets. However, one challenge will be to pack a bank-shift feature (to allow for multi-rom carts) inside the EPM3064. This particular CPLD is limited to 64 macrocells; enough for the Sega Mapper implementation, but maybe not so for bankshifting.



Next I need to test an all new exclusive feature - saving to serial EEPROM. No Sega Master System as far as I know did this, and logically, only new homebrew written with the serial EEPROM in mind could exploit the feature. Using the serial EEPROM greatly increases the available save memory and reduces costs at the same time.



dbGrafx Booster - Red, Green, Blue, Chroma, Luma - Oh My!

posted Jul 10, 2015, 5:21 AM by René Richard   [ updated Jul 10, 2015, 5:48 AM ]

In October last year I had prematurely announced that the dbGrafx Booster was a done deal. Sadly further testing after the announcement revealed several major bugs which rendered that board un-sellable. Furthermore, after a friend of mine asked: "Where's the S-Video?" I just knew the current dbGrafx Booster design was obsolete.

Last night I assembled and tested two variants of the new design: one CXA1645 based, and one THS7314 based. The major difference between these two video chips is that the CXA1645 can transcode S-Video while the THS7314 is a simple video amplifier. I chose to make compatible with two video chips in case the CXA1645 didn't pan out since it's an older chip.

After a few minutes of testing and comparisons, it was clear that the CXA1645 design was superior. Not only is the addition of S-Video a huge bonus for gamers where SCART was not standard, but the quality of the RGB signal was much better in my opinion. I don't really have the video capture equipment to make a good comparison so I guess you'll all have to trust me on that. That being said, the dbGrafx Booster will be built and sold with the Sony CXA1645.

Stay tuned for updates to availability of the dbGrafx Booster.




Mark III FM Power Base Converter - Complete!

posted May 25, 2015, 5:00 PM by René Richard   [ updated May 25, 2015, 5:02 PM ]

I've received and successfully built the first Mark III FM Power Base Converter! This new Power Base Converter variant allows Mark III games to be played on either Genesis or Megadrive with FM Sound - thereby opening up the entire Mark III Japanese library to people who do not own a Mark III console. In the coming weeks I will be testing the Mark III FM Power Base Converter with a large number of Mark III games. Stay tuned for test results!


SMS Homebrew CPLD Firmware Looking Promising!

posted Apr 9, 2015, 8:45 AM by René Richard   [ updated Apr 9, 2015, 8:46 AM ]

The db SMS Kit has been slightly harder to get started and operational when compared to TG16 De-Bee Card or the Genesis MD-Cart owing to the mapper found on most SMS games. The CPU on the Master System, the Z80, has a 16 bit address (like most 8bit CPUs) and therefore is limited in addressing a contiguous 64KB memory space which is shared between ROM and RAM among other things on the Master System. In fact, only 3/4 of this memory space is dedicated to ROM (i.e. the game code) which means without any trickery only 48KB of game code is available (in reality it's actually 32KB but let's not get into fine details). 

Anyway, to address this, Sega produced what is known as the Sega Mapper which allows banks of 16KB to be swapped in and out of the available 48KB ROM space. Using this technique allowed games up to 1MB to be produced for the Master System. Part of my challenge in getting the SMS Homebrew Cart working was to reproduce the Sega Mapper in VHDL on a EPM3064 CPLD. While this is not a particularly difficult task VHDL wise, it was slightly time consuming owing to errors I made on the first batch of PCBs (always check if your ground plane is present before sending PCBs to manufacturing!). 

My first functional mapper has proven successful in running the Sonic FM hack. Source code for my first functional mapper can be found on GitHub.





MD Flash - Hardware to Release Physical Megadrive / Genesis Games

posted Mar 2, 2015, 5:53 AM by René Richard   [ updated Mar 2, 2015, 6:22 AM ]

I'd been toying for a while with the idea of making a Megadrive / Genesis Flash Cart to enable new homebrew games to be released on real hardware (similar to De-Bee Card for TG-16). There already exists similar products but they unfortunately are using 3.3V Flash in a 5V system which can lead to all sorts of problems with latch up and clamping diode failure. To keep it short and simple, using 3.3V Flash in a 5V system requires the use of level translators!

Anyway, back to the topic at hand. I decided to use purely 5V parts to avoid any kind of out-of-spec condition in my product. The result: a 16Mbit max (2Mbit, 4Mbit and 8Mbit available as well) with 32KB of save RAM (FRAM or battery-backed SRAM). The Flash parts used are MX29F800 (or MX29F400 - MX29F200) and save RAM is FM1808 (FRAM) or AS6C62256 (SRAM).

Not An Everdrive!

MD Flash is NOT an Everdrive nor is it trying to be an Everdrive. MD Flash is modern cart hardware which can be used to release new games in a 5V safe way which gives developers peace of mind about not running the Megadrive / Genesis bus out of spec into clamping diode hell!

Burning the ROMs

I've been using a TL866CS EEPROM burner for some time now and have no real complaints about it. This burner has native support for MX29Fx00 parts so I decided I was not going to re-invent the wheel and would not make custom burning hardware. Instead, I simply designed a cartridge adapter which plugs into the TL866CS and converts the 64-pin Genesis cartridge into the 44-SOP pinout for MX29Fx00. There is a jumper on my cartridge adapter to select between upper 8Mbit and lower 8Mbit when my cart is configured for 16Mbit ROMs.

 MD Flash 8Mbit Cart

 MD Flash 16Mbit Cart with 32KB FRAM

 MD Flash in its natural habitat

 
 The MD Flash 8Mbit configuration can also support smaller ROM sizes with the MX29F400 (4Mbit) and MX29F200 (2Mbit) Flash ICs. Of course, nothing prevents an even smaller ROM from being loaded onto a 2Mbit IC.  The MD Flash 16Mbit configuration uses two 8Mbit (MX29F800) ICs, address decoding is handled by a 74HC139. The 74HC139 also decoded the upper 16Mbit of the ROM space for the 32KB of save RAM included on cart.  MD Flash in its natural habitat - oh crikey!

Endianness

The Motorola 68K CPU is a Big-Endian CPU which means that ROM files you have (but legally shouldn't ;)) on your PC are not compatible to be directly burned onto MD Flash. The high and low bytes of each word must be swapped. For this, I wrote a quick C# Endian Converter which swaps all bytes in each word and also separates the ROM into two 8Mbit files (upper and lower) if the ROM is larger than 8Mbit. The output files from my Endian Converter can be directly burned onto MD Flash.

Results

 Castlevania: Bloodlines (8Mbit)

 Megaman Wily Wars (16Mbit with save)

 Sonic 3 (16Mbit with save)

 Nothing really special here, just an 8Mbit or smaller ROM. There's really no point in testing smaller than 8Mbit ICs...  This is the SRAM hack for MMWW, the original game used a serial EEPROM for save files. 16Mbit ROMs are split across two 8Mbit chips on MD Flash.   The original Sonic 3 cart used a FRAM chip to store save files. The MD Flash hardware is fully compatible with this format (as shown above). Here it is using FRAM as well but the footprint is pin-compatible with SRAM AS6C62256 and there is a footprint for a CR2032 holder as well. 

How to Release Games

If you're interested in releasing a game on Genesis / Megadrive using the MD Flash hardware, stay tuned to updates on my Products page where I will put up a product page for MD Flash shortly. Exact details on burning arrangements will be worked out on a customer per customer basis. I will absolutely NOT burn repros for you, it must be an original game.


UMDK

posted Feb 7, 2015, 12:53 PM by René Richard   [ updated Feb 7, 2015, 12:56 PM ]

So I decided to build UMDK; a Genesis / Megadrive hardware development cartridge. The project was released as open-source under the; the code and VHDL is all LGPLv3, and the PCB is CERN OHLv1.2. Thus far, I've only soldered one board and on first tests connecting it to the PC has triggered Windows to detect the device and attempt to install a driver (a good sign I presume). Stay tuned for more updates on UMDK - if I can get this working reliably and within a reasonable amount of labour I may sell a few...


dbGrafx Booster is CSync'ing!

posted Jan 29, 2015, 5:21 AM by René Richard   [ updated Jan 29, 2015, 5:23 AM ]

Early on I discovered that my first revision of the dbGrafx Booster had a flaw in the Sync circuit (or lack thereof). I may be guilty of sometimes designing first rev PCBs a bit too quickly and not looking to check if SYNC is 0.7Vpp or TTL-level. Needless to say, it didn't work reliably as the equipment I have to convert RGB to YPbPr is expecting TTL Sync. Even if I had equipment which wanted 0.7Vpp it would still not work reliably because the signal needs to be buffered once out of the console in order to function properly.

I tried a few circuits with NOT Gate amps to produce a quick and very low delay Sync pulse but nothing seemed to operate to my liking. Finally, I decided I was fighting a losing battle and decided to order a few LM1881 sync separators. These are purpose-built chips which take in the CVBS video signal and output a TLL CSync pulse - DONE! I simply built the exact circuit found on page 7 of the datasheet and it works flawlessly (as it should!).

Now, the next step is to pull out my RGB to SCART gear and test if this will pass the test - stay tuned!

dbCard Functional Prototype With 3D Printed Plastic Holder

posted Dec 17, 2014, 7:10 PM by René Richard   [ updated Dec 17, 2014, 7:25 PM ]

A few months ago I announced dbCards which are release HuCards for homebrew software (dbCard (TurboGrafx-16 Homebrew Flash Cart) Prototype Fully Working). While this was great, the form-factor was wrong. It just didn't look like a HuCard. Therefore, I set out to design a second prototype which would have the look and feel of a traditional HuCard.

I designed a plastic holder using FreeCAD and had a few prototypes 3D printed. Then, I designed a PCB which would, in conjunction with the plastic holder, form an equivalent to a HuCard. There are two pockets in the plastic holder: the first pocket is the depth of the PCB and the second pocket is the depth of the components on the PCB. As can be seen in the pictures below it all fits together quite nicely!

Being constricted to the HuCard mechanical shape makes it harder to burn software onto the dbCard. Currently, I simply pre-burn the TSOP48 Flash ICs in my TL866CS before soldering them. For the future however, I do have plans to burn the chips only after they have been soldered by using a programming header which I've populated on the dbCard PCB. Here's a quick video showing a working dbCard!



 Plastic Holder Mechanical Design

 HuCard, Plastic Holder with Flash IC, and dbCard PCB

 All Assembled - Looking Good!


Mark III FM Power Base Converter Prototype

posted Dec 4, 2014, 12:15 PM by René Richard   [ updated Dec 4, 2014, 12:23 PM ]

I wanted to be able to use my FM Power Base Converter design with Mark III games (the Japanese Sega Master System, more or less). The trouble is, the Mark III, while it runs practically the same software as the Master System, used a different connector for its game cartridges. The Mark III uses a 44 pin 0.125" edge connector while the Master System uses a 50 pin 0.100" edge connector.

Before I invest time in branching a FM Power Base Converter design to a Mark III edge connector, I figured I should first try to get it working by hand-soldering a 44 pin 0.125" edge connector to one of my FM Power Base Converters. 

This was "almost" as simple as connecting the same-named signals together. There was however a few exceptions.

On Power Base Mini and FM Power Base Converter:
  • Genesis_A16 -> SMS_A15
  • Genesis_CE -> SMS_M07
On M3 Power Base Converter prototype
  • Genesis_A16 -> nowhere
  • Genesis_CE -> M3_A15
I used a board that I am currently developing to interface the Mark III edge connector to the SMS edge connector. I solder all of the connections in a very "ratsnest-y" method and what do you know - it worked!

I have to thank the great people at SMSPower.org, specifically in this thread, which provided very good information about some errors in online Mark III pinout documentation. 

Now that I have a proof of concept, I'll start a branch of the FM Power Base Converter to support Mark III games. What's nice about this is that, because the Megadrive/Genesis doesn't use a BIOS like the Master System, there should be no issues with play any/most of the Mark III library on Megadrive/Genesis. Hooray for imports!

You can get a suitable Mark III edge connector from Sullins, part# EBA22DCTN.





Genesis Game Cart Current Consumption Measurements

posted Nov 19, 2014, 5:58 AM by René Richard   [ updated Nov 19, 2014, 6:02 AM ]

In attempting to figure out what the maximum "safe" amount of current to draw from the cartridge port is, I thought a good experiment would be to measure the current draw of existing games. I used one of my new Genesis Probing Adapters to easily measure the current each of these game carts requires to operate. Pictures of the experiment are here, and a table of results can be found in Technical Info along with other Genesis power supply information.

The choice of which games to measure seemed obvious to me.
  • Sonic 3 and Sonic 3 & Knuckles
    • To see what difference, if any, when Lock-On® Technology is used (lol!)
  • Super Street Fighter 2
    • Largest Genesis ROM at 5MB, this game cart has a special mapper chip which probably means it consumes more current than other games
  • Power Base Mini and Power Base FM 
    • Just curious about my own creations!
  • Virtua Racing
    • This game has the Sega Virtua Processor on board - it is probably power hungry!

Results

In my opinion, the current consumption values measured on Virtua Racing are probably a good limit to follow. If we consider that all of the cartridge current is supplied by a +5V LDO, then an additional 100mA (drawn by Virtua Racing) is probably starting to push the limits of a poor old LM7805.
 
Behold the towers of power!

 Sonic The Hedgehog 3

 Sonic The Hedgehog 3 and Knuckles

 Super Street Fighter 2

 

 
 

 Power Base Mini + Double Dragon

 Power Base FM + Double Dragon

 Virtua Racing

 

 
 


1-10 of 25