Silmarils game engine reversed !

GFA, ASM, STOS, ...
maestun
Atarian
Atarian
Posts: 9
Joined: Tue Sep 02, 2008 3:13 pm

Silmarils game engine reversed !

Post by maestun »

Hi !
Follow-up to this topic, (and an even older topic :p)

Skruug (who's not registered on this forum I believe) and I have reverse-engineered and reimplemented some parts of the Silmarils script interpreter to modern platforms (anything that can run SDL2 basically).
This means that we're now able to play many of Silmarils's games (especially Ishar and Ishar 2, hehe), natively on Linux and macOS (we haven't tested on Windows yet), from any game version (Atari ST, Falcon, PC, etc.).
The sources of the project are here, we're not providing releases at the moment, but feel free to compile and test yourselves :)

Cheers !
medmed
Atari God
Atari God
Posts: 1006
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Silmarils game engine reversed !

Post by medmed »

maestun wrote: Thu Dec 07, 2023 9:08 am Hi !
Follow-up to this topic, (and an even older topic :p)

Skruug (who's not registered on this forum I believe) and I have reverse-engineered and reimplemented some parts of the Silmarils script interpreter to modern platforms (anything that can run SDL2 basically).
This means that we're now able to play many of Silmarils's games (especially Ishar and Ishar 2, hehe), natively on Linux and macOS (we haven't tested on Windows yet), from any game version (Atari ST, Falcon, PC, etc.).
The sources of the project are here, we're not providing releases at the moment, but feel free to compile and test yourselves :)

Cheers !
Thank you very much but there is no SDL2 on Atari

EDIT: Sorry I have misunderstood, you were talking about building on PC platform I guess.
Last edited by medmed on Thu Dec 07, 2023 10:31 am, edited 1 time in total.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

maestun wrote: Thu Dec 07, 2023 9:08 amThis means that we're now able to play many of Silmarils's games (especially Ishar and Ishar 2, hehe), natively on Linux and macOS (we haven't tested on Windows yet), from any game version (Atari ST, Falcon, PC, etc.).
Very nice. Have you tested Robinson's Requiem for instance? ;)
User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 3335
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Silmarils game engine reversed !

Post by Cyprian »

cool,
it was my first game on the ST and mono monitor
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
User avatar
saulot
Captain Atari
Captain Atari
Posts: 457
Joined: Sat Sep 18, 2004 9:09 pm
Location: Warszawa
Contact:

Re: Silmarils game engine reversed !

Post by saulot »

@maestun: cool project :cheers: I've spent alot of time with those games on ST/Falcon. One of best games on our platform..
User avatar
viking272
Atari Super Hero
Atari Super Hero
Posts: 960
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: Silmarils game engine reversed !

Post by viking272 »

Love these games and am torn whether I can play them on a PC :)
(It has to be played on Atari.) Great work to you guys for the effort in doing this 👏
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

Hi, I didn't notice Maestun wrote about our project here. :-)

There was lot of progress on the project since his last post. Most of the older games now runs well and basic SDL1 support was added.
mikro wrote: Thu Dec 07, 2023 9:47 am Very nice. Have you tested Robinson's Requiem for instance? ;)
I have most of the Robinson's Requiem 3d engine reimplemented, but for the moment its not playable.

BTW Atari SDL1 version requires fairly fast computer, I wouldn't even bother to run it on anything slower than TT, also there are some missing features and bugs. There is no audio, some drawing glitches in Targhan, Ishar 3 and Robinson's Requiem intro videos are extremely slow, etc.
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

VadimK wrote: Fri Dec 20, 2024 2:33 amBTW Atari SDL1 version requires fairly fast computer, I wouldn't even bother to run it on anything slower than TT, also there are some missing features and bugs. There is no audio, some drawing glitches in Targhan, Ishar 3 and Robinson's Requiem intro videos are extremely slow, etc.
Do you mean these bugs / missing features are related to (Atari) SDL1 or in general?
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

mikro wrote: Fri Dec 20, 2024 9:02 am Do you mean these bugs / missing features are related to (Atari) SDL1 or in general?
Yes, SDL1 version was cobbled together quickly from SDL2 version and it will require some more attention. It was meant as quick test how well it runs on Atari. It took much more time than expected. I didn't know there is no SDL2, no threads and much less CPU power than what I remembered.
Some of those remaining issues are likely result of conversion from multiple threads to one, others are result of SDL2 > SDL1 conversion without deeper knowledge of SDL1 and some might be issues related to Atari gcc (already found and fixed one).

BTW Code is retaining drawing optimization Silmarils originally did and internally renders everything to 8 bit chunky buffer. That buffer is then converted to 32 bit texture using current palette and fed to SDL2 to display. On modern computers we can do it for full screen at 50 fps with no problem.
On Atari it's unusable. So I added list of dirty rectangles to update just the changed areas of the screen and for 8 bit depth, SDL_surface -> pixels is used directly.
Videos (FLI and FLS) are slow mostly because they are still updating full screen, also ST and Amiga videos (FLS) require some additional processing because they are planar and use some palette tricks (spectrum512, HAM) to get over 16/32 color limit.
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

Hi!

if anybody would like to test ALIS there are now test builds for Atari. Most of the games up to Ishar 3 should work. Ishar 3 and Robinson's Requiem are not yet supported in SDL1 target.

Requirements are 68040 and faster (On 030 games might be playable with disabled sound) and 8,16 or 32 bit video mode.

To use it simply drag and drop any Silmarils game on 'alis.ttp'.

68000
https://www.icloud.com/iclouddrive/06ec ... 1.039%5F00

68020-60
https://www.icloud.com/iclouddrive/05e1 ... 1.039%5F20

With debug symbols
https://www.icloud.com/iclouddrive/0cf4 ... .039%5Fdbg
medmed
Atari God
Atari God
Posts: 1006
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Silmarils game engine reversed !

Post by medmed »

Thanks,

Tested only Ishtar2 on Aranym from now and It works great!
You do not have the required permissions to view the files attached to this post.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

medmed wrote: Tue Jan 14, 2025 6:37 pm Tested only Ishtar2 on Aranym from now and It works great!
Thanks for testing! Glad it's working for you. :-)

BTW I noticed you are porting lot of SDL1 games, do you have any tips how to support TT low?
User avatar
Rajah Lone
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Silmarils game engine reversed !

Post by Rajah Lone »

Thanks! Here with a V4SA / TC32 / FreeMiNT. Sound frequency is quicker than excepted.

One can drag'n'drop the folder (ex: Ishar1 folder) to alis.ttp and the game is loading. Wow.

Got Ishar 1 + 2 (Falcon versions) running in a window.
As expected, Ishar 3 (Falcon, no CD), gives a black screen after language selection.

Window is resizable, but that feature should be disabled. No display after resize.
medmed
Atari God
Atari God
Posts: 1006
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Silmarils game engine reversed !

Post by medmed »

VadimK wrote: Tue Jan 14, 2025 10:47 pm
medmed wrote: Tue Jan 14, 2025 6:37 pm Tested only Ishtar2 on Aranym from now and It works great!
Thanks for testing! Glad it's working for you. :-)

BTW I noticed you are porting lot of SDL1 games, do you have any tips how to support TT low?
Hi,

The expert for that is Mikro.
I guess normally SDL1 should handle the palette convertion, then if your game can be played in 320x240 you should use SDL_SetVideoMode(320, 240, 8, SDL_SWSURFACE | SDL_FULLSCREEN ... and try with SDL_VIDEODRIVER xbios - But better to ask Mikro or Thorsten about SDL.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

Indeed, assuming that you are using the "latest" SDL 1.2, you shouldn't worry about anything else than calling SDL_SetVideoMode. Btw specifying HW/SW surface is not needed, it's enforced by the backend (same as SDL_FULLSCREEN if using XBIOS).

Please note that TT's rendering got changed lately, we're skipping every second line to compensate for the 320 vs. 480 difference but this is invisible to the programmer. So just render into your 320x240 / 320x200 buffer as usual.
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

Rajah Lone wrote: Tue Jan 14, 2025 10:51 pm Thanks! Here with a V4SA / TC32 / FreeMiNT. Sound frequency is quicker than excepted.
I was using SDL audio conversion to proper output format, it might be buggy on V4SA. I'm not relying on that feature any more, so it should work in the next version.
Rajah Lone wrote: Tue Jan 14, 2025 10:51 pm Got Ishar 1 + 2 (Falcon versions) running in a window.
As expected, Ishar 3 (Falcon, no CD), gives a black screen after language selection.
I have fixed FLI player, so Falcon version of Ishar 3 and all CD versions are working, older ST and Amiga versions are still crashing after intro.
Rajah Lone wrote: Tue Jan 14, 2025 10:51 pm Window is resizable, but that feature should be disabled. No display after resize.
I'll fix it.
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

mikro wrote: Wed Jan 15, 2025 6:24 am Indeed, assuming that you are using the "latest" SDL 1.2, you shouldn't worry about anything else than calling SDL_SetVideoMode. Btw specifying HW/SW surface is not needed, it's enforced by the backend (same as SDL_FULLSCREEN if using XBIOS).

Please note that TT's rendering got changed lately, we're skipping every second line to compensate for the 320 vs. 480 difference but this is invisible to the programmer. So just render into your 320x240 / 320x200 buffer as usual.
TT rendering is working only when using SDL_UpdateRects() with single screen size rectangle. When using separate rectangles just for changed parts of the screen, it looks like update rectangle Y value is not doubled for output.

BTW should SDL work with memory protection? I got warning followed with crash. SDL: warning: PMMU is active, change memory protection.

I'm using SDL 1.2.16 downloaded from tho-otto.de.
User avatar
Rajah Lone
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Silmarils game engine reversed !

Post by Rajah Lone »

VadimK wrote: Sun Jan 26, 2025 1:00 pm
Rajah Lone wrote: Tue Jan 14, 2025 10:51 pm Here with a V4SA / TC32 / FreeMiNT. Sound frequency is quicker than excepted.
I was using SDL audio conversion to proper output format, it might be buggy on V4SA. I'm not relying on that feature any more, so it should work in the next version.
My V4SA has an Amiga-core, where MFP timers are not all implemented. It will change on V4SA with incoming Atari-core, where MFP timers are hard-coded.
So don't bother too much about this small issue.
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

VadimK wrote: Sun Jan 26, 2025 1:13 pmTT rendering is working only when using SDL_UpdateRects() with single screen size rectangle. When using separate rectangles just for changed parts of the screen, it looks like update rectangle Y value is not doubled for output.
Could be related to using too old SDL, see below.
BTW should SDL work with memory protection? I got warning followed with crash. SDL: warning: PMMU is active, change memory protection.
Not sure what is this but it's certainly not present in the official SDL version. But to answer you question: yes, you need to link SDL programs with -Wl,--msuper-memory in LDFLAGS.
I'm using SDL 1.2.16 downloaded from tho-otto.de.
That's more than half a year old. I even see that I fixed some pitch-related things in the meantime. The best stuff is always directly at https://github.com/libsdl-org/SDL-1.2 but I admit, I don't really help newcomers with not providing binary snapshots. :-/
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

mikro wrote: Sun Jan 26, 2025 3:15 pm That's more than half a year old. I even see that I fixed some pitch-related things in the meantime. The best stuff is always directly at https://github.com/libsdl-org/SDL-1.2 but I admit, I don't really help newcomers with not providing binary snapshots. :-/
Thanks for the tips. I'll try to recompile latest git version of SDL and test again.

BTW binary snapshots would be greatly appreciated. :-)
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

VadimK wrote: Sun Jan 26, 2025 4:30 pmThanks for the tips. I'll try to recompile latest git version of SDL and test again.
To ease your pain, if you already have cross-gcc set up: take https://github.com/mikrosk/build-scripts and just type "make". It will install a set of most basic prerequisities you need for SDL and a few other projects.

Of course, you are free to cut parts you don't want.
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

mikro wrote: Sun Jan 26, 2025 4:50 pm To ease your pain, if you already have cross-gcc set up: take https://github.com/mikrosk/build-scripts and just type "make". It will install a set of most basic prerequisities you need for SDL and a few other projects.
Cool, it really eased my pain. :-)

Concerning rendering on TT, it's generally much better and faster, but there are still some issues. It looks like top of all update rects is ignored.

Full screen update:
Image


Partial screen update:
Image
VadimK
Retro freak
Retro freak
Posts: 10
Joined: Mon Jul 17, 2023 3:44 pm

Re: Silmarils game engine reversed !

Post by VadimK »

BTW there was same debate if Ishar is better on Atari ST or Amiga. I can confirm, that all three ishar games are using 32 colors on both platforms, with the exception of FLS videos in Ishar 3 and even there its comparable. Ishar 3 video on Atari ST continually rewrites palette to display 48 colors per line, while Amiga is using HAM mode.

With older games, it's quite different. There was some Silmarils games using 5 bit bitmaps. Sadly those specific Amiga games are few.

Amiga 32 color Targhan running in Hatari :-)
Image
mikro
Hardware Guru
Hardware Guru
Posts: 4723
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Silmarils game engine reversed !

Post by mikro »

VadimK wrote: Tue Jan 28, 2025 2:04 pmbut there are still some issues. It looks like top of all update rects is ignored.
Please drop me a message with your repo and steps to reproduce and I'll take a look. It's true those rectangle-based updates are not so much tested.
ZiggyN
Atarian
Atarian
Posts: 2
Joined: Mon Apr 14, 2025 9:05 am

Re: Silmarils game engine reversed !

Post by ZiggyN »

Sorry for asking a stupid question, but have you actually contacted André Rocques or other former Silmarils developers? After so many years they might be willing to release the source codes which would help immensely with the porting to modern hardware.
Post Reply

Return to “Coding”