Give this version a test run, if you get a chance. IF you can't see a cursor with _PUTIMAGE, then maybe it's a color -1 issue? Or something else odd?
Even if the values do something odd (which I don't know why they should), you should still be able to see the arrow on the screen and move it around. In this case, it's only going to be a text sized character of an arrow (CHR$(24)), so you might need to strain your eyes to find it, but it should definitely be there.
Once a cursor is available and moving, then we can sort out what the heck is going on with the return values. Work on one thing at a time.
Code: (Select All)
DIM SHARED AS LONG MouseMoveX, MouseMoveY, MouseX, MouseY
SCREEN _NEWIMAGE(800, 600, 32)
_SCREENMOVE _MIDDLE
DO
CLS
Mouse
TMMX = TMMX + MouseMoveX: TMMY = TMMY + MouseMoveY
PRINT "Mouse x:"; MouseX
PRINT "Mouse y:"; MouseY
PRINT "MouseMoveX:"; MouseMoveX
PRINT "MouseMoveY:"; MouseMoveY
PRINT "Total MouseMoveX:"; TMMX
PRINT "TOtal MouseMoveY:"; TMMY
_LIMIT 30
_PRINTSTRING (MouseX, MouseY), CHR$(24)
_DISPLAY
LOOP UNTIL _MOUSEBUTTON(2)
SYSTEM
SUB Mouse
STATIC AS LONG CurrentX, CurrentY
STATIC AS INTEGER Init
WHILE _MOUSEINPUT
Xjunk = _MOUSEX: Yjunk = _MOUSEY
WEND 'catch up to the current mouse's position so we sync properly
X = _MOUSEX: Y = _MOUSEY
MouseMoveX = 0: MouseMoveY = 0
IF Init = 0 THEN
Init = -1
CurrentX = _WIDTH \ 2: CurrentY = _HEIGHT \ 2
_MOUSEHIDE
_MOUSEMOVE _WIDTH \ 2, _HEIGHT \ 2
ELSE
IF X <> _WIDTH \ 2 OR Y <> _HEIGHT \ 2 THEN
MouseMoveX = X - _WIDTH \ 2: MouseMoveY = Y - _HEIGHT \ 2
CurrentX = CurrentX + MouseMoveX
CurrentY = CurrentY + MouseMoveY
IF CurrentX < 0 THEN CurrentX = 0
IF CurrentX >= _WIDTH THEN CurrentX = _WIDTH - 1
IF CurrentY < 0 THEN CurrentY = 0
IF CurrentY >= _HEIGHT THEN CurrentY = _HEIGHT - 1
END IF
END IF
_MOUSEMOVE _WIDTH \ 2, _HEIGHT \ 2
WHILE _MOUSEINPUT
Xjunk = _MOUSEX: Yjunk = _MOUSEY
WEND 'clear the manual reset to the center so we don't read it in the next pass
MouseX = CurrentX: MouseY = CurrentY
END SUB
Even if the values do something odd (which I don't know why they should), you should still be able to see the arrow on the screen and move it around. In this case, it's only going to be a text sized character of an arrow (CHR$(24)), so you might need to strain your eyes to find it, but it should definitely be there.
Once a cursor is available and moving, then we can sort out what the heck is going on with the return values. Work on one thing at a time.