The previous post should have been sent mid-afternoon but I forgot to hit the "Submit" button as I was too distracted.
It turns out that I had the sense of the "interrupt flag" on the Read command the opposite of what it should be. Fixed that and the machine is reading.
I've also tested my config with two virtual drives and it sees both and reports 20M as the disk size, so that's good too.
I'm now going to have to reconfigure the desk so that I can hook up the Gotek to do the write testing.
P.S. I'm getting spurious "read from the write-only latch" events. I'm guessing that they're actually attempts to read from the buffer but somehow the A4 address line isn't being seen as high.
Re: General Stuff(tm)
Posted: 16 Jan 2023 21:06
by stephen_usher
Desk re-arranged and Gotek fitted.
IMG_2887.jpeg
Well, writing sort of works, extremely slowly. I'm not sure it's really working properly though. I'm very definitely getting access to the latch (A8 = 1, A4 =0) when it's supposed to be accessing the buffer (A8 = 1, A4 = 1) and if I don't catch them and do a buffer read then it doesn't work at all.
Writes seem to be waiting for a timeout before completion.
I really could do with two screens. The LCD TV takes about 10 seconds to switch inputs, which is really frustrating. The problem is that I have nowhere to safely put a monochrome monitor.
Re: General Stuff(tm)
Posted: 16 Jan 2023 22:53
by stephen_usher
I've finally got further than I did with the micropython. I'm now able to format (OK, write a FAT) to a disk and copy a file onto it and it still exists after a reboot. :-)
There is an issue with Read sometimes deadlocking, stopping Core0 from processing any more commands. Also both reads and writes are incredibly slow, as in 5 second waits before the system tries to do another drive access. I'll have to look at the BIOS source to see what it's looking for before timing out.
Re: General Stuff(tm)
Posted: 17 Jan 2023 19:55
by stephen_usher
Grr... Going backwards. What worked last night has totally broken this evening without changing anything.
Re: General Stuff(tm)
Posted: 18 Jan 2023 09:18
by stephen_usher
I'm now wondering if I need to bring the /ALE (Address Latch Enable) line over to the GAL and that I'm reading the bus when the address lines aren't stable. Hmmm...
That would explain the spurious times when the system is trying to read the buffer but the A4 line is not high I guess. I've checked the address lines and they don't need pulling up, they're hard 0V and ~4V which is ample for TTL and CMOS, especially 3.3V (5V tolerant) CMOS. (The address lines from the system bus are latched into the card. and those latches are controlled by the /ALE line. Addresses are not considered to be valid if /ALE is low.)
Still, it's only a theory.
Re: General Stuff(tm)
Posted: 18 Jan 2023 09:36
by rubber_jonnie
stephen_usher wrote: 18 Jan 2023 09:18
I'm now wondering if I need to bring the /ALE (Address Latch Enable) line over to the GAL and that I'm reading the bus when the address lines aren't stable. Hmmm...
That would explain the spurious times when the system is trying to read the buffer but the A4 line is not high I guess. I've checked the address lines and they don't need pulling up, they're hard 0V and ~4V which is ample for TTL and CMOS, especially 3.3V (5V tolerant) CMOS. (The address lines from the system bus are latched into the card. and those latches are controlled by the /ALE line. Addresses are not considered to be valid if /ALE is low.)
Still, it's only a theory.
Wow, you're definitely deep in the weeds now, wish I could help as finding this fascinating, but I lack both the hardware and programming skills!!
Re: General Stuff(tm)
Posted: 18 Jan 2023 21:12
by stephen_usher
/ALE line bodge done and more strangeness. The addresses are only ever decoded when /ALE has the wrong sense!
The /ALE line is directly connected to the /LE pin on the 74LS373 latches which sit between the system address bus and the card. The latch's /OE is connected to ground so they should always be outputting what's been latched. The latches should only change state when /ALE is low and hold the output in the state that the inputs were when /ALE transitions from low to high.
But what's happening is that the latched data on the address lines doesn't include the address that the board is looking for, they only appear during the time /ALE is low.
:WTF:
That's not how it's supposed to work!
Re: General Stuff(tm)
Posted: 18 Jan 2023 22:53
by stephen_usher
I wonder if I need more pull-ups and the bus is only being energised by the main system bus whilst /LE is active. Something to test tomorrow night.
Re: General Stuff(tm)
Posted: 19 Jan 2023 20:02
by stephen_usher
First boot!!!!
Re: General Stuff(tm)
Posted: 19 Jan 2023 21:46
by stephen_usher
I'm getting some write corruption.. found after doing quite a few writes. Definitely faster than a floppy, but not by much, but the seek latency isn't there so it feels faster.