WIP Atari ST ScummVM-lite

Our top picks of ST games!
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: WIP Atari ST ScummVM-lite

Post by thorsten.otto »

stephen_usher wrote: 21 Apr 2020 11:54 OK, weird... When I try to look at the flags using the CPX I usually use all the flag options are greyed out.
I would bet that is either because you are running a system that does not support Alt-Ram (unlikely since it is supported since tos 1.04 or so), or you just don't have Alt-RAM installed. I would consider that a bug of the CPX not being able to change the flags in this case. You should try a different program, there should be plenty of them.
User avatar
exxos
Site Admin
Site Admin
Posts: 28354
Joined: 16 Aug 2017 23:19
Location: UK

Re: WIP Atari ST ScummVM-lite

Post by exxos »

thorsten.otto wrote: 21 Apr 2020 12:19
stephen_usher wrote: 21 Apr 2020 11:54 OK, weird... When I try to look at the flags using the CPX I usually use all the flag options are greyed out.
I would bet that is either because you are running a system that does not support Alt-Ram (unlikely since it is supported since tos 1.04 or so), or you just don't have Alt-RAM installed. I would consider that a bug of the CPX not being able to change the flags in this case. You should try a different program, there should be plenty of them.
This is how its normally done...

https://www.exxosforum.co.uk/forum/viewt ... t=54&p=106
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: WIP Atari ST ScummVM-lite

Post by stephen_usher »

thorsten.otto wrote: 21 Apr 2020 12:19
stephen_usher wrote: 21 Apr 2020 11:54 OK, weird... When I try to look at the flags using the CPX I usually use all the flag options are greyed out.
I would bet that is either because you are running a system that does not support Alt-Ram (unlikely since it is supported since tos 1.04 or so), or you just don't have Alt-RAM installed. I would consider that a bug of the CPX not being able to change the flags in this case. You should try a different program, there should be plenty of them.
It works on all other programs other than those created before the flags were defined (i.e. after TOS 1.04 was released).

This is a TT with 64MB of TT-RAM.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
agranlund
Site sponsor
Site sponsor
Posts: 1751
Joined: 18 Aug 2019 22:43
Location: Sweden

Re: WIP Atari ST ScummVM-lite

Post by agranlund »

stephen_usher wrote: 21 Apr 2020 13:04
thorsten.otto wrote: 21 Apr 2020 12:19 I would bet that is either because you are running a system that does not support Alt-Ram (unlikely since it is supported since tos 1.04 or so), or you just don't have Alt-RAM installed. I would consider that a bug of the CPX not being able to change the flags in this case. You should try a different program, there should be plenty of them.
It works on all other programs other than those created before the flags were defined (i.e. after TOS 1.04 was released).
This is a TT with 64MB of TT-RAM.
I think that perhaps that CPX is not able to understand the header of gcc binaries correctly?

I downloaded the same CPX you're using and get the same result on my machine - the flags are grayed out and cannot be changed.
However, I tried 3 other flag-setting programs and they all behave correctly and shows that the program is built to use TT-RAM by default (and they let me modify the flags to prevent usage of TTRAM if I want to).

It's probably trying to be clever and looks at something in the executable to determine if it should gray out these flags or not - it doesn't gray out those options for programs which I've built in Devpac3 on the Atari itself, I think its just relying on something it knows about from compilers that were around when that CPX was made back in 1992.
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: WIP Atari ST ScummVM-lite

Post by thorsten.otto »

agranlund wrote: 21 Apr 2020 14:00 I think that perhaps that CPX is not able to understand the header of the gcc binaries correctly?
gcc binaries have a standard GEMDOS header, and the program flags are part of it. Otherwise, they would not be used by TOS when you run a program ;)
User avatar
agranlund
Site sponsor
Site sponsor
Posts: 1751
Joined: 18 Aug 2019 22:43
Location: Sweden

Re: WIP Atari ST ScummVM-lite

Post by agranlund »

thorsten.otto wrote: 21 Apr 2020 14:07
agranlund wrote: 21 Apr 2020 14:00 I think that perhaps that CPX is not able to understand the header of the gcc binaries correctly?
gcc binaries have a standard GEMDOS header, and the program flags are part of it. Otherwise, they would not be used by TOS when you run a program ;)
Yeah, I think that CPX is probably just trying to be too clever for it's own good and probably looks at something it expects to be in executables, else it grays out those options. Based on its knowledge from compilers back in 1992 when the CPX was made.
That's my only guess. TOS appears to load the program into TTRAM though so I wouldn't worry about what that CPX does :)
User avatar
agranlund
Site sponsor
Site sponsor
Posts: 1751
Joined: 18 Aug 2019 22:43
Location: Sweden

Re: WIP Atari ST ScummVM-lite

Post by agranlund »

thorsten.otto wrote: 21 Apr 2020 14:07
agranlund wrote: 21 Apr 2020 14:00 I think that perhaps that CPX is not able to understand the header of the gcc binaries correctly?
gcc binaries have a standard GEMDOS header, and the program flags are part of it. Otherwise, they would not be used by TOS when you run a program ;)
Mystery solved!
That gcc tacks on some extended header stuff for Mint and this was probably what threw it off. I found a utility to strip all that and now it displays the TTRAM settings correctly in that flag-setter CPX.

Managed to shrink the executable from 630Kb to 430Kb in the process as it got rid of some symbols(?) that were apparently still left in there.
Good find Stephen, thank you! :)

Edit: Ah I see that program was written by you Thorsten, thank you for stripx!
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: WIP Atari ST ScummVM-lite

Post by stephen_usher »

:)
I'm glad the mystery's solved (and the executable's smaller). :thumbup:
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: WIP Atari ST ScummVM-lite

Post by thorsten.otto »

agranlund wrote: 21 Apr 2020 14:52 Edit: Ah I see that program was written by you Thorsten, thank you for stripx!
Yes, this was mainly intended to strip CPX modules and SLB libraries, the former to save a few bytes, the latter because SLBs require the SLB header information to be immediately after the GEMDOS header (at least in MagiC, MiNT has some extra code to recognize executable build by gcc).

Alas, that CPX module still seems to be broken if it can't handle gcc binaries.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: WIP Atari ST ScummVM-lite

Post by stephen_usher »

thorsten.otto wrote: 21 Apr 2020 16:30 [Alas, that CPX module still seems to be broken if it can't handle gcc binaries.
It was developed and released when GCC was still in its infancy. It works/ed fine with the early 90s versions of the linker GCC tool chain and the early MiNTlibs.

Anyway, this is getting *way* off topic.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.

Return to “GAME ZONE”

Who is online

Users browsing this forum: ClaudeBot and 2 guests