Game Development Community

Mouse control assembly issue

by Steve Lamperti · in Torque Game Engine · 04/11/2005 (4:08 pm) · 2 replies

I am working on a TGE project using Codewarrior as my development environment. I just noticed that I had both the TORQUE_SUPPORTS_NASM and the TORQUE_SUPPORTS_VC_INLINE_X86_ASM macros turned off. Because I wasn't sure what I was missing in my project with both these macros turned off, I have been playing with turning them on. The NASM code doesn't seem to be supported in Codewarrior at all, and looking at old posts this seems to make sense. The X86_ASM macro compiles and links successfully, but after building with it turned on, I am seeing a very interesting control issue with the mouse.

What is happening is that the mouse control seems to be behaving very strangely for the forward/backward motion of the mouse. when I am facing in a direct Y direction, forward backward motion of the mouse seems reversed. When I am turned from the direct Y direction, moving the mouse seems to be including some rotation information as well as the strict up/down motion I am expecting. This is a bit hard to describe, but basically it's just off.

In otherwords, there seems to be a bug of some kind in the X86_ASM code under the codewarrior compiler. (This is all on windows.)

If anyone could confirm this, or offer any suggestions, I would appreciate it.

#1
04/12/2005 (1:33 pm)
I've narrowed this down to a specific routine, if anyone is interested. The routine that is turned on when the X86_ASM macro is enabled is SSE_Matrix_x_MatrixF in mMathSSE.cc, and it either has a direct bug in it, or else it just doesn't assemble correctly under codewarrior. I'm just bypassing it for right now, as that allows me to use the rest of the assembly code, but like I said, I believe it has a bug in it. (I'm not the right person to try to figure out what the bug is, but someone might want to look into it.)
#2
04/12/2005 (11:55 pm)
Pretty wild. Maybe CW has broken SSE support?