More help needed! Mode 32 vs 33

Helpful tips and guides, also new users can ask for help here.
User avatar
Sebright
ROM Dongle
Posts: 31
Joined: Fri Feb 07, 2025 9:55 am

More help needed! Mode 32 vs 33

Post by Sebright »

Hi again!

I've now finished my attempt at writing a new adventure game, and have done 2 versions, one for QDOS and one for SMSQ/E, written using Q-emulator. I've done over 60 colour screens in _pic format, in Mode 33. Now I've finished, I thought I'd download QPC2 and see if it would run on that, and it does, but without the pics.

FPIC_LOAD gives error -19 (wrong mode). So mode 33 (QEM version) and mode 32 (QPC2 version) are incompatible. :cry:

I've tried poking the header bit for mode, and the pic then loads into QPC2 but looks so wrong. Am I going to have to redo all my pics in Mode 32 and make a 3rd version???

I could make the first 2 versions available for download if there is any interest. I mainly did it as a challenge to myself, but it would be great if others could play it too.

Cheers,
Alan


Try out Finding Evan - I need some feedback :lol:
User avatar
dilwyn
Mr QL
Posts: 3053
Joined: Wed Dec 01, 2010 10:39 pm

Re: More help needed! Mode 32 vs 33

Post by dilwyn »

Sebright wrote: Thu Mar 13, 2025 4:46 pm Hi again!

I've now finished my attempt at writing a new adventure game, and have done 2 versions, one for QDOS and one for SMSQ/E, written using Q-emulator. I've done over 60 colour screens in _pic format, in Mode 33. Now I've finished, I thought I'd download QPC2 and see if it would run on that, and it does, but without the pics.

FPIC_LOAD gives error -19 (wrong mode). So mode 33 (QEM version) and mode 32 (QPC2 version) are incompatible. :cry:

I've tried poking the header bit for mode, and the pic then loads into QPC2 but looks so wrong. Am I going to have to redo all my pics in Mode 32 and make a 3rd version???

I could make the first 2 versions available for download if there is any interest. I mainly did it as a challenge to myself, but it would be great if others could play it too.

Cheers,
Alan
Yes, mode 32 and 33 are different, so it's not as easy as just changing the mode byte in the PIC file preambles, unfortunately! One mode (32) was meant for Intel systems, the other for 680x0 (33) systems. The high/low bytes are reversed and the layout of the pixels within each colour word are a bit different too. Info here: https://dilwyn.theqlforum.com/gd2/smsqe298doc.zip

There are programs such as my BMP which will do the conversion from one mode to another. Even better since Bob Spelten improved it! Get BMP from https://dilwyn.theqlforum.com/graphics/index.html

No doubt there are other programs on the same page to do the same job.


User avatar
Andrew
QL Wafer Drive
Posts: 1031
Joined: Tue Jul 17, 2018 9:10 pm

Re: More help needed! Mode 32 vs 33

Post by Andrew »

Sebright wrote: Thu Mar 13, 2025 4:46 pm Hi again!

I've now finished my attempt at writing a new adventure game, and have done 2 versions, one for QDOS and one for SMSQ/E, written using Q-emulator. I've done over 60 colour screens in _pic format, in Mode 33. Now I've finished, I thought I'd download QPC2 and see if it would run on that, and it does, but without the pics.

FPIC_LOAD gives error -19 (wrong mode). So mode 33 (QEM version) and mode 32 (QPC2 version) are incompatible. :cry:

I've tried poking the header bit for mode, and the pic then loads into QPC2 but looks so wrong. Am I going to have to redo all my pics in Mode 32 and make a 3rd version???

I could make the first 2 versions available for download if there is any interest. I mainly did it as a challenge to myself, but it would be great if others could play it too.

Cheers,
Alan
Hi Sebright!

I's so happy that I'm not the only one who writes games! We need more game developers!!
Please make the versions available for download. It would be great if you also post the sourcecode, maybe others will learn from them and we will see more games/programs.

Now, regarding the mode 32 and mode 33 images, you have 2 options:
1. create a new version for mode 32 - convert offline the images and create a new version. As Dilwyn said, BMP is the best tool for this
2. convert the images on the fly using the toolkit CV2NAT - you can download it here: https://www.knoware.no/htm/toolkits.htm

Because you game is an adventure and speed is not critical, I would go with option 2. CV2NAT is pretty fast, so the delay in loading the image is minimal.

There also is a mode 16 (256 colors)! Going with option 2 it means that you can have a single game that works in modes 32, 33 and 16
Last edited by Andrew on Thu Mar 13, 2025 6:45 pm, edited 1 time in total.


User avatar
Sebright
ROM Dongle
Posts: 31
Joined: Fri Feb 07, 2025 9:55 am

Re: More help needed! Mode 32 vs 33

Post by Sebright »

Thanks so much Dilwyn, that was quick :D

I've downloaded that and I'll give that a go when I get a minute (or 180)!

Cheers,
Alan


Try out Finding Evan - I need some feedback :lol:
User avatar
dilwyn
Mr QL
Posts: 3053
Joined: Wed Dec 01, 2010 10:39 pm

Re: More help needed! Mode 32 vs 33

Post by dilwyn »

Thanks Andrew. I didn't know about CV2NAT. I've just downloaded it and had a look at the instructions - looks extremely useful!

Doesn't Per write some brilliant software?


User avatar
Sebright
ROM Dongle
Posts: 31
Joined: Fri Feb 07, 2025 9:55 am

Re: More help needed! Mode 32 vs 33

Post by Sebright »

Andrew wrote: Thu Mar 13, 2025 5:36 pm

I's so happy that I'm not the only one who writes games! We need more game developers!!
Please make the versions available for download. It would be great if you also post the sourcecode, maybe others will learn from them and we will see more games/programs.
Thanks Andrew,

I'll post the links the links soon, once I work out how. The SMSQ/E one is over 10MB. I'm not so sure about the source code though. I don't really understand a lot of it, as I just edited an old version the Voyage of the Beano and I'm sure there's lots of redundant stuff in there. I'm amazed it actually works. Should have used Quill!
Andrew wrote: Thu Mar 13, 2025 5:36 pm
Now, regarding the mode 32 and mode 33 images, you have 2 options:
1. create a new version for mode 32 - convert offline the images and create a new version. As Dilwyn said, BMP is the best tool for this
2. convert the images on the fly using the toolkit CV2NAT - you can download it here: https://www.knoware.no/htm/toolkits.htm

Because you game is an adventure and speed is not critical, I would go with option 2. CV2NAT is pretty fast, so the delay in loading the image is minimal.

There also is a mode 16 (256 colors)! Going with option 2 it means that you can have a single game that works in modes 32, 33 and 16
That is a useful idea. I'll look into it. If Mode 16 can cope with the 640x256 graphics window, it should be possible.

Back soon with the links,
Alan


Try out Finding Evan - I need some feedback :lol:
User avatar
Andrew
QL Wafer Drive
Posts: 1031
Joined: Tue Jul 17, 2018 9:10 pm

Re: More help needed! Mode 32 vs 33

Post by Andrew »

Sebright wrote: Thu Mar 13, 2025 7:35 pm If Mode 16 can cope with the 640x256 graphics window, it should be possible.
If you want maximum compatibility you should make your program work only in these modes used by Q68 and QIMSI Gold:

Video modes
0. Standard QL MODE 8 256x256 pixel (8 colours)
1. Standard QL MODE 4 512x256 pixel (4 colours)
2. Q40/Q60 highcolour mode 512x256 pixel (65536 colours)
3. Q40/Q60 highcolour mode 1024x512 pixel (65536 colours)*
4. High resolution QL MODE 4 1024x768 pixel (4 colours)
5. Aurora mode 1024x768 pixel, 256 (colours)*
6. Medium resolution highcolour mode 512x384 pixel (65536 colours)
7. High resolution highcolour mode 1024x768 pixel (65536 colours)*

Note: Due to memory bandwidth limitations, using the video modes 3, 5 and 7 slows down the system siginficantly.
The loss of speed is approximately 37%, 28% and 56%. These modes are not recommended when speed is relevant.

So for best results and compatibility your game should run in Mode 6 - Medium resolution highcolour mode 512x384 pixel (65536 colours).
Or mode 2 512x256 pixel (65536 colours), but mode 6 has the advantage of having square pixels, so graphic art designed on Windows, Linux, Mac will not be deformed.
There is no standard video mode with 640 pixels ...


User avatar
Sebright
ROM Dongle
Posts: 31
Joined: Fri Feb 07, 2025 9:55 am

Re: More help needed! Mode 32 vs 33

Post by Sebright »

Here's the links to my Google drive with the files...

https://drive.google.com/file/d/1ULWQyz ... drive_link
for the SMSQ/E version

https://drive.google.com/file/d/1U-QPWv ... drive_link
for the QDOS version

Hope these work.

The game is set in Canada, where you are visiting your uncle Evan, but he has gone missing. So it's the usual wander around, examine everything, grab everything that isn't nailed down, ask a few questions of the people you meet, try giving gifts to curry favour, all that kind of stuff. The story should unfold and the problems (probably) aren't too tricky.

The graphics are AI generated, as I don't have a tame graphics artist handy. After the pics are downsized and converted to Mode 4, they do look a bit pants to be honest. That's why I felt I ought to do a full colour version too. Or maybe 3 full colour versions lol.

Some of the graphics later in the game have undergone some basic encryption, so there can be no peeking to give away the ending.

That's it. Have a look if you like...

Cheers,
Alan

p.s. thanks for that info Andrew, looks like there will be a new version on the way soon(ish)...


Try out Finding Evan - I need some feedback :lol:
User avatar
Andrew
QL Wafer Drive
Posts: 1031
Joined: Tue Jul 17, 2018 9:10 pm

Re: More help needed! Mode 32 vs 33

Post by Andrew »

Sebright wrote: Thu Mar 13, 2025 8:01 pm Here's the links to my Google drive with the files...
please give us access to download files :)


User avatar
Sebright
ROM Dongle
Posts: 31
Joined: Fri Feb 07, 2025 9:55 am

Re: More help needed! Mode 32 vs 33

Post by Sebright »

Andrew wrote: Thu Mar 13, 2025 8:22 pm
Sebright wrote: Thu Mar 13, 2025 8:01 pm Here's the links to my Google drive with the files...
please give us access to download files :)
Sorry, I think I've now made it public access to download. New to this!

Alan

p.s. my watch tells me my body battery is down to 5% so off to bed soon!


Try out Finding Evan - I need some feedback :lol:
Post Reply