syscalls problem

Locked
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

syscalls problem

Post by themuffinman »

Is there some kind of science to editing the *_syscalls.asm files? I've had nothing but trouble whenever I try adding entries for more traps, generally having the game crash before it loads the UI. Btw, I'm using ioquake3.

This is what I get from the console log:

Code: Select all

----- Client Shutdown (recursive error after: Bad UI system trap: 31) -----
Closing SDL audio device...
SDL audio device shut down.
RE_Shutdown( 1 )
forcefully unloading ui vm
-----------------------
If I use the dll's instead of the vm's then the UI loads, but cgame crashes:

Code: Select all

Sys_LoadDll(cgame) found vmMain function at 6d68763a
----- Client Shutdown (Received signal 11) -----
All I added was trap_Cvar_LSet to each of them, the code of which is identical to trap_Cvar_Set except it latches the cvar. I defined the traps in the *_syscalls.c files and declared them in the public headers. I've got the syscall indexes set in cgameImport_t, gameImport_t and uiImport_t all in order straight after *_FS_SEEK. Also added them to CL_CgameSystemCalls(), SV_GameSystemCalls() and CL_UISystemCalls().

I tried edited the asm's in both VC++ and RadASM but the result is the same. I attached the files if anyone wants to see if there's something wrong with them. Is there a specific procedure to adding traps?
3xistence
Posts: 90
Joined: Sun May 13, 2012 3:02 pm

Re: syscalls problem

Post by 3xistence »

try to comment out one by one every single string you added in order to find what's the one who cause the CTD. I got a similar problem when i edited the syscall
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: syscalls problem

Post by themuffinman »

Fixed the problem. Moved them to after the math functions and specified the actual index number in the appropriate headers. All works perfectly now.
Locked