View Single Post
Old 06 May 2014, 15:44   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
solving the CD32 joypad "mystery"

Hi,

In my long whdload patching career I've tried to fix/adapt games which use/want to use a CD32 joypad and still did not find a perfect way to do so.

First, I found that only lowlevel.library is able to perfectly detect and read CD32 controller data. So for all games using it, no problem.

BUT, in CD32 kit they provided a hardware way to read the joypad amongst other things (direct CD access...)

ex: in James Pond 3

It started by TST.B $BFE001, then shifted through $BFEE01 to read all buttons (too lazy to paste the code here)

This routine only works properly on a CD32. Even on a vanilla A1200 it failed to work, with symptoms: wrong or no buttons detected

I also reckon that to read 2nd button (CD32 & sega) you have to wait at least 1 VBL interrupt or the reading would be wrong.

Anyone has the solution to safely read the buttons on any computer without lowlevel library?

Bonus question: how lowlevel detects that a joystick or a CD32 joypad is connected?

I tried to resource it, but it was so full of cia.resource shit that I gave it up.

Thanks for your answers.
jotd is offline  
 
Page generated in 0.07611 seconds with 11 queries