на Главную Форума - back to Forum Indexна Главную Форума - back to Forum Indexна Главную Форума - back to Forum Index
на Главную Форума - back to Forum Index
Эадор.Сотворение - Eador.The Genesis на Главную Форума - back to Forum Indexна Главную Форума - back to Forum Indexна Главную Форума - back to Forum Index
на Главную Форума - back to Forum Index
Автор / Сообщение

Eador Genesis GNU/Linux port

   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Чт Июн 02, 2016 14:44     Заголовок сообщения: Eador Genesis GNU/Linux port

Hello Eador fans,

I have ported the original (vanilla) Eador Genesis executable to GNU/Linux.

http://eador.online.fr/eador.7z

1) Copy the Eador Genesis folder over to Linux
2) cd genesis
3) 7z x eador.7z (NOTE: Eador.cfg will be overwritten)
4) mv Text text
5) rm -r save && mkdir save (game will crash if save folder is missing)
6) ./eador

The eador executable requires liballegro4.4 and libvorbis.

Bug reports are welcome.

Regards.

[ Edited on 2020-11-14 18:12 -- fixed crash reported by NovHak ]

Последний раз редактировалось: Boon947 (Сб Ноя 14, 2020 20:17), всего редактировалось 5 раз(а)
Посмотреть профиль Отправить личное сообщение
   bonivro

 
 
 Шаман

Свитков: 31
С нами с: 20.10.2017
Откуда: InterNet
Цитировать
СообщениеДобавлено: Пт Окт 20, 2017 19:38     Заголовок сообщения:

Добрый день! Большое спасибо за отличный порт Smile

Поигрался немного, всё хорошо. Но в сообщениях с информацией в конце предложений стоят какие-то знаки "$" ...



Может быть не хватает какой-нибудь библиотеки?

ОС: Linux Mint 18.2 64-bit. NVIDIA GeForce 9600 GT (v.340.102)

#########################################################

Google Translate

Good day! Many thanks for the excellent port Smile

Played a little, it's okay. But in messages with information at the end of the sentence there are some signs of "$" ...



Maybe there is not enough of a library?
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Чт Окт 26, 2017 16:25     Заголовок сообщения:

Hello bonivro,

In Windows, end-of-line markers are encoded as 0xd 0xa (CR/LF).
In Unix, end-of-line markers are encoded as 0xa (LF).

Apparently, liballegro prints CR as a dollar sign.

The solution is to convert the EOL markers in the game's text files.

You can use either dos2unix utility, or a short sed script:

$ cd genesis/text && sed -i -e 's,\r$,,' -e '$a\' *.txt

Regards.
Посмотреть профиль Отправить личное сообщение
   bonivro

 
 
 Шаман

Свитков: 31
С нами с: 20.10.2017
Откуда: InterNet
Цитировать
СообщениеДобавлено: Пт Окт 27, 2017 22:37     Заголовок сообщения:

Many thanks Boon947!
It works, I opened a directory "text" in the terminal and entered: sed -i -e 's,\r$,,' -e '$a\' *.txt

Now I'm very happy Very Happy
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Чт Мая 17, 2018 22:24     Заголовок сообщения: Ubuntu 16.04 LTS Gnome

Hello!

Thanks for the port.
I am trying to run GOG version of Eador on my Ubuntu 16.04.
First of all I installed Eador into Wine, than I copied folder to my Ubuntu documents.
I followed your instruction and tried to run it - I see loading screen, and then it breaks. In terminal I see following:

Код:

$ ./eador
Shutting down Allegro due to signal #11
Segmentation fault (core dumped)


Am I missing something?

I installed
Код:
liballegro4.4
with following commnad
Код:
sudo apt install liballegro4.4
.
For
Код:
libvorbis
I do not know what to install. I see following suggestions:

Код:

libvorbis0a          libvorbis-dev        libvorbisfile3       libvorbisidec-dev    libvorbis-ocaml      libvorbisspi-java
libvorbis-dbg        libvorbisenc2        libvorbisidec1       libvorbis-java       libvorbis-ocaml-dev


What to install?
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Пт Мая 18, 2018 16:40     Заголовок сообщения: Re: Ubuntu 16.04 LTS Gnome

lexvol писал(а):
Thanks for the port.
I am trying to run GOG version of Eador on my Ubuntu 16.04.
First of all I installed Eador into Wine, than I copied folder to my Ubuntu documents.
I followed your instruction and tried to run it - I see loading screen, and then it breaks. In terminal I see following:

Код:
$ ./eador
Shutting down Allegro due to signal #11
Segmentation fault (core dumped)

Am I missing something?

Can you run the eador program in gdb, like this:
$ gdb ./eador
Then type run. Then when the program crashes, type bt.
I'm thinking either a game file or a directory is missing.

Regards.
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Пт Мая 18, 2018 19:06     Заголовок сообщения:

Thanks for the reply.
Here is my log:
Код:

gdb ./eador
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http>.
Find the GDB manual and other documentation resources online at:
<http>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./eador...(no debugging symbols found)...done.
(gdb) run
Starting program: /mnt/disk/Games/GOG Games/Eador - Genesis/eador
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4125700 (LWP 3325)]
[New Thread 0x7ffff3924700 (LWP 3326)]
[New Thread 0x7fffe7ffe700 (LWP 3329)]
[Thread 0x7fffe7ffe700 (LWP 3329) exited]
[New Thread 0x7fffe7ffe700 (LWP 3330)]
[New Thread 0x7fffe75f7700 (LWP 3331)]

Thread 1 "eador" received signal SIGSEGV, Segmentation fault.
0x00007ffff7afcb83 in pack_fwrite () from /usr/lib/x86_64-linux-gnu/liballeg.so.4.4
(gdb) bt
#0  0x00007ffff7afcb83 in pack_fwrite () from /usr/lib/x86_64-linux-gnu/liballeg.so.4.4
#1  0x00000000004a1e17 in ?? ()
#2  0x0000000000404107 in ?? ()
#3  0x00007ffff6c62830 in __libc_start_main (main=0x4033a0, argc=1, argv=0x7fffffffde78, init=<optimized>, fini=<optimized>,
    rtld_fini=<optimized>, stack_end=0x7fffffffde68) at ../csu/libc-start.c:291
#4  0x0000000000405912 in ?? ()
(gdb)
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Сб Мая 19, 2018 22:32     Заголовок сообщения:

lexvol писал(а):
(gdb) bt
#0 0x00007ffff7afcb83 in pack_fwrite ()
#1 0x00000000004a1e17 in ?? ()
#2 0x0000000000404107 in ?? ()

In my experience, this crash occurs when there is no save directory.
In the root directory for the game, you should have 5 directories:
var, text, dat, screens, save
Are you missing the 'save' and 'screens' directories?

Regards.
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Вс Мая 20, 2018 8:56     Заголовок сообщения:

Ok. I copied whole game folder from Wine, however I didn't run the game even once. That is why I missed such folders.
I created 'save' and 'screens' folders.
Now it works!
Thank you very much!
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Вс Мая 20, 2018 9:00     Заголовок сообщения:

Can you explain a little bit how your port works?
Does it use Wine internally some-how?
Does your "port" translate DirectX commands into OpeGL some how?
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Вс Мая 20, 2018 13:22     Заголовок сообщения:

Now I am trying to run module "New Horizons" from this link http://eador.com/B2/viewtopic.php?t=2935 on Ubuntu.
I started again from scratch.
I copied initial game folder from Wine to Ubuntu. (GOG version 1.05.2)
Then I copied module files (https://drive.google.com/file/d/17jeuLqiTAzARoZI1UdMoou5uuR_diwZ5/view?usp=sharing) into game folder (replaced).
Then I followed your instructions and created missing folders 'save' and 'screens'.
I try to run the game and see following error:



Any ideas, how to solve this?
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Вс Мая 20, 2018 22:38     Заголовок сообщения:

lexvol писал(а):
Can you explain a little bit how your port works?
Does it use Wine internally somehow?
Does your "port" translate DirectX commands into OpenGL somehow?

Alexey Bokulev wrote Eador using Allegro, a cross-platform game library:
https://en.wikipedia.org/wiki/Allegro_%28software%29
It is Allegro that makes the correct calls to DirectX (on Windows) or X11 (on Unix).

lexvol писал(а):
Now I am trying to run module "New Horizons" on Ubuntu.

You can't. Genesis and New Horizons have different binaries.
Maybe one day Jazz will let me port New Horizons to Linux...

Regards.
Посмотреть профиль Отправить личное сообщение
   lexvol

 
 
 Охотник

Свитков: 13
С нами с: 04.06.2010
Откуда: Украина, Донецк
Цитировать
СообщениеДобавлено: Пн Мая 21, 2018 8:24     Заголовок сообщения:

Ok. I got it. Thank you!
Посмотреть профиль Отправить личное сообщение
   NovHak

 
 
 Охотник

Свитков: 10
С нами с: 19.01.2020
Цитировать
СообщениеДобавлено: Вс Янв 19, 2020 20:39     Заголовок сообщения: Re: Eador Genesis GNU/Linux port

Boon947 писал(а):
I have ported the original (vanilla) Eador Genesis executable to GNU/Linux.

Wonderful, thanks ! Having switched to Linux recently, I was sad that Eador wasn't on Linux, or so I thought...

Anyway... I usually prefer running the game full screen, and it works, but seems to be using a special and very exclusive full screen mode, since I can't alt-tab or lock the screen. In fact, everything else seems to be locked out on the display as long as Eador is running full screen.

I found a workaround, running windowed but going to a 1024x768 mode with a 1920x1080 virtual desktop, and panning to the Eador window, but I would prefer plain full screen to work without those limitations. Is it possible ?

EDIT :
I found a far more easier way to have Genesis running effectively full screen without too many annoyances. The method requires the x11-utils and xdotool packages :
  1. Switch to a 1024x768 display mode of your choice.
  2. Remove window decorations (i.e. the window becomes borderless) :
    Код:
    xprop -name 'Eador. Genesis' -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 2

  3. Move the top left corner of the game window to the top left corner of your screen :
    Код:
    xdotool search --name '^Eador. Genesis$' windowmove 0 0
Alt-Tab to the game window, and play full screen, at last. This is actually 1024x768 borderless full screen.

This is confirmed to work on Ubuntu 20.04 with the stock GNOME 3 desktop and Mutter window manager.

Последний раз редактировалось: NovHak (Пн Сен 14, 2020 17:45), всего редактировалось 2 раз(а)
Посмотреть профиль Отправить личное сообщение
   NovHak

 
 
 Охотник

Свитков: 10
С нами с: 19.01.2020
Цитировать
СообщениеДобавлено: Пн Авг 31, 2020 5:25     Заголовок сообщения: Re: Eador Genesis GNU/Linux port

Boon947 писал(а):
Bug reports are welcome.

So if I may report one...

The bug seems inventory-related, and it only happens when there's not enough room in a hero's inventory.

It's very likely affecting Windows players too.

Once a hero has won a battle, there are two loot phases :
  1. Looting the enemy guard's corpses
  2. Searching the location
If the loot in the first phase contains an object (i.e. not only gold and gems) and the hero's inventory is full, the game will crash before the second loot phase.

The following workaround works : ensure you always have 4 empty slots in your inventory before any battle starts (since the first loot phase seems to yield 4 objects at most).

It just seems to be a case of not checking the inventory before adding objects, as it is done in the second phase.

I'm pretty sure the bug is affecting Windows too. I played it on Windows years ago, and while I can't remember for sure, this suddenly seems familiar.

I guess this bug could easily be patched, and I'm surprised nobody has reported it yet.
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Чт Окт 08, 2020 0:56     Заголовок сообщения:

Hello NovHak,

I'm sorry to have missed your posts (I didn't get notified).

I'm thrilled to see someone playing Eador on Linux, my preferred OS!

In the coming weeks, I will try to reproduce the inventory bug you have reported.
If I can reproduce, I can probably fix it.
What do you think should happen if the inventory is full?

I haven't tried playing NH in Wine, but it should work, right?

Regards.
Посмотреть профиль Отправить личное сообщение
   NovHak

 
 
 Охотник

Свитков: 10
С нами с: 19.01.2020
Цитировать
СообщениеДобавлено: Чт Окт 08, 2020 4:51     Заголовок сообщения:

Hi Boon,

No problem, and I'm happy you saw my posts in the end. It seems there's a problem with the notification system on the forum as I didn't get notified of your reply either, but only another reply in another thread.

IMO, when the inventory is full while looting the corpses after the battle, the same should happen as when the location has been searched, i.e. giving the opportunity to reorganise the inventory to include the loot. The code already exists so I suppose It's just a matter of using it.

And by the way, I'm wondering what would happen when the treasury (not the hero inventory) is full and one gets a reward, such as when beating the "Flaming one" that attacked a province. That didn't happen to me since I took care to have some room left just in case, but I'm wondering if there's a potential bug here too !

I didn't try playing NH at all, maybe later who knows, but I suppose it would work since people managed to have the vanilla game running, don't you think ?

That being said, as far as I'm concerned, I'm not a fan of using Wine and largely prefer running programs natively. Thanks again for making that possible with Eador Genesis !
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Пн Ноя 09, 2020 18:33     Заголовок сообщения:

Hello NovHak,

I have most likely found the problem.

There's an array defined as: int Loot [9][2];

Код:
   int k = 0;
   while ((Loot[k][0] == 0) && (k < 9))
      ++k;

Can you spot the bug? Wink

Hint: undefined behavior + optimizing compiler = nasty

Regards.
Посмотреть профиль Отправить личное сообщение
   Boon947

 
 
 }↑↑ Великий Лучник
Ветеран



Свитков: 667
С нами с: 24.09.2014
Цитировать
СообщениеДобавлено: Сб Ноя 14, 2020 20:35     Заголовок сообщения:

Hello NovHak, (and other fans of Eador Genesis on Linux)

I have fixed the reported crash, and uploaded http://eador.online.fr/eador.7z
(I also fixed a few sprintf warnings.)

One can test as follows:
In defender.var and guard.var
Set all LootPoss (loot possibility) to 100
Set all LootNum/MaxLoot (number of items dropped) to 4

The game no longer crashes after battles.

Regards.
Посмотреть профиль Отправить личное сообщение
   NovHak

 
 
 Охотник

Свитков: 10
С нами с: 19.01.2020
Цитировать
СообщениеДобавлено: Вс Ноя 15, 2020 21:36     Заголовок сообщения:

Ah, you found it ! Do you know if it's on Windows too ?

Not knowing Allegro, I suppose Loot[9][2] is Loot[0..9][0..2], in which case I suppose Loot[][] is the hero's backpack, and when the loop exits, k is (wrongly) assumed to be the first free space, but it never checks for the last space and never goes beyond 9 (k=10 => backpack full), the full backpack condition is never detected, and when it's full, k points to an occupied place in the backpack, hence the bug. Am I right ?

Anyway, thank you very much for solving this, now I won't fear attacking or being attacked while my backpack is almost full !

And by the way, I was wondering if there could be a similar bug with the demesne treasury... because sometimes there are quests with rewards that go directly into the treasury, but then what would happen if it's full ? Such quests are relatively rare however, so is there a way I could trigger a reward to my treasury, so I can test for a potential bug ?
Посмотреть профиль Отправить личное сообщение
Часовой пояс: GMT +3:00
На страницу 1, 2  След.

 


Ты не можешь начинать темы
Ты не можешь отвечать на сообщения
Ты не можешь редактировать свои сообщения
Ты не можешь удалять свои сообщения
Ты не можешь голосовать в опросах
на Главную Форума - back to Forum Indexна Главную Форума - back to Forum Indexна Главную Форума - back to Forum Indexна Главную Форума - back to Forum Index Eador. The Genesis. Encyclopedia на Главную Форума - back to Forum Indexна Главную Форума - back to Forum Indexна Главную Форума - back to Forum Index