Page 4 of 28
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 05 Jan 2023 12:41
by dad664npc
Hi - I have had a batch made. Unfortunately there is a problem with the ACSI bus IDC pinout. I need to make up a test cable and test further, but at the moment I am working on trying to get PIStorm working with ATARI STs :). Once I'm happy with the outcome, I will post on here
Cheers
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 05 Jan 2023 13:33
by alexh
dad664npc wrote: 05 Jan 2023 12:41
at the moment I am working on trying to get PIStorm working with ATARI STs :)
Are you using Pistorm-ST by BadWolf?
https://github.com/dh219/pistorm/tree/wip-pistormst
(Ah I just noticed you're CryptoDad over on the Discord server)
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 06 Jan 2023 01:13
by jfceklosky
Thanks for letting us know about the issue with the first batch board IDC connector issue.
When you have things worked out, I would be very willing to help test these out.
I have 2 MEGA ST's one with TOS 1.04 and the other with TOS 2.06/ICD Adspeed 16 installed. I have an STE on the way, but I am unsure about the status of this unit.
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 07 Jan 2023 07:02
by jfceklosky
I have a gerber for a DB 19 to IDC 20 if you need one. I modeled this after the one that have for an Ultra Satan device.
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 08 Jan 2023 06:32
by Chris O.
About Ultrasatan RTC if you need this feel free to use it.
This is for my ACSI to Teensy 4.1 hard drive implementation with MTP.
Code: Select all
case 0x20: // UltraSatan's special commands (0x20).
// from https://github.com/atarijookie/ce-atari/blob/master/ultrasatan/UltraSatan/special.c
//-----------------------------------------------
// Format of UltraSatan's special commands is as follows:
// cmd[0] - (ACSI ID << 5) | 0x1f - command in ICD format
// cmd[1] - 0x20 - group code 1 (1 + 10 bytes long command) and command TEST UNIT READY
// cmd[2..3] - the 'US' string (US as UltraSatan)
// cmd[4..7] - special command code / string
// cmd[8..10] - 3 bytes of parameters
// so the complete command could look like this:
// 0x1f, 0x20, 'USRdFW', 0x01, 0x0010 (ACSI device 0: read sector 0x0010 of firmware 1)
//-----------------------------------------------
// All i need is RTC functionality implemented from UltraSatan's RTC clock tools (US_GETCL.PRG or US_SETCL.PRG).
// for exemple: Len 11 Command 1F 20 55 53 43 75 72 6E 74 46 57 -- ReadCurrentFirmwareName
// cmd[2..3] - the 'US' string (US as UltraSatan)
if (cmdBuf[2] == 'U' && cmdBuf[3] == 'S') { // some UltraSatan's specific commands?
Serial.println(" ICD 0x1F UltraSatan's special commands (0x20)");
for (uint32_t i = 0; i < 512; i++) {
dataBuf[i] = 0; // clear the data buffer
}
// cmd [4.5.10]
if (cmdBuf[4] == 'C' && cmdBuf[5] == 'u' && cmdBuf[10] == 'W') { // read the name of currently running FW (VERSION STRING)
Serial.println(" read the name of currently running FW");
// cmd# 00 01 02 03 04 05 06 07 08 09 10 Len 11.
// HEX 1F 20 55 53 43 75 72 6E 74 46 57 // Special_ReadCurrentFirmwareName https://github.com/atarijookie/ce-atari/blob/master/ultrasatan/UltraSatan/scsi_icd.c
// ICD ** U S C u r n t F W
// Teensy STRING for the US_GETCL.PRG or US_SETCL.PRG
dataBuf[0] = 'T'; //
dataBuf[1] = 'e'; //
dataBuf[2] = 'e'; //
dataBuf[3] = 'n'; //
dataBuf[4] = 's'; //
dataBuf[5] = 'y'; //
dataBuf[6] = ' '; //
dataBuf[7] = '4'; //
dataBuf[8] = '.'; //
dataBuf[9] = '1'; //
dataBuf[10] = ' '; //
dataBuf[11] = 'A'; //
dataBuf[12] = 'C'; //
dataBuf[13] = 'S'; //
dataBuf[14] = 'I'; //
dataBuf[15] = ' '; //
dataBuf[16] = 'V'; //
dataBuf[17] = 'e'; //
dataBuf[18] = 'r'; //
dataBuf[19] = '.'; //
dataBuf[20] = '0'; //
dataBuf[21] = '.'; //
dataBuf[22] = '0'; //
dataBuf[23] = '1'; //
dataBuf[24] = 0x00; //
sendDma(512); // 512
commandSuccess();
} else if (cmdBuf[4] == 'R' && cmdBuf[5] == 'd' && cmdBuf[10] == 'C') { // read clock
Serial.print(" read clock ");
// cmd# 00 01 02 03 04 05 06 07 08 09 10
// Len 11 Command 1F 20 55 53 52 64 43 6C 52 54 43
// ICD U S R d C l R T C
digitalClockDisplay(); // Show on Serial
dataBuf[0] = 'R'; // RTC signature
dataBuf[1] = 'T';
dataBuf[2] = 'C';
// fill dataBuf with clock data
dataBuf[3] = (year() - 2000); // yea;
dataBuf[4] = month(); // mon;
dataBuf[5] = day(); // day;
dataBuf[6] = hour(); // hou;
dataBuf[7] = minute(); // min;
dataBuf[8] = second(); // sec;
sendDma(512); // send 512 bytes
commandSuccess();
} else if (cmdBuf[4] == 'W' && cmdBuf[5] == 'r' && cmdBuf[10] == 'C') { // SET, write clock
Serial.println(" write clock ");
// cmd# 00 01 02 03 04 05 06 07 08 09 10
// Len 11 Command 1F 20 55 53 57 72 43 6C 52 54 43
// ICD U S W r C l R T C
readDma(512); // read 512 bytes
commandSuccess();
Serial.print(' ');
Serial.write(dataBuf[0]); // RTC signature
Serial.write(dataBuf[1]);
Serial.write(dataBuf[2]);
Serial.print(' ');
for (uint32_t i = 3; i < 9; i++) {
Serial.print(dataBuf[i]); // data buffer
Serial.print(' ');
}
// This sets the system time lib. (NOT the Teensy RTC Clock)
// set your seperated date/time variables out as normal and update system time FIRST
//setTime(hour(), minute(), second(), day(), month(), year())
setTime(dataBuf[6], dataBuf[7], dataBuf[8], dataBuf[5], dataBuf[4], dataBuf[3]); // (hr,min,sec,day,mnth,yr) --- yr is 2 or 4 digit yr (2010 or 10 sets year to 2010)
// now lets set the RTC in teensy before exiting.
// now we can use the system time to update the Teensy's RTC bits
// This sets the Teensy RTC Clock from Arduino Time library(system time) - epoch stylee, just like it wants :)
Teensy3Clock.set(now());
// Len 11 Command 1F 20 55 53 52 64 53 74 0 0 0
// ICD U S R d S t null // read settings
} else {
sdc.lastErr = LASTERR_OPCODE; // Invalid Command (opcode not implemented)
commandError();
}
/*
if (!cmpn(&cmdBuf[4], "RdFW", 4)) // firmware read?
{
Special_ReadFW();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "WrFW", 4)) // firmware write?
{
Special_WriteFW();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "RdSt", 4)) // read settings?
{
Special_ReadSettings();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "WrSt", 4)) // write settings?
{
Special_WriteSettings();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "RdCl", 4)) // read clock?
{
// Special_ReadRTC(); // todo
//return;
}
//---------
if (!cmpn(&cmdBuf[4], "WrCl", 4)) // write clock?
{
// Special_WriteRTC(); // todo
//return;
}
//---------
if (!cmpn(&cmdBuf[4], "CurntFW", 7)) // read the name of currently running FW?
{
// Special_ReadCurrentFirmwareName(); // todo
//return;
}
//---------
if (!cmpn(&cmdBuf[4], "RdINQRN", 7)) // read INQUIRY name?
{
Special_ReadInquiryName();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "WrINQRN", 7)) // write INQUIRY name?
{
Special_WriteInquiryName();
return;
}
//---------
if (!cmpn(&cmdBuf[4], "RdLog", 5)) // read command log?
{
Special_ReadLog();
return;
}
*/
} else {
sdc.lastErr = LASTERR_OPCODE; // Invalid Command (opcode not implemented)
commandError();
}
break;
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 16 Jan 2023 02:52
by dad664npc
Not some great news... for the PCB design, I used an auto direction voltage level translator (TXB0108). This part has proven to be troublesome for me, in that I see random data (noise?) and very slow direction switching. This of course means the design does not work.
For the prototype, I used a 74LVC245 part. I moved away from this at some point as I was having unreliable IO and purchased a couple of Adafruit voltage level translators instead. This allowed me to develop the software and have a reliable interface.
In retrospect, I am guessing I was having software problems at the time as now, I have reverted back to this 245 part and it works reliably and is fast - seeing short transfer speeds of 2.5 MB/s and sustained transfer speeds of 980 KB/s when running PICO at 133 MHz.
This is the first time I have designed a PCB and it has been enjoyable and expensive. My first batch did not work at all as I had chosen the wrong chip footprint for the selected part. The second batch (the current batch), I have wired the IDC connector incorrectly but was able to continue testing with a modified cable.
At some point in the near future, I will try again - 3rd time lucky... watch this space...
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 16 Jan 2023 14:03
by jfceklosky
Thanks for the update. I will be keeping an on the project and will be willing to print out a board and test.
For the board will you be going with TH (through hole) components?
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 11 Mar 2023 09:26
by dad664npc
Been a while.
Busy getting PiStorm working on the ATARI.
Attempt three works YAY! Over the next few days, I will update GitHub.
New-HDC.jpg
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 11 Mar 2023 10:13
by Cyprian
nice project
Re: Raspberry PI PICO ATARI ST Hard Drive Emulator (WIP)
Posted: 13 Mar 2023 18:36
by jfceklosky
Nice to see the progress. I am very interested in building one of these up!
I would also be willing to work on a TH design based on your original board.