Please Help with Code Type Repeat

Started by Ozelot, November 03, 2009, 05:23:44 PM

Previous topic - Next topic

Ozelot

Hello,

I have a code for Speed run for Sonic The Hedgehog 1 (Master System) Virtual Console

00D51743 0000002B <-- Sonic Run (when poke't, then Sonic running longer)
00D51744 000000F7 <-- Speed
00D51745 000000FF <-- FF= Running left   /  00= Running right

how can I set a one repeat codetype?
If I let off a key, sonic only runs faster. how can I do that if I hold
down a key to lasting sonic runs faster?



This is the Button Activator for this game:  
28D502F7 FDFF0200 <-- Button Left
28D502F7 FBFF0400 <-- Button Right



CST0 : Set Repeat
6000NNNN 0000000P

CST1 : Execute Repeat
62000000 0000000P

CST2 : Return
64100000 0000000P

64200000 0000000P

Can you make me a example of this code?

codename:

repeat code typr is used for... emm... well... repeating certain opperation N times so...
I don't understand what U want
???

let me get this right, if you want Sonic to run faster/longer when pressing certain button... then you just got to put the button activator above the code...  :rolleyes:
but... i think you already know that... why don't you handle over the code, post it. I could help more if I know what your code looks like and what is Exactly what you want  :P

anyways, anwering your question, you can try this:

28D502F7 FDFF0200 <-- Button activator LEFT
6000000A 00000001 <-- Store next code and 0x000A (Number of times to repeat*) in b1 (block1)
00D51743 0000002B <-- This code is stored... Sonic Run (when poke't, then Sonic running longer)
00D51744 000000F7 <-- This code is stored... Speed
00D51745 000000FF <-- This code is stored... FF= Running left   /  00= Running right
62000000 00000001 <-- if *>0 executes codes stored in b1 and 0x000A is decreased (0x000A --> 0x0009)
64000000 0000000P <-- if execution state is true retuns to the store next code part
E0000000 80008000 <-- Terminator :cool: lol

* you can change this for 0xNNNN times you want

actually I think this code is pretty useless since every time you press left button times to repeat the code are set to 0x000A again, but is an example after all :P it could work in other games that requires to do the same thing several times

also if 0x000A reaches zero then the code will not be axecuted again

resuming, what I think it actually does is execute the code so Sonic runs faster/longer 10 times as long as Left is pressed so runing faster will last 10 seconds or so and then you have to press it again (I might be wrong)

good luck editing the code to your likes  O0
If only everybody could understand Hexadecimal... (sigh)