|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#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. |
![]() |
![]() |
![]() |
#2 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
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 ![]() 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 05:22 PM. Reason: Rewording |
||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
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 05:04 PM. |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
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. |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 126
Karma: 87007
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 | |
|
![]() |
#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). |
![]() |
![]() |
![]() |
#7 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
Quote:
Quote:
Last edited by orontee; 01-13-2024 at 09:43 PM. |
||
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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. |
|
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
Karma: 87708
Join Date: Sep 2023
Location: Toulouse, France
Device: Vivlio Touch HD Plus
|
|
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
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 05:18 PM. Reason: Update stats |
|
![]() |
![]() |
![]() |
#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! |
![]() |
![]() |
![]() |
#14 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
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 04:52 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Buy Older Pocketbook Ereaders. | MonsteraPeru | Flea Market | 12 | 05-19-2022 07:38 PM |
Has anybody tried installing KIF (Infocom Interpreter) lately? | curtw | Kindle Developer's Corner | 7 | 11-22-2018 11:20 AM |
KIF: a native infocom interpreter for the kindle | adq | Kindle Developer's Corner | 45 | 07-29-2013 10:40 PM |
Kindle Paperwhite: Frotz or other Z-Machine interpreter? | ezuk | Kindle Developer's Corner | 10 | 01-29-2013 12:18 PM |
Can PocketBook 360 be charged only with usb cable port ? | Greenhat | PocketBook | 7 | 12-19-2010 12:32 AM |