New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reintroduce QVM support #1182
base: master
Are you sure you want to change the base?
Reintroduce QVM support #1182
Commits on Sep 26, 2023
-
Add vm_arm.cpp, vm_interpreted.cpp, vm_local.h and vm_x86.c from mvde…
…vs/jk2mv@7dc8400. Does not compile. Files unmodified to make diffs easier.
Configuration menu - View commit details
-
Copy full SHA for 2d7593c - Browse repository at this point
Copy the full SHA 2d7593cView commit details -
Fix compiling with the jk2mv vm_* files.
Move some vm related structs. Merge some vm related structs. Adjust a few places in vm_* files. Port a few functions from jk2mv's vm.cpp file (same revision as the vm_* files).
Configuration menu - View commit details
-
Copy full SHA for 324b6fd - Browse repository at this point
Copy the full SHA 324b6fdView commit details -
Add vm_game, vm_cgame and vm_ui cvars to set the prefered vm mode: - 0: native - 1: interpret (qvm) - 2: compile (qvm) Can load QVMs on 64 bit, but it's not stable, yet. Loading the ui.qvm shows the menu, but crashes when entering player customization. Loading jampgame.qvm crashes when loading a map. These crashes are most likely related to the QVM being 32 bit and addresses getting passed in and out that don't fit. Also shared structs may be offset.
Configuration menu - View commit details
-
Copy full SHA for f57ce90 - Browse repository at this point
Copy the full SHA f57ce90View commit details
Commits on Sep 30, 2023
-
Fix return values in nested system calls from QVMs
This issue occured when the game module called the syscall G_NAV_GETNEARESTNODE. The module would receive a different value than the engine intended to return and that caused issues when the incorrect return value was used as input for other functions, causing issues and eventually crashes during later syscalls. This did not affect interpreted QVMs. Once pinpointed the source of the issue being DoSyscall a diff with ioq3 provided a fix. This fix comes from ioq3@1ce8ba0cdb8d8f2825177877a16d8525100280dd.
Configuration menu - View commit details
-
Copy full SHA for 54b4990 - Browse repository at this point
Copy the full SHA 54b4990View commit details -
Add support for ui.qvm on 64 bit engine builds.
Add g2handles to map g2 instances (64 bit address) to integers that the QVM can handle and adjust legacy uiapi to make use of them for QVMs. Convert glconfig_t in uiapi for QVMs, because the structs don't match.
Configuration menu - View commit details
-
Copy full SHA for 1d3d3c4 - Browse repository at this point
Copy the full SHA 1d3d3c4View commit details -
Add extra memory to QVMs on load to use when the module doesn't provi…
…de a destination itself and expects to be given a pointer. Make use of QVM extra memory in CL_GetGlconfig for uiapi.
Configuration menu - View commit details
-
Copy full SHA for ccdc67e - Browse repository at this point
Copy the full SHA ccdc67eView commit details -
Adjust the gameapi in a similar way to the uiapi for better QVM compa…
…tibility. Still missing conversion for structs like sharedEntity_t.
Configuration menu - View commit details
-
Copy full SHA for 9002d28 - Browse repository at this point
Copy the full SHA 9002d28View commit details -
Replace sharedEntity_t with sharedEntityMapper_t in most places.
As the QVM is always 32 bit, even if the engine is 64 bit the structs don't match due to pointers inside of them. The sharedEntityMapper_t struct has the same members as the sharedEntity_t struct, but all of them are pointers to the types sharedEntity_t uses. When the game module calls the locate gamedata syscall the pointers of the mapper struct are set. The mapper should be usable with native libraries and QVM.
Configuration menu - View commit details
-
Copy full SHA for 39000e2 - Browse repository at this point
Copy the full SHA 39000e2View commit details
Commits on Oct 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b92fc59 - Browse repository at this point
Copy the full SHA b92fc59View commit details -
Adjust the cgameapi in a similar way to the uiapi and gameapi for bet…
…ter QVM compatibility.
Configuration menu - View commit details
-
Copy full SHA for f981711 - Browse repository at this point
Copy the full SHA f981711View commit details -
Configuration menu - View commit details
-
Copy full SHA for c249103 - Browse repository at this point
Copy the full SHA c249103View commit details
Commits on Oct 6, 2023
-
Fix previously undefined behavior in SV_ClipMoveToEntities.
The vanilla and OpenJK game module use "-1" as magic value for the SV_Trace passEntityNum instead of ENTITYNUM_NONE (1023). This lead to SV_ClipMoveToEntities trying to access entity "-1" and to read its ownerNum. When switching from sharedEntity_t to sharedEntityMapper_t for the QVM support the code got adjusted to no longer read out of bounds values, potentially leaving passOwnerNum unset/undefined (as opposed to be read from undefined memory). This commit fixes this by assuming a default value and refactoring some code to be simpler.
Configuration menu - View commit details
-
Copy full SHA for 6fd6d78 - Browse repository at this point
Copy the full SHA 6fd6d78View commit details
Commits on Oct 28, 2023
-
Compile vm_legacy cvar into non-debug builds.
As most (maybe all) modules that support the OpenJK API also support the Legacy API give users the option to use the legacy system without requiring a debug build.
Configuration menu - View commit details
-
Copy full SHA for 73e46f9 - Browse repository at this point
Copy the full SHA 73e46f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e3da12 - Browse repository at this point
Copy the full SHA 9e3da12View commit details -
Configuration menu - View commit details
-
Copy full SHA for db0a3d4 - Browse repository at this point
Copy the full SHA db0a3d4View commit details
Commits on Oct 29, 2023
-
Use longjmp in Com_Error, because throwing an exception when the call…
… comes from within the QVM results in a crash.
Configuration menu - View commit details
-
Copy full SHA for bce0347 - Browse repository at this point
Copy the full SHA bce0347View commit details -
Add com_dedicatedForceErrorsToFatal cvar.
At some point OpenJK forced all Com_Error calls for dedicated servers to be ERR_FATAL, leading to the process terminating. This can be helpful for some simple forms of automatic restart scripts, but the original behavior of dropping to the interactive console can be useful during mod development or when testing various settings. To avoid issues with restart scripts depending on the ERR_FATAL rewrite the cvar defaults to enabled, but can be disabled to restore the original behavior.
Configuration menu - View commit details
-
Copy full SHA for e02ac4a - Browse repository at this point
Copy the full SHA e02ac4aView commit details
Commits on Oct 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf4fb13 - Browse repository at this point
Copy the full SHA cf4fb13View commit details
Commits on Nov 2, 2023
-
Port file extension and character restrictions for vms from jk2mv.
- Use GetFullPathNameA, GetFinalPathNameByHandleA and realpath to actually resolve paths when validating filenames - Use ERR_DROP instead of ERR_FATAL when a VM tries to access a forbidden extension - Check for more forbidden extensions - Prevent the VM from accessing files with unwanted characters in their names (just block the access and print a warning, don't drop)
Configuration menu - View commit details
-
Copy full SHA for cf10de6 - Browse repository at this point
Copy the full SHA cf10de6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3f43ad - Browse repository at this point
Copy the full SHA d3f43adView commit details
Commits on Nov 3, 2023
-
vm_x86.cpp: push and pop ebx in EmitCallDoSyscall.
Existing comments in the function suggested it would already push and pop ebx (non-volatile), but really performed the actions on ecx (volatile).
Configuration menu - View commit details
-
Copy full SHA for 4ab1db0 - Browse repository at this point
Copy the full SHA 4ab1db0View commit details -
vm_x86.cpp: backup and restore registers r12, r13, r14 and r15 in Emi…
…tCallDoSyscall, because they are non-volatile.
Configuration menu - View commit details
-
Copy full SHA for afa3d13 - Browse repository at this point
Copy the full SHA afa3d13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a74fa5 - Browse repository at this point
Copy the full SHA 2a74fa5View commit details
Commits on Nov 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2626c38 - Browse repository at this point
Copy the full SHA 2626c38View commit details -
Use new macros to fix double pointers in sharedEntityMapper reading 6…
…4 bit addresses from QVMs when dereferencing. Remove ConvertedEntity function, because the sharedEntityMapper read macros handle the required changes on demand now.
Configuration menu - View commit details
-
Copy full SHA for 9eb8502 - Browse repository at this point
Copy the full SHA 9eb8502View commit details
Commits on Nov 12, 2023
-
Add SV_EntityMapperReadGhoul2 to handle special case for ghoul2 handl…
…es that SV_EntityMapperReadData was not aware of.
Configuration menu - View commit details
-
Copy full SHA for 57cf72f - Browse repository at this point
Copy the full SHA 57cf72fView commit details
Commits on Apr 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9292075 - Browse repository at this point
Copy the full SHA 9292075View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1271456 - Browse repository at this point
Copy the full SHA 1271456View commit details