Half-Life Amiga Port in the works
  • Just looking around
    Posts: 4 from 2023/8/27
    I recently had a conversation with some guy on macrumors who's working on an Amiga port of the Xash3D engine.

    Here's his work:
    https://github.com/AmigaPorts/xash3d-fwgs/tree/feature/amiga-support

    I have been able to compile his code on PPC OS X but I was unsuccessful in getting the game to run unfortunately.

    I was wondering if anyone here could give a MorphOS build a try.
  • »27.08.23 - 11:04
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 109 from 2020/12/24
    I'm on it. Compiled and kinda starts but it doesn't get too far:

    Could be easier for the MorphOS version a proper support for dll's.
  • »28.08.23 - 05:22
    Profile
  • Just looking around
    Posts: 4 from 2023/8/27
    Awesome, care to share your binary?

    have you tried running the game in software mode by passing the "-ref soft" flag?
    Btw, I noticed that the mainui source from an older version of Xash (0.19 / 0.19.1) works better with the PPC build of the Xash engine.
  • »29.08.23 - 14:43
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 109 from 2020/12/24
    @the_doc

    "Kinda starts" meaning things start to run but it crashes or stops before rendering is done.

    Notes:

    - A MorphOS port would not work copy-pasting the Ami port as it is (as usual): Just the compiling scripts are different and a mess. Crosscompiling territory only BTW..

    - DLL's are a bitch here as all functions exported have to be located and shared on each dll table: A detective work.

    I'm using the same dll as Doom3 MOS port or my Warpos Quake engines but the Ami port uses another dll link library that seems incompatible here.

    - Ami port at least had some rendering menu on screen AFAIK but here I'm still way behind.


    Edit:
    Found that reading the Pak files still fails somewhat: Removing it shows a bare menu of the game similar to the Ami port or the PC port when there's no pak0.pak file.




    [ Edited by Cowcat 30.08.2023 - 10:31 ]
  • »30.08.23 - 05:12
    Profile
  • Just looking around
    Posts: 4 from 2023/8/27
    There's also this repo btw: https://github.com/thermophylae33/xash3d_ppc

    It uses the old pre-FWGS version of the Xash source and I was actually able to get it to boot on my G4 PowerMac running OS X 10.4 Tiger but it crashes a lot - and I mean a lot...
  • »08.09.23 - 16:02
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 109 from 2020/12/24
    @the_doc

    Yep. I know about that repo and maybe I'll try that one: The partial endian support is used for the new xash, but functions are different and is a matter of constant trial and error.

    The Ami developers will soon restart their thing while I check other issues for this port.
  • »09.09.23 - 05:50
    Profile
  • Cocoon
    Cocoon
    Posts: 49 from 2024/7/11
    Is the comment from you from 2023 "Could be easier for the MorphOS version a proper support for dll's" still relevant BTW ?

    If it is you could just use the stuff I used for Q2 (basically it launches "DLLs" as AmigaOS - or MorphOS, I use it for the MorphOS version of RetroArch for example - executable, and then addresses of functions are exchanged through message ports).

    Disadvantage is you have to provide a "Export List" and "Import List". Also there seem to be with some exe's issues with the freeing (which is why RetroArch on doing "Close Content" does a restart of the application).
  • »06.08.25 - 10:28
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 109 from 2020/12/24
    Quote:

    Is the comment from you from 2023 "Could be easier for the MorphOS version a proper support for dll's" still relevant BTW ?



    Yep. The dll link lib I use is still a modded 68k/warpos "Q2 dll" with some changes done by Bszili and the proper Morphos functions in it.

    The ugly part is "yes, disadvantage": In something like Xash3D a whole long stream of functions have to be typed manually for the Export/Import list parts. No other way here.
  • »06.08.25 - 13:15
    Profile
  • Cocoon
    Cocoon
    Posts: 49 from 2024/7/11
    @Cowcat:

    Then you are basically doing the same thing I am doing ^^ I am using the "Q2 dll" solution in RetroArch for OS4, WOS, 68k and MOS (each slightly adapted to the respective APIs). For OS4 I originally used so libraries, but there were some issues with that which is why I moved there to the "Q2 dll" solution as well. magicsystem.dll in Gorky 17 also uses this system (the point of magicsystem.dll was just to be able to use SDL - WarpOS only has SDL1, which is under LGPL - in the game).

    The typing of long lists you describe I know very well. Heretic 2 and Sin ;-) (only for 68k version each, OS4 version there uses so libs).
  • »06.08.25 - 17:49
    Profile
  • Moderator
    Kronos
    Posts: 2467 from 2003/2/24
    Quote:

    Cowcat wrote:

    The ugly part is "yes, disadvantage": In something like Xash3D a whole long stream of functions have to be typed manually for the Export/Import list parts. No other way here.


    Don't know the specifics of that but my mantra for such things is "if there is a will there will be a LUA script", as that kanguage is very good at dealing with strings.

    Pattern matching, extracting, recombining etc.
  • »06.08.25 - 17:56
    Profile
  • Cocoon
    Cocoon
    Posts: 49 from 2024/7/11
    The specifics are:

    - Find out what functions the DLL for the game in question needs exported/imported (checking the code for "GetProcAddress" is a good one here. Though sometimes they take the names of the functions from somewhere else, so more source code analysis needed

    - construct a little array from it.

    For RetroArch Cores it looks like this for example. While for games like Heretic2 or Quake 2 there might be both imports and exports. You then of course also need to setup the function pointers referenced here.

    dll_tExportSymbol DLL_ExportSymbols[]=
    {
    {dllFindResource,"dllFindResource"},
    {dllLoadResource,"dllLoadResource"},
    {dllFreeResource,"dllFreeResource"},
    {retro_init,"retro_init"},
    {retro_deinit,"retro_deinit"},
    {retro_api_version,"retro_api_version"},
    {retro_get_system_info,"retro_get_system_info"},
    {retro_get_system_av_info,"retro_get_system_av_info"},
    {retro_set_environment,"retro_set_environment"},
    {retro_set_video_refresh,"retro_set_video_refresh"},
    {retro_set_audio_sample,"retro_set_audio_sample"},
    {retro_set_audio_sample_batch,"retro_set_audio_sample_batch"},
    {retro_set_input_poll,"retro_set_input_poll"},
    {retro_set_input_state,"retro_set_input_state"},
    {retro_reset,"retro_reset"},
    {retro_run,"retro_run"},
    {retro_serialize_size,"retro_serialize_size"},
    {retro_serialize,"retro_serialize"},
    {retro_unserialize,"retro_unserialize"},
    {retro_get_memory_data,"retro_get_memory_data"},
    {retro_get_memory_size,"retro_get_memory_size"},
    {retro_cheat_reset,"retro_cheat_reset"},
    {retro_cheat_set,"retro_cheat_set"},
    {retro_load_game,"retro_load_game"},
    {retro_unload_game,"retro_unload_game"},
    {retro_get_region,"retro_get_region"},
    {retro_set_controller_port_device,"retro_set_controller_port_device"},
    {retro_load_game_special,"retro_load_game_special"},
    {retro_set_audio_sample_batch,"retro_set_audio_sample_batch"},
    {retro_set_audio_sample,"retro_set_audio_sample"},
    {0,0}
    };

    dll_tImportSymbol DLL_ImportSymbols[]=
    {
    {0,0,0,0}
    };

    int DLL_Init(void)
    {
    return 1L;
    }

    void DLL_DeInit(void)
    {
    }
    #endif
  • »07.08.25 - 10:41
    Profile
  • Just looking around
    Posts: 4 from 2023/8/27
    Quote:

    Cowcat wrote:
    Two years later ....

    https://www.youtube.com/watch?v=bN1brvRKiEo


    Impressive work, the game looks pretty playable already - at least compared to my attempts from 2 years ago. Did you make the source available somewhere? I'd be interested in checking it out and maybe compiling a Mac OS X build. :D
  • »29.08.25 - 19:46
    Profile