JA2

I’ve built a version of JA2 (Stracciatella) with the 800×600 mod from Mythrell, initial thread here. It is statically linked to libSDL so you shouldn’t have to have any libraries installed and of course it should work on i386/x86_64.

Download it here.

It goes without saying you’ll need the data files to play. Why not buy it here from gog.com.

With thanks to monkey physics for the original package I downloaded which led to the idea of a static/universal version. I’ve not yet got PPC working according to tests done with the arch command but I don’t have a PPC based mac to truly test. If someone can test give me a shout or if you know how to compile JA2 for PPC so that it works please let me know. I’d like this to be as easy to use as possible and supporting all mac architectures is the biggest thing.

Peace, out.

One Response to JA2

  1. Diziet says:

    I’ve tracked down a bit more about the problem with PPC. From enabling debug and adding a few more FastDebugMsg calls:

    { 208 } CD Library /Users/diziet/Library/JaggedAlliance2/data/data.slf opened. [Line 140 in sgp/LibraryDataBase.cc]
    { 208 } Malloc being called with 1694498816 entries. [Line 148 in sgp/LibraryDataBase.cc]

    Yeah… err last I checked that should’ve read:

    { 44 } CD Library /Users/diziet/Library/JaggedAlliance2/data/data.slf opened. [Line 140 in sgp/LibraryDataBase.cc]
    { 44 } Malloc being called with 101 entries. [Line 148 in sgp/LibraryDataBase.cc]

    **EDIT**

    Yeah, more debugging shows that it reads the binary data from that file straight into a struct. The first 512 bytes are treated as two 256 byte strings then the next chunk is hex 65000000 which in intel land is 101. If you treat that as a little endian value into a INT32 you get 1694498816.

    So, problem identified. Now how to fix it elegantly. One solution would be to write code to rebuild someones data files for mac. It would be a one off task but the nature of the problem means that all numerical values read from a file in this fashion would be affected, e.g. all stats maybe.

    **FURTHER EDIT**

    Have the headers reading in OK now so it bombs a lot later on. Need to do the legwork for converting data in the files as it’s read in. All seems v. well structured though, nice source code this.

    { 285 } Reading 532 bytes for LibFileHeader. [Line 150 in sgp/LibraryDataBase.cc]
    { 285 } Malloc being called with 47 entries for file LOADSCREENS.SLF. [Line 163 in sgp/LibraryDataBase.cc]
    { 286 } Called Malloc. [Line 165 in sgp/LibraryDataBase.cc]
    { 340 } Initializing the Font Manager [Line 154 in sgp/SGP.cc]
    { 341 } Initializing Sound Manager [Line 158 in sgp/SGP.cc]
    { 537 } Initializing Random [Line 163 in sgp/SGP.cc]
    { 538 } Initializing Game Manager [Line 167 in sgp/SGP.cc]
    ERROR: caught unhandled exception:
    Reading from file failed
    Shutting down the Video Surface manager
    Shutting down the video manager

Leave a Reply