English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 19 November 2009, 20:41   #21
Hungry Horace
Wipe-Out Enthusiast
 
Hungry Horace's Avatar
 
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
this is the test i've always used for Button 2 in joyport 1, which is well known to work!
It's effectively checking the Right mouse button in the joystick port.


Code:
		btst.b	#14,$DFF016		; test second button (joy 1)
		bne	.finish

here is from Galahad's Alien 3 (i think?) whd slave, which "megadrive C" is tested.

Code:
		dc.l	$0839000e		;btst #$e
		dc.l	$dff016
		bne.s	not_megadrivec
$E = 14 , so the check is identical. All this answers, is that any pad not sending the same signal as megadrive-C, isnt doing a genuine second button press imo.
Hungry Horace is offline  
Old 19 November 2009, 20:55   #22
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
Quote:
Originally Posted by Hungry Horace View Post
this is the test i've always used for Button 2 in joyport 1, which is well known to work!
It's effectively checking the Right mouse button in the joystick port.
Yes, it is correct but it does only work if DFF034 direction bit and data bit is set to one (as explained in HRM).

!!NOTE!! some "non-standard" joysticks/pads/mice (some Amiga/Atari ST switchable mouse for example) can have pullup resistors in button lines and they will work when direction=input. This can cause confusion. Of course in this mode normal non-pullup firebuttons won't work..

Quote:
Code:
		btst.b	#14,$DFF016		; test second 
button (joy 1)
which is actually "illegal" instruction. yes it works but it should be btst.b #14-8,$dff016. btst and friends use byte accesses to memory, not word. (this is very common "bug" in blitter wait too..)
Toni Wilen is offline  
Old 19 November 2009, 20:55   #23
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,457
Quote:
Originally Posted by Retro-Nerd View Post
BC Kid doesn't work with the MD pad, but with the Tecno Plus. Not sure about YoJoe, have to test it.
Correction: BC Kid C-button jump works with the MD pad, BUT only in standstill. You can't move and jump at once. No probems with the TP pad.

YoJoe: Works with both pads i have.

Correction2: Now i've plugged the TP pad and then the MD pad again and it works fine with BC Kid. Strange, but true.

Last edited by Retro-Nerd; 19 November 2009 at 21:06.
Retro-Nerd is offline  
Old 19 November 2009, 21:08   #24
Fabie
Banned
 
Join Date: Apr 2009
Location: France
Posts: 478
Quote:
Originally Posted by Retro-Nerd View Post
Correction: BC Kid C-button jump works with the MD pad, BUT only in standstill. You can't move and jump at once. No probems with the TP pad.

YoJoe: Works with both pads i have.
thanks for all Retronerd !!!!!!

it seems that some games were developed for many different pads?

btw..2ND button joystick is really an issue on games on real Amiga and WINUAE

YOJOE 2ND button works with with my pad but 2nd button doesn't works on WINUAE

however BCKID 2nd button and Bubble & squeak works on WINUAE but not on my pad
Fabie is offline  
Old 19 November 2009, 21:28   #25
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,980
Quote:
Originally Posted by Fabie View Post
YOJOE 2ND button works with with my pad but 2nd button doesn't works on WINUAE
Hmm, the 2nd button works fine here in WinUAE without tweaking anything. Not sure why it doesn't for you.
TCD is offline  
Old 19 November 2009, 21:29   #26
Hungry Horace
Wipe-Out Enthusiast
 
Hungry Horace's Avatar
 
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
Quote:
Originally Posted by Toni Wilen View Post
which is actually "illegal" instruction. yes it works but it should be btst.b #14-8,$dff016. btst and friends use byte accesses to memory, not word. (this is very common "bug" in blitter wait too..)
well, it has been explained to me how it is not the "correct" way of writing it, but i have real trouble understanding how something could be illegal when it compiles/runs/operates 100%... it seems barfly is kind enough to not complain too much when compiling

to me a "bug" produces errors. this does not, it just (really) upsets a few purists!
Hungry Horace is offline  
Old 19 November 2009, 21:34   #27
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Hungry Horace View Post
this does not, it just (really) upsets a few purists!
As said on IRC already (and yes, I HAVE to repeat it here!), this has NOTHING to do with being purist or not, this code is just incorrect! I agree 100% with Toni!
StingRay is offline  
Old 19 November 2009, 21:37   #28
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
@ Sting - Yes! \o/

I was only explaining this to someone the other day who sent me some code that had a btst #10 in it.

btst is for BYTES!!

Where's bit 10 in an 8 bit byte!? It's NOT THERE that's where!
pmc is offline  
Old 19 November 2009, 21:41   #29
Hungry Horace
Wipe-Out Enthusiast
 
Hungry Horace's Avatar
 
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
each to their own. I however, am only really interested in the result, and i do get the result i want even with the incorrect code.

i must have learnt it from someone else who was also fond of such bad habits!
Hungry Horace is offline  
Old 19 November 2009, 21:44   #30
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Come on HH - why use bad habits? Soon or later your code will FAIL
pmc is offline  
Old 19 November 2009, 21:47   #31
Hungry Horace
Wipe-Out Enthusiast
 
Hungry Horace's Avatar
 
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
Quote:
Originally Posted by pmc View Post
Come on HH - why use bad habits? Soon or later your code will FAIL
my code fails all the time. (I am very new at asm) - I just correct what is needed to make it work

i will correct this one in my current source, out of gratitude
Hungry Horace is offline  
Old 19 November 2009, 22:05   #32
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by HungryHorace
my code fails all the time.
LOL. Doesn't everyone's? Well, not Sting's obviously.

Quote:
Originally Posted by HungryHorace
i will correct this one in my current source, out of gratitude
Good for you - you know it makes sense.
pmc is offline  
Old 19 November 2009, 22:22   #33
Fabie
Banned
 
Join Date: Apr 2009
Location: France
Posts: 478
Quote:
Originally Posted by TheCyberDruid View Post
Hmm, the 2nd button works fine here in WinUAE without tweaking anything. Not sure why it doesn't for you.
it doesn't works here....I just checked YoJoe whdload and winuae 160 and 161...the hero can't jump using 2nd button
but I will check Yojoe floppy version later
Fabie is offline  
Old 19 November 2009, 22:32   #34
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,980
Quote:
Originally Posted by Fabie View Post
it doesn't works here....I just checked YoJoe whdload and winuae 160 and 161...the hero can't jump using 2nd button
but I will check Yojoe floppy version later
I think I know the problem then
From the WHDLoad readme :
Quote:
- Added CUSTOM2 to control how the 2nd joystick button works:
- CUSTOM2=0 (default) disables the 2nd fire button on both joysticks
- CUSTOM2=1 to enable player 1's jump button only
- CUSTOM2=2 to enable player 2's jump button only
- CUSTOM2=3 to enable both players jump buttons
Set Custom2 and it should work.
TCD is offline  
Old 19 November 2009, 22:35   #35
prowler
Global Moderator
 
prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
So, what's the difference between the signals generated by pressing a joystick's 2nd button that invokes no response and pressing some other joypad's button that is detected normally?

Would incorporating a buffer circuit similar to this one (with autofire disabled) into the errant joystick cure the problem when used with a real Amiga?

prowler is offline  
Old 20 November 2009, 12:00   #36
Fabie
Banned
 
Join Date: Apr 2009
Location: France
Posts: 478
Quote:
Originally Posted by TheCyberDruid View Post
I think I know the problem then
From the WHDLoad readme :

Set Custom2 and it should work.
you are right !!!
it works now !!!

thanks !!!
Fabie is offline  
Old 20 November 2009, 12:02   #37
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,980
You're welcome
TCD is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2nd button support for Mean Arenas rmcin329 Games images which need to be WHDified 0 17 June 2013 16:56
edit joy 2nd button ? turrican3 support.WinUAE 4 15 November 2012 10:30
Killing Game Show 2nd button support Bamiga2002 project.WHDLoad 0 23 January 2008 16:06
Amiga 2 Button Joystick to PC USB Zetr0 support.Hardware 4 24 July 2007 12:47
2nd Fire Button Doozy support.WinUAE 7 22 January 2002 19:21

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 02:23.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12694 seconds with 13 queries