SAM Coupé screenshot format

This is the place for general discussion and updates about the ZXDB Database. This forum is not specific to Spectrum Computing.

Moderator: druellan

User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

[mention]PeterJ[/mention] and [mention]moroz1999[/mention]

How does it look with the support of SSX format now?

1) In ZX-Image library? Does it really require PHP 7.4?

2) At SC site?

Thanks for info.
Last edited by pavero on Sat Nov 28, 2020 8:34 pm, edited 1 time in total.
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

[mention]obo[/mention] Is it possible to open SSX files in your emulator?
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

[mention]moroz1999[/mention]

$converter->getResultMime() probably doesn't work for SSX files.
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

[mention]pavero[/mention], because of the amount of issues we had with Sam screens I went back to using PNGs. I'm happy to try again though. I just spent a long time on it and didn't get anywhere. Will need to refer back to my notes to find the details.
[mention]moroz1999[/mention] kindly updates the image library when we request it.
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

PeterJ wrote: Sat Nov 28, 2020 9:05 pm @pavero, because of the amount of issues we had with Sam screens I went back to using PNGs. I'm happy to try again though. @moroz1999 kindly updates the image library when we request it.
It's working for me now at my local computer!

The basic issue which I can see is to install PHP 7.4 on SC hosting server.
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

Hi [mention]pavero[/mention]

I will see which version of PHP we are running in the morning. The server is still on Ubuntu 16.04, so this will need updating to 18.04 or 20.04 soon. Not sure what version 16.04 runs, but I run updates every couple of weeks.

Edit. Just checked and Ubuntu 16.04 runs PHP 7.0. I won't be updating to 18.04 or 20.04 until after Christmas.

I also need to reference back to the exact issues we had. I just remember some Sam screens worked, but not others.
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

PeterJ wrote: Sat Nov 28, 2020 10:31 pm Hi @pavero

I will see which version of PHP we are running in the morning. The server is still on Ubuntu 16.04, so this will need updating to 18.04 or 20.04 soon. Not sure what version 16.04 runs, but I run updates every couple of weeks.

Edit. Just checked and Ubuntu 16.04 runs PHP 7.0. I won't be updating to 18.04 or 20.04 until after Christmas.

I also need to reference back to the exact issues we had. I just remember some Sam screens worked, but not others.
Thanks.

Maybe [mention]moroz1999[/mention] can prepare a version compatible with PHP 7.0
User avatar
moroz1999
Manic Miner
Posts: 329
Joined: Fri Mar 30, 2018 9:22 pm

Re: SAM Coupé screenshot format

Post by moroz1999 »

Sorry guys, I was a bit busy with real life lately. Will look into issues and provide support for SSX.
I was targeting the PHP7.4 really lately and I'm eager to switch to a fresh 8.0 with all its features. However, I will take a look at how to provide the support for 7.0, there should be some transpilers available already if I'm not mistaken.
User avatar
moroz1999
Manic Miner
Posts: 329
Joined: Fri Mar 30, 2018 9:22 pm

Re: SAM Coupé screenshot format

Post by moroz1999 »

viewtopic.php?f=32&t=3786 - added topic for zx-image discussions.
Shortly: SSX is fully supported now, mime is fixed, now I'll try to transpile it for older PHPs.

Update: PHP7.0 compatible version is ready to run, described in topic above.
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

Emulator Sim Coupe generates two different SSX files (in SS4 mode) for the same title.

e.g.:
https://spectrumcomputing.co.uk/entry/3 ... e/Amalthea
https://spectrumcomputing.co.uk/entry/3 ... tain_Comic

1) The first one (24 592 b)
https://spectrumcomputing.co.uk/zxdb/si ... load-1.ssx

2) The second one (98 304, 4x bigger size + resolution)
https://spectrumcomputing.co.uk/zxdb/si ... -run-1.ssx

[mention]obo[/mention]
[mention]moroz1999[/mention]

Is it a feature or bug? :)
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

pavero wrote: Sun Jan 17, 2021 7:36 pm Emulator Sim Coupe generates two different SSX files (in SS4 mode) for the same title.
Hi [mention]pavero[/mention] and [mention]moroz1999[/mention],

[mention]Stefan[/mention] kindly replied to my report on GitHub, and there is a later version which is available here:

https://github.com/simonowen/simcoupe/r ... g/20200827

I have tested with Captain Cosmic and the files are the correct size.

Start taking SSX screens everyone!

PS - Noticed that Simon also created a SSX viewer in Python which looks nice:

https://github.com/simonowen/ssxview
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

PeterJ wrote: Wed Feb 03, 2021 8:31 am
Hi [mention]pavero[/mention] and [mention]moroz1999[/mention],

[mention]Stefan[/mention] kindly replied to my report on GitHub, and there is a later version which is available here:

https://github.com/simonowen/simcoupe/r ... g/20200827

I have tested with Captain Cosmic and the files are the correct size.

Start taking SSX screens everyone!

PS - Noticed that Simon also created a SSX viewer in Python which looks nice:

https://github.com/simonowen/ssxview
I am a little bit confused now.

On that link I can still see only the old version, all files are 6 months old, without any changes.

[mention]PeterJ[/mention] , [mention]Stefan[/mention] ?
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

[mention]pavero[/mention],

The original one linked here:

viewtopic.php?p=37338#p37338

Is from 24 May 2020

The new one in my post above is from 27 Aug 2020.

Old version

New version
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

PeterJ wrote: Wed Feb 03, 2021 6:32 pm @pavero,

The original one linked here:

viewtopic.php?p=37338#p37338

Is from 24 May 2020

The new one in my post above is from 27 Aug 2020.

Old version

New version
For me both versions are old. :)

I am using the version from 27 Aug 2020 for several months. And the bug is still there.

Now I have tried to generate SSX file from Bulgulators game and the output size is still about 100kB.
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

pavero wrote: Wed Feb 03, 2021 6:39 pm
I am using the version from 27 Aug 2020 for several months. And the bug is still there.

Now I have tried to generate SSX file from Bulgulators game and the output size is still about 100kB.
OK, I only tried the game that you put in your earlier post, Captain Cosmic and that was the correct size. Does that file come out the right size for you now?
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

Well, maybe there is some progress between both versions, but there is still not 100%.
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

PeterJ wrote: Wed Feb 03, 2021 6:43 pm
pavero wrote: Wed Feb 03, 2021 6:39 pm
I am using the version from 27 Aug 2020 for several months. And the bug is still there.

Now I have tried to generate SSX file from Bulgulators game and the output size is still about 100kB.
OK, I only tried the game that you put in your earlier post, Captain Cosmic and that was the correct size. Does that file come out the right size for you now?
Yep, Captain Cosmic works fine.
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

OK, I get the same result as you with Bulgulators. I will add to the GitHub report.

I suggest this does not stop us taking screens, we just keep a list of ones which come out incorrectly.
User avatar
PeterJ
Site Admin
Posts: 6879
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: SAM Coupé screenshot format

Post by PeterJ »

Posted here [mention]pavero[/mention]

https://github.com/simonowen/simcoupe/issues/37
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

Here is the other example.

https://www.worldofsam.org/products/f-16-combat-pilot

(SSX output 96 kB for running screen)
User avatar
pavero
Dynamite Dan
Posts: 1586
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: SAM Coupé screenshot format

Post by pavero »

[mention]moroz1999[/mention] can you please confirm if ZX-Image library support RAW format?

https://github.com/simonowen/ssxview
RAW = 512x192 palette indices = 98304 bytes.

Here is an example of this file.
https://spectrumcomputing.co.uk/zxdb/si ... -run-1.ssx

ZX-Image shows these screens in double size resolution, at least I guess ... (and without any border?)

https://spectrumcomputing.co.uk/SCRtoIm ... x&border=0
User avatar
moroz1999
Manic Miner
Posts: 329
Joined: Fri Mar 30, 2018 9:22 pm

Re: SAM Coupé screenshot format

Post by moroz1999 »

@pavero, thanks, that sounds like some bug in code, I will investigate it further.
Should there be border as well? It's doable, but what about its color? Is it just black on Sam?
User avatar
moroz1999
Manic Miner
Posts: 329
Joined: Fri Mar 30, 2018 9:22 pm

Re: SAM Coupé screenshot format

Post by moroz1999 »

[mention]pavero[/mention], actually, it's totally ok. Raw SSX is 512*384 by design, because raw format is made to display any combinations of Sam's modes on a screen. Including mode3 which is hires 512*192, stretched to 512*384. So the minimum possible resolution for the raw SSX is 512*384.
I can possibly make some key to force 256*192 by the price of losing hires pixels, but is it really required? I think that this can be done with CSS as well.
User avatar
moroz1999
Manic Miner
Posts: 329
Joined: Fri Mar 30, 2018 9:22 pm

Re: SAM Coupé screenshot format

Post by moroz1999 »

pavero wrote: Wed Feb 03, 2021 10:46 pm ZX-Image shows these screens in double size resolution, at least I guess ... (and without any border?)

https://spectrumcomputing.co.uk/SCRtoIm ... x&border=0
I'm not sure why is it shown as 1024*768 though, I've tried it on my machine and it's converted as 512*384.
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: SAM Coupé screenshot format

Post by 4thRock »

moroz1999 wrote: Thu Feb 04, 2021 9:13 am I'm not sure why is it shown as 1024*768 though, I've tried it on my machine and it's converted as 512*384.
There are two issues: Scaling and Border.

Scaling:

SC sets 2x zoom on ZX-Image, so SCRs are displayed as 512x384. We also set the border getting 640x480 images.
The same 2x zoom applied to SSX gives 1024x768.

As it is, 2x zoom gives
- 2x2 pixel scaling on Spectrum images
- 1X2 pixel scaling on Timex images;
- 4x4 (or 1X2) pixel scaling on SSX images;

No change needed here. It's not a problem on SC because we control image sizes with CSS, but it's a bit inconsistent.


Border

Border is being ignored on SSX, and that messes up pixel scales and website display.
I suggest adding it for consistency. For now just a black border would do.
This change is needed, otherwise we have to somehow resize the images in SC and add the border area.
This is not ZX-Image's fault, but would really make our life easier ;)


When displaying image galleries it's important that image sizes are consistent, specially if we want to do 1:1 pixel scaling.
Hope it helps!
Post Reply