tag:blogger.com,1999:blog-8349470052336612452.post2853713805214222465..comments2024-03-26T22:26:28.226-07:00Comments on Old Vintage Computing Research: Gopher on the Palm Pilot and the pitfalls of PalmOS connectivityClassicHasClasshttp://www.blogger.com/profile/17331846076856918359noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8349470052336612452.post-34091873150622617422022-05-17T17:55:53.224-07:002022-05-17T17:55:53.224-07:00I'd still have a 64K (or less?) limit anyway w...I'd still have a 64K (or less?) limit anyway with text view, since it's just a blob in a control, so I'll just add a check as a first cut. Thanks, I accepted the pull.ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-54992211265736973802022-05-17T06:16:33.974-07:002022-05-17T06:16:33.974-07:00Thanks, that fixed the issue. I was able to add s...Thanks, that fixed the issue. I was able to add support for some of the Clie buttons, they didn't interfere with anything else. I'll submit a PR for that when I get a chance. I think the issue with it not recognizing the end of the network transfer might be an issue with plua itself; I didn't see any unhandled events in the network transfer loop, it's just never triggering the final ioPending event with a nil result to indicate EOF. I did find an additional (non-Clie-specific probably) issue - if the response is larger than ~64KB a "not enough memory" error appears. My guess is this is just because that's the most you can allocate on the heap at once, but that would be hard to fix without rearchitecting how you store the response, so probably not worth the trouble.Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-58900453811881329042022-05-15T18:15:01.520-07:002022-05-15T18:15:01.520-07:00Yeah, I'd like to try to avoid those. I added ...Yeah, I'd like to try to avoid those. I added a couple extra macros and pushed. Thanks for spotting it (this is Fedora).ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-90240475260685143902022-05-15T17:43:21.417-07:002022-05-15T17:43:21.417-07:00My system (Pop OS 22.04, 64-bit; derivative of Ubu...My system (Pop OS 22.04, 64-bit; derivative of Ubuntu) defines __BYTE_ORDER rather than __LITTLE_ENDIAN__. This is old but still seems to be accurate: https://stackoverflow.com/questions/4239993/determining-endianness-at-compile-time<br />I did change plua2c to force little endian and it made a valid prc file, so that seems to be the problem.<br />I'm not sure if all systems have these so I'm not sure if it would be a good cross-platform solution, but in my system's endian.h I have macros htobe16(), htobe32(), htole16(), htole32(), and reverse functions (le16toh(), etc.); these convert 16 and 32-bit values to the desired endian order irregardless of the host CPU. They seem to be standard in Linux but not sure about other OS's.Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-77590990345259546812022-05-14T19:56:55.396-07:002022-05-14T19:56:55.396-07:00Although I originally used it on Mac OS X/ppc, whi...Although I originally used it on Mac OS X/ppc, which is indeed big-endian, nowadays it's developed on ppc64le (little endian 64-bit Power) and Overbite Palm was compiled with plua2c on ppc64le. What OS is this? Does it define __LITTLE_ENDIAN__ or IS_LITTLE_ENDIAN? See src/luac/pdb.c and hard code it there to see if it fixes the problem. If it does, it's not detecting it on your OS for some reason.ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-15328056672498228742022-05-14T18:27:41.299-07:002022-05-14T18:27:41.299-07:00I think there's an endian order issue in plua2...I think there's an endian order issue in plua2c - I'm unable to install any prc I compile with it, and looking at pilot-xfer's debug output it's reading totally invalid records from the prc file; when I do a hex compare with your binary and mine, a bunch of stuff in the header seems to have the byte order flipped. Has plua2c been tested on little endian systems? (I'm using x86-64 for building).Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-75529094645481688642022-05-13T08:31:10.409-07:002022-05-13T08:31:10.409-07:00plua2c is just a compiler; it doesn't contain ...plua2c is just a compiler; it doesn't contain any of the runtime, unfortunately.ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-73868665724671066952022-05-13T06:55:50.686-07:002022-05-13T06:55:50.686-07:00Adding the keycodes looks fairly easy once I add s...Adding the keycodes looks fairly easy once I add some logging or something to figure out what codes to use. Regarding the network issue, it kind of looks like either gui.event() isn't returning ioPending on EOF, or :read() isn't returning nil on EOF. I looked at the plua2c code for io_read but didn't see anything immediately obvious; I'm thinking it might require changes to Plua2 itself to fix, and it's not open source. I think I'll fork overbitepalm and work on what I can for sure do first.Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-62010204616006202052022-05-12T19:57:13.389-07:002022-05-12T19:57:13.389-07:00Sounds good! For the keycodes at least, there are ...Sounds good! For the keycodes at least, there are two event loops you would need to modify to support the added or different keys: the menu event loop ( https://github.com/classilla/overbitepalm/blob/main/overbite.lua#L735 ) and the text event loop ( https://github.com/classilla/overbitepalm/blob/main/overbite.lua#L884 ). You should be able to see where the keyDown event is handled in each loop, and add in the Sony-specific codes here. If it's a custom event, then add that event code, whatever it is.<br /><br />As far as the other issues you observed, the network loader is at https://github.com/classilla/overbitepalm/blob/main/overbite.lua#L557 (which has, you guessed it, another event loop - I wonder if the Sony hardware sends a different event to indicate the transmission has finished).ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-3428472547730269702022-05-12T19:43:09.643-07:002022-05-12T19:43:09.643-07:00I don't think I'm opposed to at least look...I don't think I'm opposed to at least looking at the code to see if I could contribute; I've never worked on a Palm app but my day job is C/C++ mostly and I understand the basics of how Palm OS works. At the very least I could get the jog dial and keys acting right hopefully. A lot of Clie devices have a jog dial so hopefully it would make all of them work. When I get some free time I'll take a look at it. Thanks for replying!Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-2203353249395210582022-05-11T20:58:48.714-07:002022-05-11T20:58:48.714-07:00The problem is, while I could probably support the...The problem is, while I could probably support the key codes it handles incorrectly by sending you a little tool to test with, the other stuff I'd need actual hardware to debug. If you're willing to play with the source code it's easy to build and I'd take a patch as long as it doesn't regress the other supported hardware. (I don't have a Clie here.)<br /><br />It's also possible this is a fault in the Plua runtime, but fixing that will have to wait until Marcio finds the source code for it.ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-64571065500954190762022-05-10T21:22:21.984-07:002022-05-10T21:22:21.984-07:00Hi, I've just tried out Overbite Palm on a Cli...Hi, I've just tried out Overbite Palm on a Clie UX50 - it has 16MB of heap, Palm OS 5.2, and a strange custom Sony processor. With no network connection Overbite starts up fine, and the about page says 730K/7164K.<br />Unfortunately, with a network connection (WiFi), the application acts a bit weird. It loads the home page, but when it finishes loading it it just says "5334 bytes read", and doesn't progress until you press a button (the jog dial or a keyboard press). The jog dial works to scroll through the content, but pressing Enter on the jog dial seems to exit the application. Tapping items with the stylus seems to mostly work for navigation, but it still never refreshes the screen after loading until I press a key on the keyboard. Pressing Home (which usually exits back to the launcher) instead seems to navigate back to the home gopher page, and then you have to press Home a second time after it loads to actually exit. While you can scroll through the content with the jog dial, you can't tap an item after that, it seems to reset the scroll position to the top. You need to actually scroll with the stylus in order for tapping to work correctly. Also, while a page is loaded the About Overbite Palm dialog doesn't work (nothing happens when you select it).<br />Sorry about the giant block of text - I could probably put these in as issues on the github issue tracker if you would prefer. It's neat that this works at all though, as with the SSL/CSS/JS/memory limitations of the built-in browsers the Clie is otherwise not very useful even with WiFi and Bluetooth, except for reading, remote terminals, and simple games.Shawnhttps://www.blogger.com/profile/05894313119974438467noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-86402409803684320902022-05-10T13:38:28.190-07:002022-05-10T13:38:28.190-07:00Hey, thanks! Yes, memory pressure is a problem. I ...Hey, thanks! Yes, memory pressure is a problem. I have an idea to compress the internal representation further, but I'm also toying with an idea I came up with for an even crazier project (to be revealed when I have a working prototype) that would use an internal temporary database for working storage. I might proof this up into Overbite Palm.ClassicHasClasshttps://www.blogger.com/profile/17331846076856918359noreply@blogger.comtag:blogger.com,1999:blog-8349470052336612452.post-29481769365631101662022-05-10T08:22:13.897-07:002022-05-10T08:22:13.897-07:00Dear Cameron, your work is excellent!
I just tri...Dear Cameron, your work is excellent! <br /><br />I just tried to browse Gopher on my Treo 180 with GPRS (ir still works here in the Czech Republic). The Bongusta is easily accessible. Just sometime the Overbite stops because there is not enough memory<br />.<br /><br />I must find a new battery for my Centro as the Overbite is a good reason to use it!<br /><br />And I will have to re-organise my own phlog main page as it is already too long for the Overbite Palm :-(jirkahttps://www.blogger.com/profile/01553494553958651860noreply@blogger.com