techtravels.org

simplified ISR

It looks as if I spoke too soon.

I’m still having reading problems.  The data used to be forced into an MFM mold, but all that’s done in some cases, is to further corrupt the corrupt data.

I rewrote my ISR to simplify it.

‘ ————————————————————————-
INTERRUPT NOCODE
‘ ————————————————————————-

ASM

SETB rb.1            ‘debug pin(inside interrupt)
CLR RTCC

CLR FSR

ISR_Start:

‘these next two instructions retrieve the edge-pending register and clear it in the event an edge triggered it

MODE $09
MOV !RB,#%00000000
mov myres, w

‘W NOW CONTAINS A %00000001 IF FIRED BY EDGE, 0 IF RTCC
‘next 5 lines store the bit in the fram
CLRB SCK        ‘make sure clock is low to start with
NOP

MOVB SI, myres.0    ‘send bit to fram
NOP

SETB SCK        ‘raise clock notifying chip to read the data

‘COUNT THE Bit stored
IJNZ lobyte, goback
IJNZ hibyte, goback
inc superhibyte

goback:

CLRB rb.1            ‘debug pin
MOV W, #-101     ‘wait 101 cycles(101/50 = 2.02 us) to fire next timed interrupt
retiw

ENDASM

Once again, I’m seeing duplicate 1’s.  Either there really are two edges close together, or my SX is detecting the same edge twice.

keith

Amateur Electronics Design Engineer and Hacker

3 comments

  • Another possibility is that the memory read/write routines are shaky. I’ve run decent tests on them and I think they are simple enough, but who knows.

    There’s also another possibility that the memory errata error is showing up, but darned if the errata datasheet is off of ramtron’s site. Now I do have a downloaded copy, but I wonder why they would have deleted it? maybe because its fixed in the latest revision. who knows. ill check the memory stuff too.

  • Hello.

    I’m really interested in your project, except I want to do it the other way around. I want to be able to write amiga disks from a PC.
    It’s just really hard to get software to an Amiga 1000 or the like when you don’t have a scsi controller on the computer, and it’s getting hard to find addons for it (or they are pretty expensive).

    Would your project beable to do both? Read & write? I’d like to hear from you, if you have time. And yes, I do understand how the Amiga drives work, and how they are different then pc drives. I’ve done a bit of research into this, even been looking into making an adaptor to connect the external drive connector to a PC and have it “emulate” a drive. You know, send the correct signals back to the amiga, and convert the signals it gets into the data it needs. Figured I might have to make an adaptor for that, maybe. But i’m not an expert, just a hack, if even that.

    Anyways, like to hear from you if I could, and i’m going to go over your archives on this.

    thanks

  • Nyder,

    Initially, the project is designed to do just reading. I figured writing would be pretty important, and it’s definitely a long term goal.

    Tim, another guy that follows this blog, has made a very nice adapter similar to what you speak of.

    https://www.sensi.org/~tnt23/megadrive/index.html

    You load .ADF images onto the flash card, plug the flash card into the device, and it plays the role of the floppy serving up MFM and the associated signals. Very cool.

    Thanks for the interest