QuakespasmNX - a better Quake port

I ported Quakespasm to the Switch. Why? Because it's better than NXQuake/TyrQuake and I'm too lazy to backport features from it into NXQuake.
Github repo: /fgsfdsfgs/QuakespasmNX
Latest version: 0.4.0 (Apr 20, 2021)
Download link: Github release page

2018091704404200-DB1426D1DFD034027CECDE9C2DD914B8.jpg


2018091704382700-DB1426D1DFD034027CECDE9C2DD914B8.jpg


2018091704124800-DB1426D1DFD034027CECDE9C2DD914B8.jpg

Some of the features of the port:
  • hardware-accelerated OpenGL-based rendering in 1280x720 and 1920x1080;
  • sound, including support for OGG and MP3 music tracks;
  • supports the Mission Packs and other mods compatible with Quakespasm (Quoth, Arcane Dimensions), with a simple mod selector menu;
  • analog controls and shit;
  • gyro aiming (thanks to falquinho for implementing this);
  • multiplayer support (I think);
  • most other features of Quakespasm, such as:
    • advanced renderer with cool stuff, such as colored lighting, fog, translucent water, high-res textures, model interpolation, etc;
    • scalable, optionally translucent HUD and menus;
    • music support, as mentioned earlier;
    • raised engine limits;
    • built-in controller support, which means I had to do basically nothing to make it work on the Switch.

To install it, just unzip quakespasmnx_v040.zip to the root of your SD card, then copy pak0.pak and (optionally, if you have the full version of Quake) pak1.pak from your Quake installation to /switch/quakespasm/id1/. You can then run the game using the Homebrew Launcher. You can get pak0.pak from the Shareware Quake data files in this archive.
If you want to play Mission Pack 1, copy hipnotic/pak0.pak to /switch/quakespasm/hipnotic/ from your installation.
If you want to play Mission Pack 2, copy rogue/pak0.pak to /switch/quakespasm/rogue/ from your installation.
For any other mod, just copy its folder to /switch/quakespasm/.

Some notes:
  • if it crashes and exits back to HBL/Horizon silently, check /switch/quakespasm/error.log to find out what caused it;
  • music should be copied into a music subfolder inside of the appropriate game folder, and the tracks should be named track02.ogg - track11.ogg (or .mp3 if you're using MP3s), e.g.:
    • Quake music goes into /switch/quakespasm/id1/music/;
    • Mission Pack 1 music goes into /switch/quakespasm/hipnotic/music/.
  • some more complex mods, like Arcane Dimensions, will only work if you run Quakespasm in regular app mode (not from the Album), as they require more memory;
  • to enable texture filtering, change gl_texturemode in config.cfg to GL_LINEAR_MIPMAP_LINEAR;
  • to enable round particles, change r_particles in config.cfg to 1, 2 for square particles;
  • you can adjust analog and gyro sensitivity in Options -> Joystick Options;
  • to get out of the "Completed" intermission screen at the end of a map, press "jump" (LTRIGGER by default) a few times;
  • to input text in text fields and console, press Y, to delete text press X, to scroll the console use L and R;
  • mod selector can be accessed from the Options menu;
  • multiplayer was only tested between Switch and PC, use the IP shown in the Multiplayer -> TCP/IP menu to connect to your Switch;
  • read the original Quakespasm readme for more information;
  • if you have any suggestions or bug reports, please post them here or in the Github issues.

Credits:
  • Quakespasm was made by:
    • Ozkan
    • Eric
    • Sander
    • Stevenaaus
    • based on FitzQuake by Fitzgibbons
    • and probably others;
  • falquinho and Ch0wW for their contributions and testing;
  • fincs, Armada651, Subv and probably others for their work on the OpenGL/mesa/libdrm stuff;
  • id Software for Quake.
 

Attachments

  • quakespasmnx_v040.zip
    3.2 MB · Views: 144
Last edited by fgsfds,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@fgfds.

Sorry to be a pain - I've just set up the devkitpro on Ubuntu as I wanted to compile some programs from github. However I am looking for an example code to run to do the following:

Check the sd card to see if helloworld.txt exists.
If if it exists - do nothing
If it does not exist - create a new text file called - helloworld.txt - containing some text.

For example: this would not work as there is no ofstream in the devkitpro.

Code:
std::ofstream out("somefile.bin", std::ios::binary);
out.write(array, sizeof(array));

So as devkitpro uses some other way to write a file - that's the example I'm looking for.

Thanks.
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
And I thought we were SO CLOSE to fixing it ! I'm definitely sorry about that.
Time to make more checks then...
That's the memory corruption issue I was talking about on github. There's no way around it. The first build just happened to be stable.

So as devkitpro uses some other way to write a file - that's the example I'm looking for.
I don't know about ofstream (I'm pretty sure it's in there, why don't you try it?), but the standard libraries included with DKA64 contain standard C file facilities (fopen/fread/fwrite/fprintf).
 
Last edited by fgsfds,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
I don't know about ofstream (I'm pretty sure it's in there, why don't you try it?), but the standard libraries included with DKA64 contain standard C file facilities (fopen/fread/fwrite/fprintf).

That's weird, I tried with using those c file things - fopen etc - but I kept getting errors compiling. Thanks anyway, I'll have a look at the lockpic code to see how it's done.
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
Are you writing a payload or a NRO homebrew? In the first case there's indeed no built-in file IO functions, you have to use hwinit or something.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Are you writing a payload or a NRO homebrew? In the first case there's indeed no built-in file IO functions, you have to use hwinit or something.

No I want to edit argon-nx payload injector. I want to check if my licence.dat (for sxos) is present on my sd card, if not I want to write a new licence.dat from a hex array (specific to my own licence.dat file).
This is handy for me as my switch has a modchip fitted - so I can always store the hex to generate that dat file on the chip, so if I format my card and lose my licence, or sxos website is closed, I can always have that file.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
That's a payload, so as fgsfds said, no built-in file I/O. See how argonnx does it, it might have file functions you can use.

e: nice idea storing the file for safe-keeping on the chip anyway :)

Hekate and Lockpic-rcm are payloads and can generate your keys into a file, so it's possible - I'll have a look at the source for those and see If I can figure it out.
 
  • Like
Reactions: hippy dave

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,874
Trophies
2
XP
29,188
Country
United Kingdom
Hekate and Lockpic-rcm are payloads and can generate your keys into a file, so it's possible - I'll have a look at the source for those and see If I can figure it out.
Yeah, and argonnx checks for the existence of payloads and writes screenshot files, so honestly take a look at its code and it might have all the functions you need.
 
  • Like
Reactions: mrdude

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
Yes, it runs. Some of the more complex maps like ad_sepulcher require regular app RAM. It's also pretty slow, but that might improve with the next release. And it does support mods, read the OP.
 

-Pao

Active Member
Newcomer
Joined
Nov 16, 2018
Messages
25
Trophies
0
XP
462
Country
Italy
it works for me, but I had to delete everything I had before. I'm using only the full version of quake, without any expansions for now
Atmos 0.8.8 and 7.0.1
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
Version 0.2.0 released. Thanks to @Ch0wW and @falquinho for their input-related contributions and testing.

Notable changes from v0.1.0:
  • added gyro aiming;
  • added swkbd input in text fields and console;
  • added joystick settings menu;
  • added a new mod select menu (accessed from the Options menu);
  • added 1080p support;
  • fixed multiplayer;
  • updated dependencies to their latest versions;
  • stability improvements to enhance the user's experience (mostly, the game now exits properly, handles graphics stuff better and uses additional memory in regular app mode).
See the original post for download links and instructions.
You can probably just unzip it on top of your old install. The game also now reads resources from the current directory, meaning you can put the quakespasm folder anywhere.
 

LSolrac

Well-Known Member
Newcomer
Joined
Oct 26, 2015
Messages
61
Trophies
0
Age
28
XP
418
Country
If it works, please do let us know. I've tried a few times but no avail.


Also how does one get HD Textures to work? I've tried extracting the packs to ID1/gfx, materials but no avail also.
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
  • stability improvements to enhance the user's experience (mostly, the game now exits properly, handles graphics stuff better and uses additional memory in regular app mode).
This never gets old :rofl2:
Any chance of get those improvements in DOOM 64 port? :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.ebay.com/itm/386617469929?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=2T8UwYf_Qse&...