I've recently started using a Beeb again for the first time in 30 years, and as an exercise I thought it would be fun to write a Gopher client, initially in BASIC as a proof of concept. It currently requires a wifi modem running a recent version of the Zimodem https://github.com/bozimmerman/Zimodem firmware, so it won't work on an emulator. For details on how to make your own modem, see https://www.northdevonretroarchive.co.u ... -via-wifi/. Parts cost around £10-£15.
For anyone that isn't familiar with Gopher, it's a text-only way of navigating the internet that appeared in the early 90s alongside the world-wide-web. Initially Gopher was more popular because most people only had access to the internet via text terminals, but as computers' multimedia capabilities grew, the web started to grow exponentially, leaving Gopher in its wake.
I'm sharing this experimental browser mainly to see if anyone has any thoughts on where I should take it next.
It works, but it's very slow and many pages are truncated due to a lack of memory.
I think the speed can be increased by changing the baud rate to 9600 and rewriting the page load routine in assembler. The parsing of pages could also be done much faster in assembler as it's a relatively simple format.
The bigger problem is the lack of memory. I think I need 16k of available memory to store pages, and ideally 32k.
One option is to download pages to disc and load them into memory as required. This would allow me to keep a history, too, so the back button would work more quickly without having to reload over the network.
Another option is to use sideways RAM. This would be more tricky as the program is written in BASIC, but I see Chris who is a regular on these forums has written a guide: http://www.boobip.com/information-index ... -ram-basic
What are people's thoughts?
If anyone would like to give it a try, you're very welcome. I've attached a disc image with two files on it:
SOURCE: Original BASIC program. Not well commented as I was running out of memory. Probably won't actually run as-is due to memory constraints.
GOPHER: The same BASIC program compressed using Tookit+ *CRUNCH commend to save memory. This is the one to run.
You can adjust the size of the buffer used to store pages by altering H%=4000 in the first line (BUFMAX%=4000 on line 60 in the SOURCE file)
Keys:
L - load link (then enter the appropriate line number on the left of the screen)
A - page up
Z - page down
B - back (reloads page from the network)
Caveats:
- Tested with Zimodem running v4 .0.1 firmware. May not work in earlier versions due to bugs in packet handling.
- Pages longer than 4000 bytes are truncated, and not nicely. The end can get corrupted.
- Pages load at 1200 baud, so large ones can take ages.
- The progress bar stops when the buffer is full, but the rest of the page will continue to download at 1200 baud and get silently dumped. This can take ages.
- Parsing can take an extra 30 seconds before a page can be displayed.
- Only Gophermap, text and search pages can be displayed.
- Selecting a invalid link number will cause undefined behaviour
- I haven't done much error handling, either.
As it stands, the best way to use Gopher is probably to telnet into a Linux machine and run a Gopher client, but I love the idea of a native(ish) client on the BBC rather than just using it as a terminal.
All feedback welcome!
For anyone that isn't familiar with Gopher, it's a text-only way of navigating the internet that appeared in the early 90s alongside the world-wide-web. Initially Gopher was more popular because most people only had access to the internet via text terminals, but as computers' multimedia capabilities grew, the web started to grow exponentially, leaving Gopher in its wake.
I'm sharing this experimental browser mainly to see if anyone has any thoughts on where I should take it next.
It works, but it's very slow and many pages are truncated due to a lack of memory.
I think the speed can be increased by changing the baud rate to 9600 and rewriting the page load routine in assembler. The parsing of pages could also be done much faster in assembler as it's a relatively simple format.
The bigger problem is the lack of memory. I think I need 16k of available memory to store pages, and ideally 32k.
One option is to download pages to disc and load them into memory as required. This would allow me to keep a history, too, so the back button would work more quickly without having to reload over the network.
Another option is to use sideways RAM. This would be more tricky as the program is written in BASIC, but I see Chris who is a regular on these forums has written a guide: http://www.boobip.com/information-index ... -ram-basic
What are people's thoughts?
If anyone would like to give it a try, you're very welcome. I've attached a disc image with two files on it:
SOURCE: Original BASIC program. Not well commented as I was running out of memory. Probably won't actually run as-is due to memory constraints.
GOPHER: The same BASIC program compressed using Tookit+ *CRUNCH commend to save memory. This is the one to run.
You can adjust the size of the buffer used to store pages by altering H%=4000 in the first line (BUFMAX%=4000 on line 60 in the SOURCE file)
Keys:
L - load link (then enter the appropriate line number on the left of the screen)
A - page up
Z - page down
B - back (reloads page from the network)
Caveats:
- Tested with Zimodem running v4 .0.1 firmware. May not work in earlier versions due to bugs in packet handling.
- Pages longer than 4000 bytes are truncated, and not nicely. The end can get corrupted.
- Pages load at 1200 baud, so large ones can take ages.
- The progress bar stops when the buffer is full, but the rest of the page will continue to download at 1200 baud and get silently dumped. This can take ages.
- Parsing can take an extra 30 seconds before a page can be displayed.
- Only Gophermap, text and search pages can be displayed.
- Selecting a invalid link number will cause undefined behaviour
- I haven't done much error handling, either.
As it stands, the best way to use Gopher is probably to telnet into a Linux machine and run a Gopher client, but I love the idea of a native(ish) client on the BBC rather than just using it as a terminal.
All feedback welcome!
Statistics: Posted by SevernWolf — Wed Apr 10, 2024 8:23 pm