Mar 24

Commodore Amiga Floppy Analyzer

amiga_fl_analyzer

So I’ve toyed with the idea for quite some time about having a tool that was a little more “data” centric for analyzing floppy data. The Amiga Floppy Project Nostalgia client(which was the main Java client for the project) had fairly limited analysis capabilities. It was more ADF-generation tool than anything.

So I spent a couple nights on slapping something together, and this is what it looks like.

It does a bunch of things:

  • The input file is a “Delta T” file which contains time between pulses which are nominally 4us, 6us, and 8us for a LD amiga floppy. This can be generated a bunch of ways.
  • It identifies in range and out range values.
  • It plots all the values in the file on the top chart. Ideally, a really clean floppy read will have three distinct bands. I call these bands clusters. It shouldn’t have many values (outside of the track gap) far from the center line.
  • It locates these starting and ending boundary for each cluster using an adaptive read algorithm which removes things like motor speed variation from being an issue. It automatically adjusts the reading based on the form of the data!
  • It calculates an average for each cluster and displays it as a horizontal red-line on the graph.
  • It finds the magic 0x44894489 sync value and plots it as a green vertical line. Those are the start lines of each sector.
  • The top graph functions as a way to look at all ~50k delta T values and spot the outliers.
  • Next, bottom left, it plots a histogram showing the number of values in each cluster.
  • The bottom center has a text output display that gives cold hard numbers and resulting analysis like standard deviation for each cluster. Lower standard deviation values means a cleaner disk.
  • It decodes MFM using the adaptive cluster boundaries, and then calculates header checksums and datachecksums.
  • It performs (6) different tests on the data and you receive a bright green checkmark if all PASS.
  • If there’s a corrupted sector, then you can drill down into each sector

bad_sector

The above example shows you that Sector 5 is bad, clicking the RED sector number takes you here

sector_view

Where now your presented with a hex editor, and a copy of the Delta T’s restricted to just that sector.

Now I have very little time so far put into this application, and so it’s not even close to be ready for more-than-me consumption. Things that need to be done are:

  • It handles one track at a time, obviously, it has to handle a whole floppy at a time.
  • There’s no ability fix bad data values.
  • There needs to be an automatic mode where educated guesses can be plugged in, and re attempt the checksums. The problem is that the lousy 32-bit XOR checksum used has a potential false positive rate of 1/32. IE, you can’t brute force it because multiple values will work. (See my post on this topic)

I have some fairly unique methods in mind for fixing this data, but some details still need to be worked out.

Please feel free to comment below about the software.

Mar 24

New 3M, now Desco SCS, antistatic mats arrived today

deskwmat1600

Before today, I was using a “field anti-static mat” on my HP Logic Analyzer cart. This was the cart that I built from scratch, and I think it did the trick for the most part.

But the more and more I started watching videos, and talking with people, there were much higher quality two-layer mats available. The two layers are the top (dissipative) and the bottom layer (conductive). The wrist straps (through a 10M ohm resistor, for safety) grounds to the conductive layer which is hooked up to an earth ground.

Here’s an image of my new soldering station decked out in 3M blue. I used the 3M 8831 series, and bought them from digi-key, with the datasheet here. I also bought the 2272 and 2224 wrist straps.

These mats are really high quality. Thick, smooth silky surface, great bottom layer. Comes with a dual-port wrist strap system and grounding cable. Note you do have buy the wrist straps separately.

I also bought a mat for my LA cart, but I still have to fit that one.

In the top of the picture, were my new built from scatch shelves that I just installed this weekend. Really getting the man cave outfitted properly, better organized, etc.

Visible on the right is the Rigol DS1102D and the Rigol DP832.

Feb 22

Trying to use mini-box picoPSU-120 to power Amiga but -12v rail is out of ATX compliance

So I purchased a mini-box picoPSU-120 kit which is in essence a very very small power supply that provides multiple regulated voltages. I want to power my Commodore Amiga 500 with the tiny power supply but there’s potentially a big problem with using it out of the box: the -12v rail seems to be out of spec. It’s not being properly regulated to -12v.

I have no problems with the +5v rail or the +12v rail, both measure around +/-1%, or +/-4%, respectively. I haven’t even looked at the +3.3v rail, because the Amiga doesn’t need it.

Their specs are located here.

With their critical specs being outlined here

picopsu_specs

I wasn’t a math major, but I think this means that the voltages should be between -11.4v and -12.6v. And remember, with load regulation, even without a load, the voltage should be within this range.

But, alas, it’s not:

picoPSU-120_problem_680

So I’m getting -13.8v on the -12v rail, which is a solid 15% off target.

Since the PicoPSU is actually a DC->DC converter, it requires 12v input, but I bought their kit, so they are also providing the normal AC to 12v DC conversion with an EDACPOWER ELEC Model EA11203A. The output of this measures +12.49v which is within the the +/- 5% specified on their spec sheet. So this means that the input is ok. And given that it’s unloaded, the voltage sitting high(er) doesn’t concern me at all.

The ATX Specification states that the regulation can be +/- 10% for the -12v rail is allowed, but on the high(low?) side this is still -13.20v. (Section 3.2.1 DC Voltage Regulation (which is a required section) Table 5.)

I double-checked every measurement with another multimeter to ensure that I’m getting decent numbers.

Some others have mentioned that there’s a few things I can do to solve the problem:

  • Use voltage regulation, likely with a 7912, which would handle the negative rail, but I’d have to be sure to get a LDO one. I ordered an LM2990T-12 today.
  • Use two diodes in series for a 1.2v to 1.4v drop. There’s low currents involved on this rail, perhaps 20 or 25ma. So my voltage drop would likely be 1.2v, which would take me from -13.8v to -12.6v. Much more palatable 5% difference
  • Try testing the Amiga at -13.8v by slowing deviating from -12v using my lab bench supply, the Rigol DP832.

In any event, I wish this would have just worked out of the box.

Perhaps it’s me? Perhaps I’m doing something wrong? What do you think?

Feb 08

Powering the Commodore Amiga 500 with the Rigol DP832 supply

a500_powered

So thanks to Mike/amigamech for still having brand new stock of 5-pin A500 power connectors that he could ship quickly.

I used information from http://www.ianstedman.co.uk/Amiga/amiga_hacks/Amiga_Power_supplies/amiga_power_supplies.html for the various pinouts.

I have ordered a picopsu really small power supply to replace the big normal clunky one. I like the idea of using new and still available components where we can.

This is a stock A500 with the only addition being my custom A501 card.

Besides just an excuse to put my DP832 into action, it also gave me the ability to confirm the power draw requirements, and make sure I don’t exceed them with the pico.

The A500, Rock Lobster rev 5, motherboard draws (as you can see in the picture) 20ma on the -12v rail, 22ma on the +12v, and 1.5A on the +5v rail when idle. 8-9 watts for a running machine sounds pretty low to me!

When the floppy runs, which is probably the only other power intensive operation, this 1.55 amps goes up to around 2 amps maximum.

I could try playing some audio(op amps) and doing some serial operations, as they should exercise that -12v rail.

Pretty cool. Also thanks to Dave McGuire for helping me understand negative voltages a little bit. I’m really not used to playing with them, and connecting the positive output of the isolated -12v channel to the ground of the +5v and +12v channels definitely gave me pause. A lack of smoke and a multimeter quickly confirmed that this was fine, if only counter-intuitive for me.

The A500 boots normally and works as it should.

 

Jan 11

Cause of original instability and boot problems on the original A500 identified

So the very first A500 I had been testing on since the beginning of the project had a Bug Katcher installed.  It turns out that I wasn’t really using it, but I left it plugged in anyways.

I’m not sure electrically what the exact effects of having that installed are, but removing it caused all of my instability and boot issues to disappear.

I was able to boot the amiga (10) times in a row from a cold start without an associated hang.

I still want to reconnect the logic analyzer, and verify that the race condition(which was/is a separate issue) has truly been addressed.

There was an issue where /CE could get asserted low prior to the latched addresses being clocked (or stabilizing) into the SRAM.  I solved this by using slower logic(LS instead of ACT) on the logic path of /CE.  While not ideal, I think it’s pretty effective.

I’m going to verify that those setup times for the SRAM are being respected, and I have a sufficient design margin.

 

Jan 08

Sweet success, card works 100% in different DUT(Amiga)

So I think the Amiga 500 I was testing with has problems.  I’m not sure precisely what or why but

Today, I dropped my new A501 replacement card into a known-working Commodore Amiga 500.  It fired up immediately no issues with booting, everything worked, no wonkiness, memory tests passed 100%.  This amiga has an accelerator card, and I was able to run 300 tests of pretty much the entire memory space on the card in about 5 minutes.  Everything worked without error.

I’d like to get more data points here before I call it DONE, but it looks GREAT to me!

I’ve got to start putting up some more information, update the schematics with a few small fixes, and do some more testing.

Good milestone tonight!