XBox Controller - Thanks

biggmacattack

New Member
I'm another xbox controller modder and wanted to thank everyone who worked with castlecrazy on his project. It was a huge help in getting mine done.

At this point I have succesfully gotten my -08m to operate two buttons at the speed I wanted them to. The code I have cobbled together (from other peoples posts and hard work) seems to be working fine but I wanted to post it up in case anyone see's some way to make it run even smoother.
At this point I have taken it as far as I can go with the knowledge I have and will happily accept any constructive criticism.:)

But mainly I really wanted to say thanks to everyone who worked to help the other xbox modders get their projects done, it helped me a lot. I also have 3 extra -08M's that I'm looking forward to doing other projects with. ( I bought 4 with the thought that I would probably at least destroy 2 or 3 in the process)

I'm using a -08M and this program represents two additional button added to a video game controller that will override the original buttons and allow the controller to simulate rapid button pushes.

Leg 1 represents the output to button "A"
Leg 2 represents the output to button "B"
Pin 4 represents extra rapid button "A"
Pin 3 represents extra rapid button "B"
Extra button "A" is allowed interuppt the leg2on sub with and logic

Code:
		Main: 
			Setfreq m8
			If pin4 = 1 then gosub Leg1on
			If pin3 = 1 then gosub Leg2on
			If pin4 = 0 then gosub leg1off
			If pin3 = 0 then gosub leg2off
			goto main
	
	Leg2on: 
			do
		        high 2
			Pause 23
      		low 2
     			pause 15 
     			If Pin3 = 1 and pin4 = 1 then leg1on 
     			If pin3 = 0 then exit
     			loop while pin3 = 1       
     		      
     		      	
      Leg2off: 	b0=b0 and %00000000' bit 2 input
      	   	Let dirs=B0
      		return	
		   		
		   		
	Leg1on: 	do
		  	pulsout 1, 250 
		  	b0=b0 and %00000010' bit 1 output
      	   	        Let dirs=B0
		  	If pin4 = 0 then exit
     		  	loop while pin4 = 1 
		  	
		  
		  		  
	Leg1off: 	b0=b0 and %00000000' bit 1 input
		   	Let dirs=B0
		  	return
 

Mycroft2152

Senior Member
Excellent job!

Remember that going to a 14M or 20M will give you the ability to have many more automatic sequence buttons.

Myc
 

hippy

Technical Support
Staff member
I also have 3 extra -08M's that I'm looking forward to doing other projects with. ( I bought 4 with the thought that I would probably at least destroy 2 or 3 in the process)
That's always a good policy. Keeps the project running if you have an accident ( and it's less depressing when there's a spare to hand ) and you'll be ready to go with your next project if you don't.

Thanks for the thanks - I'm sure it is appreciated by everyone - and thanks for taking the time to post your code.

( I hope you don't mind but I moved the post to the finished project section where others interested may more easily find it in the future ).
 
Last edited:

biggmacattack

New Member
Moving it is fine. I wasn't sure where to put the post in the first place. I look forward to asking advice on what to do with the spares when I get around to it. Everyone here was very civil and helpfull with the questions that were asked.
 

BCJKiwi

Senior Member
A small suggestion,
relocate the 'setfreq m8' to the top of the code ( before the main: )
This is a one time setup of the clock speed at turn on. It does not need to be re-issued every time the program cycles.
Code:
Setfreq m8
Main:
 

biggmacattack

New Member
A small suggestion,
relocate the 'setfreq m8' to the top of the code ( before the main: )
This is a one time setup of the clock speed at turn on. It does not need to be re-issued every time the program cycles.
Code:
Setfreq m8
Main:
Great!

I'll go do that now. Thanks!
 
Top