xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
3 Pages V  1 2 3 >  
Reply to this topicStart new topic
> Picaxe 14m Rapid Fire Mod, Utilizes A,B,X,Y,RB,RSclick,RTrigger
razorbackjedi
post Oct 19 2008, 08:05 AM
Post #1


X-S Member
*

Group: Members
Posts: 66
Joined: 13-November 03
Member No.: 73956



I dont have a camera to use at the moment, so no tutorial photos, but heres my schematic and some codes (I did this work on a CG controller so if you have a Matrix change the code accordingly) for Halo and COD4. Just so everybody knows Im not an expert at coding these chips, that being said Im sure someone will come up with a better way of doing it. Presently I have been able to fit COD4 rapidfire/active reload and Halo3 rapidfire/rapid melee all on one 14m, even though its possible to run both I always reflash my controller with a single game code depending on what Im playing, so I will be posting them as seperate codes.

I tried every way possible to interface all of these buttons correctly without a Darlington Array but no matter what I tried I got unreliable results(buttons would work then they wouldnt!), using the Darlington was the only I could get it to work correctly with my limited coding experience. You may also notice the haphazard way I have connected the A,B,X,Y,RB criss-crossed, but it was for a reason, turning the darlinton array 180 degrees allows the +v, 0V and the 14's right side outputs line up with the darlingtons inputs and you can just solder the chips on top of one another. I also have this schematic in Illustrator .ai and Photoshop .psd formats with greater resolution and editibility.
IPB Image

Although Im only utilizing a few of the sub-routines they are all there in the code for ease of combo programming, for example... combos could be written like.

BXB:
gosub Bbtn
gosub Xbtn
gosub Bbtn

then just work out the pauses in between the gosubs, at least that how I did the active reload.

Heres COD4
CODE
Setfreq m8

main:
    do
    low 0
    if pin3 = 1 then gosub Rstick
    if pin4 = 1 then exit
    loop while pin4 = 0
    pause 800

    do
    high 0
    if pin3 = 1 then gosub reload
    readadc 0,b0
    if b0 > 40 then gosub Rtrig
    if pin4 = 1 then exit
    loop while pin4 = 0
    pause 800
    goto main

Rtrig:
    do
    high portc 3
    pause 85
    low portc 3
    pause 80
    b0=b0 and %00000000
    Let dirsc=b0
    readadc 0,b0
    loop while b0 > 40
    return

reload:
    gosub Xbtn
    pause 3000
    gosub Ybtn
    gosub Ybtn
    return

Abtn:
    b0=b0 or %00000100
    let dirsc=b0
    high 5
    pause 50
    low 5
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0    
    return

Bbtn:
    b0=b0 or %00000010
    let dirsc=b0
    high 4
    pause 50
    low 4
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

Xbtn:
    b0=b0 or %00000001
    let dirsc=b0
    high 3
    pause 50
    low 3
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

Ybtn:
    high 2
    pause 50
    low 2
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

RBumper:
    high 1
    pause 50
    low 1
    b0=b0 and %00000000
    Let dirsc=b0
    pause 50
    return

RStick:
    b0=b0 or %00100000
    let dirsc=b0
    high portc 5
    pause 50
    low portc 5
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

Heres Halo3
CODE
Setfreq m8

main:
    do
    low 0
    if pin3 = 1 then gosub Bbtn
    if pin4 = 1 then exit
    loop while pin4 = 0
    pause 800

    do
    high 0
    if pin3 = 1 then gosub Bbtn
    readadc 0,b0
    if b0 > 40 then gosub Rtrig
    if pin4 = 1 then exit
    loop while pin4 = 0
    pause 800
    goto main

Rtrig:
    do
    high portc 3
    pause 106
    low portc 3
    pause 90
    b0=b0 and %00000000
    Let dirsc=b0
    readadc 0,b0
    loop while b0 > 40
    return

Abtn:
    b0=b0 or %00000100
    let dirsc=b0
    high 5
    pause 50
    low 5
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0    
    return

Bbtn:
    b0=b0 or %00000010
    let dirsc=b0
    high 4
    pause 50
    low 4
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

Xbtn:
    b0=b0 or %00000001
    let dirsc=b0
    high 3
    pause 50
    low 3
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

Ybtn:
    high 2
    pause 50
    low 2
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return

RBumper:
    high 1
    pause 50
    low 1
    b0=b0 and %00000000
    Let dirsc=b0
    pause 50
    return

RStick:
    b0=b0 or %00100000
    let dirsc=b0
    high portc 5
    pause 50
    low portc 5
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    return




Heres some YouTube vids of the chip in action. In COD4 the first clip emptied and reloded are without the chip, the remainder is with the chip enabled.
COD4 rapid fire/active reload
Heres a Halo 3 rapid fire/rapid melee video.
Halo 3 Rapid Fire/Rapid Melee

I will get my camera back and do some pics for my next mod and try to make a tutorial. Anyone else get some cool combos worked up let me know, Im currently working on a few simple combos for my son when playing Star Wars:The Force Unleashed.

This post has been edited by razorbackjedi: Oct 19 2008, 08:22 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
razorbackjedi
post Oct 19 2008, 10:07 AM
Post #2


X-S Member
*

Group: Members
Posts: 66
Joined: 13-November 03
Member No.: 73956



If you leave the loop in the Rtrig gosub you cant access other parts of the code without releasing the right trigger... duh on my part..., so if you were shooting at someone and press the extra input button for rapid melee it wont work. You need to either remove the loop or ad a gosub call within the Rtrig gosub for the Bbtn gosub(or whatever button your using). Heres the replacement gosubs for the Halo3 code.

CODE
Rtrig:
    do
    high portc 3
    pause 106
    low portc 3
    pause 90
    b0=b0 and %00000000
    Let dirsc=b0
    readadc 0,b0
    if pin3 = 1 then gosub Bbtn
    loop while b0 > 40
    return
Bbtn:
    do
    b0=b0 or %00000010
    let dirsc=b0
    high 4
    pause 50
    low 4
    pause 50
    b0=b0 and %00000000
    Let dirsc=b0
    loop while pin3 = 1
    return



This post has been edited by razorbackjedi: Oct 19 2008, 10:09 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dschu012
post Oct 20 2008, 02:26 AM
Post #3


X-S Member
*

Group: Members
Posts: 121
Joined: 9-April 08
Member No.: 378121



Just a quick question on what certain lines in the code do.

readadc 0,b0
b0=b0 or %00000100 (looks like you are or'ing b0 with 4 but I dunno why)
let dirsc=b0 (what is dirsc)
b0=b0 and %00000000 (looks like you are clearing what is in b0, again I dunno why)

I probably could figure this all out if I looked in the picaxe manual, but figured I would ask here because it requires less reading.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
razorbackjedi
post Oct 20 2008, 05:45 AM
Post #4


X-S Member
*

Group: Members
Posts: 66
Joined: 13-November 03
Member No.: 73956



QUOTE(dschu012 @ Oct 19 2008, 09:02 PM) *

I probably could figure this all out if I looked in the picaxe manual, but figured I would ask here because it requires less reading.


I know very little about Picaxe programming but reading is the only place to start. I read a bunch of posts by Dr Acula about preserving pin states while others are doing output, etc. I still dont understand it all, but enough to get what youve seen so far to work.

Im still reading the rest....
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dschu012
post Oct 20 2008, 06:18 AM
Post #5


X-S Member
*

Group: Members
Posts: 121
Joined: 9-April 08
Member No.: 378121



QUOTE(razorbackjedi @ Oct 20 2008, 06:21 AM) *

I know very little about Picaxe programming but reading is the only place to start. I read a bunch of posts by Dr Acula about preserving pin states while others are doing output, etc. I still dont understand it all, but enough to get what youve seen so far to work.

Im still reading the rest....

After doing some reading it looks like you are setting the pin 8 (in the code in my previous post) to output and then below with the and statement setting all pins 5-10 to input. Couldn't you just at the very beginning do
let dirsc=%00100111
since 5,8,9,10 are all output? And then leave out all of the other b0=b0 or/and statements and let dirsc=b0 statements.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
razorbackjedi
post Oct 23 2008, 07:06 PM
Post #6


X-S Member
*

Group: Members
Posts: 66
Joined: 13-November 03
Member No.: 73956



Theres no doubt i have extraneous code!... and your suggestions sound correct. When I learn more perhaps I can shave the code down and repost it. It does work though.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Feb 28 2009, 07:49 AM
Post #7


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



SORRY FOR THE MEGA BUMP!
But im actually taking on the challenge of doing this today i got me some goodies: love.gif
IPB Image
Well ive got about 4 hours sleeping.gif into it:
IPB Image
IPB Image
IPB Image
IPB Image
IPB Image
IPB Image
IPB Image
IPB Image
Ill be working on it tomorrow hopefully finishing it!
wish me luck! jester.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Salincer
post Feb 28 2009, 05:10 PM
Post #8


X-S Expert
***

Group: Members
Posts: 507
Joined: 1-June 08
From: Virginia, USA
Member No.: 382357
Xbox Version: unk
360 version: unknown



Hmmm...wonder if i can be conservant and free-form this. I bet you rape on halo w/ double beatdown thing
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Feb 28 2009, 06:37 PM
Post #9


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



You probably could, looking back at my pictures the next day: i was not conservative at ALL! (just trying to make it "neat") looks like the pins are pretty much the same if you turned the picaxe 180 degrees and set them on top of one another! HOPE TO FINISH TODAY! What it the double beat down for halo 3?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Mar 1 2009, 01:27 AM
Post #10


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



I KNEW IT WAS TOOOOOOO GOOD TO BE TRUE! of course its not working! mad.gif mad.gif mad.gif mad.gif mad.gif i dont think 3 volts is enough to program the picaxe!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Protolisk
post Mar 1 2009, 01:32 AM
Post #11


X-S X-perience
**

Group: Members
Posts: 401
Joined: 2-January 08
Member No.: 368666
Xbox Version: unk
360 version: unknown



Wait so why do you need a darlington array?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Salincer
post Mar 1 2009, 01:50 AM
Post #12


X-S Expert
***

Group: Members
Posts: 507
Joined: 1-June 08
From: Virginia, USA
Member No.: 382357
Xbox Version: unk
360 version: unknown



QUOTE(killer skittle @ Feb 28 2009, 08:03 PM) *

I KNEW IT WAS TOOOOOOO GOOD TO BE TRUE! of course its not working! mad.gif mad.gif mad.gif mad.gif mad.gif i dont think 3 volts is enough to program the picaxe!

Dang. Is there anything you can do about it? This mod looks interesting..and i wanna try it. I say i could free-form it
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Mar 1 2009, 02:32 AM
Post #13


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



I was just angry! I think it might have some thing to do with my laptop! I took a break from it, and will hopefully figure out in a minute! I will post some more picture later everything is soldered up, just i cant seem to program the picaxe now, i know its getting power and hooked up right. but don't know if 3v is enough. I think from what im gathering, the "cable 1, cable 2 and cable 3" on the main schematic are the programming wires! but he doesn't say it!
wish me luck! sleep.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Mar 1 2009, 03:39 AM
Post #14


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



QUOTE(killer skittle @ Mar 1 2009, 03:08 AM) *

I was just angry! I think it might have some thing to do with my laptop! I took a break from it, and will hopefully figure out in a minute! I will post some more picture later everything is soldered up, just i cant seem to program the picaxe now, i know its getting power and hooked up right. but don't know if 3v is enough. I think from what im gathering, the "cable 1, cable 2 and cable 3" on the main schematic are the programming wires! but he doesn't say it!
wish me luck! sleep.gif


I THINK I MIGHT KILL SOME ONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IVE PUT OVER 15 HOURS ON THIS PIECE OF SH%&, AND STILL NOTHING!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
killer skittle
post Mar 1 2009, 04:28 AM
Post #15


X-S Senior Member
**

Group: Members
Posts: 245
Joined: 26-October 08
From: Atlanta, GA
Member No.: 393574
Xbox Version: v1.2
360 version: v1 (xenon)



ITS FRIED!!!!
PERFECT!!!!
SPARK FUN ALL OUT.... NOT FUN
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





3 Pages V  1 2 3 >
Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 22nd May 2013 - 07:43 PM