06.28.09

got build environment working again, fixed uart code

Posted in Amiga Floppy at 9:24 pm by Administrator

So awhile ago I bought a quad core machine which runs Vista 64.  Once I had the new machine, I tried getting my build environment for the AFP working again.  NetBeans, the java IDE I use, has 64-bit support but there were a host of issues regarding FTDI drivers, jd2xx, etc which I fought over and eventually gave up.  I was getting error messages like “Can’t load IA 32-bit .dll on a AMD 64-bit platform” and there was a serious conflict between 32 bit and 64 bit JVM, JDK, DLL’s etc etc.  Pain in the butt.

I’ve had some time to work on stuff the last couple days and sit down and re-attack the problem.  I did manage to solve it by uninstalling anything Java that is 64-bit. :)  I believe it was just the JDK and JVM.  I also had to reinstall NetBeans because it links itself to a JDK —- once it was uninstalled, NetBeans would literally not boot with a link.  I looked all over NetBeans for something that defines a “target.”  You know, something where I can say “I want to build applications for 64-bit” or “32-bit” or whatever.  I couldn’t find it.  I uninstalled NetBeans, reinstalled it (this time it detected and recognized the 32-bit JDK), and voila, my java client now loads, builds, and runs correctly!@#

I hooked up my AFP again, and attempted to image and disk, and there were major problems.  Do you remember this post? This time it actually wasn’t that bad.  Another time somehow one of my SX28 pins were fried.

I’ve always wanted to do an extended UART data transfer test.  I’ve never really done this and I think it has been a big source of problems from the beginning.  Even though I checked the UART carefully for cycle counts(and done this 239408 times), put it on the logic analyzer, and even had someone else review it, there must have been a mistake.  I was corrupting about 3-5 bytes for every 100,000.  Not tons, but enough to show up during a disk transfer.

I started out really looking into my UART.  When bytes were corrupted, they were corrupted in exactly the same way:

The first data bit that was a 1-bit was ignored, and the data only started being received after the next one bit.  Let me give an example:

Let’s say the correct byte was : dec 138, or binary 1000 1010.  It would be received as dec 10 or 0000 1010.

correct byte might be : dec 39 or binary 0010 0111. It would be received as dec 7, or 0000 0111.

correct byte might be: dec 166 or binary 1010 0110. It might be rx’d as dec 38, or 0010 0110.

Remember, this only happened as an exception.

I eventually tweaked my UART by shortening the delay between the start bit and the first data bit, and also the time between bits by 20ns.  I’m honestly not sure why that worked, and it was mostly found by trial and error. But it had a profound and instant effect.  I was running trials and counting the number of bad bytes per 655k of transfer.  I was anywhere between 33-42 bad bytes per 655k.  When I made the change, it jumped to 0 !!

As a matter of fact, I just finished sending 284 megabytes (or 2.84 gigabits) of traffic through it without a single bit error!  I think that’s pretty decent.  The funny thing, I fired up “calc” to do some quick math, and I think the cpu interruption, or disk access, or something, caused me to lose some data.  In the actual real client, it would have automatically retransmitted the track, so it’s not the end of the world.

Once I fixed the uart, it started reading disks correctly again.

I’m pretty happy to see this thing working again.  Maybe I’ll read in some more amiga floppies tonight!

06.25.09

my checksum algorithm

Posted in Amiga Floppy at 6:31 pm by Administrator

So I’m using an XOR checksum to detect errors in the transfer between the SX and the PC.  I always thought it was a reasonably strong checksum, even though it’s still an 8 bit checksum.

I found a neat article today here.

“The XOR checksum has the highest probability of undetected errors for all checksum algorithms in this study, and is not as effective as addition-based checksums for general purpose error detection uses.”

There were around 6 or 7 different checksums presented.

More later.

05.18.09

sanding a 556 timer IC to expose the die

Posted in Amiga Floppy at 1:21 am by Administrator

So tonight, just for the fun of it, I decided to sand, by hand, a 556 timer IC.

I just bought an extremely inexpensive microscope and was very interested to see what pictures I could get from it.

Unfortunately, for me, this was a trial and error process.  I started with something like this:

and then after some sanding with 60grit sandpaper to remove basically the top half, this is what I ended up with

And then I switched to 320 grit, and after a couple of hours of sanding by hand, I ended up with

And then after some more time sanding, the center copper piece w/ what was left of the traces simply plucked off.  I sanded and sanded more, but there was nothing left.

Now, just before this, I had just a center block of shiny copper, and then after some brief sanding ended up with some gray-ish speckled “layer.”  I put it under the microscope and couldn’t see any pattern, couldn’t see anything discernible from just some scratches.  I didn’t try putting it under a lot of power or anything, perhaps only at 80x or so — nothing in the least bit interesting.

I can’t help but now feel that I screwed up and should have tried that gray-ish layer under more power, I believe that might have been what I was looking for.

04.25.09

upgraded Tivo HD serial 652

Posted in Amiga Floppy at 1:54 am by Administrator

I followed the instructions at http://www.bumwine.com/tivo.html but when I tried to expand the partition after the copy, it failed with the following error:

Primary volume header corrupt, trying backup.
Secondary volume header corrupt, giving up.
mfs_load_volume_header: Bad checksum.
Unable to open MFS drives.

So I downloaded the MFSLive Linux Boot CD 1.4 from http://www.mfslive.org/

and issued the command mfsadd -x /dev/sda -r 4.  Where /dev/sda is the name of the destination copied drive that needs expanding, from cat /proc/partitions.

Everything (edit: did not — see below) work(ed) perfectly.  I would probably just suggest following the FAQ/guide for MFSLive Boot CD, using the backup/restore commands.

The drive I bought was the Western Digital 1.5TB green drive from newegg.

02.03.09

FPGA eval board

Posted in Amiga Floppy at 3:16 am by Administrator

One of these arrived today.  Very cool.  I’ve only done minor things with it so far — but I’m learning.

I’ve got FPGAs by Example for Verilog coming within a couple days.  Looks like a good book.

The only thing I’ve managed to do so far was modify the assembly for the picoblaze microcontroller to change the text scrolling on the lcd — you’ve got to start some place.

So is this amiga floppy project rev 3 now? heh. I dunno.

(I want to get the afp stable, working perfectly, and move on — I’ve spent too much time on it already, although I’ve enjoyed every minute)

« Previous entries