Burn the Lighter #04: Internet Surfing on ZX Spectrum

██████▓▓▒▒░░:                  ▄  ▄▄▄▄ ▄▄▄   ▄ ▄▄▄   ▄   ▄ ▄▄▄▄▄
████▓▓▒▒░░: █ █ █ ▄▄▄██ █ █▄▄▄█ █▀▀▀█ █

Since Lighter is making attempts to claim regularity, why not open such a section with articles on current issues and just relevant topics? Fortunately, there is currently one topic that has not yet caused a total furor... For now.

Meet...

:░░▒▒▓▓██████████████████████████████████████████████████▓▓▒▒░░:
:░░▒▒▓▓██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██▓▓▒▒░░:
:░░▒▒▓▓██ Our window to another world ██▓▓▒▒░░:
:░░▒▒▓▓██ or ██▓▓▒▒░░:
:░░▒▒▓▓██ Another's window to our world? ██▓▓▒▒░░:
:░░▒▒▓▓██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██▓▓▒▒░░:
:░░▒▒▓▓██████████████████████████████████████████████████▓▓▒▒░░:

■.▄.■ by moroz1999 featuring nix./site ■.▄.■

Well, today we have one working Twitter client, one working IRC client, and one working multiplayer game under Spectranet. But how can we call a card for internet access that does not allow browsing its expanses with almost the same ease as modern web browsers?

And it’s about time! It’s been a long time coming to create a certain standard of web pages for our beloved Speccy, which would allow our Spectrumists to download software almost as easily as in the days of BBS, while foreigners could discuss this very software by typing messages on forums with their native rubber keyboard. Of course, after the death of the BBS phenomenon on the Spectrum, newspapers and magazines repeatedly published articles about whether the internet was needed for the repeatedly cloned computer or not, but a few years after the end of the debates, it became a reality. And thanks to those who didn’t even participate in these debates.

So, the goal of this article is to try to raise the discussion on the best implementation of web surfing based on ZX Spectrum. The topic is quite relevant, as just recently Spectranet was released for free sale, independently implementing a TCP/IP stack for data transmission.

What can be considered the best implementation in the current situation?
1. The solution should be technically simple - otherwise, no one will implement it.
2. The solution should rely as much as possible on already existing standards, for the same reason.

I suggest skipping the discussion on "Why does anyone even need it" (which we will cover a bit later) and getting closer to the point.

███████████████████████████████████▓▓▓▒▒▒░░░: Background of the problem

moroz1999:

Since Spectranet is likely to spread most widely in the West soon, including among owners of branded machines with 48K memory, there are serious limitations on the technical implementation of the web on the Spectrum:
1. The standard screen does not allow displaying huge and complex structures.
2. The small amount of memory does not provide much opportunity for working with "adult" HTML.
3. Color limitations and slow conversion speed make viewing png/jpg graphics almost impossible.

These three points make viewing HTML pages completely impossible: for example, the main page of Speccy Live weighs 92 kilobytes, and that's still a lightweight example.

Oblomyč:

And sites made in Flash can be completely disregarded. Of course, it is possible to try to write a client that would load programs like websites. Possible. But who will prepare such websites? Moreover, viewing both disk magazine articles and internet pages is much more convenient and aesthetically pleasing in some ZX Format or even Enigm than in a shell that is weak in Basic. :)

█████████████████████████████████▓▓▓▒▒▒░░░: Proposed solution

moroz1999:

It is obvious that for normal and comfortable browser operation on ZX, we will have to give up a lot of things for which the "big" internet is known and develop a simplified technological model that takes into account the features of ZX.

What could this be?

As a transport, it is necessary to use the already existing TCP/IP implementation in Spectranet. This will allow, if desired, to detach from Spectranet and use any other hardware, if it ever appears.

As the main working protocol for file transfer, it would be reasonable not to reinvent the wheel and stick to good old HTTP 1.0, because:
1. This will allow using a huge amount of various PC software like Apache or nginx.
2. We can use a bunch of ready-made and well-thought-out features of the standard. For example, sending your User-Agent with the request so that the server can automatically recognize the ZX browser and give it some of its content. For long texts, we can use Content-Range so that the browser can read the next portion of content at the right moment and not hit memory limits.

Instead of full-scale HTML5, we need to use something much lighter and more familiar to the ZX format - for example, one of the text formats of a magazine or newspaper.

Requirements that come to mind right away:
1. Hyperlinks
2. Extensibility and human readability
3. Support for downloadable music from the site
4. Support for illustrations
5. Text coloring

The closest to this option, imho, is Quick HyperText. If someone is not familiar with its capabilities, you can download Quick HyperText System v0.65 by Coders' Academy'2004 from Virtual TR-DOS.

Summarizing the initial vision, a combination of HTTP + simplified HTML like Quick HyperText would fit perfectly under strict hardware requirements. A Spectrum web site in a ZX browser would look like a classic magazine or newspaper - with illustrations in ZX graphics format and downloadable AY music from the site. Text chunks would be read on the fly during text scrolling, and files could be downloaded separately to the local disk if necessary.

The lack of backward compatibility of QHT with HTML and desktop browsers is a completely insignificant thing, as the content can be generated on the server in the required format depending on the platform. Or access from PC can be completely closed, making it exclusive for "correct" platforms.

Oblomyč:

Another clear example of hypertext use from Vitamin is the newspaper TaganNews, although the most illustrative should be considered its last, eighth issue. Just for reference.

By the way, recalling our correspondence with Moroz, it is worth mentioning that there was also an idea to make a standard of pages in the spirit of Insanity or bеccul’a of the Future/Psychoz, where pages would go as solid text with 48 characters per line (ascii pictures, salt and pepper to taste), and to the right of it - service symbols (49th - designation of a line with a link/image, 50th and 51st - color of the line/paragraph, using gigascreen). At the very beginning of the text, it would be possible to write the actual addresses of the pages, which would be linked to the links.

However, if there will be a second standard, a reasonable solution would be to write a script that would easily convert pages from magazine format to newspaper format. As a result - two parallel existing web pages that, nevertheless, will not take up much space.

████████████████████████▓▓▓▒▒▒░░░: Viewing the rest of the internet

moroz1999:

100-200 kilobytes of markup with errors, inaccuracies, and just differences in standards leave absolutely no room for ZX to parse all this at a reasonable speed by its own means.

That is why the most reasonable way would be to take the example of Opera Mini, where a mobile phone receives simplified content, and the simplification is done by an intermediate proxy server.

Thus, for example, one could write a small software on PHP/Python/whatever that would merge HTML and wildly simplify it to QHT, caching it on the server for a while. That is, the ZX browser would receive excellent text from such a server in the same way as if it were specially prepared in advance. It could even recognize the presence of CSS for printing and apply it in advance, discarding any columns and menus.

Oblomyč:

In general, if the method gains sufficient popularity, conversion can be organized directly on the site, which would be quite practical for such resources (de facto, databases) like WoS Infoseek Database, Speccy Live, ZXPress, ZX-Art, and so on, since they update almost weekly, and doing Spectrum versions of pages manually is troublesome.

███████████████████▓▓▓▒▒▒░░░: What needs to be done first

moroz1999:

First of all, we need to create a simple HTTP client that can send requests through the same Spectranet and parse responses, dumping the content into a designated memory area. After that, we could purely as a proof of concept try to attach a QHT viewer to it, and then decide where to go next - attach new tags, change infrastructure, or develop packages for working with content.

What cool applications could this technology have?
1. Recording a TRD image to a floppy disk directly from Virtual TR-DOS
2. Viewing works with ZX-Art directly on real hardware
3. Listening to music from ZX-Tunes directly from live AY
4. Maintaining an underground news feed available only to ZX browsers
5. A new push for ZX press, which could be assembled directly on the site - isn't that what was once envisioned in Scenergy?
6. Running code from online like flash videos? At the same time, we’ll get the first trojans on ZX? :)

Oblomyč:

Regarding the penultimate point: there was a time when BBS stations accepted letters for now inactive newspapers like Oberon, Nicron, Maximum, Lime Tree... There are suspicions that now feedback on the press, games, and demos will be collected in a similar way. ;) Therefore, it would be good to implement such a feature of any modern browser, as text input! It is still unknown whether it will be possible to transfer a couple of forums dedicated to it to the Spectrum, but this should be aimed for. Meanwhile, we will have to be content with comments on Speccy Live and the online version of Krik.

Speaking of software, it is worth mentioning the ongoing cold war between TR-DOS and DivIDE. No, of course, it is possible to make a browser for both of these formats, but it is also worth considering the downloading of software that will be supplied for both domestic Spectrumists and foreigners! The most reliable option: distribute new programs as BASIC files, followed by their transfer to floppy disk or processing and transferring to .tap or floppy disk +2/+3.

Well, as for the last point... No way! The Spectrum will be as clean as Linux. Although it is possible to implant a Trojan horse on it, yes... Just not coded in assembler, but at least drawn. >:)

█████████████████████████████████▓▓▓▒▒▒░░░: Final word

Oblomyč:

Of course, to implement this idea, a lot of effort will need to be applied. And not just regarding creating a proper format for presenting pages - that’s only half the job. The question is: how *will* you support this idea? Will you want to write a Spectrum version of your web page in the same hypertext as Vitamin? Easy! Do you want to adapt foreign hardware for Pentews or create your own domestic version? As you wish. Do you want to organize a small service for temporary storage of ZX files? That’s doable! It will be a bit challenging to implement, but nevertheless.

Right now, of course, Spectranet is not that widespread. And not just among ex-USSR, but also among the rest of Europe! Although the show is just beginning, in my opinion, it’s still too early to judge the prospects of such an idea as the internet on the Spectrum. :) When the abundance of sites begins and no less abundance of their visitors, who are sitting, at least, in an emulator... But I feel that it won’t be long before that moment, as Moroz1999 is probably already writing a hypertext format for interfacing with Spectranet, along with a test shell! So keep an eye out for new messages on this topic and, as they say, wait for the arrival of the hour X!

moroz1999:

In fact, I’m not writing anything right now, but an opensource HTTP client is an interesting topic to get into.

:░░░▒▒▒▓▓▓████████████████████████████████████████████▓▓▓▒▒▒░░░:

P.S. While this text was being formatted, the first steps towards this idea were already announced on the internet, and they are called WoSBridge. However, this service is currently in a very early preview stage and is only intended for using Sinclair Infoseek archives, although I doubt that many will find it convenient to only browse through folders far from the user via the command line... :)

Contents of the publication: Burn the Lighter #04

  • Incoming
    The article discusses several ZX Spectrum game mods and releases. Highlights include 'VADE RETRO', a game with unique plot twists, and color modifications for 'RodLand'. Also covered are demos from Mojon Twins' Covertape and a Jet Set Willy mod.
  • Insight - moroz1999, Обломыч
    Discussion on the best web browsing implementation for the ZX Spectrum using Spectranet. Suggestions include simplified web standards using TCP/IP and HTTP 1.0 for ZX compatibility. Emphasizes using Quick HyperText for a more efficient browsing experience.
  • Credits
    Listing of contributors and contact information for the issue's content. Features various roles such as image loader, shell designer, and music creator. Highlighting individuals and groups involved in production.