English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 15 March 2014, 21:15   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
tablet.library information

Information about tablet.library is listed as one of the wanted things on www.winuae.net so I've taken a look at the Deluxe Paint V and OpalPaint code. Apparently ArtEffect 2.6 (or later?) supports tablet.library, but I haven't looked at that.

Tablet.library was provided by the AccuPoint software published by TriMedia. Apparently they worked with Commodore to define the tablet interface used in Intuition V39+, so there are many similarities. Read the intuition/intuition.h include file for info about tablet-related data structures.

DPaint and OpalPaint seem to only use three functions in tablet.library. There may be more functions of course.

The DextraPoint tablet driver comes with source code which might be some use if implementing an Amiga tablet driver.


Offset -$1E function
Open/own/allocate tablet. Since a tablet is read-only, this might not exclusively "own" the tablet, but it would need to allocate a separate TabletData structure for each opener. The taglist argument is probably used to specify which tags the calling program wants to receive. The driver presumably doesn't, for example, put a TABLETA_InProximity tag in td_TagList after a call to function -$2A, unless the caller passed that tag in the taglist pointed to by A0.
For example, DPaint passes a taglist with TABLETA_Pressure. OpalPaint passes a taglist with TABLETA_Pressure and TABLETA_InProximity.

The TabletData structure is probably filled out with the current tablet state: After calling this function DPaint checks for a TABLETA_Pressure tag in td_TagList. If not present it shows an error message.

Call with:
A0: Pointer to taglist with TABLETA_xxx tag values. (Maybe it's acceptable for this argument to be 0?)
Returns:
D0: Pointer to a TabletData structure (see intuition/intuition.h), or 0 for failure.

Offset -$24 function
Close/free/disown tablet.
Call with:
A0: pointer to the TabletData structure which was returned by the -$1E function.

Offset -$2A function
Read tablet data, filling out fields of the TabletData structure. Perhaps the IntuiMessage pointer argument is to allow the tablet driver to e.g. set mouse buttons qualifier and/or MouseX/MouseY, if the user has enabled that option???
Call with:
A0: Pointer to an IntuiMessage
A1: Pointer to TabletData structure
Returns:
D0: Some value, non-zero for success.
mark_k is offline  
AdSense AdSense  
Old 15 March 2014, 21:55   #2
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,618
just as a reference: the search thread for tablet.library. Imagemaster RT 1.60 does also use the library (listed in binary)
emufan is offline  
Old 15 March 2014, 22:19   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Thanks. I also noticed ImageFX 2.0 uses tablet.library too.
mark_k is offline  
Old 15 March 2014, 22:40   #4
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,618
Quote:
Originally Posted by mark_k View Post
Thanks. I also noticed ImageFX 2.0 uses tablet.library too.
np. arteffect 4 does have "AccuPoint" in its binary, but not tablet.library itself.
emufan is offline  
Old 16 March 2014, 09:35   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
So tablet.library basically is a wrapper for input.device tablet stuff? I assumed it was something more complex.

Quote:
Originally Posted by mark_k View Post
comes with source code which might be some use if implementing an Amiga tablet driver.
WinUAE already has full tablet support, implementing what intuition.h describes. (but not all, for example Angle range can't be "This number should be normalized to fill a signed long integer", there was some test program that shows all parameters and angle field will overflow if it is too big..).

Quote:
Offset -$2A function
Read tablet data, filling out fields of the TabletData structure. Perhaps the IntuiMessage pointer argument is to allow the tablet driver to e.g. set mouse buttons qualifier and/or MouseX/MouseY, if the user has enabled that option???
Call with:
A0: Pointer to an IntuiMessage
A1: Pointer to TabletData structure
Do you mean A0 is IntuiMessage received by the application which tablet.library may or may not modify? Or is it completely generated by tablet.library?
Toni Wilen is offline  
Old 16 March 2014, 11:20   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Quote:
Originally Posted by Toni Wilen View Post
So tablet.library basically is a wrapper for input.device tablet stuff? I assumed it was something more complex.
Well maybe TriMedia (co-)developed the spec which Commodore later supported in Intuition V39. So at least on Intuition V39+, tablet.library could be a kind of wrapper around that.
Quote:
Originally Posted by Toni Wilen View Post
Do you mean A0 is IntuiMessage received by the application which tablet.library may or may not modify? Or is it completely generated by tablet.library?
I'll look at the code in DPaint/OpalPaint again, but I was probably wrong about tablet.library modifying the passed IntuiMessage.

A couple of possible uses for the IntuiMessage argument by tablet.library:
- Look at the time values (Seconds, Micros). When updating the TabletData structure, interpolate recent position readings so the position data written to the TabletData is (an approximation of) what it would have been at that time.
- On Intuition V39+, check whether the IntuiMessage has eim_TabletData non-zero. If so, copy the values from that TabletData structure.
mark_k is offline  
Old 16 March 2014, 12:51   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
I added skeleton tablet.library but Dpaint 5.2 refuses to open it (it does not even attempt to open it) but it has tablet.library string inside executable.

What do I miss?
Toni Wilen is offline  
Old 16 March 2014, 18:20   #8
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Run DPaint, in the Eff. menu there is a Pressure submenu. Select On/Off or Settings... then click OK. I get a "Can't open tablet.library" requester then.

If you also want to test with ImageFX 2.0, I think that only tries to use tablet.library when Kickstart version <39.

For the tablet close function (-$24), I assume tablet.library frees the memory used by the TabletData structure.
mark_k is offline  
Old 16 March 2014, 19:24   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
Thanks, now it gets opened and "read" function is called after open returns and then it is called each time mouse is moved (I assume when any input event appears)

I don't currently have tablet for testing but technically it should work now

GUI option added to GamePorts panel.
Toni Wilen is offline  
Old 16 March 2014, 19:57   #10
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,618
the wait is over - Harry 0. found the tablet.library, he uploaded it into the zone
thanks Harry
emufan is offline  
Old 16 March 2014, 20:25   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Quote:
Originally Posted by emufan View Post
np. arteffect 4 does have "AccuPoint" in its binary, but not tablet.library itself.
Thanks, that's in the ArtEffect 2.6 demo too.

ArtEffect seems to detect three different tablet drivers. It does FindPort("TABLEAU"), then FindTask("AccuPoint") then FindTask("Wacom.API-Task") in that order, setting a variable depending on which is the first to succeed.

It seems to behave differently with regard to processing tablet pressure values depending on which tablet driver it found.
mark_k is offline  
Old 16 March 2014, 20:38   #12
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,618
Quote:
Originally Posted by mark_k View Post
Thanks, that's in the ArtEffect 2.6 demo too.
... FindTask("AccuPoint") .
np.
the Accupoint port is created by the tablet tools on:
"AccuPoint TCS Software for CalComp Graphic Tablets v2.0 (1993)(TriMedia Inc)"
it's in tosec already but i zone it again ( Accupoint-summagfx.adf ). just in case you want analyze that too

Last edited by emufan; 16 March 2014 at 20:47.
emufan is offline  
Old 16 March 2014, 22:04   #13
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Quote:
Originally Posted by emufan View Post
the wait is over - Harry 0. found the tablet.library, he uploaded it into the zone
thanks Harry
Indeed.

I've begun to take a look at the tablet.library code.

What I'll call the ReadTabletData function (lib offset -$2A) does this:

If running on V39 or later (tablet.library actually checks the utility.library version, not Intuition version):
- Check eim_TabletData field in IntuiMessage. If non-zero, copy the TabletData structure to (A1) and return 1.
- Else return 0 (i.e. when eim_TabletData = 0)

If running pre-V39 it does more work, and the library also installs some kind of patch at initialisation time. I haven't looked into that yet. So it will probably be much easier to limit any WinUAE tablet.library-compatible code to require at least Intuition V39 for the time being.

There's also a currently-unknown function at offset -$30.

Edit: A little update: What I'll call the OpenTablet() function (offset -$1E) clears all tag data fields in the passed taglist.

Last edited by mark_k; 17 March 2014 at 17:22.
mark_k is offline  
Old 17 March 2014, 21:38   #14
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,618
harry uploaded the accupoint wacom version. tablet.library is now on that disk, incl tools and config:
Apoint_disk1.adf ( zoned )
AccuPoint TCS Software for Wacom Tablets v2.0 (1993)(TriMedia Inc) ( soon its tosec name )
thanks again, harry
emufan is offline  
Old 22 March 2014, 15:51   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
I borrowed tablet for testing and after fixing stupid bug that causes boot divide by zero guru tablet.library seems to work, dpaint calls library and reads pressure value but it does not seem to do have any effect at all.

I tried very big values and small values (DPaint shifts pressure 15 bits to left before using the values), nothing changes on screen.

Any ideas?
Toni Wilen is offline  
Old 22 March 2014, 17:10   #16
Michael Sykes
WinUAE end user

Michael Sykes's Avatar
 
Join Date: Jan 2014
Location: Bremen
Age: 38
Posts: 623
One idea I have,indeed. On the above mentioned Apoint_disk1.adf is a setup/config tool.
Maybe you have to save some generic settings in ENV: at first.

Toni if you succeed,will that only work with a specific kind/brand of tablet?
I mean do we need an ancient serial tablet or will pressure support work with any cheap usb tablet that is pressure sensitive?
I really hope for the latter one since general tablet support worked fine,with my Trust TB2100 for ~30€,last time I tested it.
Michael Sykes is offline  
Old 22 March 2014, 17:52   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
Any tablet that is wintab (more or less de-facto tablet standard) compatible. Physical connection type makes no difference.
Toni Wilen is offline  
Old 22 March 2014, 18:07   #18
Michael Sykes
WinUAE end user

Michael Sykes's Avatar
 
Join Date: Jan 2014
Location: Bremen
Age: 38
Posts: 623
That would mean even tuchscreens that support that standard work!
Brilliant.
BTW: hacking wintab screen into google I stumbled over that
http://sourceforge.net/projects/vbtablet/
Maybe its of some interest or helps implementing tablet stuff into uae.
Michael Sykes is offline  
Old 22 March 2014, 19:25   #19
bubbob42
Registered User
 
Join Date: Oct 2012
Location: Aachen, Germany
Posts: 362
Arrrrr...DPaint on Wacom Cintiq - here we come!
bubbob42 is offline  
Old 22 March 2014, 20:26   #20
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Quote:
Originally Posted by Toni Wilen View Post
dpaint calls library and reads pressure value but it does not seem to do have any effect at all.

I tried very big values and small values (DPaint shifts pressure 15 bits to left before using the values), nothing changes on screen.
I don't have a tablet or the DPaint V manual so these are just guesses:
- Try with and without the translucency option checked.
- Try with the size option checked
- Try setting backing store to 24-bit RGB in the initial screen format requester. Maybe translucency requires that???

Have you checked whether OpalPaint (on Aminet) or ImageFX 2.0+ can work with tablet pressure?

By the way with WinuAE 2.7.1b12, after starting emulation I enabled tablet.library then clicked Reset, but DPaint couldn't open tablet.library. After exiting WinUAE, running it again this time enabling tablet.library before starting emulation, DPaint didn't report that error.
mark_k is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
tablet.library Predseda request.Other 28 26 November 2016 16:26
HELP: Opus5, KingCON, SysInfo.library (Sysmon.library) triangle Michael support.Apps 6 10 March 2014 14:08
Mediator - openpci.library and pci.library mardn78 support.Hardware 1 01 February 2014 11:11
graphics tablet hettle MarketPlace 15 13 May 2010 15:43
Making a shared library from a gcc .a library JoJo Coders. General 1 10 March 2003 19:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:45.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.24540 seconds with 11 queries