tschak909 Posted January 3, 2020 Author Share Posted January 3, 2020 Awesome, will try shortly. Meanwhile, I am going back to basics, to see just how tight I can make SIO processing on the ESP32, starting over from scratch. I'll upload the test shortly. -Thom Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4423708 Share on other sites More sharing options...
tschak909 Posted January 3, 2020 Author Share Posted January 3, 2020 Ok, so here's test #30, re-thinking command processing, notice no interrupt. let's see if I can make this translate into faster beeps for read in the next test. $ cat scratch30.ino /** Test #30 - start over. */ #ifdef ESP8266 #define SIO_UART Serial #define BUG_UART Serial1 #define PIN_LED 2 #define PIN_INT 5 #define PIN_PROC 4 #define PIN_MTR 16 #define PIN_CMD 12 #endif #ifdef ESP32 #define SIO_UART Serial2 #define BUG_UART Serial #define PIN_LED1 2 #define PIN_LED2 4 #define PIN_INT 26 #define PIN_PROC 22 #define PIN_MTR 33 #define PIN_CMD 21 #endif /** A Single command frame, both in structured and unstructured form. */ union { struct { unsigned char devic; unsigned char comnd; unsigned char aux1; unsigned char aux2; unsigned char cksum; }; byte cmdFrameData[5]; } cmdFrame; /** Setup */ void setup() { SIO_UART.begin(19200); SIO_UART.setTimeout(5); // this seems to be absolute minimum value BUG_UART.begin(115200); // Set up pins pinMode(PIN_INT, OUTPUT); // thanks AtariGeezer digitalWrite(PIN_INT, HIGH); pinMode(PIN_PROC, OUTPUT); // thanks AtariGeezer digitalWrite(PIN_PROC, HIGH); pinMode(PIN_MTR, INPUT); pinMode(PIN_CMD, INPUT); #ifdef ESP8266 pinMode(PIN_LED, INPUT); digitalWrite(PIN_LED, HIGH); // off #elif defined(ESP32) pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED2, OUTPUT); digitalWrite(PIN_LED1, HIGH); // off digitalWrite(PIN_LED2, HIGH); // off #endif BUG_UART.printf("Test #30 - scratch\n"); } /** Loop */ void loop() { int a; if (digitalRead(PIN_CMD) == LOW) { delayMicroseconds(650); // computer is waiting for us to notice. // read cmd frame SIO_UART.readBytes(cmdFrame.cmdFrameData, 5); BUG_UART.printf("CMD DEVIC: %02x\nCMD COMND: %02x\nCMD AUX1: %02x\nCMD AUX2: %02x\nCMD CKSUM: %02x\n\n",cmdFrame.devic,cmdFrame.comnd,cmdFrame.aux1,cmdFrame.aux2,cmdFrame.cksum); while (digitalRead(PIN_CMD)==LOW) yield(); BUG_UART.printf("CMD HI\n\n"); } else { a = SIO_UART.available(); if (a) { BUG_UART.printf("%d excess bytes.\n", a); while (SIO_UART.available()) { BUG_UART.printf("."); SIO_UART.read(); // dump it. } BUG_UART.printf("\n\n"); } } } Which produces the following debug output: Test #30 - scratch CMD DEVIC: 00 CMD COMND: 00 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 00 CMD HI 2 excess bytes. .. 1 excess bytes. . CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 31 CMD COMND: 53 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 84 CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 4f CMD AUX2: 4f CMD CKSUM: 2e CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI CMD DEVIC: 4f CMD COMND: 40 CMD AUX1: 00 CMD AUX2: 00 CMD CKSUM: 8f CMD HI Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4423748 Share on other sites More sharing options...
tschak909 Posted January 3, 2020 Author Share Posted January 3, 2020 So with that, in hand, and adding just enough for booting a floppy, I get the following code: /** Test #31 - start over. add read. */ #ifdef ESP32 #include <SPI.h> #include <SPIFFS.h> #endif #include <FS.h> #include <driver/uart.h> #ifdef ESP8266 #define SIO_UART Serial #define BUG_UART Serial1 #define PIN_LED 2 #define PIN_INT 5 #define PIN_PROC 4 #define PIN_MTR 16 #define PIN_CMD 12 #endif #ifdef ESP32 #define SIO_UART Serial2 #define BUG_UART Serial #define PIN_LED1 2 #define PIN_LED2 4 #define PIN_INT 26 #define PIN_PROC 22 #define PIN_MTR 33 #define PIN_CMD 21 #endif /** A Single command frame, both in structured and unstructured form. */ union { struct { unsigned char devic; unsigned char comnd; unsigned char aux1; unsigned char aux2; unsigned char cksum; }; byte cmdFrameData[5]; } cmdFrame; File atr; /** * Calculate offset into ATR file from desired sector */ unsigned long atr_sector_to_offset(unsigned short s) { return (unsigned long)(((s*128)-128)+16); } /** calculate 8-bit checksum. */ byte sio_checksum(byte* chunk, int length) { int chkSum = 0; for (int i = 0; i < length; i++) { chkSum = ((chkSum + chunk[i]) >> 8) + ((chkSum + chunk[i]) & 0xff); } return (byte)chkSum; } /** * sio NAK */ void sio_nak() { SIO_UART.write('N'); } /** * sio ACK */ void sio_ack() { SIO_UART.write('A'); } /** * sio COMPLETE */ void sio_complete() { SIO_UART.write('C'); SIO_UART.flush(); } /** * sio ERROR */ void sio_error() { SIO_UART.write('E'); } /** * sio READ from PERIPHERAL to COMPUTER */ void sio_read(byte* b, unsigned short len) { byte ck=sio_checksum(b,len); // delayMicroseconds(250); // For now, we assume command completes sio_complete(); // Write data frame. SIO_UART.write(b,len); // Write checksum SIO_UART.write(ck); } /** * SIO process drive status */ void sio_process_drive_status() { byte status[4]={0x10,0xFF,0xFE,0x00}; sio_read(status,sizeof(status)); } /** * sio_process_drive_read() */ void sio_process_drive_read() { byte sector[128]; atr.read(sector,128); sio_read(sector,128); } /** * Process drive */ void sio_process_drive() { unsigned short sector=(cmdFrame.aux2<<8)+cmdFrame.aux1; unsigned long offset=atr_sector_to_offset(sector); if (sio_checksum(cmdFrame.cmdFrameData,4)!=cmdFrame.cksum) { sio_nak(); return; } else if (sector>720) { sio_nak(); return; } else sio_ack(); // Seek to desired position atr.seek(offset,SeekSet); switch(cmdFrame.comnd) { case 'R': sio_process_drive_read(); break; case 'S': sio_process_drive_status(); break; } } /** Setup */ void setup() { SIO_UART.begin(19200); SIO_UART.setTimeout(8); // Set up pins pinMode(PIN_INT, OUTPUT); // thanks AtariGeezer digitalWrite(PIN_INT, HIGH); pinMode(PIN_PROC, OUTPUT); // thanks AtariGeezer digitalWrite(PIN_PROC, HIGH); pinMode(PIN_MTR, INPUT); pinMode(PIN_CMD, INPUT); #ifdef ESP8266 pinMode(PIN_LED, INPUT); digitalWrite(PIN_LED, HIGH); // off #elif defined(ESP32) pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED2, OUTPUT); digitalWrite(PIN_LED1, HIGH); // off digitalWrite(PIN_LED2, HIGH); // off #endif SPIFFS.begin(); atr=SPIFFS.open("/autorun.atr","r+"); } /** Loop */ void loop() { int a; if (digitalRead(PIN_CMD) == LOW) { memset(cmdFrame.cmdFrameData,0,5); // clear cmd frame. // delayMicroseconds(250); // computer is waiting for us to notice. // read cmd frame SIO_UART.readBytes(cmdFrame.cmdFrameData, 5); while (digitalRead(PIN_CMD) == LOW) yield(); if (cmdFrame.devic==0x31) sio_process_drive(); } else { a = SIO_UART.available(); if (a) { while (SIO_UART.available()) { SIO_UART.read(); // dump it. } } } } This produces the following load performance, ESP8266 is still significantly faster: Some things learned ESP32 is being bit in the arse by a transmission idle being imposed after EVERY TX FIFO clear! ARGH! Serial.flush() absolutely hammers this to oblivion by imposing an ADDITIONAL DELAY of SAME VALUE on TOP OF THE EXTANT TX IDLE DELAY, so it was slowing down performance even mode SIO performance is still not where I want it. Next step is just to handle the UART ourselves and to hell with Arduino's HardwareSerial object and Espressif's binding of it. 3 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4423818 Share on other sites More sharing options...
tschak909 Posted January 4, 2020 Author Share Posted January 4, 2020 @jeffpiep has been doing amazing work on the Printer (P:) emulation, and it is now emitting output from the Atari. Here is a document that was written in AtariWriter, using the 1027 emulation! Output is attached as well. memory.pdf 11 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424360 Share on other sites More sharing options...
Bee Posted January 4, 2020 Share Posted January 4, 2020 FWW - I've ordered a a ESP8266 that matches the document - https://www.amazon.com/gp/product/B081CSJV2V?pf_rd_p=ab873d20-a0ca-439b-ac45-cd78f07a84d8&pf_rd_r=R87B5M39SYKAXV9QEWA8 And will work on a SIO Break Out Board soon. I should be able to help with testing at the least in the next week. I will like likely set up a Pi3 with VNC and the Arduino IDE so it can all go in a case , or inside the Atari and update remotely, maybe even script it to look at boot up for updated code and archive the current version and update before execution. As stated elsewhere I know enough to be dangerous. - LOL Thank you Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424413 Share on other sites More sharing options...
tschak909 Posted January 4, 2020 Author Share Posted January 4, 2020 that's a good thing, and that's exactly why this project is compulsively public. -Thom 1 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424419 Share on other sites More sharing options...
E474 Posted January 4, 2020 Share Posted January 4, 2020 Hi, I am not a hardware hacker, but I have been looking to get an ESP-32 from AliExpress. I don't mind the wait for shipping, and I have found this unit (among others) : https://www.aliexpress.com/item/4000079648503.html When I look in the FujiNet Google doc description for the ESP-32 board, the pins are listed for GPIO pins, but I know that on the Raspberry Pi the GPIO pin numbers don't actually correspond with the real pin numbers. When I have a look at the original board on Amazon: https://www.amazon.com/Espressif-Genuine-ESP32-DEVKITC-ESP-WROOM-32-soldered/dp/B01N0SB08Q The pins are labelled (on the original, and on the AliExpress clone), as: 5V, CMD, D3, D2, 13, GND, 12, 14, 27, 26, 25, 33, 32, 35, 34, VN, VP, EN, 3V3 [microUSB socket] CLK, D0, D1, 15, 2, 0, 4, 16, 17, 5, 18, 19, GND, 21, RX, TX, 22, 23, GND I'm assuming the AliExpress board should be good to go, but can anyone who has already got an ESP-32 board up and running with the FujiNet code confirm that this board should also be OK? Once I get the ESP-32, I'm planning on bread-boarding the interface to the SIO connector, unless someone has uploaded the Gerber files in the meantime. Any help would be appreciated! Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424621 Share on other sites More sharing options...
tschak909 Posted January 5, 2020 Author Share Posted January 5, 2020 #FujiNet @mozzwald has been hard at work implementing an R: device! It provides an 850 compatible interface with a WiFi modem attached that responds to baud rate and config commands from SIO! Amazing! (The test is in tests/modem850 in GitHub repo) 8 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424667 Share on other sites More sharing options...
mozzwald Posted January 5, 2020 Share Posted January 5, 2020 4 hours ago, E474 said: I am not a hardware hacker, but I have been looking to get an ESP-32 from AliExpress. I don't mind the wait for shipping, and I have found this unit (among others) : https://www.aliexpress.com/item/4000079648503.html When I look in the FujiNet Google doc description for the ESP-32 board, the pins are listed for GPIO pins, but I know that on the Raspberry Pi the GPIO pin numbers don't actually correspond with the real pin numbers. When I have a look at the original board on Amazon: https://www.amazon.com/Espressif-Genuine-ESP32-DEVKITC-ESP-WROOM-32-soldered/dp/B01N0SB08Q I'm assuming the AliExpress board should be good to go, but can anyone who has already got an ESP-32 board up and running with the FujiNet code confirm that this board should also be OK? The pinout for ESP32-DEVKITC is available in a nice picture at this site: https://components101.com/microcontrollers/esp32-devkitc and in the spreadsheet. The numbers on the pcb are the actual GPIO's (except the ones labeled as Dx or SVx or SDx). So, either of those boards should work Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424816 Share on other sites More sharing options...
E474 Posted January 5, 2020 Share Posted January 5, 2020 Hi, Thanks very much, I'll order the board. Btw, the spreadsheet sheet for the ESP-32 doesn't show the pin labels, only the GPIO numbers, etc. Can the (excellent) pictures (both of them) from the components101 web page be added to the Google doc? Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4424864 Share on other sites More sharing options...
Dropcheck Posted January 5, 2020 Share Posted January 5, 2020 19 hours ago, tschak909 said: @jeffpiep has been doing amazing work on the Printer (P:) emulation, and it is now emitting output from the Atari. Here is a document that was written in AtariWriter, using the 1027 emulation! Output is attached as well. memory.pdf 7.73 kB · 4 downloads So is this being printed on a network attached modern printer? Or is it just being sent to a pdf file? Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425043 Share on other sites More sharing options...
mozzwald Posted January 5, 2020 Share Posted January 5, 2020 13 minutes ago, Dropcheck said: So is this being printed on a network attached modern printer? Or is it just being sent to a pdf file? FujiNet is creating a PDF file which you can download and then print on a modern printer. 1 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425051 Share on other sites More sharing options...
Mr Robot Posted January 5, 2020 Share Posted January 5, 2020 3 hours ago, mozzwald said: FujiNet is creating a PDF file which you can download and then print on a modern printer. At the moment 1 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425152 Share on other sites More sharing options...
Bee Posted January 5, 2020 Share Posted January 5, 2020 Just a thought, I probably am one for very few that would want to disable the R handler. The P handler is something I asked for in a diffrent thread. It would be nice if there was an option to fully disable R. Why would you do this? For security. One of the reasons I decided to Re-Boot my Atari is because I can store information on it and unless you can get physical access it's a secure system. I will dedicate a system for online use. The ability to use P alone would be important to me on other systems. I hope this input is helpful. Thank you Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425220 Share on other sites More sharing options...
tschak909 Posted January 5, 2020 Author Share Posted January 5, 2020 Understood, thankfully, this is not an issue. The R: and N: handlers must be explicitly loaded, either by a type 1 poll (AUTORUN.SYS) or via an explcitly loaded handler. They are not part of the OS ROM, nor are they loaded by the FMS of most disks. -Thom 3 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425310 Share on other sites More sharing options...
Bee Posted January 6, 2020 Share Posted January 6, 2020 Not having the ISO mounting board I'm building a breakout board. To that end, I've come up with a IDC 14 layout with a protective key - Labeled in Hex. The top row ends in "ack". Any thoughts ? Thank you Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425461 Share on other sites More sharing options...
tschak909 Posted January 6, 2020 Author Share Posted January 6, 2020 the next long stretch of time will be defined by adjusting these 6 timing values, which occur at different points along each and every #Atari SIO transaction. If you have insight, or can help get tests/esp32/multilator-rev2 working best, please help. Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425612 Share on other sites More sharing options...
tschak909 Posted January 6, 2020 Author Share Posted January 6, 2020 Since I am knee deep in timing issues... If anyone wants to help, please implement PERCOM block read/write to esp32/tests/multilator-rev2 Example data structure from one of my other programs: typedef struct _PercomBlock { unsigned char num_tracks; unsigned char step_rate; unsigned short sectors_per_track; unsigned char num_sides; unsigned char density; unsigned short sector_size; unsigned char drive_present; unsigned char reserved1; unsigned char reserved2; unsigned char reserved3; } PercomBlock; Write, of course, just write the percom block to the data structure. Read, of course, just read the percom block to the data structure. When doing a mount of a disk image (look for a call to tnfs_open()), update the percom block with data pulled from the ATR. The data structure of the percom block is described in the Altirra Hardware Reference Manual, page 188: http://www.virtualdub.org/downloads/Altirra Hardware Reference Manual.pdf Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4425946 Share on other sites More sharing options...
tschak909 Posted January 7, 2020 Author Share Posted January 7, 2020 @flashjazzcat meanwhile, SDX _REALLY_ doesn't like FujiNet, at all. I suspect I'm responding to something sideways. -Thom Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426260 Share on other sites More sharing options...
tschak909 Posted January 7, 2020 Author Share Posted January 7, 2020 (edited) Am wondering what's tripping this guy up. SIO acceleration in Altirra doesn't break it, so can't be drive timing... Tried looking at DVSTAT during the load process and didn't see anything odd... ...is it literally the zero timeout for read sectors in the middle of the loader? -Thom Pinball Construction Set.atr Edited January 7, 2020 by tschak909 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426293 Share on other sites More sharing options...
flashjazzcat Posted January 7, 2020 Share Posted January 7, 2020 5 hours ago, tschak909 said: @flashjazzcat meanwhile, SDX _REALLY_ doesn't like FujiNet, at all. I suspect I'm responding to something sideways. Are you asking me a specific question? Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426409 Share on other sites More sharing options...
tschak909 Posted January 7, 2020 Author Share Posted January 7, 2020 @flashjazzcat Not yet, but we do need to get you a unit. It's a bit bizarre. -Thom 1 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426568 Share on other sites More sharing options...
manterola Posted January 7, 2020 Share Posted January 7, 2020 (edited) Maybe unrelated, but the response to the drive status looks a bit awkward to me, but it may be causing some hiccups perhaps... byte status[4]={0x10,0xFF,0xFE,0x00}; Instead, sio2linux starts with 0x10, 0x00, 0x01, 0x00 and then it changes the response if disk is Read only or if the disk geometry is different: static unsigned char status[] = { 0x10, 0x00, 1, 0 }; status[0]=(disks[disk].secsize==128?0x10:0x60); if (disks[disk].secsize==128 && disks[disk].seccount>720) status[0]=0x80; if (disks[disk].ro) { status[0] |= 8; } else { status[0] &= ~8; } Interestingly, bits 5, 6 and 7 are not mentioned in the Altirra HW ref manual (Or I missed that part). sio2linux code has this comment, an extract from Bob Wolley post in the usenet news: * Bob Woolley wrote on comp.sys.atari.8bit: * * at your end of the process, the bytes are * CMD status, H/W status, Timeout and unused. * CMD is the $2EA value previously * memtioned. Bit 7 indicates an ED disk. Bits * 6 and 5 ($6x) indicate DD. Bit 3 indicates * write protected. Bits 0-2 indicate different * error conditions. H/W is the FDD controller * chip status. Timeout is the device timeout * value for CIO to use if it wants. * * So, I expect you want to send a $60 as the * first byte if you want the OS to think you * are in DD. OK? Edit: this is what is done in RespeQt: void SimpleDiskImage::getStatus(QByteArray &status) { status[0] = m_isReadOnly * 8 | (m_newGeometry.bytesPerSector() == 256) * 32 | (m_newGeometry.bytesPerSector() == 128 && m_newGeometry.sectorsPerTrack() == 26) * 128; status[1] = 0xFF; status[2] = 0xE0; // Timeout for format ($E0) - Time the drive will need to format a disk (1050 returns 0xe0, XF551 0xfe) status[3] = 0; } Edited January 7, 2020 by manterola Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426593 Share on other sites More sharing options...
E474 Posted January 7, 2020 Share Posted January 7, 2020 (edited) Hi, The bits are listed in the Status column of Table 29 (but you have to infer them). Table 26 is for 810 functionality only, though IMHO opinion Table 26 would be more useful if it included these bits with a note saying only used in drives "better" than a stock 810. The Enhanced density bit is mentioned in the paragraph on page 189 or 190 (from memory). Edited January 7, 2020 by E474 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426601 Share on other sites More sharing options...
tschak909 Posted January 7, 2020 Author Share Posted January 7, 2020 @jeffpiep latest additions to P: emulation add support for the #Atari 1027 Printer International character set, and with that, the 1027 tests on the #Atari CPS Diagnostic disk now pass. Awesome! 3 Quote Link to comment https://forums.atariage.com/topic/298720-fujinet-a-wip-sio-network-adapter-for-the-atari-8-bit/page/12/#findComment-4426873 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.