Track n field algorithms?

Battlezone

Active member
Feedback
1 (100%)
Credits
410CR
That's good detective work Ade. I also see a weaker first throw using your handy break point. One nice thing about this is that we can use this technique to confirm the best throw angles for all the events. Another nice thing is that it means hunting for the reason in the code is less likely to be a wild goose chase.
 

RGP

Meeter & Greeter
Feedback
5 (100%)
Credits
2,039CR
This is an absolutely riveting thread, cmonkey as always i'm uber impressed at your ability to decipher the code.

Can't wait to hear Jon's thoughts on the podcast, i've had many a discussion with him about T&F and although I can't rack the score up like he can I could be a spotter on the 2nd play position as I can marathon the game quite well even if my score gets left standing.

If you set the board to standard settings, after three loops the difficulty does not increase any further.

T&F and HS have to be two of the best arcade games ever.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,659CR
So I now have definitive proof that the second and third attempts at the javelin throw ARE boosted by the game code.

The boost works by looking at the whole metres part of your previous throw distance, dividing it by 2 and then adding it to your speed. This is why the first throw is always less, as there is no concept of a previous throw on the first throw. You don't get a boost if the previous throw was a FOUL either.

Also, this may come as a bit of a surprise, but if your speed is greater than or equal to 1300cm/sec when you release the javelin it's capped at 1300cm/sec. Then, in all cases (irrespective of your launch speed) 330cm/sec is added to your speed, presumably to simulate the effects of acceleration through the javelin by the player's arm on release. Then the boost figure is added based on previous throw distance.

So, armed with this knowledge you can relax those shotgun fingers a little bit during the javelin event as any surplus energy you burn attempting to get a speed > 1300cm/sec will simply be wasted as the game code will cap the speed. I can guarantee that, on your first throw attempt, you'll get no further distance by having a launch speed of 1450cm/sec versus a launch speed of 1300cm/sec (assuming exact same launch position and angle). The code dictates that your launch speed in both cases will be 1630cm/sec.

I've also found the routine which boosts your speed even more by getting a launch angle of between 43 and 47 degrees. This routine is called by the long jump, hammer throw and javelin events BUT (and it's a big BUT) there's a bug in the javelin event code which means you'll never get an extra boost in the javelin (reason - register X gets trashed before entry to the routine and needs to have been pointing to a specific memory location on entry).

For the long jump and hammer (where the bug does NOT exist) you get a 60cm/sec boost for a 45 degree angle jump/throw, a 30cm/sec boost for an angle of 44 or 46 degrees and a 10cm/sec boost for an angle of 43 or 47 degrees.

If receiving the boost would tip your speed over 1500cm/sec then it's capped at 1500cm/sec.

It's a shame that the routine is broken for the javelin, I've checked all 3 versions of TnF (Konami licence, Centuri licence and Hyper Olympic) and it's broken in all 3 versions. It would be trivial to fix but obviously you can't try for a TG world record with modified roms.

You can check what your pre-adjusted and post-adjusted final throw speeds are in MAME by putting a breakpoint at $ea64 (pre) and $ead1 (post) and examining the 4 BCD bytes from $28b0 (assuming playing a one player game).

So I'm now at the position where I can launch the javelin at EXACTLY the same launch speed and angle every throw (irrespective of whether it's my first, second or third attempt) but I still get slightly varying throw distances, so there's obviously still some amount of randomness in the throw itself. Ideally I'd like to get to an understanding where I can get exactly the same distance every time but realistically I don't know how much more time I want to throw at this. The code which handles the flight of the javelin is complex and full of maths (as you'd expect) and I don't know whether I have the time and energy to sit there for hours unravelling it all. I really want to resume work on my own game rather than keep reversing this one, but we'll see how things pan out. Not making any promises though.

This is the piece of code which caps speed to 1300cm/sec, then adds 330cm/sec and then finally boosts speed based on previous throw distance :-

[font="Courier New, Courier, mono"]; if throw speed is >= 1300cm/sec then it's capped at 1300cm/sec[/font]

[font="Courier New, Courier, mono"]; then 330cm/sec is added to the speed for the launch of the javelin (to simulate acceleration on the javelin by the thrower's arm presumably)[/font]

[font="Courier New, Courier, mono"]; then finally (previous throw whole metres / 2) is added[/font]

[font="Courier New, Courier, mono"]; no boost for first throw[/font]

[font="Courier New, Courier, mono"]; no boost if previous attempt was a FOUL[/font]

[font="Courier New, Courier, mono"]; [/font]

[font="Courier New, Courier, mono"]; so, if your first throw was 80m, then you get a 40cm/sec boost on your second throw[/font]

[font="Courier New, Courier, mono"]; and if your second throw was 90m then you get a 45cm/sec boost on your third throw[/font]

[font="Courier New, Courier, mono"]; NOTE - the result of (previous throw whole metres / 2) is always rounded DOWN before being added to your speed[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]EA61: BD 79 8C JSR $FB0E ; give a speed boost if throw angle is between 43 and 47 degrees[/font]

[font="Courier New, Courier, mono"] ; ( *** BROKEN DUE TO X POINTING TO WRONG MEM LOCATION ON ENTRY *** )[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; check if speed >= 1300cm/sec and cap it at 1300cm/sec if it is[/font]

[font="Courier New, Courier, mono"]EA64: DC 92 LDD $B0 ; get 2 highest digits of throw speed[/font]

[font="Courier New, Courier, mono"]EA66: 81 83 CMPA #$01 ; compare highest digit with 1[/font]

[font="Courier New, Courier, mono"]EA68: 26 26 BNE $EA78 ; branch if not equal[/font]

[font="Courier New, Courier, mono"]EA6A: C1 8B CMPB #$03 ; compare second highest digit with 3[/font]

[font="Courier New, Courier, mono"]EA6C: 25 22 BCS $EA78 ; branch if it's less than 3[/font]

[font="Courier New, Courier, mono"]EA6E: CC 89 21 LDD #$0103 ; cap throw speed at 1300cm/sec if speed > 1300cm/sec[/font]

[font="Courier New, Courier, mono"]EA71: DD 32 STD $B0 ; store at $28b0 (high 2 digits of speed)[/font]

[font="Courier New, Courier, mono"]EA73: CC 22 22 LDD #$0000[/font]

[font="Courier New, Courier, mono"]EA76: DD 30 STD $B2 ; store $0 at $28b2 (low 2 digits of speed)[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; now add 330cm/sec to speed (presumably to simulate the acceleration on the javelin by the thrower's arm)[/font]

[font="Courier New, Courier, mono"]EA78: 86 2B LDA #$03 ; A = 3[/font]

[font="Courier New, Courier, mono"]EA7A: 9B 39 ADDA $B1 ; add 300cm/sec to speed[/font]

[font="Courier New, Courier, mono"]EA7C: 19 DAA ; decimally adjust[/font]

[font="Courier New, Courier, mono"]EA7D: 85 78 BITA #$F0 ; test upper nibble bits in A[/font]

[font="Courier New, Courier, mono"]EA7F: 27 26 BEQ $EA85 ; branch if they're zero[/font]

[font="Courier New, Courier, mono"]EA81: 0C 32 INC $B0 ; else increment highest digit of throw speed[/font]

[font="Courier New, Courier, mono"]EA83: 84 2D ANDA #$0F ; clear upper nibble of A[/font]

[font="Courier New, Courier, mono"]EA85: 97 33 STA $B1 ; store A at second highest digit[/font]

[font="Courier New, Courier, mono"]EA87: 86 2B LDA #$03 ; A = 3[/font]

[font="Courier New, Courier, mono"]EA89: 9B 3A ADDA $B2 ; add 30cm/sec to speed[/font]

[font="Courier New, Courier, mono"]EA8B: 19 DAA ; decimally adjust[/font]

[font="Courier New, Courier, mono"]EA8C: 85 D8 BITA #$F0 ; test upper nibble bits in A[/font]

[font="Courier New, Courier, mono"]EA8E: 27 8C BEQ $EA94 ; branch if they're zero[/font]

[font="Courier New, Courier, mono"]EA90: 0C 93 INC $B1 ; else increment second highest digit of throw speed[/font]

[font="Courier New, Courier, mono"]EA92: 84 8D ANDA #$0F ; clear upper nibble of A[/font]

[font="Courier New, Courier, mono"]EA94: 97 90 STA $B2 ; store at third highest digit[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; now boost the speed based on distance thrown in previous attempt[/font]

[font="Courier New, Courier, mono"]EA96: 0D 1D TST $9F ; which throw attempt is this?[/font]

[font="Courier New, Courier, mono"]EA98: 27 1F BEQ $EAD1 ; branch if it's the first attempt (no speed boost for 1st attempt)[/font]

[font="Courier New, Courier, mono"]EA9A: D6 57 LDB $DF ; which player is currently playing (0-3) ?[/font]

[font="Courier New, Courier, mono"]EA9C: 10 8E A1 E8 LDY #$2960 ; point Y at P1 player's first throw attempt[/font]

[font="Courier New, Courier, mono"]EAA0: 86 2E LDA #$0C ; 12 bytes per player score[/font]

[font="Courier New, Courier, mono"]EAA2: 3D MUL ; multiply A by B, storing result in B[/font]

[font="Courier New, Courier, mono"]EAA3: 31 87 LEAY B,Y ; add B to Y pointer to correct it for which player is currently playing[/font]

[font="Courier New, Courier, mono"]EAA5: 96 1D LDA $9F ; which throw attempt is this?[/font]

[font="Courier New, Courier, mono"]EAA7: 4A DECA ; decrement A (to get previous attempt)[/font]

[font="Courier New, Courier, mono"]EAA8: 48 ASLA ; multiply A by 4 via two left shifts[/font]

[font="Courier New, Courier, mono"]EAA9: 48 ASLA ; because there are 4 bytes per attempt in the score[/font]

[font="Courier New, Courier, mono"]EAAA: 31 2E LEAY A,Y ; adjust the Y pointer to point to the correct atttempt[/font]

[font="Courier New, Courier, mono"]EAAC: A6 8C LDA ,Y ; get first byte of this attempt[/font]

[font="Courier New, Courier, mono"]EAAE: 81 9E CMPA #$16 ; was this throw a FOUL? (first byte will be $16 if it was)[/font]

[font="Courier New, Courier, mono"]EAB0: 27 3D BEQ $EAD1 ; branch if previous attempt was a FOUL (no boost for FOUL on previous attempt)[/font]

[font="Courier New, Courier, mono"]EAB2: C6 88 LDB #$0A ; A = 10 [/font]

[font="Courier New, Courier, mono"]EAB4: 3D MUL ; multiply first byte of previous throw (tens of metres) by 10, store result in B[/font]

[font="Courier New, Courier, mono"]EAB5: EB A3 ADDB $1,Y ; add second byte of previous throw (metres) to B[/font]

[font="Courier New, Courier, mono"]EAB7: 57 ASRB ; divide B by 2 (B now contains whole metres / 2 from previous throw)[/font]

[font="Courier New, Courier, mono"]EAB8: 1F B0 TFR B,A ; transfer B to A[/font]

[font="Courier New, Courier, mono"]EABA: 10 8E 00 9C LDY #$28B4 ; point Y at the byte after the lowest digit of the player's speed[/font]

[font="Courier New, Courier, mono"]EABE: AB 2A ADDA ,-Y ; add lowest digit of player's speed to A[/font]

[font="Courier New, Courier, mono"]EAC0: 81 28 CMPA #$0A ; compare A with a value of 10[/font]

[font="Courier New, Courier, mono"]EAC2: 25 89 BCS $EACF ; branch if A < 10[/font]

[font="Courier New, Courier, mono"]EAC4: C6 28 LDB #$0A ; B = 10[/font]

[font="Courier New, Courier, mono"]EAC6: BD 79 7A JSR $FB52 ; A / 10 (quotient in B, remainder in A)[/font]

[font="Courier New, Courier, mono"]EAC9: A7 2C STA ,Y ; store remainder in player's speed (moving target)[/font]

[font="Courier New, Courier, mono"]EACB: 1F B0 TFR B,A ; transfer B to A[/font]

[font="Courier New, Courier, mono"]EACD: 20 67 BRA $EABE ; loop[/font]

[font="Courier New, Courier, mono"]EACF: A7 86 STA ,Y ; store A at Y[/font]

This is the piece of code which boosts speed based on perfect (or near perfect) jump/throw angles :-

[font="Courier New, Courier, mono"]; this routine gives the player's speed a little boost if the jump/throw angle is between 43 and 47 degrees[/font]

[font="Courier New, Courier, mono"]; it's called by the 3 events that use jump/throw angles, namely long jump, javelin and hammer throw[/font]

[font="Courier New, Courier, mono"]; HOWEVER - this routine doesn't work as intended when called from the javelin routine as X is pointing to the wrong memory location [/font]

[font="Courier New, Courier, mono"]; (it should be pointing to $28a0 on entry but instead it's pointing to $2b60)[/font]

[font="Courier New, Courier, mono"]; i've checked MAME rom sets trackfld, trackfldc (Centuri licence) and hyprolym (Hyper Olympics) and the bug exists in all versions[/font]

[font="Courier New, Courier, mono"]; when called by the long jump processing X is pointing at $28a0 on entry which means $38+X is the jump angle at $28d8)[/font]

[font="Courier New, Courier, mono"]; when called by the hammer throw processing X is pointing to $2a00 which means $38+X is the throw angle at $2a38)[/font]

[font="Courier New, Courier, mono"]; boost is calculated as follows :-[/font]

[font="Courier New, Courier, mono"]; 60cm/sec boost for a jump/throw angle of 45 degrees[/font]

[font="Courier New, Courier, mono"]; 30cm/sec boost for a jump/throw angle of 44 or 46 degrees[/font]

[font="Courier New, Courier, mono"]; 10cm/sec boost for a jump/throw angle of 43 or 47 degrees[/font]

[font="Courier New, Courier, mono"]; if boost takes player's speed over 1500cm/sec then speed is capped at 1500cm/sec[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]FB0E: A6 00 1A LDA $38,X ; $2b98 for javelin (WRONG), $28d8 for long jump (jump angle), $2a38 for hammer throw (throw angle)[/font]

[font="Courier New, Courier, mono"]FB11: 80 AF SUBA #$2D ; subtract a value of 45 from A[/font]

[font="Courier New, Courier, mono"]FB13: 27 31 BEQ $FB28 ; branch if jump/throw angle is exactly 45 degrees[/font]

[font="Courier New, Courier, mono"]FB15: 2A 83 BPL $FB18 ; branch if jump/throw angle is more than 45 degrees[/font]

[font="Courier New, Courier, mono"]FB17: 40 NEGA ; jump/throw must be less than 45 degreess so negate A[/font]

[font="Courier New, Courier, mono"]FB18: 81 29 CMPA #$01 ; and compare A with a value of 1[/font]

[font="Courier New, Courier, mono"]FB1A: 27 80 BEQ $FB24 ; branch if A is 1 (44 or 46 degrees)[/font]

[font="Courier New, Courier, mono"]FB1C: 81 2A CMPA #$02 ; compare A with a value of 2 (43 or 47 degrees)[/font]

[font="Courier New, Courier, mono"]FB1E: 26 97 BNE $FB3F ; branch if A is not equal to 2[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; 10cm/sec boost for a 43 or 47 degree jump/throw angle[/font]

[font="Courier New, Courier, mono"]FB20: 86 23 LDA #$01 ; A = 1 (for 10cm/sec)[/font]

[font="Courier New, Courier, mono"]FB22: 20 84 BRA $FB2A [/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; 30cm/sec boost for a 44 or 46 degree jump/throw angle[/font]

[font="Courier New, Courier, mono"]FB24: 86 21 LDA #$03 ; A = 3 (for 30cm/sec)[/font]

[font="Courier New, Courier, mono"]FB26: 20 80 BRA $FB2A[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; 60cm/sec boost for a 45 degree jump/throw angle[/font]

[font="Courier New, Courier, mono"]FB28: 86 2E LDA #$06 ; A = 6 (for 60cm/sec)[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]FB2A: 10 8E 00 9B LDY #$28B3 ; point Y at lowest digit of player's speed[/font]

[font="Courier New, Courier, mono"]FB2E: AB 2A ADDA ,-Y ; add second lowest digit of player's speed to A and decrement Y pointer at the same time [/font]

[font="Courier New, Courier, mono"]FB30: 19 DAA ; decimally adjust[/font]

[font="Courier New, Courier, mono"]FB31: 85 F2 BITA #$70 ; test bits 4-6 of A for the overflow from the addition[/font]

[font="Courier New, Courier, mono"]FB33: 27 2A BEQ $FB3D ; branch if there's no overflow from the addition[/font]

[font="Courier New, Courier, mono"]FB35: 84 8D ANDA #$0F ; else handle the overflow[/font]

[font="Courier New, Courier, mono"]FB37: A7 8C STA ,Y ; into the next highest digit[/font]

[font="Courier New, Courier, mono"]FB39: 86 89 LDA #$01 ; by adding 1 to it and keep looping until there's no overflow[/font]

[font="Courier New, Courier, mono"]FB3B: 20 D9 BRA $FB2E[/font]

[font="Courier New, Courier, mono"]FB3D: A7 2C STA ,Y ; store A at Y[/font]

[font="Courier New, Courier, mono"]
[/font]

[font="Courier New, Courier, mono"]; if the boost takes the player's speed over 1500cm/sec then cap it at 1500cm/sec[/font]

[font="Courier New, Courier, mono"]FB3F: DC 92 LDD $B0 ; get upper two digits of player's speed[/font]

[font="Courier New, Courier, mono"]FB41: 10 83 83 27 CMPD #$0105 ; compare with 15xx cm/sec[/font]

[font="Courier New, Courier, mono"]FB45: 25 88 BCS $FB51 ; branch if less than 15xx cm/sec[/font]

[font="Courier New, Courier, mono"]FB47: CC 29 2D LDD #$0105 ; else cap speed at 1500 cm/sec[/font]

[font="Courier New, Courier, mono"]FB4A: DD 38 STD $B0[/font]

[font="Courier New, Courier, mono"]FB4C: CC 28 88 LDD #$0000[/font]

[font="Courier New, Courier, mono"]FB4F: DD 90 STD $B2[/font]

[font="Courier New, Courier, mono"]FB51: 39 RTS [/font]
 

Hurray Banana

Moderator
Staff member
vacBacker
Feedback
8 (100%)
Credits
2,766CR
Awesome work Ade
smiley32.gif
 

smarty

Ready Player One
vacBacker
Feedback
12 (100%)
Credits
1,305CR
Excellent code analysis Ade, I love the way this thread has turned opinions/thoughts of how to best play the game into facts with reversing of the code and 'Vaccers testing the concepts.

Great stuff like this always seems to happen on UKVaC, well done all.
smiley32.gif
 

Mr20to5

Active member
vacBacker
Feedback
1 (100%)
Credits
1,366CR
To all contributors of this thread.

I was aware of this thread when it originated but never really had the time to commit to reading/trying to understand it, so have left it to develop.

Until now. I have just spent the last half hour, thoroughly in grossed in this. Do I understand it? Hell no!, But it is so well written that it still makes perfect sense.

The skills shown here to debug, interrogate and manipulate the code is utterly immense.

It just adds to what is already a great game anyway.

Top work all.
 

Battlezone

Active member
Feedback
1 (100%)
Credits
410CR
Having spent more time looking into the code some more here are some
corrections and updates:

Corrections (I've fixed the old post too).

* It's jump angle that gives you a long jump speed boost not closeness

to the spring board. Ade's post mentions this too.

* Even though the long jump flight checks for button presses and

increases your speed it appears to be too late to make any difference

to the overall distance. This is now inline with the experience of the

expert players, so this is good. I've confirmed this by running tests.

New info (still to be confirmed independently).

* The best long jump angle is 42 degrees, no question, no surprise.

* The long jump distances appear to get boosted by the previous jump

too (like the Javalin).

* The best javalin angle appears to be 42 degrees (then 43, 44, 47)

but this may vary (especially with the bug Ade mentioned).

* You don't want to throw the javalin over 100m the distance is bugged,

as well as the graphics.

* There are a number of speed display bugs if you run "too" fast

* I posted the required steady state frequencies to get to a particular

speed. I still think the post is correct, however in practice you'll have

to click faster than this to get to the required speed because the events

are relatively short and the acceleration is slow.

Having looked at the code here is my list of handy Mame commands

to automatically play the first 3 events. You can change the click rates

and the angles to run assorted tests. Here I've set the click rate to a

modest 20Hz.

Start the 100m sprint: bp 7b1f,{(b@283f%3)==1},{b@2839|=1;g}

Run the races: bp 93cd,{(b@283f%3)==1},{b@2839|=1;g}

Start the ljump: bp 7cb3,{(b@283f%3)==1},{b@2839|=1;g}

ljump leap: bp 7d87,{b@364d==5d},{b@2839|=2;g}

ljump angle: bp 9801,{b@28d8<2d},{b@2839|=2;g}

ljump hit buttons in the air: bp 9859,{(b@283f%3)==1},{b@2839|=1;g}

javalin start the run: bp e6eb,1,{A=5;g}

throw the javalin: bp e7bb,{b@3643==f7},{A=2;g}

javalin set the angle: bp e895,{b@28d8<2a},{A=2;g}

javalin mash the buttons for lift: bp eb0b,{(b@283f%3)==1},{A=1;g}

'{(b@283f%3)==1}' this means click every 3rd frame and controls the

button speed to 20Hz. Replace this with 1 to see max speed 60Hz

(and the bugs caused).

I haven't found a good way to judge throw/jump position very accurately

yet. At different speeds you may need to reduce the screen location

being checked by 1 or 2 (screen blocks are in the range 0x3000-0x37FF)

to avoid FOUL.

Found a few odd things in the sprite ROMs while hunting.

tnf.png


Battlezone2016-08-03 20:53:21
 

philmurr

Active member
vacBacker
Feedback
48 (100%)
Credits
2,378CR
More excellent work John. Really enjoying what you, Ade and Eric are doing here.

Especially like the bugs that are being found and explaned.
 

Battlezone

Active member
Feedback
1 (100%)
Credits
410CR
It's possible we've done this thread to death, but one more correction on

some info I posted on this thread earlier. 30Hz combined clicks (not 60Hz)

are the fastest that a player can make for most of the running sections

of the game. I'll correct the earlier part of the thread too at some point.

The game does keep a 3 frame history for each button but they don't

make good use of this when attempting to run at speed, in fact

they introduce a nasty relationship between the buttons (that in

my opinion slightly reduces the point of having 2 buttons in the first place).

I'd call this a bug in the original code, maybe it's a design feature

(you can end up going slower if you are not careful when you click

the other button).

Most of the buttons checks follow a scheme like this one that

looks for a down-click on either button but that keeps the histories

distinct (this one happens to be a 3 frame check rather than a 2

but the principle is the same).

[font="Courier New, Courier, mono"][/font]

[font="Courier New, Courier, mono"]L9862: a642 LDA 0x02,U // Get the player's button status from 2 frames ago[/font]

[font="Courier New, Courier, mono"]L9864: aa41 ORA 0x01,U // combine it with the history from 1 frame ago[/font]

[font="Courier New, Courier, mono"]L9866: 43 COMA // Invert as we need 2 frames of not pressed in this case[/font]

[font="Courier New, Courier, mono"]L9867: a4c4 ANDA ,U // Combine with the current button status[/font]

[font="Courier New, Courier, mono"]L9869: 8405 ANDA #0x05 // Check player run buttons[/font]

[font="Courier New, Courier, mono"]L986b: 2710 BEQ L987d // If no rising edge on either button then no speed boost[/font]

[font="Courier New, Courier, mono"] boost the speed...[/font]

However this is the check the game uses for running. In English this code

means that you need a frame of neither run button followed by a frame of either

run button. It also means that if you perfectly interleave the clicks on the

two buttons (at 30Hz each) you don't move at all. 30Hz is the best you

can do on one button and it's also the best you can do on 2 buttons

(fingers allowing).

[font="Courier New, Courier, mono"][/font]

[font="Courier New, Courier, mono"]L93e4: a621 LDA 0x01,Y // Get the player's button status from the last frame[/font]

[font="Courier New, Courier, mono"]L93e6: 8405 ANDA #0x05 // Check both run buttons[/font]

[font="Courier New, Courier, mono"]L93e8: 2661 BNE L944b // If either was pressed then no speed boost[/font]

[font="Courier New, Courier, mono"]L93ea: a6a4 LDA ,Y // Get the player's current button status[/font]

[font="Courier New, Courier, mono"]L93ec: 8405 ANDA #0x05 // Check both run buttons[/font]

[font="Courier New, Courier, mono"]L93ee: 275b BEQ L944b // If both are not pressed then no speed boost[/font]

[font="Courier New, Courier, mono"] boost the speed...[/font]

I'd have written this so the clicks are independent (but what do I know).

[font="Courier New, Courier, mono"][/font]

[font="Courier New, Courier, mono"] LDA 0x01,Y[/font]

[font="Courier New, Courier, mono"] COMA[/font]

[font="Courier New, Courier, mono"] ANDA ,Y[/font]

[font="Courier New, Courier, mono"] ANDA #0x05[/font]

[font="Courier New, Courier, mono"] BEQ out_of_here[/font]

[font="Courier New, Courier, mono"] boost the speed...[/font]

This subtlety eventually became obvious when coding a Track & Field

training ROM. Who knows if there is any use for this, but the idea

interested me.

Here is a screen shot, it runs in Mame and I'm pretty sure will run on my original

hardware too (when I dig out an 8K EPROM and try it).

It displays your event speed, recognized click rate, wasted click rate

and allows you to practice long jump angle presses. So basically it allows

you to perfect your running 3 finger technique and minimize your wasted clicks.

tnftrain_small2.png


Battlezone2016-08-16 09:29:41
 

Battlezone

Active member
Feedback
1 (100%)
Credits
410CR
silverfox0786 said:
i want that rom please its looks so cool to train with

is there a gym subscription for this

The subscriptions are reasonable. The software is worth the subscription

fee.
smiley24.gif


I hesitate to send out a ROM I've not tested on the hardware

given the number of corrections I've already had to my own

comments in this thread. I'll risk it, maybe someone will

get a chance to confirm it on hardware before I do.

In line with my understanding of the forum rules

this is just my single new ROM file you'll need your

backups of the other ROMs to run this on Mame.

It goes in the same slot as a05_e05.bin (rename it to that and

combine with the other roms into a trackfld.zip if you want to run

it on unmodified Mame - I use a modified Mame and can also

run unencoded but that's another story).

https://www.ukvac.com/forum/data/uploads/3180/tnftrain_v2.zip (confirmed working on my hardware)

Battlezone2016-08-17 00:13:02
 

Hurray Banana

Moderator
Staff member
vacBacker
Feedback
8 (100%)
Credits
2,766CR
Awesome investigation and coding John.

If people want to run this on standard Mame, you'll need to run from the command line so you can ignore the CRC checksum checking. If you run the from the inbuilt UI it will refuse to run.

Amazing John
smiley32.gif
 
Top