|
|
Thread Tools | Search this Thread |
01-07-2024, 03:21 PM | #1 |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
What would it take to port an Infocom/Z-machine interpreter to PocketBook eReaders
Being able to play interactive fiction in eReaders seems like a good way of expanding its possibilities. There are already interpreters available for Kindle and Kobo eReaders.
For those that have experience developing software for PocketBook eReaders, could you give me an idea of how difficult or how long can it take to port an interpreter like Frotz? What would be the right approach: an independent app or maybe a KOReader plugin since KOReader might offer a better base to build upon? I am a developer but I never worked in this sort of environment (probably C langue and linux) since I mostly do web development and Godot game development... but if it doesn't sound too big of a project I might give it a go. It would be awesome to have hundreds of IF adventures playable from my eReader. |
01-07-2024, 04:55 PM | #2 | ||
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
Quote:
Quote:
According to the documentation of the Unix port of Frotz, it includes "a curses interface, an SDL interface, and a dumb interface that requires absolutely no other libraries besides the standard C library." Thus, if you stick to the dumb interface (to start with ), it should be easy since a modern C compiler with the standard C library is provided by Pocketbook SDK. What's left is a problem of configuring a build system (but there are many examples already available). Maybe more difficult and with unexpected results is: Reversing the behavior of the keyboard functions offered by the Pocketbook SDK (for example, the default behavior of OpenKeyboard() function is to gray out the upper part of the screen, which is certainly not what you want, but there's no documentation on how to achieve different behavior...). I'll try to find time to cross-compile Frotz to complete this first analysis of the work to be done. Complement: I just realized that the curses programming library is in Pocketbook SDK! Again very nice project ! Keep us informed. Last edited by orontee; 01-07-2024 at 06:22 PM. Reason: Rewording |
||
Advert | |
|
01-07-2024, 05:55 PM | #3 |
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
For the dumb interface, it's really easy. On a Linux box with "build essentials", execute the following commands:
Code:
git clone https://gitlab.com/DavidGriffith/frotz.git git clone https://github.com/pocketbook/SDK_6.3.0.git pushd SDK_6.3.0 git checkout 6.5 pushd ../frotz CROSS=arm-obreey-linux-gnueabi \ CC=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/$CROSS-clang \ CXX=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/$CROSS-clang++ \ AR=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/$CROSS-ar \ STRIP=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/$CROSS-strip \ RANLIB=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/$CROSS-ranlib \ PKGCONFIG=$PWD/../SDK_6.3.0/SDK-B288/usr/bin/pkg-config \ CFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" make dumb Code:
/mnt/ext1/applications/dfrotz /mnt/ext1/Downloads/espions.z5 Last edited by orontee; 01-07-2024 at 06:04 PM. |
01-07-2024, 06:20 PM | #4 |
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
My recommendation would be to forget the ncurse interface since the reader has no term info library, nor ncursesw (ncurses with support for UTF-8)...
Build the dumb executable dfrotz and write an independent interface using Pocketbook SDK that starts a dfrotz sub-process and is responsible for the text rendering; It could handle selecting a Z file, using buttons, etc. In a second time add support for images and why not audio. |
01-08-2024, 04:26 AM | #5 |
Zealot
Posts: 127
Karma: 87012
Join Date: Apr 2021
Device: Lux 5, Libra 2, PRS-T2N
|
Way back Pocketbook organized an app development challenge of sorts. IIRC an Z-interpreter was a honorable mention, but I can't find the page anymore. It looked basic and probably came without its source anyway.
See also this Frotz for Kobo thread: https://www.mobileread.com/forums/sh...42#post2711142 |
Advert | |
|
01-08-2024, 07:21 AM | #6 |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
Thanks guys!, fantastic information there.
@wold it's a shame that the development challenge results are not available anymore. That sounds like Pocketbook community development was a bit more active back then, or maybe the PocketBook company was involving the community more. @orontee. Thank you for all the information and I find it amazing that you basically already built the most basic version of it by looking into it a couple of hours. I will look into this. Unfortunately I have almost zero free time but I plan to put a bit of time each week and see if I make progress. Of course if you want to look into it since you clearly have more experience with this, please go ahead (I don't mean this as an attempt for you do to the work I planned to do, but just in case you got to know about this possibility now and its something you want to do, then don't feel that you are stealing my idea or anything like that, all I want is to play this kind of text adventure in my new Inkpad Color 3 some day). |
01-13-2024, 10:25 PM | #7 | ||
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
Quote:
Quote:
Last edited by orontee; 01-13-2024 at 10:43 PM. |
||
01-14-2024, 04:08 AM | #8 |
Addict
Posts: 251
Karma: 214890
Join Date: Sep 2006
Device: none
|
It was different company back then, it had other owners. The current management is clearly not interested in the development community.
|
01-14-2024, 04:47 AM | #9 | |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
Quote:
With Z-machine only you still get A LOT of good IF games and there is still some activity going on nowadays. Z-machine games evolved themselves, if they have extensions ending in .z3 or .z5 those are built for older versions of the interpreter, with no images or sounds. If their extensions are .z8 or .zblorb, they are more modern and can contain some media files. But yes, it is a limited interpreter and there are other options. A much more interesting port would be Gargoyle https://github.com/garglk/garglk/ that includes a big number of interpreters, including Z-Machine (it includes a ported version of Frotz) and more modern ones (but not all the big modern ones), in a single package. And it was actually ported for Kindle https://www.mobileread.com/forums/sh...d.php?t=223455 With Gargoyle you would be covering most of the IF games available out there. The full list of supported interpreters is here https://github.com/garglk/garglk/wik...rpreter-Status There is also lectrote https://github.com/erkyrath/lectrote that also covers a lot of interpreters but this is based in Electron (a Javascript framework) so maybe even harder to port. |
|
01-14-2024, 05:46 AM | #10 |
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
|
01-19-2024, 05:19 AM | #11 |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
What are your first impressions on porting Gargoyle? does the Pocketbook SDK lack any essential libraries? I kept looking at other possible options to port but I don't think there is anything out there as interesting as Gargoyle.
|
01-19-2024, 06:04 PM | #12 | |
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
Quote:
That said, almost all Qt usages are in few relatively small files. The launcher looks easy to port. In sysqt.cpp, the Qt event loop and image rendering are used but there're replacements in the SDK. Thus tere should not be much troubles. Look: Code:
↳ find garglk/ \( -name "*.h" -or -name "*.hpp" -or -name "*.cpp" -or -name "*.cxx" \) -print | xargs grep -E 'sysqt\.h|<Q' | cut -d':' -f 1 | uniq | sort | xargs wc -l 313 garglk/launchqt.cpp 948 garglk/sndqt.cpp 762 garglk/sysqt.cpp 69 garglk/sysqt.h 2092 total Depending on the weather and cycling conditions, I'll have time to explore further this week-end. Last edited by orontee; 01-19-2024 at 06:18 PM. Reason: Update stats |
|
01-20-2024, 12:10 PM | #13 |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
Thanks for the reply! please keep us updated if you make any good findings.
When I read their INSTALL.md and saw Qt 5 or 6 as a requirement I thought that could be the biggest problem since, from my little knowledge, I knew it is a big library for graphical interface building that I couldn't find any references for in the Pocketbook SDK. Do you know of any modern Pocketbook apps that use Qt? I searched the forums and found this https://www.mobileread.com/forums/sh...d.php?t=265941 but since it is form firmware 4 pocketbook might as well have removed Qt support in recent SDKs. Again, thank you for looking into this! |
02-05-2024, 05:38 PM | #14 | |
Connoisseur
Posts: 62
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
News
Quote:
- The CMake configuration has been updated to define a new "INKVIEW" interface with dependency to the corresponding library - A recent version of libpng is cross-compiled to match garglk requirements - Compilation succeeds for some interpreters and fails at linkage for the others since the C++ files garglk/sysinkview.cpp and garglk/sysinkview.h corresponding to the new "INKVIEW" interface are almost empty So I've reach the point where one has to convert Qt based code; There's not a huge code base, just the two sysqt.cpp and sysqt.h files to convert. The interface to implement is described here: https://eblong.com/zarf/glk/Glk-Spec-075.html. That said note that CMake outputs the following dependency error (but make find the headers; Will have to study this...): Code:
-- The following REQUIRED packages have not been found: * Freetype Last edited by orontee; 02-05-2024 at 05:52 PM. |
|
02-06-2024, 12:03 PM | #15 |
Connoisseur
Posts: 73
Karma: 8068
Join Date: May 2012
Device: PocketBook Inkpad Color 3
|
Very exciting, and it seems good progress already! though I understand that the QT to Inkview conversion is the heavy part... hopefully your experience developing Taranis interface will help with that process.
I got to know about IF games because as a child I bought and played gamebooks (like the old popular Fighting Fantasy gamebooks) and some IF games have a similar playstyle as those gamebooks but you can read them in your phone or computer and no need to carry dice or paper and pen... Now an eReader seems like the perfect device for it: bigger and with less distractions than a smartphone, more portable than a computer. Pocketbook allows you to install external apps without jailbreak which is great. If you manage to get a working version of Gargoyle for Pocketbook it will be great way of experience IF games. The Pocketbook community is not very big unfortunately, I will surely help spreading the word. In any case take your time! and thanks for the update! looking forward to your next post. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Buy Older Pocketbook Ereaders. | MonsteraPeru | Flea Market | 12 | 05-19-2022 08:38 PM |
Has anybody tried installing KIF (Infocom Interpreter) lately? | curtw | Kindle Developer's Corner | 7 | 11-22-2018 12:20 PM |
KIF: a native infocom interpreter for the kindle | adq | Kindle Developer's Corner | 45 | 07-29-2013 11:40 PM |
Kindle Paperwhite: Frotz or other Z-Machine interpreter? | ezuk | Kindle Developer's Corner | 10 | 01-29-2013 01:18 PM |
Can PocketBook 360 be charged only with usb cable port ? | Greenhat | PocketBook | 7 | 12-19-2010 01:32 AM |