Sunday, 30 September 2018

Atari 5200 DC in and Composite Video Out

Here we have an Atari 5200 games console. Bit of an odd one this, one of their least successful creations.
It's a massive thing, made even larger by a storage compartment at the back for the custom controllers (more on those later). The board is only 2/3 of the size of the case, but it is still massive.
There are lots of things on the 5200 that seem like nice ideas that should have been optimised out before production started.
There is only a single wire coming out of the unit. This is combined power in and TV out, and connected to an external box that was meant to sit behind the TV.
This being the 5200, it wasn't just a power injector, it was an intelligent box that detected when the 5200 was drawing power and switched the aerial input on the TV over to the 5200.
Inside, the power is split off, but doesn't just go to power the unit, there is a whole load of circuitry to do a soft power on / off switch, and also an interlock to stop the unit powering on if there is no cartridge installed. When the power is actually switched on it feeds not one, but two 7805 regulators on a strange double heatsink. One power the digital circuitry, one the analogue.
The controllers are also a bit special. They have a keypad, start, pause and reset, four fire buttons (two duplicated on each side), and an analogue control stick (which doesn't self centre).
This extra complexity means there is are a lot of components for each port, plus a row of 4052 multiplexers.
I've yet to find a working one, the two that came with this system suffer from flaky pots, and flaky membranes.
To match the system, the cartridges are also super sized.
It's so big, they have had to add extra shielding around the PCB.
However inside, the boards only need to contain 1 or 2 ROM chips (there are two 16K banks available).
None of these things are bad ideas as such, there's just a whole lot of things that didn't really need to be there, and weren't included on the 2600s before, and most of which had gone again by the time of their final 8 bit console, the XEGS. (the board shown was in the process of repair, read it's repair blog)
The XEGS board is a whole lot smaller, but actually contains much the same chips. To be honest, the XEGS is the console the 5200 should have been. The 5200 has the same CPU, ANTIC, POKEY and GTIA chips from the 400/800/600XL/800XL, just missing the 6520 PIA, but has been designed to not be compatible with them.
The XEGS has the additional MMU and Freddie chips from the 65XE and 130XE, but like those is still compatible with the majority of software and cartridges from the 400 onwards.
It only has 16K, but one interesting thing is this is made up of 4516 chips. I hadn't come across these before. I wonder why they weren't more widely used. The are basically 16Kx1 DRAM chips, like a 4116 but with a single 5V supply.
Imagine how much simpler (and more reliable) the design of things like the ZX Spectrum would have been if they didn't have to generate 12V and -5V for a bank of 4116 chips.
This is the circuitry around the power input, I want to convert this so I can just supply it 9V DC from a normal mains adapter. It turns out to be quite simple, once the modulator and input cable are removed, 9V DC could just be fed into the same point the main cable was removed from.
The composite video conversion was much the same as other Atari computers, an almost identical circuit is used, so just locate and remove the same parts as usual.
The resistor R32 connects the audio circuitry to the video output, so that can be removed. L12 connects the video out to the modulator circuitry, likewise. Q4 and L1 disable the AF oscillator, and R41 disconnects the decoubled audio from the rest of the circuitry.
To test this, I temporarily connected the composite video buffer board to the usual points. Not this is for testing only, you should never leave the leads this long when installing it, as they are can pick up noise is left too long. Given the split supplies of the 5200, I took the 5V from the top of L1, which was on the analogue rail. Ground came from the second pad where the original RF lead attached. Audio was taken the bottom of R41, and video from the top of R32.
That worked very nicely, power rails all measuring 5V, and a good picture.
It took me a while to get past the title screen, as the start button wasn't working on either controller, so I had to find the appropriate pins to connect together to 'press' the start button. But then we were away, although it only moved left - I still need to fix the controllers.
I spent a while looking at options for mounting the connectors. There were no suitable holes to mount things to, and I don't like drilling cases if I can avoid it. I found there was a section of the bottom panel that was originally used to coil the cable around, and that could be removed.
Under that, I could fit the AV buffer board, and have the jack plug poking out one of the existing cutouts in the case. The cutout on the other side was used to house the end of a 2.1mm DC jack extension lead, which wedged in place, to allow the power supply to be unplugged when not in use.
With he trim back in place, the board was hidden and you are just left with the cable exiting neatly from the base.
I shortened the leads and reattached them from the back of the board to tidy things up, pushed the connectors through the hole in the case, and that was all ready to go.
The power connector was wired 9V, centre negative, to match the other devices I use regularly, and so I could use the TFW8b 9V DC supplies.
That's it for the moment. I have more plans for the 5200, I need to either make some new controllers, or make an adapter for an existing controller.
I also want to make a cartridge PCB. I have been testing with a sort of multi-cart I made by plugging a modified PET ROM/RAM board into the 5200s CPU socket. Some titles didn't work. I'm not sure if there is a problem with the 5200, or the ROM images. Space invaders played, but the 'invaders' were corrupted. I've ordered some more real cartridges to check.
This has allowed me to try out a few more games to test the controllers, and a few more titles you might not expect to find on an Atari 5200, such as Mario Brothers.
And, err. this one.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.

Sunday, 23 September 2018

Toshiba HX-10 MSX Repair

Here we have a Toshiba HX-10 MSX computer. I got this quite a while ago, because I didn't have one, and also because I was considering doing an MSX multicart or SD interface or something like that.
This conforms to Microsoft's MSX standard, with a Z80, 64K of RAM, TMS99xx video chip. These MSX machines were made by companies like Sony or Toshiba, without a legacy of computer hardware, so they signed up to follow a standard. Shame it didn't catch on.
Being more familiar with the HiFi and video world, they were more consumer friendly, often with built in power supplies rather than lots of extra wires and boxes. They would usually have great picture quality, with things like SCART connectors and AV jacks to make connecting to a TV much easier than on some other machines.
As far as I remember, this one was working, but now it's just giving a blank screen. Sync is being generated, so the power side is probably OK, and it is making a regular clicking noise (on the audio, not the cassette relay).
One of the standard tests on these is to try the caps lock key. If it is partly running, pressing the caps lock key will toggle the caps LED. Nothing was happening. Another thing to test is pressing keys should give a click sound, and pressing ctrl+G, which should make a beep. No response to any of those. (spoiler warning: the above photo with the caps lock LED on was taken after I fixed it.)
Inside is a very neatly laid out board. There is also an add on board at the side which appears to be an adaptation to generate the PAL video standard.
The boards are clearly marked with lots of well spaced parts, although there a quite a lot of parts not fitted. Looks like there has been a bit of Muntzing going on. We (snip) don't (snip) need (snip) all (snip) these (snip) decoupling (snip) capacitors.
Nothing looks obviously bad in here. Voltages were fine, clock and reset pulses OK, data lines wiggling suitably. Everything was apparently fine.
Some of the chips are socketed, so I'll check those first.
Swapping the Z80 made no difference,
Nor did the TMS9929 video chip, although I noticed the legs were quite tarnished, so I gave those a quick clean.
The next socketed chip is the ROM, I took that out and read it in an EPROM programmer as a 27C256 (always remember to switch of ID check when doing this).
I dumped the ROM, and a quick scroll through and all looks OK, at the end there was the copyright message.
I tried running without the Yamaha sound chip, again no change. So, running out of things and trying to skirt around the massive tiny pinned TCX-1007 ULA chip - if that's gone, I'm in trouble.
I suppose the next step would be to check out the sixteen RAM chips. 8x 4164 chips making the main 64K of RAM, and 8x 4116 chips making the 16K video RAM.
Faced with that, I decided to leave it for the moment. I'd dug the machine out to try out Misfit's new game Rodman on the MSX, so I resigned myself to playing Rodman in an emulator. I downloaded openMSX, and fired it up. It started in MSX2 mode, but I wanted to go plain MSX. To change that, I needed to select a machine to emulate and thought I may as well select the Toshiba HX-10 since there was one sitting on the bench right next to me.
It failed to start, saying it needed a ROM image. Aha, I've got one of those, I just read it in to check it. So I copied the ROM into the emulator and reselected Toshiba HX-10.
It flagged up the SHA1 checksum didn't match what it expected, and then proceeded to show a blank screen, with a ticking sound. Yes, exactly the same as the real hardware was behaving. Hmm, so is the ROM bad?
I googled up a archive copy the the ROM and compared them, and there were some differences. I tried that ROM image with the emulator and it ran fine. It is looking like the ROM is bad. I burned an EPROM replacement and tried to boot the real hardware and up came the boot screen.
There were quite a few differences between the ROM images, so I thought it might have been a different revision, but I noticed a bit of a pattern to the bad bytes. Scrolling down, there were similar but different patterns in clear blocks. (a shout out here to HxD, a great hex editor I use all the time)
Intrigued, I wrote a little program to take the two ROM images and XOR them. This gave a file which only shows the bits that were different. If the files were identical, the output file would be full of zeroes, but this has sections with lots of 4s, and one with lots of 10s and so on.
Any byte in that 256 byte block in the ROM image that already has bit 2 set reads fine, anything that doesn't have bit 2 set appears to be 4 higher than it should be, 32 reads as 36. 08 reads as 0C etc.
It appears that throughout the ROM certain 256 byte blocks have one or more bits stuck on. Not a failure mode I have seen before.
If this were an EPROM, I would try reprogramming it, since the bad bits were high, the default state, but the MB83256 is a mask ROM, which is programmed in the factory, so I'll leave the EPROM in place.
All back together, ready to try it out.
That's booting up fine, with no other apparent problems. (It seems it is meant to show less than 32K available to BASIC on a 64K machine?)
OK, that's about the limit of the programs I feel like typing in today. Over to the tapes.
I had initially expected it would use the same cassette lead as the BBC Micro and Oric, but it appears not, so I'm using a little ad hoc cable with my good old Sony TCM-818 tape deck.
The load command on the MSX is a little weird, bload "cas:",r
Rodman loaded first time, nice to not have to fiddle with the volume control, or maybe I was just lucky.
Having played most of the other versions, the MSX version of Rodman is a really nice one, and the MSX is preforming well.
Rodman is on pre-order now at The Future Was 8 bit.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.