Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: __builtin on July 15, 2019, 12:14:08 PM

Title: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on July 15, 2019, 12:14:08 PM
I'm pleased to announce that we now have a playable version of Quake as a plugin (not yet merged).

For those itching to try it out, use the patch below (currently only tested on iPod 6G):

http://gerrit.rockbox.org/r/#/c/1832/
 (http://gerrit.rockbox.org/r/#/c/1832/)

Game data files (id1/pak0.pak) go in /.rockbox/quake.

(This is likely the absolute limit of what is practical to port to Rockbox. You will be getting no more 3-D games from me!)
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on July 18, 2019, 03:19:29 PM
I was able to complete the first level!

Its frustrating not being able to jump though (0/0 secrets is unacceptable and I can't set to nightmare difficulty ;)

I think if I map back/down to jump then that should improve the keymap.

Its amazing that you were able to get this port this far.

I can't help but be sad at the colour palette/software rendering artifacts and the glitchy audio though.

If you spend anymore time on this, then good luck with the final optimisations!
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on July 18, 2019, 05:44:00 PM
It's possible to customize the keymap any way you want. Just go to Options > Customize Controls.

Regarding audio, I've made some significant optimizations in recent patch sets and locally. You could see if those work any better.

Finally, I haven't seen any rendering issues, on ipod6g at least. What exactly is the problem you're seeing?

Also-what target is that?
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on July 18, 2019, 06:28:39 PM
Finally, I haven't seen any rendering issues, on ipod6g at least. What exactly is the problem you're seeing?

Okay, I've uploaded 3 files.

rockbox_quake.png -> https://www.rockbox.org/wiki/ScreenDump of the game and how it looks
winquake.png -> screenshot of winquake running in WINE
screenshot_screendump.png -> a screendump of the image viewer on my ipod6g viewing winquake.png (this proves it can display the same colours as the hardware rendered winquake?

I had to use ImageMagick to convert the bmp screendumps to png
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on July 18, 2019, 06:50:43 PM
Oh, I know what's going on. The game has an in-game "brightness" setting which changes some gamma mapping or whatever. That's useless and is the cause of the color issues you're seeing. To fix it, go to Options and turn the brightness setting down as low as it goes.

EDIT: the latest patch sets have assembly sound mixing routines and should sound much better.
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on July 19, 2019, 02:56:15 AM
Oh, I know what's going on. The game has an in-game "brightness" setting which changes some gamma mapping or whatever. That's useless and is the cause of the color issues you're seeing. To fix it, go to Options and turn the brightness setting down as low as it goes.

EDIT: the latest patch sets have assembly sound mixing routines and should sound much better.

Unfortunately as soon as you adjust the brightness in game - either up or down - the screen goes 100% white and you have to force reset the ipod.

Do you know the cfg values to insert to test setting brightness to low without the ui?
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on July 19, 2019, 11:22:10 AM
Hmm, that's odd. Try deleting any .cfg files in /.rockbox/quake/id1.

Or you can edit your config file by adding or editing
Code: [Select]
gamma "1.0"
By the way, which version (shareware or registered) are you running?
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on July 20, 2019, 07:27:41 AM
Hmm, that's odd. Try deleting any .cfg files in /.rockbox/quake/id1.

Yep, deleted autoexec.cfg and config.cfg and it fixed the colours.

Sounds like if you've fixed the audio the port is as good as finished!

I have no idea which version of Quake I have - its just Quake.zip in my games folder and I must have downloaded it many moons ago.
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: Frankenpod on July 21, 2019, 04:30:32 AM

(This is likely the absolute limit of what is practical to port to Rockbox. You will be getting no more 3-D games from me!)

So for my ipod, the answer to "but can it run Crysis" is "no, of course it can't!"?
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on July 21, 2019, 02:20:25 PM
I just merged the patch into the master branch. Give it a whirl and tell me how it runs! (Registered episodes work, too.)
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on August 26, 2019, 01:41:55 PM
Finally got round to compiling again.

I compiled all of rockbox and then pulled out only the quake binaries and copied via usb:

Quote
[foo@bar quake]$ tree .rockbox/
.rockbox/
└── rocks
    └── games
        ├── quake.ovl
        └── quake.rock

2 directories, 2 files

As soon as I launch the game I get an on screen message saying "Incompatible version".

Quote
[foo@bar quake]$ grep -rHiB 6 'incompatible'
net_dgrm.c-   if (MSG_ReadByte() != NET_PROTOCOL_VERSION)
net_dgrm.c-   {
net_dgrm.c-      SZ_Clear(&net_message);
net_dgrm.c-      // save space for the header, filled in later
net_dgrm.c-      MSG_WriteLong(&net_message, 0);
net_dgrm.c-      MSG_WriteByte(&net_message, CCREP_REJECT);
net_dgrm.c:      MSG_WriteString(&net_message, "Incompatible version.\n");

[foo@bar quake]$ grep -rHi NET_PROTOCOL_VERSION
net.h:#define NET_PROTOCOL_VERSION   3

Did I screw something up here?
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on August 26, 2019, 10:09:53 PM
Plugins are tightly bound to the Rockbox core and cannot be separately installed. You will have to do a complete installation.
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: bobba_mosfet on August 27, 2019, 03:00:06 AM
Thanks, obviously it launches now! D'oh.

Switched my PAKs to a known verified release.

Still hearing some artifacting in the audio - similar to the kind of sounds you'd hear if you encoded cymbals to mp3 64k and a bit underwatery.

Sometimes the gun would fire without input too.

Honestly though, I'd say merge it, its a great POC!

Not sure I will be able to test any more!
Title: Re: Ladies and gentlemen, we have QUAKE!
Post by: __builtin on August 27, 2019, 01:01:15 PM
Yeah, the sound quality is far from perfect. I think the sample rate is set at 16kHz . I've already merged it, actually.