Can all registered uses please login, even just for a few minutes..
It helps build a picture where our "good traffic" is coming from..
Thanks :)

Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Blogs & guides and tales of woo by forum members.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7504
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by stephen_usher »

exxos wrote: Wed May 17, 2023 11:19 pm Wouldn't that be almost the same as dumping known bit patterns to the drive and reading them back like jookie's test program does anyway ?
If his program just does a contiguous read then it possibly doesn't. Reading random words from the file requires rapid, multi cylinder seeks between reads. This is both testing for lost seeks and miscalculation of the location when doing seeks.

I know from experience with my Apricot HD simulator using a Pico that with an off-by-one error in my cache code meant that in certain situations one byte would not be written and that was a head scratcher as to why the files were being corrupted.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
dad664npc
Posts: 178
Joined: Mon Sep 12, 2022 2:32 pm
Location: Oxfordshire

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by dad664npc »

The ACSI commands are the same for TOS and the HD test programme - they are both using 6 byte commands
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
dad664npc
Posts: 178
Joined: Mon Sep 12, 2022 2:32 pm
Location: Oxfordshire

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by dad664npc »

stephen_usher wrote: Thu May 18, 2023 9:15 am
exxos wrote: Wed May 17, 2023 11:19 pm Wouldn't that be almost the same as dumping known bit patten's to the drive and reading them back like jookies test program does anyway ?
If his program just does a contiguous read then it possibly doesn't. Reading random words from the file requires rapid, multi cylinder seeks between reads. This is both testing for lost seeks and miscalculation of the location when doing seeks.

I know from experience with my Apricot HD simulator using a Pico that with an off-by-one error in my cache code meant that in certain situations one byte would not be written and that was a head scratcher as to why the files were being corrupted.
There aren't any seeks in the generic sense. sd-cards are addressed by sector number (LBA). So just read/write commands with a LBA
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3065
Joined: Tue Nov 19, 2019 12:09 pm

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by Badwolf »

I got my own board (@dad664npc's version from December) assembled and flashed yesterday. It doesn't work, but I was expecting this as it uses the TXB0108 chips spec'd at the time which are now not believed to work.

However I do now want to debug it, so will be trying to learn a bit about ACSI and how the design hangs together. If I learn, find or write anything possibly useful I'll chip in.

My board does spit out debug spam onto the USB serial port successfully, so I've a foot in the door. I think it's failing to read the SD card, so the chat two and from the ST is immaterial at present.

In terms of a test program, the first thing that springs to mind is to write something that replicates the ACSI commands that are seen to fail and do so repeatedly, checking for a discrepancy. The fact you (@exxos) have a log of commands sent during a failure is extremely useful for this.

I wouldn't bother with anything that tries to write to files or drives (reliant on GEMDOS and the driver), but go down into the weeds early doors.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 28821
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by exxos »

I tried syncing DRQ to CLK8 but was unsuccessful in changing anything :(

There is still a mystery of why DRQ is extremely sensitive. I thought running it through a DFF may help or make it worse but it changed nothing. Theoretically you should not do anyway, but I really had no other avenues to explore.

I have basically hit a wall because there is simply nothing else for me to try.

IMG_0618.JPG
IMG_0618.JPG (91.95 KiB) Viewed 423 times
IMG_0619.JPG
IMG_0619.JPG (77.95 KiB) Viewed 423 times

I could see a potential hiccup, where keeping the CPU in 8MHz based on RW low would potentially help, and it does. But this unfortunately does not explain the issues with 8MHz mode. Which seems to be ironically working fine again now. :roll:

Capture.PNG
Capture.PNG (178.17 KiB) Viewed 421 times

I thought I figured it out back in this post viewtopic.php?p=100387#p100387 but guess its difficult with the faults being so random :(

I tried adding 33pF back to the 8 MHz clock again. It failed repeatedly to even get to desktop. Signal does not look any much different other than the over and under shoots are slightly less.

EDIT:

Now the display has gone into a funky disc even though it looks like the ST is still trying to boot.

IMG_0620.JPG
IMG_0620.JPG (56.05 KiB) Viewed 407 times

I wonder if the 33pF Is adding a slight delay where it then misses its "time slot" for RAM accesses.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7504
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by stephen_usher »

dad664npc wrote: Thu May 18, 2023 9:27 am There aren't any seeks in the generic sense. sd-cards are addressed by sector number (LBA). So just read/write commands with a LBA
The ACSI interface will be using CHS addressing however.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
dad664npc
Posts: 178
Joined: Mon Sep 12, 2022 2:32 pm
Location: Oxfordshire

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by dad664npc »

Nope

Screenshot 2023-05-18 at 10.58.46.png
Screenshot 2023-05-18 at 10.58.46.png (202.39 KiB) Viewed 414 times
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
User avatar
exxos
Site Admin
Site Admin
Posts: 28821
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by exxos »

Going back to 220MHz tests. On boot up.

Code: Select all

RESET
RESET
RESET
RESET
CMD_READ        tgt=0 lun=0 (0x08:00:00:00:01:00) (00)
CMD_READ        tgt=1 lun=0 (0x08:00:00:00:01:00) (02)
CMD_READ        tgt=1 lun=0 (0x08:00:00:00:01:00) (02)
Then get 4 bombs. Though writes (at least in general) have worked better at that speed.
User avatar
exxos
Site Admin
Site Admin
Posts: 28821
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by exxos »

dad664npc wrote: Thu May 18, 2023 7:02 am I too can replicate what exxos has seen, in that a cold startup, writes work for a few minutes before corruption starts.
Do you also get this at 8MHz with either the original or beta GAL firmware ? I've lost track.

Been doing testing with another revised firmware and I think is just be easier to release the tweaked GAL firmware for anyone who ends up with similar issues. It seems to be working at both 8MHz and 32MHz speeds now.

The problem is I'm just going around in circles with all of this. For some bizarre reason, it seems like the RW timings gets screwed up with some drives but not others. As to how it can go from a DMA cycle to a RW timing skew is beyond me. But after spending the best part of three weeks on this, I am just getting nowhere, and if the tweaked GAL firmware offers a workaround and it seems to work, then that will just have to be the fix for now.
dad664npc
Posts: 178
Joined: Mon Sep 12, 2022 2:32 pm
Location: Oxfordshire

Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)

Post by dad664npc »

I am back to using the original GAL firmware. Writes are corrupted in both 8 MHz and 32 MHz
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
Post Reply

Return to “MEMBER BLOGS”