Jump to content
tschak909

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

Recommended Posts

A rather simple solution that should cover a lot of cases is using a (configurable) timeout. This is how I implemented the printer backend in AtariSIO some time ago. I used a rather simple approach: if there was no SIO activity for 15 seconds it'd flush out the printer data.

 

Sure, that won't cover every situation but it worked really nicely for the stuff I mainly did (like sending program listings to the printer).

 

so long,

 

Hias

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Exactly,and in addition, it can act just like and old serial or parallel printer buffer. The solutions Hias provided sound quite workable. This take us one step closer to Atari independence using FujiNet...Atari can connect and interface with the world and rely on itself with the FujiNet device to do it without any intermediaries involved. This is exactly the direction I was hoping it would go. One less set of boxes on my desktop. This is one more step to make the Fujinet THE device to have.

 

So finally some of this can go away!

 

image.jpg

image.jpg

Edited by _The Doctor__
And this also while we’re at it :

Share this post


Link to post
Share on other sites

Success! Just done up on a breadboard for now, and I used some 5v-3.3v level shifters...

 

Which brings the question, the ESP32 isn't 5v tolerant... Are the 470 ohm resistors enough to limit the current so it doesn't damage things?

 

IMG_0669.jpg

  • Like 3

Share this post


Link to post
Share on other sites

@mozzwald ? :)

 

@MrMartian the canonical bring-up test is to mount fujinet.online and select jumpman.atr (as this was the first disk to successfully boot over the internet) :)

 

-Thom

Share this post


Link to post
Share on other sites
25 minutes ago, MrMartian said:

Success! Just done up on a breadboard for now, and I used some 5v-3.3v level shifters...

 

Which brings the question, the ESP32 isn't 5v tolerant... Are the 470 ohm resistors enough to limit the current so it doesn't damage things?

Awesome!

 

The ESP32 IS 5V tolerant on the GPIO pins but NOT the power input (this is not documented in the datasheet, but confirmed by the CEO of Espressif). The resistors are there for current limit.

  • Like 4

Share this post


Link to post
Share on other sites
13 hours ago, mozzwald said:

The ESP32 IS 5V tolerant on the GPIO pins but NOT the power input (this is not documented in the datasheet, but confirmed by the CEO of Espressif). The resistors are there for current limit.

 

I wish more people would actually state this, as I think it would help adoption of people integrating these things into retro projects.. I still prefer to use Atmel CPLDs in anything I do because they are 5v devices.

  • Like 4

Share this post


Link to post
Share on other sites
Just now, MrMartian said:

 

I wish more people would actually state this, as I think it would help adoption of people integrating these things into retro projects.. I still prefer to use Atmel CPLDs in anything I do because they are 5v devices.

The 5V tolerance issue and the ESP devices is a continuing debate. Just try doing a search and you'll still find people saying it's not 5V tolerant and it's understandable why since the datasheet mentions nothing about this. I'm glad we did some research and found out. Even if it wasn't 5V tolerant, level shifting is easy enough to implement (the first FujiNet had lvl shifting) that it should be of no concern for retro projects.

Share this post


Link to post
Share on other sites

and I can say, after months of constant near 24/hr day use developing the firmware, it is indeed 5V tolerant.

 

-Thom

  • Like 3
  • Haha 1

Share this post


Link to post
Share on other sites

2020-05-03 STATUS: 

 

Have spent the last week biting the bullet and porting the prototype CIO handler which was written in C, and ported it to Assembler.

 

Given the unique debugging requirements (needing to debug a CIO handler), I opted to do this development natively, and used the following development environment:

 

* My 1200XL

* DOS XL 2.30

* Atari Macro Assembler (AMAC)

* ACTION! editor

* Amoeba, for debugging.

 

The result is a handler that is roughly half the code size of the C variant, and is slightly faster.

 

There is still a LOT to do to it,

 

it needs, for example, burst mode support.

 

but it's a good start.

 

I have posted the code into Github:

https://github.com/FujiNetWIFI/atariwifi/tree/master/n-handler/production

 

and have also attached it to this post, along with the most recent listing, for anyone who wants to see.

 

I have also attached the amac.atr, my development tools, which goes into D1:

and the source code, which goes into D2:

 

The resulting code can be assembled in AMAC, with the following invocation:

D2:NDEV.ASM,O=D2:NDEV.COM,L=P:,R=F

The listing and cross reference output (the same as seen in this post) can be omitted for much faster assembling.

 

For reference:

 

* The C code size, including static data, was 2,585 bytes.

* The assembler code size, is 975 bytes.

 

Both require an additional 2K for buffers.

 

Onward, and upward.

n-handler-asm-alpha-listing.pdf amac.atr n-asm.atr

  • Like 7

Share this post


Link to post
Share on other sites

P.S. If anyone wants to help make the assembler code suck less, have at it. I am NOT an expert, and am literally just trying to keep pushing things forward. :)

 

-Thom

  • Like 2

Share this post


Link to post
Share on other sites

#Atari8bit #FujiNet - Have spent the last week porting the CIO handler to assembler. A lot more to do, but wanted to put it through its paces through a few different DOSes, and programs to show its transparency. I just loaded a document into AtariWriter from HTTP :)

 

 

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

back to being very difficult to hear.... maxed out laptop volume and video volume and while everything else is failing me, my hearing isn't one of those things, the Atari noises are loud, but difficult to hear Mr. Thomas Cherryhomes

He's so quiet...

 

Much improved Fujinet! KUDOS!

 

The 10 Best Dogs in Science Fiction | Tor.com

Great Scott, he likes where this is going!

 

OSS A+ 4.10, Basic, load of 9.3 filename without issue... nice

Edited by _The Doctor__

Share this post


Link to post
Share on other sites

9.3?

What you smokin?

 

Share this post


Link to post
Share on other sites

can you not see he typed

BLACKJACK.BAS

123456789.123

and it did the long file name no issue at all...

  • Like 1

Share this post


Link to post
Share on other sites

Filename limitations don't come from CIO at all. For OPEN, all CIO sees is a buffer containing a device specification, which, since it has a 16-bit length value, can be quite large, and BASIC sends 128 byte records to CIO...

 

The more severe limitations come from the various user interfaces that different DOSes provide, e.g.:

 

* DOS 2's DUP: 8.3 + Nx:, so ostensibly 15 characters with a terminating EOL, or it complains that the filename is too long.

* OS/A+ 4 has a 32 character filename limit, while argument processing is basically limited to the size of the record retrieved upon input (128 chars)

* XDOS seems to taper off at a 35 character record

* SpartaDOS (pre-X) uses a 128 character record.

 

DOS 2.x has other strange quirks, such as:

 

'C'opy command sends the entire GET RECORD buffer for the SOURCE,DESTINATION specifications to both IOCB's, so I see something like: "N:FOO.OBJ,D1:FOO.OBJ" .. I kid you not. DOS 1 DOES NOT DO THIS.

 

MyDOS seems to truncate strings in odd cases, it wants to assume anything NOT "D:" can't possibly contain a filename, so when doing a copy:

N:BURIEDBU.COM,D1:BURIEDBU.COM, the destination becomes: D1:BUR

OS/A+ 2 and DOS XL's COPY command is chock full of weirdness:

COPY N:FMOUNT.DOC D1:FMOUNT.DOC ... the source file becomes N:FMOUNT.DO.C.

under OS/A+ 4.1, the COPY command can't handle filenames outside of 8.3,

 

SpartaDOS's CP does not contain the binary loader, it's in the FMS, which is only for "D:" devices, I will have to implement my own implementation of Special call $28 if I want to be able to load binary files from the N: device.

 

MyDOS fails to do binary load from N: device, quitting with an error 146 after several load attempts. I need to see what special command it is attempting.

 

it will take months to slog through all of this. 

 

-Thom

Share this post


Link to post
Share on other sites

mathy and his friend might help in the mydos department, they were fixing and enhancing it...

Share this post


Link to post
Share on other sites

Ok, looks like MyDOS has its own BINARY LOAD XIO seperate from SpartaDOS. shit.

 

-Thom

  • Like 1

Share this post


Link to post
Share on other sites

Hello guys

 

MyDOS uses XIO 39 or 40 IIRC.

 

It's been a while since I did some serious testing on (read: using) the Atari.  Maybe I should start using it some more.  Now if somebody could pack that Linux version of the TNFS server into a Synology package...

 

Sincerely

 

Mathy

 

PS No, I'm not talking about Thom.  He's got more than enough to do developing FujiNet software.

 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Yup, I'm hoping I can just jump right to that routine so I don't have to write my own damned loader to put into my handler.

-Thom

 

p.s. can somebody take the code I've done and use it as a guide for a SpartaDOS X driver? ;)

 

-Thom

Edited by tschak909
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

I think I'm going to have to dig around and figure out where I put the ESP32 I ordered...  but I did find my XM301, which I think would be PERFECT for this device to sit inside!

I'm an idiot and realized I ordered the wrong board!  Anyhow, gonna see if I can build one, as this looks too awesome to not play with.

Edited by leech
  • Like 2

Share this post


Link to post
Share on other sites

While I've been hard at work on the N: device, the rest of the team has also been doing awesome work!

 

@mozzwald brought his reflow oven out onto his bench to do the next run of what we hope will be one of the final spins of the #FujiNet board, based on the WROVER version of the ESP32 chip, with 8 megabytes of added PSRAM! :)

 

@jeffpiep has been hacking away on the printer emulations, currently working on the Atari 1025 output using a font that matches the character set (including the two unmentioned characters from the service manual):

fonts1025.pdf

 

@jamm has been doing incredible work in removing explicit Arduino dependencies in our code, replacing them with direct calls to ESP-IDF, so that we can realistically make the code smaller and more efficient, as well as take advantage of many bug-fixes in the underlying board toolkit that Espressif have done, that haven't made it to the Arduino bindings. Not to mention it gives a lot more access to the underlying IDF functionality, of which the Arduino toolkit does make easier to use, but at the expense of hiding a great deal of functionality that we'd like to use. This is critical work, and I'm glad he's taken this on and done such an awesome job! :)

 

@jamm also surprised us with an HTML printer output! This takes the ATASCII output, and creates an output HTML that can be shown, cut, pasted, etc in browser! Shown here is some example output from printing the TIC-TAC-TOE UDP example in BASIC. The extended character set isn't currently shown, but I have handed him a CSS file with an ATASCII font embedded (with a version in character order inside the font space), so that 1:1 printings of ATASCII to HTML are possible.

 

Some example output:

 

10 REM  TIC-TAC-TOE  FOR #FUJINET
20 REM AN EXAMPLE OF HOW TO IMPLEMENT
30 REM A GAME USING THE UDP PROTOCOL
40 REM AND THE N: DEVICE.
50 REM 
60 REM AUTHOR: THOMAS CHERRYHOMES
70 REM 
80 REM 
90 DIM B(9),YN$(16),ON$(16),H$(64),D$(64)
100 REM MAIN PROGRAM 
101 C=1:S=1:POKE 54018,61
110 REM START SCREEN
120 ? "":POSITION 9,1:? " #FUJINET TIC-TAC-TOE "
130 ? :? "ENTER YOUR NAME >";:INPUT #16,YN$
140 ? :? "ENTER HOSTNAME, OR  RETURN  TO LISTEN"
150 ? "> ";:INPUT #16,H$
160 IF H$="" THEN C=2:S=2
170 D$="N:UDP://":D$(LEN(D$)+1)=H$:D$(LEN(D$)+1)=":6502/"
180 OPEN #1,12,0,D$
181 ? :? "WAITING FOR OTHER PLAYER..."
182 PRINT #1;YN$
183 POKE 54018,61:STATUS #1,A:L=PEEK(746):IF L=0 THEN FOR X=1 TO 50:NEXT X:GOTO 182
184 INPUT #1,ON$
185 WINNER=0:FOR X=0 TO 8:B(X)=0:NEXT X
200 ? "":POSITION 9,1:? " #FUJINET TIC-TAC-TOE "
210 ? 
220 ? "               "
230 ? "               "
240 ? "  1    2    3  "
250 ? "               "
260 ? "               "
270 ? ""
280 ? "               "
290 ? "               "
300 ? "  4    5    6  "
310 ? "               "
320 ? "               "
330 ? ""
340 ? "               "
350 ? "               "
360 ? "  7    8    9  "
370 ? "               "
380 ? "               "
390 ? 
400 IF C=1 THEN POSITION 20,8:? " X  ";YN$:POSITION 20,9:? " O  ";ON$
410 IF C=2 THEN POSITION 20,8:? " X  ";ON$:POSITION 20,9:? " O  ";YN$
430 RESTORE 470:FOR N=0 TO 8:READ BX,BY:ON B(N) GOTO 440,450:GOTO 460
440 POSITION BX,BY:? "     "
441 POSITION BX,BY+1:? "     "
442 POSITION BX,BY+2:? "     "
443 POSITION BX,BY+3:? "     "
444 POSITION BX,BY+4:? "     "
445 GOTO 460
450 POSITION BX,BY:? "     "
451 POSITION BX,BY+1:? "     "
452 POSITION BX,BY+2:? "     "
453 POSITION BX,BY+3:? "     "
454 POSITION BX,BY+4:? "     "
455 GOTO 460
460 NEXT N
470 DATA 2,3,8,3,14,3,2,9,8,9,14,9,2,15,8,15,14,15
471 POSITION 2,21
472 GOSUB 700:IF WINNER<>0 THEN 800
473 IF S=2 THEN 520
480 ? "YOUR MOVE >> ";:INPUT #16,M
490 IF B(M-1)>0 THEN ? "ALREADY OCCUPIED.":FOR X=1 TO 200:NEXT X:? "":GOTO 480
500 B(M-1)=C
510 ? #1;B(0);",";B(1);",";B(2);",";B(3);",";B(4);",";B(5);",";B(6);",";B(7);",";B(8)
512 S=2:GOTO 200
520 ? "WAITING FOR ";ON$;"'S MOVE."
530 POKE 54018,61:STATUS #1,A:L=PEEK(746):IF L=0 THEN 530
540 INPUT #1,B0,B1,B2,B3,B4,B5,B6,B7,B8
550 B(0)=B0:B(1)=B1:B(2)=B2:B(3)=B3:B(4)=B4:B(5)=B5:B(6)=B6:B(7)=B7:B(8)=B8
590 S=1:GOTO 200
700 RESTORE 750
710 FOR W=1 TO 8:READ W1,W2:W3=B(W1)+B(W1+W2)+B(W1+W2+W2):W3=W3*SGN(B(W1) AND B(W1+W2) AND B(W1+W2+W2))
720 IF W3=3 OR W3=6 THEN WINNER=W3/3:RETURN 
730 NEXT W
740 RETURN 
750 DATA 0,1,3,1,6,1,0,3,1,3,2,3,0,4,2,2
800 ? "";
810 IF WINNER=1 AND C=1 THEN ? YN$;
820 IF WINNER=2 AND C=2 THEN ? YN$;
830 IF WINNER=1 AND C=2 THEN ? ON$;
840 IF WINNER=2 AND C=1 THEN ? ON$;
850 ? " WINS!"
860 CLOSE #1:POKE 54018,60:END 

Notice I just pasted that in here. :)

-Thom

  • Like 8
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

Is there a way (like the G: handler) to print listings such as x=USR(ADR("String of ATASCII........"))?

 

Edit: For those who don't know about G:, it is a handler for an Epson graphics capable printer that allows L."G: in BASIC.

It is WYSWYG with the ATASCII on the screen.

 

Edited by Kyle22
clarity

Share this post


Link to post
Share on other sites
2 hours ago, Kyle22 said:

Is there a way (like the G: handler) to print listings such as x=USR(ADR("String of ATASCII........"))?

 

Edit: For those who don't know about G:, it is a handler for an Epson graphics capable printer that allows L."G: in BASIC.

It is WYSWYG with the ATASCII on the screen.

 

sigh.

 

As I had alluded to in my previous post, this was being addressed. the output HTML will have an embedded font, which will have the full ATASCII character set in them.

 

-Thom

  • Like 1

Share this post


Link to post
Share on other sites

@mozzwald's latest #WROVER #ESP32 based #FujiNet board is working splendidly with my #Atari 1200XL. This latest board spin adds 8 MB of PSRAM and an extra momentary toggle button. #Atari8bit

 

96080943_2684898461742529_908144549539348480_o.jpg?_nc_cat=107&_nc_sid=8bfeb9&_nc_ohc=vdh-R0gp8AwAX8vRFxm&_nc_ht=scontent-dfw5-2.xx&oh=a98602c4de7d2d2964ccf8eb70764d84&oe=5ED8E87D

 

95952688_2684898508409191_3231115471717662720_o.jpg?_nc_cat=102&_nc_sid=8bfeb9&_nc_ohc=3_sTiEwB7g4AX-2Smt0&_nc_ht=scontent-dfw5-2.xx&oh=712d7c5b73734da5ab82edc34c5803bd&oe=5ED93BBC

 

96239841_2684898558409186_8376723103937462272_o.jpg?_nc_cat=100&_nc_sid=8bfeb9&_nc_ohc=HL-eWpZhCqAAX9OGr6O&_nc_ht=scontent-dfw5-2.xx&oh=ba44d33e810ee729eb87bca3d8dddf6d&oe=5ED7F769

 

96001322_2684898598409182_3469775478527623168_o.jpg?_nc_cat=108&_nc_sid=8bfeb9&_nc_ohc=5xn_rslVaUkAX9XGk5G&_nc_ht=scontent-dfw5-2.xx&oh=fb9d1257baec4bae76d07fa54dce2974&oe=5ED6EAB1

 

 

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

@mozzwald , Is the sio plug extended a little bit extra to make it into the 1200XL's recessed lip?... or is just making it as standard?... the worry being that slight variations in sio socket distance could make for a loose connection on some 1200XL's and may be exacerbated by chaining a cord out to other devices...

Edited by _The Doctor__
  • Like 1

Share this post


Link to post
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.

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...