Jump to content
jedimatt42

TIPI XB Mouse Driver like Mechatronics Driver

Recommended Posts

try this:  call load(10003,horz home, vert home, left limit, right limit, up limit, down limit)

or call load(10003,1,1,0,255,0,192) 

then run it again

 

Greg

Share this post


Link to post
Share on other sites

I didn't know how to initialize the defaults for the seemingly arbitrary address 10000 decimal that the driver uses. There is no run me first routine. And xb assembly routines are supposed to be relocatable code. 

 

Where does loading start? Did the mechatronics driver use a data segment with AORG? The EA manual says not to use AORG with xb modules unless you are an expert.

 

This is probably the same issue as my home bug. My code's data is probably overlapping with the mailbox addresses.

 

[email protected]

Share this post


Link to post
Share on other sites
10 minutes ago, jedimatt42 said:

I didn't know how to initialize the defaults for the seemingly arbitrary address 10000 decimal that the driver uses. There is no run me first routine. And xb assembly routines are supposed to be relocatable code. 

 

Where does loading start? Did the mechatronics driver use a data segment with AORG? The EA manual says not to use AORG with xb modules unless you are an expert.

 

This is probably the same issue as my home bug. My code's data is probably overlapping with the mailbox addresses.

 

[email protected]

Well the fact that the call load fixes it means you are using that workspace at dec 10003+ for those variables.. you just need to load in the default values probably here's the original mouse driver from mechatronics for comment 

MOUSECODE

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, arcadeshopper said:

i am able to reproduce on my sidecar system, its like the minmax of the mouse is getting corrupted.. reported to matt 

Cool!  Thanks.  I'll wait for the new revised driver to come out.  I've got about a dozen other projects in the works, and my weekend ends tonight.

Share this post


Link to post
Share on other sites
14 hours ago, RXB said:

I use a PC RS232 or PS2  Logitech Trackball that works great, but you have to adjust the polling in Assembly then Reassemble.

Funny but if you run PC99 it works with it also just fine.

Also you can use it with any PC that has a RS232 Card using PC99.

 

Oh and it works on my TI99/4A too!

https://picclick.com/Vintage-1991-MicroSpeed-PC-TRAC-Trackball-Serial-Version-Mouse-283742529080.html

 

 

Tell us about the TI-99/4A applications you use it for... Maybe there is interest in updating them for the TIPI USB mouse capability.

 

[email protected]

Share this post


Link to post
Share on other sites

Adding the following code at the beginning of my assembly fixes the initialization problem

 

	AORG	>2710		; 10000 - location of XB mailbox
	BYTE	0,0,0,0,0,0,255,0,192
	EVEN

 

The EA manuals implies that programs are loaded into >2700. In the Mechatronics source code ArcadeShopper shared, there is no address directive. So the mailbox is the first set of things. But Mechatronics came up with >2710.

 

If you don't AORG, and load some other assembly first, then I would expect the mailbox to end up somewhere else unknown with the Mechatronics driver.  If you do AORG, and load some other assembly first, I expect it to overwrite the other assembly. 

 

So, I think the rules if using multiple assemblies, is load the mouse ( mine or mechatronics' ) first, then subsequent assemblies...   

 

I'd like to not AORG and have the mailbox location be discoverable. Maybe another DEF at that location, so the address is in the ref/def table...

 

And...

 

VHOME is still being clobbered somehow.  Right mouse button when running MOUSE0 ( non-interrupt based version ) causes the cursor to jump and stay at row 0, and then get moved to within the bounds. Using MOUSE1 ( the interrupt based routine ), the location jumps to row 0 while left is down, and on release, jumps to the bottom. 

 

And...

 

My code is about 3 x instructions compared to the mechatronics code. Some of that is discovering the CRUBASE, it only runs the first time. But TIPI messaging code is burdensome. The driver code probably needs a round of expert assembly optimization.  I only know about 1/3rd of the instruction set.  

 

[email protected]

 

  • Like 2

Share this post


Link to post
Share on other sites
9 hours ago, jedimatt42 said:

 

Tell us about the TI-99/4A applications you use it for... Maybe there is interest in updating them for the TIPI USB mouse capability.

 

[email protected]

Here is all my code I used and packages that had the data also all programs.

The original mods were lost when my SCSI drive failed, but all the source is there to do any mods.

I usually used the JOYST DSR, but found the MOUSE DSR worked fine, though some fine tuning was needed for using RS232/2

 

MOUSE.zip

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, arcadeshopper said:

try this:  call load(10003,horz home, vert home, left limit, right limit, up limit, down limit)

or call load(10003,1,1,0,255,0,192) 

then run it again

 

Greg

 

Since pixel-row 192 is off-screen, why is the down limit 192 and not 191?

 

...lee

Share this post


Link to post
Share on other sites
28 minutes ago, Lee Stewart said:

 

Since pixel-row 192 is off-screen, why is the down limit 192 and not 191?

 

...lee

Compatibility, per the PDF from mechatronics, and their source. (For better or worse)

 

[email protected]

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
48 minutes ago, RXB said:

Here is all my code I used and packages that had the data also all programs.

The original mods were lost when my SCSI drive failed, but all the source is there to do any mods.

I usually used the JOYST DSR, but found the MOUSE DSR worked fine, though some fine tuning was needed for using RS232/2

 

MOUSE.zip 253.58 kB · 2 downloads

That's not what I asked. I only see one use case in there, TI Artist. We covered that one a while back. See the TIPI wiki.

 

It sounded like you were using a serial mouse from XB for some purpose. I was interested in the purpose.

 

[email protected]

Share this post


Link to post
Share on other sites
1 hour ago, jedimatt42 said:

Adding the following code at the beginning of my assembly fixes the initialization problem

 

	AORG	>2710		; 10000 - location of XB mailbox
	BYTE	0,0,0,0,0,0,255,0,192
	EVEN

 

The EA manuals implies that programs are loaded into >2700. In the Mechatronics source code ArcadeShopper shared, there is no address directive. So the mailbox is the first set of things. But Mechatronics came up with >2710.

 

If you don't AORG, and load some other assembly first, then I would expect the mailbox to end up somewhere else unknown with the Mechatronics driver.  If you do AORG, and load some other assembly first, I expect it to overwrite the other assembly. 

 

So, I think the rules if using multiple assemblies, is load the mouse ( mine or mechatronics' ) first, then subsequent assemblies...   

 

I'd like to not AORG and have the mailbox location be discoverable. Maybe another DEF at that location, so the address is in the ref/def table...

 

I'm surely not able to follow most of this! What's a mailbox anyway?

 

I thought maybe this might help with the loading issue...

 

	BSS	>10		; 10000 - location of XB mailbox
	BYTE	0,0,0,0,0,0,255,0,192
	EVEN

:ponder:

Share this post


Link to post
Share on other sites
5 hours ago, jedimatt42 said:

That's not what I asked. I only see one use case in there, TI Artist. We covered that one a while back. See the TIPI wiki.

 

It sounded like you were using a serial mouse from XB for some purpose. I was interested in the purpose.

 

[email protected]

Hmm I was!

I used the XB version Mouse DSR  using RXB 2001 to try and make a Disk Manager and Memory Manager for SAMS.

Everyone stopped using a mouse on the TI99/4A so I pretty much gave up the project.

Besides swapping DSR between RS232 to Floppy Disk Card and Hard Drives slowed the program in GPL and Assembly to a crawl.

 

I was not doing anything that radical.

  • Like 2

Share this post


Link to post
Share on other sites
14 hours ago, HOME AUTOMATION said:

 

I'm surely not able to follow most of this! What's a mailbox anyway?

 

I thought maybe this might help with the loading issue...

 

	BSS	>10		; 10000 - location of XB mailbox
	BYTE	0,0,0,0,0,0,255,0,192
	EVEN

:ponder:

 

So, mailbox is a name for a pattern of inter-process communication. You agree on a location, one process puts a message in the mailbox, and another process looks for change and fetches the message. 

The mouse driver exchange of info between assembly and XB relies on the simplest form of this pattern. 

 

Padding the front won't work. So I dusted off the debugger/classic99, and observed some things... While we have the source for the mechatronics driver, it is missing something. It _must_ have had an AORG that loaded it into address >2710 (dec 10000) - it just wouldn't work otherwise.  That is not the address to which XB begins loading relocatable code. That is considerably earlier. 

 

Reading the EA manual docs for XB with more care, I see the location is not literally defined... There are 'utility vectors', 'utility routines', and then 'assembly language program area' starting as a set at >2008. 

 

Then the DEF table works down from 0x3FFF, so as long as my code is small enough that I don't collide up with that table, an AORG seems the appropriate fix. 

I'm just not happy with that as it disrupts the ability to use other sets of assembly routines as it looks to me like the memory management just keeps track of the top and bottom of the availabile space. 

 

[email protected]

 

  • Thanks 1

Share this post


Link to post
Share on other sites

It's late for me but IIRC, low memory has a pointer (>2002 ?) to the first free address in that 8k block. It should be updated (by the loader) each time a relocatable object code file is loaded into memory via CALL LOAD.  Once your driver is loaded, update the pointer to a memory address beyond the driver and table.  A good way to do this is a call link within your driver code that moves an address into >2002. 

Share this post


Link to post
Share on other sites
3 hours ago, jedimatt42 said:

So, mailbox is a name for a pattern of inter-process communication. You agree on a location, one process puts a message in the mailbox, and another process looks for change and fetches the message.

 

And if you allow for some more objects to be stored as FIFO, you get a "pipe".

  • Thanks 1

Share this post


Link to post
Share on other sites
14 hours ago, InsaneMultitasker said:

It's late for me but IIRC, low memory has a pointer (>2002 ?) to the first free address in that 8k block. It should be updated (by the loader) each time a relocatable object code file is loaded into memory via CALL LOAD.  Once your driver is loaded, update the pointer to a memory address beyond the driver and table.  A good way to do this is a call link within your driver code that moves an address into >2002. 

Yeah, good tip. My driver fits before >2710, I can update the low mem address to the word just after the mailbox, and then other assemblies should be loadable.

 

It wastes a good chunk of memory, but leaves a safe environment.

 

For new applications, I think I'll try a driver that uses the bscsup package to tell you were the mailbox is, instead of expecting the XB client to hard code it.

 

[email protected]

  • Like 2

Share this post


Link to post
Share on other sites



I have limited space, so for all my retro computers that take a mouse, I've got one old USB/PS2 Microsoft optical mouse.. oldest I could find.  Works nice on Amiga, MSX, and TIPI.  It is too slow (low res) to use on my current laptop.

[email protected]


I happen to have a unused RS232 mouse, if you like I can send it to you.8756fce14625ff3c892d654cf6e01417.jpga4f20799e904c83d3e604e608a6d954a.jpg

Sent from my SM-G955U using Tapatalk

Share this post


Link to post
Share on other sites
On 1/17/2020 at 11:04 PM, jedimatt42 said:

Updated build on github to v1.0 

That worked!  Thanks [email protected]!  This is pretty slick.  I did find an error in SOUNDGEN-T while using the mouse though...  apparently you have to be careful where you click!

Share this post


Link to post
Share on other sites
2 hours ago, --- Ω --- said:

That worked!  Thanks [email protected]!  This is pretty slick.  I did find an error in SOUNDGEN-T while using the mouse though...  apparently you have to be careful where you click!

It is a bug in @Vorticon basic code, if you are talking about the the duration.

 

[email protected]

Share this post


Link to post
Share on other sites
2 hours ago, Mehridian Sanders said:


 

 


I happen to have a unused RS232 mouse, if you like I can send it to you.8756fce14625ff3c892d654cf6e01417.jpga4f20799e904c83d3e604e608a6d954a.jpg

Sent from my SM-G955U using Tapatalk
 

 

No, thanks, I wasn't clear. I desire only one mouse, keyboard, screen shared for all these old things. 

 

[email protected]

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...