Quake3World.com Forums
     Programming Discussion
        syscalls problem


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: syscalls problem

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 384
PostPosted: 04-14-2013 12:25 PM           Profile Send private message  E-mail  Edit post Reply with quote


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:
----- 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:
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?




Attachments:
syscalls.zip [4.24 KB]
Downloaded 318 times
Top
                 

Warrior
Warrior
Joined: 13 May 2012
Posts: 90
PostPosted: 04-15-2013 03:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 384
PostPosted: 04-16-2013 02:31 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.