GFA/MiNT and game controllers

GFA BASIC-related articles in here please

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

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 371
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

GFA/MiNT and game controllers

Postby Rajah Lone » Fri May 20, 2016 11:04 pm

Hi,

I'm having some issues with classic STICK/STRIG GFA instructions under my FireBee/FreeMiNT setup. My application freezes when these instructions are called. The OS runs OK. Seems the joysticks survey is disabled by default.

Using Atari DB9 joystick or Jaguar/STE DB15 gamepad is not a custom under multitasking environement and desk.

Calling directly for joystick state is hard and not for GFA: must create some survey C functions and change joy-vector in XBIOS(34).
I can't test Jaguar controllers: no gameport on my FireBee?

My only option at the moment is to use SDL.LDG. But is there a smart and light and basic solution? Is someone has some experience on the subject? Is there some kind of joystick.xdd/xif for FreeMiNT?

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2257
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: GFA/MiNT and game controllers

Postby lp » Sat May 21, 2016 5:05 pm

Hi,

I certainly am no expert at programming game controllers, but I can look into the freezing problem. Do you have a small test case I can try at my MiNT setup? The STICK and STRIG commands in my library are unchanged from the original library, but it's possible some ancient bug remains. Would not be the first time. ;)

This might be useful: http://paradize.final-memory.org/downloads/jagpad.lst

User avatar
shoggoth
Nature
Nature
Posts: 854
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: GFA/MiNT and game controllers

Postby shoggoth » Sat May 21, 2016 5:45 pm

I wrote joystick.xdd:s many years ago. They sort of comply to the Linux 1.0 joystick API.

The only one who every used them was myself, in some emulators I ported.
Ain't no space like PeP-space.

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 371
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA/MiNT and game controllers

Postby Rajah Lone » Sat May 21, 2016 8:25 pm

A simple code like this makes the application hang, either on STRIG or STICK.

Code: Select all

DO
  joy_fir!=STRIG(1)
  joy_dir&=STICK(1)
  IF joy_dir&>0
    PRINT joy_dir&
  ENDIF
LOOP UNTIL joy_fir!

Thanks for the link to the Joypad routine. I was searching for this kind of code.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2257
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: GFA/MiNT and game controllers

Postby lp » Sun May 22, 2016 6:41 am

Rajah Lone wrote:A simple code like this makes the application hang, either on STRIG or STICK.


When compiled, the loop can't be interrupted and appears frozen. Makes me wonder if the joystick registers in the firebee work at all. If I temporarily add compiler options $I+,$U+ I can then break the endless loop.

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 371
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA/MiNT and game controllers

Postby Rajah Lone » Sun May 22, 2016 10:06 pm

The joystick works with pmdoom, on my FireBee setup, SDL library is used.

My guess: the joystick is supported by the IKBD, but related routines are disabled or not initialized. A software support omission in MiNT or FireTOS?

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2257
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: GFA/MiNT and game controllers

Postby lp » Sun May 22, 2016 10:20 pm

I have two suggestions that might help. Compile the test case and have someone with a Falcon + MiNT give it go. Would help narrow down where the problem is. Also you can look into the sources of SDL, specifically the patches for our platform, might gives some clues?

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4858
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: GFA/MiNT and game controllers

Postby simonsunnyboy » Mon May 23, 2016 4:27 pm

lp wrote:I have two suggestions that might help. Compile the test case and have someone with a Falcon + MiNT give it go. Would help narrow down where the problem is. Also you can look into the sources of SDL, specifically the patches for our platform, might gives some clues?


Joystick with STRIG and STICK does work on my Falcon with old Mint Kernel 1.15 or 1.16 IIRC.
I never tried in the interpreter but running a compiled executable feels ok.
My programs go into SUPERVISOR due to hardware access. That might make a difference though.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2257
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: GFA/MiNT and game controllers

Postby lp » Mon May 30, 2016 10:35 pm

I don't recall having a problems with my Hades and MiNT 1.16.x either.

Been digging deeper into the problem with Rajah's help, since I don't have a firebee myself. Internally GFA does OUT 4,x with some commands for the IKBD. Seems that any command sent to the IKBD hangs. Testing IKBD commands without MiNT have not been done yet. I can't say where exactly the problem is yet.


Social Media

     

Return to “GFA BASIC”

Who is online

Users browsing this forum: No registered users and 2 guests