Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: TBDI - Progress report

  1. #11

    Re: TBDI - Progress report

    Like I said, it detects the force feedback abilities, but I think it is the autocenter part, that is not working correctly. Because the assigned effect is not playing.

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TBDI - Progress report

    Hi Mike,

    I will study more your sources later because I have to go out right now but just to give you little advices (not related to the problem you are facing).

    1.
    To zero fill a structure you can use RESET Power Basic keyword instead of using ZeroMemoryAPI API function.

    2.
    avoid globals when possible. Defining local variables or full structures is really fast in Power Basic even if executed thousands of times per seconds.
    So instead to RESET a global structure used by many functions, declare structures locally in the function. Power Basic will RESET them for you every time avoiding the need to call a RESET or a ZeroMemory fill operation.
    Of course if you need a global to share info among different functions, it is ok. But if it is only to reuse it, better go local.

    3.
    thinBasic interface: instead of using
    [code=thinbasic]
    If thinBasic_CheckOpenParens() Then
    thinBasic_ParseNumber efID
    If thinBasic_CheckCloseParens() Then
    ...
    [/code]
    you can do it in one line using:
    [code=thinbasic]
    efID = thinBasic_Parse1NumberAndParens
    [/code]

    or with more variables...
    [code=thinbasic] If thinBasic_CheckOpenParens() Then
    thinBasic_ParseNumber minT
    If thinBasic_CheckComma() Then
    thinBasic_ParseNumber maxT
    If thinBasic_CheckCloseParens() Then
    ...
    [/code]

    to
    [code=thinbasic] thinBasic_Parse2NumbersAndParens(minT, maxT)
    [/code]

    There are also other thinBasic_Parse* functions in thinCore.inc up to 6 parameters.


    I will check your code again later. I'm not an expert on DI but at least I can see if I find any Power Basic related problem.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #13
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Game pad report

    Guys, as some of you are also in the market, I found this nice article about current gamepads.
    I will go out tomorrow and start looking to see if the stores here have it in stock.

    http://compactiongames.about.com/od/...p/gamepads.htm

    I used to have a generic no name gamepad I bought for $9, that worked well. I then bought a microsoft game pad as well as joystick and those things you could use for years. Very durable.

    It looks like they really like the logitech wireless. My friend Josh has one in South Carolina and he says he loves it. So I will look for that.

    Last chance to tell me any other good recommendations
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #14

    Re: TBDI - Progress report

    Sorry, can't help here. I have a Microsoft sidewinder Force feedback 2 joystick and a regular Saitek P880 Gamepad without FF.

  5. #15

    Re: TBDI - Progress report

    LAst night I played more with it and at least I get the interfaces called now that I wanted to. I made my own GUID structure and that way it worked better. Here is the updated DINput include and the lib source. Sorry that it is a little messy now but I will clean it up over the time. I hope I get this FF thing going, I would really love to.
    Attached Files Attached Files

  6. #16

    Re: TBDI - Progress report

    Ok, I found the little bugger I think.

    SetCoorperativeLevel needs a dialog/window handler. And I don't know it at the time I initialize directinput.

    Any ideas?

  7. #17
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TBDI - Progress report

    Give TBDI_INIT to user to be called after window is created
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #18

    Re: TBDI - Progress report

    Ok, I talked to Eros, and there is no way to initialize the module for ForceFeedback without having the window handle from TBGL. So I will first install TBDI_Init again. After all the testing is done and the lib is pratically final, we should talk about if it would be a positive mode to integrate TBDI functionality into TBGL. This way TBGL could initialize TBDI when it creates a window.

  9. #19

    Re: TBDI - Progress report

    Dooo, that was it. : This damn window handle did the trick. And now a BIG YEAH!!!!!
    I managed it. My sidewinder is jumping like a nutcase ;D ;D ;D

    Gues... expect ForceFeedback comming to your local thinbasic installation within the next days .

    Man I feel like a little kid. Outside is great weather, my son is going to a birthday party soon and I will go for a long walk with my wife. What a sunday. YIPPIE!!! ;D

  10. #20
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TBDI - Progress report

    WOW, thanks. We want to see an example soon. Tomorrow I will get my new toy (Joystick with FF)

    Quote Originally Posted by MikeHart
    Ok, I talked to Eros, and there is no way to initialize the module for ForceFeedback without having the window handle from TBGL. So I will first install TBDI_Init again. After all the testing is done and the lib is pratically final, we should talk about if it would be a positive mode to integrate TBDI functionality into TBGL. This way TBGL could initialize TBDI when it creates a window.
    This gave me a nice idea to add inter module communications. Still to understand how but should not be so difficult.
    Maybe you will have to add a new exported function in your module able to get info from other module. Something like
    [code=thinbasic]ModuleMessages(ModuleSource, ModuleTarget, Message, Param1, Param2, param3) as long[/code]where
    ModuleSource="TBGL"
    ModuleTarget="TBDI"
    Message = Get..., Set... something
    some parameters
    and a return value

    thinCore will take care to call this function from the target module (if loaded) passing all needed parameters and returning data to source module.

    Just an idea.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Progress Bar
    By fgasoi in forum Console
    Replies: 5
    Last Post: 02-02-2010, 18:03

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •