Jump to content
IGNORED

#FujiNet - a WIP SIO Network Adapter for the Atari 8-bit


tschak909

Recommended Posts

For any ESP/Arduino hackers who want to help:

 

Simple task:

We want to use OTA for firmware updates (of course), it would be helpful to take a look at tests/esp32/multilator and to adapt it for OTA use.

 

Not So Simple task: ( @ivop ? ) :)

Try to see if we can do an OTA firmware upgrade from an Arduino firmware, to any Arduino Firmware written in ESP32-IDF (or ESP8266-RTOS, which is the same thing)

 

-Thom

Link to comment
Share on other sites

Also, can somebody write a better Diskulator? The current Diskulator is here:

https://github.com/FujiNetWIFI/atariwifi/tree/master/esp32/tests/multilator/atari

 

The list of active commands is here:

https://github.com/FujiNetWIFI/atariwifi/wiki/SIO-Commands-for-Device-ID-%2470

 

 

You can see the overall flow of how to send commands to FujiNet, to do things like:

 

* Configure the desired WiFi network

* Get a phone book of TNFS hosts

* Write an entry into TNFS hosts

* Mount a TNFS Server

* Read TNFS directory

* Read device slots and what's assigned to them

* Mount an ATR image from TNFS into a device slot

 

and even things like

 

* how to use player/missile graphics to make a long text-sized colored bar for selection

 

All of these things follow the same basic pattern:

 

* Get the needed parameters

* Fill those out in the DCB

* call SIOV.

 

the multilator is also a case study in how to make a boot disk from a CC65 binary (the very hacky way of removing the standard binary file headers and segments, and adding a boot loader header at the beginning of crt0.s)

 

It is, at the end of the day, an example. I used CC65 because I am comfortable with it.

 

If you want to do one in assembler, go ahead. please do. More examples for everyone.

 

If you wanna do it in ACTION! ? sure. again, same premise?

 

BASIC? Yes, it will work there too.

 

I'm asking because I need to continue mapping out features and functionality, and I want to get more people involved in writing something better than I can. :)

 

 

Edited by tschak909
  • Like 1
Link to comment
Share on other sites

#FujiNet with High Speed SIO! Shown here is my Atari 1200XL with a Fujinet (ESP32 version) attached and booting into a MicroSpartaDOS menu full of games, and doing so at US Doubler speed (POKEY Divisor $0A which is 52640 baud) still a lot to do, but it works!

 

 

Hope everybody is having a great holiday!

  • Like 7
Link to comment
Share on other sites

sigh.

too early.

 

Trust me, given the frequency and the reasons for which I post updates, when that exists, it will happen.

 

For R: and N: this is compounded by the fact that these R: and N: drivers will need a custom SIOV, which I do not know how to write yet, so until I can, or until someone else takes up that mantle... :)

 

Which again, This is an open project, if you want a feature, please, dive in and help. The scope of what I am needing to do is massive!

 

-Thom

  • Like 2
Link to comment
Share on other sites

Just spent the last day and a half implementing and trying to debug ATX based on code in the SDrive-Max...

 

Output is from Wayout.atx ...

 

This...is gonna take some time. urgh. 

 

-Thom

#FujiNet ATX
CMD DEVC: 31
CMD CMND: 53
CMD AUX1: 0
CMD AUX2: 0
CMD CKSM: 84, ACK
CMD DEVC: 31
CMD CMND: 52
CMD AUX1: 1
CMD AUX2: 0
CMD CKSM: 84, ACK
atx_read();
Status now 10
Bytes per sector now: 128
Drive Request delay. 3.22ms
atxCurrentHeadTrack != tgtTrackNumber. (0, 1)
Track stepping done.
read track header @:48
Read Track header. Track has 18 sectors.
Track header is 32 bytes.
Retries left 4
Sector #0 - seeking to 88
Read sector header, status 0, timev 273
Proceeding forward, currentFileOffset now: 96Sector #1 - seeking to 96
Read sector header, status 0, timev 1639
Proceeding forward, currentFileOffset now: 104Sector #2 - seeking to 104
Read sector header, status 0, timev 3009
Proceeding forward, currentFileOffset now: 112Sector #3 - seeking to 112
Read sector header, status 0, timev 4375
Proceeding forward, currentFileOffset now: 120Sector #4 - seeking to 120
Read sector header, status 0, timev 5746
Proceeding forward, currentFileOffset now: 128Sector #5 - seeking to 128
Read sector header, status 0, timev 7118
Proceeding forward, currentFileOffset now: 136Sector #6 - seeking to 136
Read sector header, status 0, timev 8486
Proceeding forward, currentFileOffset now: 144Sector #7 - seeking to 144
Read sector header, status 0, timev 9859
Proceeding forward, currentFileOffset now: 152Sector #8 - seeking to 152
Read sector header, status 0, timev 11226
Proceeding forward, currentFileOffset now: 160Sector #9 - seeking to 160
Read sector header, status 0, timev 12592
Proceeding forward, currentFileOffset now: 168Sector #10 - seeking to 168
Read sector header, status 0, timev 13960
Proceeding forward, currentFileOffset now: 176Sector #11 - seeking to 176
Read sector header, status 0, timev 15326
Proceeding forward, currentFileOffset now: 184Sector #12 - seeking to 184
Read sector header, status 0, timev 16697
Proceeding forward, currentFileOffset now: 192Sector #13 - seeking to 192
Read sector header, status 0, timev 18063
tt: 15415
atxLastAngle now: 18063tgtSectorIndex: 13, tgtSectorOffset: 1856Proceeding forward, currentFileOffset now: 200Sector #14 - seeking to 200
Read sector header, status 0, timev 19428
Proceeding forward, currentFileOffset now: 208Sector #15 - seeking to 208
Read sector header, status 0, timev 20796
Proceeding forward, currentFileOffset now: 216Sector #16 - seeking to 216
Read sector header, status 0, timev 22160
Proceeding forward, currentFileOffset now: 224Sector #17 - seeking to 224
Read sector header, status 0, timev 23529
Proceeding forward, currentFileOffset now: 232We're good, no need to retry.
Sector data follows:
00 01 00 06 00 10 a9 52 8d 02 03 a9 01 8d 01 03 a9 00 8d 0b 03 a9 13 8d 0a 03 a9 00 8d 04 03 a9 80 8d 05 03 20 53 e4 10 39 a9 00 8d 0b 03 a9 25 8d 0a 03 a9 00 8d 04 03 a9 10 8d 05 03 20 53 e4 30 20 ad 0a 03 c9 a4 f0 17 ee 0a 03 ad 04 03 18 69 80 8d 04 03 ad 05 03 69 00 8d 05 03 4c 3d 06 18 60 a0 65 a9 00 99 00 06 88 10 fa 38 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Rotational delay is now 15415
Waiting for next angular position 19271
Status returned as: ff, num bytes: 128
reqSec: 1, sector_size 128, statusByte: ff
00 01 00 06 00 10 a9 52 8d 02 03 a9 01 8d 01 03 a9 00 8d 0b 03 a9 13 8d 0a 03 a9 00 8d 04 03 a9 80 8d 05 03 20 53 e4 10 39 a9 00 8d 0b 03 a9 25 8d 0a 03 a9 00 8d 04 03 a9 10 8d 05 03 20 53 e4 30 20 ad 0a 03 c9 a4 f0 17 ee 0a 03 ad 04 03 18 69 80 8d 04 03 ad 05 03 69 00 8d 05 03 4c 3d 06 18 60 a0 65 a9 00 99 00 06 88 10 fa 38 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CMD DEVC: 31
CMD CMND: 52
CMD AUX1: 13
CMD AUX2: 0
CMD CKSM: 96, ACK
atx_read();
Status now 10
Bytes per sector now: 128
Drive Request delay. 3.22ms
Status returned as: ef, num bytes: 0
reqSec: 19, sector_size 128, statusByte: ef

CMD DEVC: 31
CMD CMND: 52
CMD AUX1: 1
CMD AUX2: 0
CMD CKSM: 84, ACK
atx_read();
Status now 10
Bytes per sector now: 128
Drive Request delay. 3.22ms
Status returned as: ef, num bytes: 0
reqSec: 1, sector_size 128, statusByte: ef

CMD DEVC: 31
CMD CMND: 52
CMD AUX1: 13
CMD AUX2: 0
CMD CKSM: 96, ACK
atx_read();
Status now 10
Bytes per sector now: 128
Drive Request delay. 3.22ms
Status returned as: ef, num bytes: 0
reqSec: 19, sector_size 128, statusByte: ef

CMD DEVC: 31
CMD CMND: 52
CMD AUX1: 1
CMD AUX2: 0
CMD CKSM: 84, ACK
atx_read();
Status now 10
Bytes per sector now: 128
Drive Request delay. 3.22ms
Status returned as: ef, num bytes: 0
reqSec: 1, sector_size 128, statusByte: ef

 

Link to comment
Share on other sites

Hey guys, it's the end of the year. Hope everyone's had a good one!

 

I've recorded this #FujiNet video to show the reliability performance improvements that have been made in Multilator over the last week, which are fantastic even over links to cloud hosts!

 

In this video, we copy a disk image TO a real Atari 1050 disk, AS WELL as to another disk image, on ANOTHER cloud host, and boot them!

 

 

 

 

  • Like 3
Link to comment
Share on other sites

in tests/multilator, go to sio_high_speed:

set the pokey divisor,

 

then add a call to update the baud rate at the bottom of the sketch, e.g.

 


SIO_UART.updateBaudRate(52640); // for pokey divisor A.

 

Keep in mind, I am not flipping back and forth in the current code, this will cause problems.

 

You'll also want to use the latest 8266 board support (2.6.3), as updateBaudRate is a new function.

 

-Thom

Edited by tschak909
Link to comment
Share on other sites

On 12/27/2019 at 7:41 PM, Kyle22 said:

Nice! How about high speed R: and N: Handler?

 

Last night I was able to use the Express cart to call your BBS using the fujunet board, but at 19200 baud it looses data, not sure if a ring / circular buffer would help or not.  One solution might be an accellerated E: handler?

 

Also, can you update my account on your BBS? Guess I haven't called enough :)

 

Link to comment
Share on other sites

Guys, Here's a bit of code to wet your appetite :)  This will help you in getting rid of that state machine...

 


void Handle_SIO() {
  byte nDev   = 0;
  byte nCmd   = 0;
  byte Aux1   = 0;
  byte Aux2   = 0;
  byte ChkSum = 0;
  int  nRtn   = 0;

  if (SerSIO.available() > 0) {
    nRtn = SerSIO.readBytes(&SIO_CmdFrame, 5);
    if (nRtn == 5) {
      long time = micros();

      // Wait For COMMAND to go HIGH
      while ((digitalRead(CMD_PIN) == LOW) && ((micros() - time) < 600)) {
        yield();
      }
      SIO_CmdLineLow = false;

      //InvertBuffer(&SIO_CmdFrame, 4)
      ChkSum = Calc_SIO_Checksum(SIO_CmdFrame, 4);
      if (ChkSum != SIO_CmdFrame[4]) {
        return;
      }

      nDev = SIO_CmdFrame[0];
      nCmd = SIO_CmdFrame[1];
      Aux1 = SIO_CmdFrame[2];
      Aux2 = SIO_CmdFrame[3];
      SerBUG.print("SIO_CmdFrame -> ");
      SerBUG.print(nDev, HEX);
      SerBUG.print(",");
      SerBUG.print(nCmd, HEX);
      SerBUG.print(",");
      SerBUG.print(Aux1, HEX);
      SerBUG.print(",");
      SerBUG.print(Aux2, HEX);
      SerBUG.print(",");
      SerBUG.print(R_Dev.BootFlg, HEX);
      SerBUG.print(",");
      SerBUG.println(R_Dev.PollCnt, HEX);

      if (nCmd == '?') { // POLL COMMAND?
        Process_RDev_GetBootParms(Aux1, Aux2); // (Type 1/2 Poll command)
      } else {
        R_Dev.PollCnt = 26;

        if ((R_Dev.BootFlg != 0xFF) && (nDev == 0x31)) {
          //SerBUG.println("DDev");
          switch (nCmd) {
            case 'S': // $53 Get PSEUDO DISK STATUS
              Process_DDev_Status(Aux1, Aux2);
              break;
            case 'R': // $52 Get Byte(s)
              Process_DDev_Read(Aux1, Aux2);
              break;
            default:
              R_Dev.BootFlg = 0;   // Set Boot Flag Minus
              Send_SIO_Response(NAK); // Issue a (N)ak Response
              break;
          }
          return;
        }
      }

      switch (nDev) {
        case 0x50: // R1:
        case 0x51: // R2:
        case 0x52: // R3:
        case 0x53: // R4:
          Process_R_Dev(nDev, nCmd, Aux1, Aux2);
          break;
        case 0x58: // W1: WiFi Modem
          Process_W_Dev(nDev, nCmd, Aux1, Aux2);
          break;
        case 0x70: // N1: Network Device (TNFS)
          Process_N_Dev(nDev, nCmd, Aux1, Aux2);
          break;
        default:
          break;
      }
    } else {  // Error Occured
      if (nRtn < 1) {
        // Serial Error
      } else {
        // Less Than 5 Bytes Received
      }
    }
  } else {
    if (R_Dev.Concurrent) {     // Drop Out of Concurrent Mode
      R_Dev.Concurrent = false;
    }
  }
}

 

  • Like 1
Link to comment
Share on other sites

On 12/25/2019 at 11:59 AM, tschak909 said:

Part of the work I am planning to do outside of the "D:" emulation, focuses on the following aspects:

 

* Creating a new N: device for TCP and UDP communication

* Creating an R: device that actually implements a proper device, instead of just dumping into R-Verter mode.

 

-Thom

 

I'll post my source code after you do this :)

Edited by AtariGeezer
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...