Reply 60 of 113, by rasz_pl
leejsmith wrote on 2022-08-19, 10:28:The next video is now on Youtube
https://www.youtube.com/watch?v=6JJg_Gj08qU
I am going to take a break on this and work on some other projects at the weekends, If I do find anything that I think is worth trying I will do so.
@18:35 thats not how I would interpreted it. Its not "then it would start to write out data". Where would the data go before this writeout? There are no chipsets with hidden DMA buffers, the only place where the data goes is RAM. DOS has special space reserved for disk data https://forum.vcfed.org/index.php?threads/how … ers-work.72225/
you could try for laughs set BUFFERS=1 and see what happens, this would force DOS to limit reads to 1 sector at a time
That MEMW activity right after finishing DMA transactions @18:40 is IMO DOS executing TYPE command, copying internal floppy buffer to the SCREEN memory at 0xB0000 😀
looking at last-400-good you can see 46 single byte writes every ~200us (no clue what is being written here), and then a nice clumped 2000 bytes transfer. 80x25 = 2000, this is clearly a write to VGA card rewriting whole screen all at once.
protip: holding shift while selecting a slice of one channel adds nice measurement marker with statistics, falling edge count on memw = number of written bytes, same for dack.
@18:50 No way this is true, there are no magic dma caches in chipsets. What I said earlier in the thread and what might be happening is this Headland chipset having hardware design defect resulting in not issuing MEMW signal externally on DMA transactions. It evidently generates one internally (issuing memory write signal by memory controller) because data is being stored, but this behavior would limit working DMA exclusively to ram handled by onboard ram controller. DMA to ISA ram expansion cards would not work. This might of been missed by hardware designers? You could test that by writing a short test program that tries to read floppy directly to ram at 0xB0000 (graphics card text buffer). Another possibility is Headland chipset being so advanced/optimized that it knows where onboard ram is and where it isnt and issues MEMR/MEMW on ISA bus ONLY for addresses not handled by its internal memory controller.
@19:50 you dont see any memw because computer locked up = no code writes anything to video ram = no memw
There are no hidden DMA buffers!!1!111!! 😀 One way you could verify DMA is really writing data to ram but chipset is somehow not generating valid MEMW signals would be putting one of Logic analyzer probes on pin 21 of the SIMM socket (WE signal for ram modules).
I finally looked at your captures
last-400-good shows 5 512 byte transfers. Probably DOS parsing floppy FAT table followed by final 512 one sector read.
last-500-bad for some reason decides to read 7 sectors, probably because bigger file is in different spot on the disk forcing DOS to read more of the FAT structures to finally get to it.
now very good thinking on your part to capture IRQ 6! because the first thing that jumps at me is IRQ 6 not being deasserted! EDIT: wrote this before finishing watching your video 😀
If we look at correctly handled IRQ we see
- 2 or 3 bytes memr
- waiting ~17us
- continues to execute IRQ handler
now I dont know if those "2 or 3 bytes memr" are part of interrupt handler, or if PCs have slow interrupt latency of ~17us and it just takes that long for interrupt controller to signal CPU to stop what its doing and jump to interrupt handler.
If we look at last-500-bad failure case we see
- 3 bytes memr
- ... and nothing, the only memr activity on the bus is memory refresh every 14us - we know this is memory refresh because every memr corresponds to AEN. This is exactly how original IBM PC refreshed memory - a timer let a DMA channel read from RAM in a repeated cycle every 15 µs. You can even see Pentium still doing those AEN/MEMR cycles every 15 µs despite no need for them anymore (ram is on its own separate bus), its there for backward compatibility with very old and basic ISA RAM cards.
It now occurred to me that maybe your 286 also doesnt show all of its ram read/write cycles because you can clearly see IORDY activity every time interrupt handler is running - that tells us that code is being executed and is reading/writing IO registers.
Every IRQ6 handler reads/writes 20-30 IO ports before finishing
Bad read gets stuck in a tight loop querying some IO port, in fact if you zoom to ~6us per division and start scrolling right you will see a repetaring pattern of exactly the same IO accesses while computer is frozen - Floppy interrupt handler must be executing in some loop repeatedly querying some IO port, not liking what it saw and retrying.
Im a little sorry for you this repair is so tedious, but simultaneously absolutely loving every minute of the debugging going on here! 😁 This is my favorite vogon thread of the month, if not the year, by far!
What next. Since you have 16 channel salea slap probes on:
iordy,DMAAEN,irq6,ior,iow,A0 to A10
and capture failure case (freeze), this will let us know what addresses are those IO ports being read in the IRQ handler. I am trying to think how to also capture data being written/read with only 16 probes 😀 hmm, lets try:
iordy,DMAAEN,irq6,A0 to A4, D0 to D7
Combining and lining up both captures should show us the full picture. We will get to the bottom of this!
ps: floppy controller IO port description https://www.isdaman.com/alsos/hardware/fdc/floppy.htm
ps2: I still see green pins on the next ISA slot. Were there any damaged tracks under the first one? or was all of the damage incurred during the removal?
https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor