[Atari800-users] Why FujiNet + Atari800? -- Was re: Adding FujiNet Support to Atari800
Brought to you by:
joy
From: Bill K. <nb...@so...> - 2023-08-20 17:36:34
|
On Thu, Aug 17, 2023 at 04:13:09PM +0200, Petr Stehl�k wrote: > On Čt, 2023-08-17 at 16:09 +0200, Miro Kropáček wrote: > > On Thu, 17 Aug 2023 at 00:37, Thom Cherryhomes < > > tho...@gm...> wrote: > > > "What can I do to help bring FujiNet to the Atari800 Emulator?" > > > > > > > To put it shortly: provide a patch. :) > > It would be great to help others understand what FujiNet is and how it > could be useful to Atari800 users. I'm a huge fan of FujiNet, though I lack enough time or energy to do a lot with it right now. (That said, I HAVE done a few things; see below!) So I'll take a moment to be a cheerleader ;) FujiNet is a hardware device for Atari 8-bits that connects via the SIO port and simulates a number of typical Atari devices, such as disk drives (D:), cassette (C:), printer (P:), modem (R:), clock (like R-Time8 or APETime), and also provides some quite atypical things, such as a CP/M system you can connect to (I suppose like an ATR8000; I have no experience), S.A.M. speech synthesis (send the text strings over SIO, and the audio comes back via SIO, similar to how you can hear audio via Atari cassette drives). The disk drive emulation works in two ways. First is the fairly common method: access ATR disk image files (as well as executable binaries; in modern days people often name them XEX) off of a microSD card (similar to SIO2SD, SDrive, and similar). Second is accessing such files over the internet. People run special server software (TNFS; it was born in the ZX Spectrum community) that hosts files, and the Atari, via a FujiNet device, can browse them and mount those remote files onto their virtual disk drives. As you hear the SIO beeps while something loads, appreciate the fact those disk sectors are travelling vast distances across the globe! (You can, of course, have a combination of disk images on your local SD card, and disk images on one or more remove TNFS servers, mounted on the virtual D1: thru D8: drives. And, since FujiNet has an SIO pass-thru port, you can have local drives, be they real -- 1050, XF551, etc. -- or virtual -- SIO2SD, SIO2PC, APE, SDrive, etc. -- connected, too.) To me, most importantly, the FujiNet offers a new kind of device, the N: network device. This allows the Atari to connect to remote systems via a variety of protocols, including HTTP & HTTPS, FTP, SMB, etc. For example, you can do something like: OPEN #1,4,0,"N:HTTPS://GOOGLE.COM/" and then use GET #1... or INPUT #1... to read the results. (As a VERY simple example.) Personally, I used this functionality, combined with small web application I wrote (in *cough* PHP), to fetch and display the current NASA Astronomy Photo of the Day (APOD) right on the Atari. (So if one launches the program today, for example, and hits the [F] key, you'll see an 80x192, 4096-color rendition of the photo "A Roll Cloud Over Wisconsin". :) ) Atop this, the FujiNet offers JSON decoding (and maybe also XML? if not, it's at least planned). This allows you to tell the FujiNet to download and _parse_ a JSON file, and the Atari can access the parts of it that it's interested in, without having to do all of the data storage and string manipulation inside the Atari itself. I used this functionality to create my International Space Station (ISS) tracker. Unlike my APOD viewer, it does NOT have a bespoke corresponding web app backend. It simply connects to existing API endpoints on the Internet -- something tons of other desktop and web apps do. It talks to one (https://wheretheiss.at/) to ask for the current latitude and longitude coordinates of the ISS, and another (http://open-notify.org/) to fetch the names of everyone currently in space. It displays this info within an otherwise extremely simple Atari application. (Map of the world is baked in, and it uses Player/Missile Graphics to position the ISS.) Versions of this app have been re-implemented on a number of other systems that the FujiNet now supports, including the Apple II, Coleco ADAM, and Atari Lynx. A slimmed down version of the Atari ISS tracker could probably be written in plain Atari BASIC in a few dozen lines of code. (If you just want the lat. & long., it'd probably fit in 5 lines of code!) Other fun apps include a weather app (with forecast), a news reader (as in, capital-N News, like newspapers, TV, AP, Reuters; not like Usenet news), realtime chat room, etc. Obviously, the FujiNet allows for over-the-internet multiplayer games. A Reversi game written in Atari BASIC (IIRC, and old, preexisting game from the 1980s?) was updated to support FujiNet. A brand new 5-card Stud Poker game, supporting 6 or 8 human players (plus server-controlled bots) and multiple "tables", all accessible via a game room "lobby", with realtime chat recently added, is an extremely polished example of a brand _new_ game that utilizes FujiNet. (The game lobby is accessible via the web, so you can see whether anyone's playing the games; see: http://fujinet.online:8080/) Speaking of games, another interesting feature FujiNet + TNFS servers offer is the ability to _share_ a high score table. A number of games have been patched to offer this. In some cases, no actual patch to the Atari game was even required. Basically, the TNFS server is told "this ATR disk image is _read only_ ... _except_ this/these sector(s)". Then, when someone plays a game, and gets a high score, and the Atari tries to save it back to the D: drive, the TNFS server _accepts_ those write operations, thus placing their high score onto the disk image file _on the TNFS server_. So when someone else loads and plays the game, they'll see the new high score (or table of top scores)! These high scores have even been exposed via the web; see: http://scores.irata.online/ Can you beat CHM's high score of 583,510 points on Pac-Man?! ;) ) So... back to Atari800. Why? Why would anyone need or want support for FujiNet's functionality on their Atari800 emulator? Frankly, I would only care about support for ONE feature: the "N:" device. And why? So I can more rapidly develop and test any updates to my existing network apps (APOD Viewer & ISS Tracker), or any new apps and games I might decide to create. When creating those apps (this was before I realized how trivial it was to run my own local TNFS server <facepalm>), I would build my app (cross-compiled via CC65) on my Linux laptop, copy the XEX executable binary to an SD card, and insert it into my (increasingly flakey, and currently returning from repair) Ultimate SD Cart, or my SIO2SD device -- because SD is less fidgety than microSD that FujiNet uses. In other words, I would "sneakernet" the file from my laptop to my Atari. Then I'd boot my Atari and test, determine that something did or didn't worked, and repeat this tedious loop. Or, in the case of the ISS tracker, I had two "builds". One was a local test build with fake JSON data that got baked into the Atari (and at this time, I was parsing it by hand, because FujiNet's built-in JSON parsing was not working), and the other was the "production" version that actually talked to the FujiNet N: device. I would build the test version, and could run it locally under Atari800 ("atari800 -run iss.xex"). That helped while I did things like polishing the UI, testing the math, etc. etc. But when I needed to actually confirm it all worked and could show me live data, I'd have to do that SD-card-based "sneakernet" described above. (Today, I would just have TNFS running, and launch the XEX over the network. I am no longer living like a caveman.) I recently took the time to try out the Altirra emulator, which I of course needed to run under Wine (I use Linux, it's a Windows app). I was able to use the virtual FujiNet device plugin for Altirra, and was able to briefly get my virtual Atari running on my laptop to connect to the Internet. Theoretically, between my two real Ataris, and two real FujiNets, and my virtual Atari & virtual FujiNet, I could have taken up three spaces in one of those 5-card stud games! I would literally need to run between two rooms in my house to do so, though. ;) (IIRC, there's also a way to get Altirra to use a _real_ FujiNet device, via an SIO2PC or APE cable. My knowledge in these parts is extremely limited. If you asked me how I got Altirra + virtual FujiNet working, I'd have to tell you to wait 10 minutes while I go dig up the documentation again. It was not difficult, but it's not something I do every day. ;) ) I've said, for a long time (again, rapid development is niiiice!), that it would be awesome if Atari800 could offer, at the very least, an N: device (with at least _some_ the features FujiNet offers, e.g. JSON parsing). In the meantime, a full virtual FujiNet device has been implemented, and can be attached to Altirra. So I would like to hope that it's matter of time and a little effort to get it attached to Atari800, too! As mentioned, I have very little time. (I'm burning my free time during vacation writing this email, and working on a new little Atari 8-bit game ;) ) And more importantly, I don't have any clue how to create virtual devices that can be included in (or added onto, as a plugin -- is this even possible?) the Atari800 emulator. For those who DO have time and skill, but may not have the info required on adding devices to the Atari800 emulator, is there any kind of documentation anyone could point us to? Atari 8-bit'ing for 40 (holy crap) years, Atari800 emulating for at least 25 years, and FujiNet-working for just under 3 years... -- -bill! Sent from my computer |