merchise / fortaleza

Fortaleza RPG from the nineties, Cuba
GNU General Public License v3.0
16 stars 8 forks source link

Try to build the project #2

Closed mmoya closed 2 years ago

mmoya commented 4 years ago

Research how to build the game (turbopascal on a DOS emulator, freepascal?) and document the process.

mmoya commented 4 years ago

Start by installing FreePascal Compiler (FPC) and running it as fpc -Mtp -O- -Rintel FORT1.PAS. I'm testing with FPC 3.0.4 on a modern x86_64 system.

TELETYPE.PAS is the one failing because of all of the assembler involved.

greenled commented 4 years ago

Any word from the original developers?

mmoya commented 4 years ago

Regarding this issue, the original developer is not involved in any way. This is a community effort.

Take in account this is code from almost 3 decades ago and people usually move on to other projects. The original developer provided a link to the builds in case you want to play the game. They are in the README.

med-merchise commented 4 years ago

@jromero2k is considered a original developer, not the author, but he had a crucial role in the second version. He is starting to participate here.

jorgeamadosoria commented 4 years ago

Any thoughts on porting the code to a more modern language? Java, for example?

mmoya commented 3 years ago

Read here starting from I haven’t written Turbo Pascal in about 25 years, but do you ever really forget? There is a thing called DOSBox-X and a copy of Turbo Pascal 7.0.

It might be a more practical approach than building with FPC.

davidmpaz commented 2 years ago

Hi,

i did came late to the party. But since i am another nostalgic who did enjoy this game, here’s my 5 cents.

First step was to explore the Free Pascal solution. It was a dead end to me as it is documented in this issue.

Second step was to achieve some setup with DOSBox and Turbo Pascal. Results are in this repository: https://github.com/davidmpaz/docker-dosbox.

Since i did not found any way to automate the Turbo Pascal installation ;-) next step was just to create the container, install the TP manually and push the image to docker hub so other can just use it as is, it is under: https://hub.docker.com/repository/docker/davidmpaz/dosbox-tp7

Since the base image used installs a vnc server, if you just want to play, this is enough. You only have to mount a volume to access the executable from inside dosbox and that's it.

After installing TPC, i got this error when building FORT1.PAS file:

Bildschirmfoto 2022-01-01 um 13 25 31

This error posed another goal, to obtain the object file from the assembler code. It can be checked the branches in the repository, masm-6-15 and ta-2.0. MAS32 did not worked under MS-DOS, as well as MASM v6.15, the error was This Program Cannot Be Run in DOS Mode. Then i tried to use Turbo Assembler, the error was then:

Bildschirmfoto 2022-01-02 um 16 49 39

which makes me think that, either the file got mangled with the encoding or the Assembler is not understood by TA-2.0. Could we confirm that the encoding of the .ASM file is correct as well as the code the file contains?

Currently, i just ran out of ideas, so a pause will be made :) ... next steps would be to manage to compile the project fully, and then, configure dosbox auto-exec to run the compilation process as a batch when dosbox start. That would allow to use the build setup in a pipeline if needed.

Another repository that worth mentioning is: https://github.com/johangardhage/dos-tpdemos

Hope this helps, Chers, David

mmoya commented 2 years ago

Hi, David

I've take a look and the file is obviously mangled, the same it was with CASTLES.PAS. @rsotolongo can you check if you have a correct WIN.ASM in your local copy? Thanks.

mmoya commented 2 years ago

which makes me think that, either the file got mangled with the encoding or the Assembler is not understood by TA-2.0. Could we confirm that the encoding of the .ASM file is correct as well as the code the file contains?

@davidmpaz WIN.ASM is fixed now by #6. Can you try again to build the project?

davidmpaz commented 2 years ago

Hi,

take a look to the pull request please. I can provide more documentation if required. Now it is possible to fully build the project!

One thing to note, there are still files uncompleted or mangled. Once all these issues are resolved, anyone can build this project using the provided tools.

Cheers, David