Charles MacDonald's Home Page
News
Current
Old News

Emulation
SMS Plus
Genesis Plus
TGEmu
Sega System 24
MAME WIP
Sega WIP
FD1094 Status
FD1094 Game Conversion

Electronics
Electronics Projects

Information
Sega Genesis
Sega Master System
Sega Game Gear
Sega SC-3000H
Sega Saturn
Nintendo Super NES
Nintendo GameCube

Miscellaneous
Video Game FAQs
Links

External Links
The Guru's ROM Dumping News
Nicola's MAME Ramblings
David Haywood's MAME WIP
Aaron Giles' Home Page
Richard Bannister
doxDev
AamirM's Homepage
Kale's Mame Wip
PC-Engine dev

Other
Contact

News (7/3)

Emulator updates


I've decided to switch licenses for SMS Plus, Genesis Plus and TGEmu to the MAME license, in an effort to curb people from selling them for profit. The newest releases are here:

  • Genesis Plus v1.3
  • SMS Plus v1.6
  • TGEmu v0.2
I strongly recommend port maintainers to remove older source distributions of the software, and to include "license.txt" from these new source packages with your port specific binary and source distributions. Please contact me if you have any questions or concerns.

Old News (6/27)

YMO Live


I had a great opportunity to see Yellow Magic Orchestra perform at the Warfield in SF. Its been thirty years since they last visited the USA, and this was quite a limited tour with only one other stop at the Hollywood Bowl in LA. The crowd had a lot of energy and we made enough noise at the end to get two more songs as an encore.

They played more material from their middle period which happens to be my favorite, such as Seoul Music, Taiso, Gradated Grey, and Ongaku. The new songs were fantastic, and of course they covered all the classics the fans were expecting, including an especially rousing performance of Firecracker. Definitely a once in a lifetime chance and a lot of fun!

News (6/26)

Super Magic Drive Schematics


Here are schematics for the floppy disk drive PSU that comes with the Super Magic Drive. What's interesting is that the parts for the +12V rail are missing but could be added. I guess modern 3.5" drives only need +5V to operate? The disk drive itself is identical to a standard PC floppy drive, mine is a TEAC FD-235HF in particular.

  • Magic Drive 3.5" schematics (PNG)
  • Magic Drive 3.5" schematics (BSch CE3)

PAL device reader, rev. 4

Here are the current project files for revision 4 of the PAL device reader. Please take note that the archive is incomplete and I need to find a few files to add as well as completing the documentation. I cannot provide any support for it, so don't ask!
  • PAL device reader project files

Atmel ATDH1150USB JTAG cable

Atmel sells a USB JTAG cable for use with the ATF1508 CPLD. There is very little documentation about it available online. For $50 USD, you get a FT2232D, 93C56A EEPROM, and 74LVC244A in the kind of enclosure a hobbyist project would come in:

spacer spacer

I think it's well made, but there are many DIY and commercial JTAG cables with identical parts for much less. The connectors are:
  • JTAG-A - Connects to a JTAG header to program ATF1508 CPLDs.
  • JTAG-X - Same as "A", but as a fine pitch connector.
  • TWI (AT17) - Connects to a TWI header to program the AT17xxx FPGA configuration EEPROMs.
It has a status LED that is not powered by the target device so it can function even if the target device is turned off or not connected. The LED states are as follows:
  • Unlit - Default state when cable is plugged in to a PC.
  • Green - Only after the Atmel ISP software has detected the cable and is idle.
  • Orange - When communicating with a device (e.g. during programming, erasing, verify)
  • Red - When an error has occurred.

You can access the EEPROM data using FTDI's FT Prog v2.2 utility program. Start it and hit F5 (or select "Scan and Parse") to read the device settings. According to the program, the FT2232 is set up like so:

    Chip type:  FT2232D/C
    Vendor ID:  0x0403
    Product ID: 0x6010
    Product Description: 'ATDH1150USB'
    Serial Number: FTS8GSG1 Auto-Generate
My board has a FT2232D. The EEPROM contents include the string "FTS8GSG1" so it's not clear what the "auto-generate" part refers to.

The software used is Atmel ISP v6.7, and it's quite well written. Once you set up a chain file to program the device, you can just click on the "Jedec file" chain item and click "OK" on the Device Property dialog box that comes up to automatically reload a new JED file. This makes development very easy and rapid. So overall it's a good product, but I'm sure cheaper options exist.

CPLD development board

I recently made a development board for the Atmel ATF1508AS(L) CPLD:
spacer
It has the following features:
  • 6-bit (2:2:2 RGB) video DAC (can directly drive a RGB monitor)
  • 7-bit audio DAC (can drive a line-in input of an amplifier)
  • JTAG header
  • Socket for Flash/NVRAM (512K max)
  • SD card interface
  • Pushbutton and LED (for user I/O)
  • Two 2x32 headers to access CPLD pins
  • 5V and 3.3V power supply (with power switch and PTC resettable fuse)
  • 28.636 MHz clock
In particular the video output has been a lot of fun, I've tried implementing different kinds of video designs to generate 15 and 31 KHz displays, displaying bitmaps, byte and bit-mapped graphics, playing video clips stored in NVRAM, compositing multiple layers, scrolling, etc. Time permitting I'd like to put my designs online and maybe write a tutorial about working with CPLDs. Coming from a PAL/GAL background this kind of chip certainly seems to have unlimited potential.

SMS Region Mod + YM2413 sound

I've developed a safe region modification for the SMS. The previous method that somebody developed was to short an I/O pin to ground when it was being driven as an output which is potentially damaging. The new method uses a feature of the I/O chip to disable it during the region detection routine and can be added with a 74LS125 and 74LS138.
  • Region mod schematic (PNG)

I also implemented this modification in a 16V8 PAL along with the support functions to add YM2413 sound output:

spacer

Here are the relevant files:

  • Region mod + FM sound schematic (PNG)
  • Region mod + FM sound PLD source
  • Region mod + FM sound JEDEC fusemap
This isn't necessarily the best method to for adding FM sound in regards to the analog section and the missing PSG/FM enable and mixing functions, but it's what I could build with the spare parts I had and it sounds decent.

News (6/11)

System 16 odds and ends


I've updated the Sega USB Link project files with a USB BIOS for the System 16B 171-5797 ROM board, and a sample program (memory map viewer) that can be used as a basis for developing System 16B software.

  • Sega USB Link project files

DRAM interface

I was doing some research on the 315-5195 chip and found out it has a DRAM interface, presumably to support DRAM in place of the 68000 program ROMs. This would facilitate uploading new ROM images and being able to immediately test updated software without having to erase and program EPROMs. The related signals are:
  • AEX# (CN4 A20) - Lags 68K AS# by 10 ns. Can be used by an external multiplexer to switch from the row address to the column address.
  • CAS# (CN4 A21) - Lags 68K AS# by 90 ns. Can be used as the column address strobe by DRAMs mapped to the program ROM space. Note: AS# functions as RAS#.

Video ROM access

There are also two additional signals that decouple sprite and tile ROM address bus from the video chips:

  • XGAO# (CN2 A20) - When high, disables output of the '374 at J16 that normally connects VR0-7 to GA3-10. This pin is input by the 315-5192 chip and may direct it to tristate the GA0-2 and GA11-15 outputs as well. GA0-15 can then be freely driven.
  • OBAC# (CN2 B20) - When high, disables both '244s at J6,J7 that normally connect RD0-15 to RDB0-15. RDB0-15 can then be freely driven. CGB0-3 would still need to be isolated from the sprite ROM banking circuit on the ROM board.

If the object and tile ROMs were replaced with SRAMs, these functions greatly simplify the hardware needed for the 68000 to share the SRAMs with the video hardware, allowing it to write new graphics data as needed. Hang-On supports SRAM in place of sprite ROM, so it seems likely they wanted to support a similar feature for System 16B.

ADPCM mute control

One bit of the Z80 sound bank latch drives the mode input of the uPD7759. This always seemed unusual as the stand-alone mode can't possibly work; the chip's message select inputs (I0-7) are grounded and the message start strobe (ST#) is permanently inactive. Not to mention the lack of external ROMs and support hardware needed to address sample data.

But the designers did this intentionally. In stand-alone mode the chip drives the Z80 data and write pins which would cause a conflict, so they added buffers to isolate these signals. Now the chip can operate in either mode, but uPD7759 manual says the mode pin should never be changed during speech synthesis or when idle; as these are the only two states it has, this seems to imply it shouldn't be changed at all and should be fixed to a desired level at power-up. So why toggle the operating mode during gameplay?

A quirk of ADPCM encoding is that you cannot immediately transition from one volume level to another, it takes several samples to accomplish that. This is problematic when you want to cancel playback of an existing sample and start up another. It would be too hard to calculate the sample data needed to transition from the current state to a new one (if interrupting a sample) or to zero (if muting an existing sample early) and there might be some unusual sounds during the transition period.

So the result of cycling in and out of stand-alone mode seems to mute the chip instantly and reset the internal ADPCM decoding state such that new sample data can be sent. Games pulse the pin high after sample playback ends, transitioning it into stand-alone mode for a few microseconds. In some cases they leave it high until the next sample is requested. For whatever reason the RESET# pin isn't used for this purpose; perhaps asserting it during playback causes an audible pop or other undesired noise. Or maybe it was too complex to add a circuit to assert the pin for the required time (18.7us), and this solution used less parts at the expense of operating the chip in an undefined way.

News (5/8)

TMS9929A experiments


The TMS9918A VDP has composite video output, and the TMS9928A and TMS9929A have component video output in the form of luma (Y) and color difference (R-Y, B-Y) signals. As the luma output includes sync information, it can be used for composite video too, if you don't mind being limited to a grayscale display. The VDP can generate about eight unique shades.

I tried using the composite video output circuit from the Elf Color Board which was intended for TMS9918A/TMS9118A chips, and it worked perfectly on the TMS9929A. Here's a slightly modified schematic of the circuit, along with a test pattern display for the SC-3000 personal computer which has an integrated VDP register editor.

  • Composite video output schematic
  • Video test pattern and register editor program (Source included)

I'm currently working on a project to add RGB output to the TMS9929A and adapting it to use standard SRAM instead of several 16Kx1 DRAMs. I'll post more information if the experiments are successful.

Old News (4/10)

DECO cassette drive overview


Data East made an arcade system that loaded game data from a miniature cassette, that was played back from a custom digital tape drive. The drive chipset was develped by Mag-Tek who are still in business and make magnetic strip based products. I was asked to look into how the cassette system works so that games could be dumped and preserved. I'll present an overview of the hardware and an (untested) dumping circuit.

The cassette drive connects to the "BIO-8" circuit board by means of a 2x10 pin connector:

                    +----------+
     TAPE_SENSE     |A1 <   B1 |    (N.C.)
     (N.C.)         |A2     B2 |    (N.C.)
     RCLOCK         |A3     B3 |    RDATA
     GND            |A4     B4 |    (N.C.)
     REV            |A5     B5 |    FWD
     FAST           |A6     B6 |    (N.C.)
     (N.C.)         |A7     B7 |    (N.C.)
     EOT/BOT        |A8     B8 |    (N.C.)
     +12V           |A9     B9 |    +12V
     GND            |A10    B10|    GND
                    +----------+

Cable "E" has a 2x10 header that plugs into this connector, and it has a black plastic arrow molded on it which points to pin A1 as shown above. The other end of the cable is a green edge connector with gold contacts that plugs into the cassette drive PCB.

TAPE_SENSE is a switch output that is 5V when a cassette is inserted and the lid is closed, and 0V when no cassette is inserted or the lid isn't closed. The switch is a spring-loaded metal pin near to the motor.

EOT/BOT is the output of a photodiode that can see light emitted from a LED that is mounted at a 90-degree angle from it. The cassette contains a reflective metal strip behind the tape, such that an opaque section of tape blocks light, and the transparent leader permits light through. This output is 5V when the leader portion of the tape is visible (meaning you are at the end or beginning of the tape) and 0.40V for any other condition: opaque tape present (you are in the middle of data), no cassette inserted, or lid open regardless of cassette being present or not.

FWD, REV, and FAST are inputs that control the cassette spindle motor when driven at +5V and are inactive at 0V. FWD and REV cannot be asserted at the same time, and the BIO-8 board has logic to prevent this condition. Normally the cassette speed is appropriate for playback when only FWD or REV are driven, and asserting FAST along with either one of those signals is used for a fast-forward or fast-reverse.

RCLOCK and RDATA are the digital data that is encoded on the tape. The clock signal is used to determine when the data signal can be sampled. These outputs are 5V for a '1' bit and 0.40V for a '0' bit. Because the tape passes by the pickup head faster as one spindle gathers tape, the clock and data rate increase during playback. It seems that the MCU on the BIO-8 board is fast enough to handle the steadily increasing data rate.

DECO cassette drive dumping

I have developed a circuit that is connected to the cassette drive cable "E" by splicing the RCLOCK and RDATA wires so that the signal can be tapped. RCLOCK is a white wire at the ends with a gray sleeve and RDATA is a red wire at the ends with a black sleeve. You can also splice the black wire with the foil "E" label on it (corresponding to position A10 on the above diagram) for ground. The circuit should allow normal operation of the board in addition to providing audio outputs for dumping.

It converts the output levels to 1.25V, low-impedance outputs that should be suitable for driving the line-in input of a PC sound card. To prevent damage, I would recommend connecting the outputs to a cheap amplifier first, which you can use to adjust the volume. For this reason the schematic only shows RCA jacks.

  • Schematic image

Note that cable "E" has no +5V line, so you'll need to tap that from the PSU that powers your DECO boardset.

Please record the audio at 44100 Hz or higher and check the volume levels to avoid clipping. The right channel (clock) will look like a square wave, and the left channel will look like a rectangular wave. I haven't been able to test the circuit myself as I need to transplant parts from two different drives to make one working one, so please use this circuit at your own risk. That said, I'm looking forward to seeing some new tape dumps!

PAL TurboGrafx information


NEC released a PAL variant of the TurboGrafx-16 (model HES-TGX-11), which is fairly amusing as the video chipset only supports NTSC. To accomodate PAL displays, a chip (PCZ80 by NHE) clocks the VCE slowly during several scanlines such that a 264-line NTSC frame fits within a 313-line PAL frame. While it can control the CPU speed, it does not slow it down. This means NTSC software has more time to execute code during the "slow" lines, but in practice this does not seem to cause any problems. During the slow lines, the PCZ80 chip continues to generate regular horizontal sync pulses on its composite sync output, such that all 313 lines are present for a PAL monitor.

The video output is fairly interesting. Analog RGB from the VCE is fed into a CXA1145 encoder that is hardwired to PAL mode. It generates S-Video and composite video, the latter of which goes to a 5-pin DIN jack with an unusual 270-degree pin spacing. The S-Video is not accessible but appears to be fully implemented. The composite video output of the VCE is completely bypassed. To provide PAL compatible display timing, the PCZ80 chip generates a 4.48 MHz color subcarrier for the CXA1145 chip.

This arrangement introduces a few subtle differences. The color subcarrier strip bit in the VCE control register does nothing as now the CXA1145 controls the color burst. The frame size bit (262 or 263 lines) does nothing either as the PCZ80 forces a NTSC frame to always be 264 lines. Games that use the vertical blanking interrupt have slow music, those that use the timer do not. No games were reprogrammed to handle PAL differences, and regular North American TurboChips run on the PAL system, albeit letterboxed and slower.

A/V DIN connector modification

The A/V connector has the following pinout (with the system's connector facing you, pins are 5 to 1 from the 270 degree position going clockwise to the -90 degree position):

    1. Composite video
    2. Right audio
    3. Ground
    4. +5V DC
    5. Left audio
    
I removed the 270-degree DIN connector and replaced it with a more standard 180-degree one, then cut the traces to isolate the solder pads and rewired the connections to match the CoreGrafx II / SuperGrafx A/V cable pinout:
  • Solder a wire from the side of R155 facing the backplane connector to DIN pin 1.
  • Solder a wire from the side of R150 facing the backplane connector to DIN pin 2.
  • Solder a wire from DIN pin 3 to the shield ground tab nearest to it on the board perimeter.
  • While it isn't necessary to connect +5V, you can solder a wire from the pin of L109 nearest to the board perimeter to pin 4 for compatibility.
  • Solder a wire from the side of R149 facing away from the backplane connector to DIN pin 5.

PAL timing and NTSC modification

There isn't much information about the PCZ80, though sources seem to indicate it is a Z80-based microcontroller. However it generates complex high-frequency signals, so either it has a very capable timer peripheral or it isn't a MCU at all, and is some kind of small-scale gate array. Relevant pins are:

Pin 2 - Reset input.
Pin 4 - Unused (active-high horizontal sync output)
Pin 5 - Unused (active-low horizontal sync output)
Pin 6 - 21.32825 MHz clock input (X201 via 74HCU04)
Pin 10 - 17.73448 MHz clock input (X202 via 74HCU04)
Pin 11 - 4.48 MHz clock output to CXA1145 "XO IN" (X202/4)
Pin 15 - 21/17 MHz clock output to HuC6260A
Pin 16 - Composite sync output to CXA1145 "C-SYNC IN"
Pin 17 - Vertical sync input from HuC6270
Pin 22 - 21.32825 MHz clock output to HuC6280A

While not fully implemented, to modify a PAL system to NTSC make the following changes:

  • Replace X201 with a 21.477270 MHz crystal.
  • Replace X202 with a 3.579545 MHz crystal.
  • Remove IC115 and socket it.
  • Jumper IC115 socket pin 6 to pins 15 and 22.
  • Jumper IC115 socket pin 10 to pin 11.
  • Cut and lift pin 7 of IC117, tie to +5V.

    This clocks the Hudson chipset at NTSC speeds, and provides a 3.58 MHz color subcarrier for the CXA1145 as well as putting it in NTSC mode. What's untested is recreating composite sync for the CXA1145. I think you can do it by XORing the V-Sync and inverted H-Sync outputs of the VCE together, but the real VCE composite sync leads/lags from these two sync outputs. So the picture may not be centered and the equalization pulses will be missing; though in practice most modren monitors don't need them. While the VCE provides a composite sync output on the luma (Y) pin, it isn't clear if a LM1881 sync splitter could be used without the rest of the composite video circuit being implemented, which is otherwise missing on this system. And lifting the VCE pins to make the necessary connections could be quite difficult.

    Old News (1/12)

    Spring cleaning


    I recently had a chance (after many years) to dump a FD1094, and after digging up all the utility programs and information from back then I realized I should have put all this stuff online so it would be easier to find. Doing this work also got me curious about documenting the ROM board used by several System 24 games too. Here are a few files:

    • Sega USB Link project files. (GAL equations, new PCB layout, sample program)
    • FD1094 CPU dumping tool. (includes compiled findkey.exe from MAME)
    • System 24 floppy disk dumping tool.
    • System 24 ROM board "magic latch" dumping tool.
    • System 24 ROM board technical information.
    • System 24 ROM board schematic.
    I couldn't find the source to the USB link utility and can't be bothered to rewrite it at the moment, but Windows executables for it are provided in the various archives. I'll provide source for a rewritten version eventually if people have a need for it.

    The disk dumping tool is a little crude, you have to specify the disk type and reassemble the program before running it. But it works, and that's all that matters. Speaking of which, these tools use SNASM68K (not included) which has an interesting quirk: your PATH environment variable must be 250 characters or less or it will crash outright. Keep that in mind if it fails unexpectedly.

    To the best of my knowledge I believe we can brute-force FD1089 keys now, so there is no need to dump those CPUs. The only missing information that can't be determined is the bitmap that specifies encrypted areas, but that's easy enough to infer from program behavior. As a result the FD1094 dumping tool does not support the FD1089. The ones I worked on previously were done manually and the process was never fully automated unlike the FD1094.

    With the help of Mark McDougall I've made schematics for the Super Magic Drive copier. These units tend to get damage from a leaking battery, so I hope the schematics help owners with repair efforts. I'm also providing a link to the last update of the SMD utility software I wrote, which has a DRAM test for those of you who want to check if your SMD is functioning properly.

    • Super Magic Drive schematic (PNG)
    • Super Magic Drive schematic (Bsch CE3)
    • Super Magic Drive transfer utility. (DOS binary)
    • Super Magic Drive transfer utility. (Source code)

    If you are having trouble dumping games on your SMD, take a look at the schematics -- there are a lot of signals from the Genesis that aren't connected to the pass-through cartridge slot. You could easily solder wires to restore these connections. If anyone tries this I'd love to know which games benefit. I'm sure Virtua Racing is one of them.

    Work on the PAL reader is still underway, it's just taking longer than I expected. To answer some very common questions it isn't ready, it isn't for sale, and I won't build you one. This website is a hobby of mine, not a business. :)


  • spacer spacer
    gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.