How can I use the Ninja Tracker and read the mouse X,Y?

STOS-related stuff in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

How can I use the Ninja Tracker and read the mouse X,Y?

Postby EstTeeEfEm » Tue Oct 06, 2015 6:16 am

Hi all,

first things first... if the damned search function in this BBS worked i'd use that! Instead of telling me I have to wait 15 seconds everytime (yeah, i waited about a minute each time before giving up)

I am having all sorts of trouble using the Ninja STE tracker extension and reading the mouse X,Y plus the mouse buttons within a STOS program...
As it stands, it just crashes the mouse until the MOD file stops playing... I need to be able to see the mouse pointer or at least use a BOB/Sprite to work out the X,Y positions while the routine is running.

Everything works fine before and AFTER playback and I know the documentation for the Ninja Replayer states the keyboard/mouse wont work properly but can you read the mouse directly with some peek or other?

I'm trying to avoid posting the code and files because its quite messy and kind of unreadable.. (whose code is neat? :? )

Thanks in advance

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby exxos » Tue Oct 06, 2015 7:13 am

IIRC most trackers turn off mouse and keyboard interrupts so unfortunately other than keys (which is normally done with a new command in whatever tracker extensions you use) I don't know of ever being done.

You have to think of tracker code as assembly code which is run "outside" of STOS. STOS simply calls the routine and passes the memory location to the assembly code so it knows where in RAM the module is. The checking for keyboard command STOS simply halts running any actual STOS code until that key is pressed, then the tracker "turns off" and STOS code is allowed to continue.

Overall the mouse is turned off as it can slow down music related code, I know playing sampled sound slows down when the mouse is moved as CPU time is diverted away from the music code. So it is the same reason why it is disabled in tracker extensions.

The only possible extension is the STOS tracker extension (ABK format) terrible quality, but you have 3 choices of playback speeds. Running the lowest quality 7khz frees up some CPU time, though its been like 20 years since I looked into all this, but I am pretty sure STOS can still run code with that extension, I don't know if mouse works still or not though anyway. If it does, it will most likely slow down the music. Tracker music is only really advisable for intro screens, any in game music has to be chip music.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby EstTeeEfEm » Tue Oct 06, 2015 7:46 am

Its odd because the keyboard and joystick work but not the mouse ...?

even the old
if inkey$=" " default : end works nicely... rather than some special function inside the extension.
Real pain in the ass when working on something that relies so heavily on the mouse, maybe ill have to come up with something diff.. time to rethink my strategy ;)

the Ninja tracker uses STE specific hardware, would this not make a difference?

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby exxos » Tue Oct 06, 2015 7:53 am

EstTeeEfEm wrote:Its odd because the keyboard and joystick work but not the mouse ...?

even the old
if inkey$=" " default : end works nicely... rather than some special function inside the extension.
Real pain in the ass when working on something that relies so heavily on the mouse, maybe ill have to come up with something diff.. time to rethink my strategy ;)

the Ninja tracker uses STE specific hardware, would this not make a difference?


I never programmed on a STE with STOS. I know of the Ninja extension, but I don't recall any extensions being able to run STOS code at the same time as playing music.. other than the ABK extension.

By the sounds of it then, Ninja can run code while playing music ? I would imagine the code would run pretty slow though as music takes up pretty much all the CPU time. someone else might know how to peek the mouse directly, but not sure it is possible. I think the mouse is intentionally turned off because it slows down the music if moved. So its not really a good idea to use the mouse with music anyway.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby EstTeeEfEm » Tue Oct 06, 2015 8:03 am

I never programmed on a STE with STOS. I know of the Ninja extension, but I don't recall any extensions being able to run STOS code at the same time as playing music.. other than the ABK extension.


Well, the Ninja Extension is the only one that I can find that can do code, and graphics manipulation while running, albeit at 7khz but its VERY good at it.
as for ABK ... A Bit Krap :P

Seriously, if you've not used this extension you need to ;) its awesome
I use STEEM, unfort dont have an STE until i sell my other stuff lol.

If the mouse slows everything down then bugger! it wont work, maybe i'll just stick to the keyboard routines, OR funnily enough, have it Joystick driven.. which is bizarre but still..? (Thinking out loud now..)

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby exxos » Tue Oct 06, 2015 12:46 pm

I'm would have probably never used Ninja as I only ever had a STFM years ago. Later I moved onto the Falcon, so playback was done with different extensions on the DSP anyway :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby EstTeeEfEm » Wed Oct 07, 2015 12:53 pm

Aah, now then ;)

I've written this "small" program and its quite well documented REM wise ;) , if you would like to convert the play routines for Falcon it would make this program accessible to ALL falcon users...
Atm, it "should" be compliant with Falcs but the replayer MOD routine is not... its not a huge BAS file but the extension is purely STE only. I am going to write an FM version when this is finished by changing the routines round, would you be willing to do a Falcon version? I assume your quite busy but it might not take too long?

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: How can I use the Ninja Tracker and read the mouse X,Y?

Postby exxos » Wed Oct 07, 2015 3:20 pm

Unfortunately my falcon has been in bits since 2002 pending CT60 upgrade. Though as it wouldn't fit properly I was waiting to see if the CT60e would appear any time soon, but that guy seems to have vanished. I don't even have a hard drive with any programs on it at the moment. I do plan on sorting out all my STOS stuff (which is backed up on my pc) but that isn't high up on my to do list.

The ninja extension *might* work on the falcon as is, you would have to find a willing falcon owner to test it.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator


Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 1 guest