Donkey Kong Forum

General Donkey Kong Discussion => General Donkey Kong Discussion => Topic started by: Sock Master on May 12, 2016, 11:38:45 pm

Title: Donkey Kong Trainer
Post by: Sock Master on May 12, 2016, 11:38:45 pm
So, I've started working on a "Trainer" version of DK.

This is essentially going to be a Donkey Kong romset that plays just like normal Donkey Kong, but will add extra information to the game's display and will also include some features and functions to help with practice and training.

I'm not finished it yet, but I figured it'd be interesting to share what I've got as I work on it.  You can download the romset here:

**The old link is broken now so I've attached the file to the end of this post - see below!**

The file isn't a complete DK romset, you'll have to unzip it and copy these files into a folder already containing a copy of DK roms to get it to work in MAME.


Here's what you get so far...  during gameplay,

On the left side of the screen:
-Your score (total)
-Your score (on this board)
-Lives
-Total points that could be earned leeching kong in the time that is left (appears on rivets board only)

Center:
-High score (I'll replace this with a Pace display in the future)

On the right side of the screen:
-Game speed (currently selectable between 20% and 150%)
-Points earned from jumps (on this board)
-Points earned from hammer smashes (on this board)
-Level indicator
-Internal difficulty indicator, plus time in seconds till the internal difficulty goes to the next level.
-Bonus
-Hammer time left (in seconds and milliseconds, when hammer is active)
-Time till next fireball/firefox spawn interval (seconds/milliseconds, on rivets and pies only)
-Scrolling spring I.D. display (on springs only)

Playfield:
-Indicator for pie spawn cycle (on pies only)
-"always 300 points" Pies are indicated by their blue color (on pies only)


And...  The 1P and 2P start buttons can be used to control these features,

1P button:
-quick tap sets the game speed 10% slower per tap
-slower tap sets the game speed 10% faster
-hold down (for over a second) and let go sets the speed back to normal (100%)

2P button:
-quick tap resets the board.  No lives lost.  Your score is restored to what it was before you started the board.  You can use this to retry the board as many times as you like, restart if you mess up a move, or just want to practice something over and over.

-slower tap skips the board.   Whatever is on the bonus timer gets added to your score and you move to the next board as if you completed it.   You can tap slow taps during the "How High" screen to keep skipping till you get to lets say 5-1.

-hold down (for at least 3 seconds) and let go.  Quit back to attract mode.


The idea here is that you can play a game as if it were a normal DK game, but it allows you to retry stages if something didn't work out.   Only the last play on a board will count - this would allow you to judge what your score would be if no mistakes ever happened, etc...

For practice play, the speed controls will allow you to try pixel-perfect moves at slow speed to work out the timing, then speed it up incrementally until you can do it in real-time.   For reaction time training, speed the game up >100% and play and then when you go back down to regular speed it'll be easier to manage.

There are other ideas I'd like to add, but some of them are pretty complicated to implement.  Hopefully I can get some of them in.  Things like on-screen indicators for where you'd land after a jump, where a barrel might get to after your jump, visible indicators for fireball decision points, stuff like that...

Oh, and I removed the high score table.. this allows me to add stuff while still fitting in DK's normal ROM space.  High scores are pointless in a trainer/practice version of DK anyway.   I also removed the 2 player option.

Let me know what you think.  Comments are welcome.
Title: Re: Donkey Kong Trainer
Post by: xelnia on May 12, 2016, 11:49:50 pm
Playing with this now.  Kreygasm
Title: Re: Donkey Kong Trainer
Post by: marinomitch13 on May 13, 2016, 02:12:01 am
Wow. I would so buy this if it ever becomes hardware and I have the money to spend. Kreygasm

Another idea: Time until conveyer changes direction on pies.
Title: Re: Donkey Kong Trainer
Post by: xelnia on May 13, 2016, 02:31:33 am
Quick thoughts after playing with it for about an hour:

1) The spring indicators are cool, but I'm not sure they're useful as a trainer in their current implementation. Because the numbers are on the right and the springs come in from the left, it's visually difficult to connect the two, especially on level 4.

2) The idea was raised that a trainer might provide players with not just data, but also specific scenarios. So, you could have a L5+ spring stage with mostly longer springs. Or a rivet with all bottom spawners. Or a pie factory with more aggressive fireballs. etc. etc.

3) I really like the jump / smash points counter. I think these can be very useful as players try to increase their efficiency with bottom/top hammers. To that end, maybe separate bottom hammer smashes from top hammer smashes if possible.

Pretty cool all around. Great work sir!
Title: Re: Donkey Kong Trainer
Post by: Adam_Mon on May 13, 2016, 08:18:03 am
Wow. I would so buy this if it ever becomes hardware and I have the money to spend. Kreygasm

Another idea: Time until conveyer changes direction on pies.

That might clutter the screen imo, besides we get a visual cue for conveyer change when kong hits the left wall.

The blue springs scrolling numbers/text I found a little distracting tbh.

other than that this is great. cant wait for the built in pace  Kreygasm
Title: Re: Donkey Kong Trainer
Post by: Sock Master on May 13, 2016, 08:46:00 am
I'll keep working on it.  I'm thinking there are too many things on the right side of the screen and I could move one or two of them over to the left side, or move things around a bit till everything fits in convenient and non-distracting locations.

After it's done, I'll start looking into getting it to run on actual arcade hardware too.

1) The spring indicators are cool, but I'm not sure they're useful as a trainer in their current implementation. Because the numbers are on the right and the springs come in from the left, it's visually difficult to connect the two, especially on level 4.

2) The idea was raised that a trainer might provide players with not just data, but also specific scenarios. So, you could have a L5+ spring stage with mostly longer springs. Or a rivet with all bottom spawners. Or a pie factory with more aggressive fireballs. etc. etc.

3) I really like the jump / smash points counter. I think these can be very useful as players try to increase their efficiency with bottom/top hammers. To that end, maybe separate bottom hammer smashes from top hammer smashes if possible.

1)I'm going to try moving the indicators,  maybe above Kong's head.    Later on I'm also hoping to put in some kind of graphical indications - like a sprite dot displaying at the next landing point of each moving spring.

2)I'll have to think about how that might be done.  We have a few problems - how to make a user interface to select scenarios, and getting it all to still fit into DK ROM space.

3)Two hammer point displays might be handy, but how to add that without making the screen cluttered/more confusing?


One of the more interesting things that this trainer makes visible is how the different timers work.

The spawn timer keeps cycling, always, even between boards and during hammer smashes - BUT, spawns do not always happen.  You can time your smashes to coincide with the spawn timer reaching zero and force the game skip respawns while you're hammering.    I still have a bit to clean up there, but when it says "S=nnn" it can spawn a fireball.  When you're smashing, the "S=" vanishes, to indicate the timer is running but at that moment a fireball will not spawn if the timer reaches 0.

A similar thing happens with the time till internal difficulty increase.  It keeps ticking while smashing things (but in this case difficulty still increases during a smash.)   But it does show that internal difficulty jumps are not directly linked to the bonus timer.
Title: Re: Donkey Kong Trainer
Post by: marinomitch13 on May 13, 2016, 11:09:48 am
In terms of clutter, the best option might just be a menu where the user gets to pick what gets displayed.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on May 14, 2016, 12:54:10 am
Hi John

Used your trainer yesterday and like it A LOT. Its a brilliant idea and for my part I think its close to perfect. Two comments:

1. If possible to program I think the spring indicators should be graphical and showing where the first landingspot is on the girder (position 1-15) since training to take notice of this are key in getting good at the spring-levels. I dont think you really train anything by looking at the numbers in the trainer.

2. In addition to the trainer and regarding the pace-info I would REALLY love, if it was possible to enter a "tournament edition" showing the pace informations (deaths included) that we could choose to use while playing for highscores. Of course this would be dependent on DKF (and TG) to accept submissions by this version. Today a lot of people struggle to show this info in their stream by either using the very old pauline tracker (for 106) or other programs/excel sheets. It would be a lot better, if it was somehow possible to implement in a nice way in the code or maybe as a supplement tracker of some kind if it otherwise would be problematic to make legit submissions. What do other people thinks about this?
Title: Re: Donkey Kong Trainer
Post by: ChrisP on May 19, 2016, 03:18:00 pm
I like this! Here are my change suggestions.

When skipping a board, don't add the timer value to the score: I think it's much better to skip boards and keep the score "clean", adding up just the points that have been earned. (IMO, you do not earn the bonus timer until and unless you clear the board.) Or, it could work such that you won't get the timer bonus added if you skip the board during the stacked monkey screen, but will get the bonus if you skip it with the playfield on screen.

Automatic Free Play: This trainer will never be used in a conventional on-location setting, therefore credit-handling tasks are probably a waste of memory and time. Just simplify and make pressing 1P start the game.

Remove the intro cutscene: "I want to see that intro again!", said no one, ever. And look, more ROM space!

Reset the hammer score upon grabbing a second hammer: Individual hammer points are much more useful than cumulative hammer points for the board. For the first hammer this is no problem, but if you want to know how many points the second hammer was worth, you have to remember what the first one was worth, then subtract.

Change the input triggers: "tap for function 1, longer press for function 2" is awkward. The problem is that to get the secondary function you have to press the button long enough to not trigger the first function, but if you press it for too long, you'll trigger neither function, and if you press it for 3 seconds, you'll trigger the third function! So getting all of the functions to trigger is actually a bit of a skill in itself. Suggestion:
1P = board replay
2P = board skip
Jump+1P = speed down
Jump+2P = speed up
Reset to attract mode = Jump+1P+2P
Speed reset = drop it. Easy to reset it to 100% with the J+1P=down/J+2P=up method.

5-1 Warp: For a trainer, it can't be emphasized enough how valuable it is to be able to skip all the early levels and go to 5-1 instantly, since that's the beginning of the real game. With MAME, a 5-1 savestate can be made as a workaround, but if and when this becomes compatible with arcade hardware, anyone who wants to practice internal difficulty 5 will have to manually skip the first 14 boards every time. I suggest assigning a specific trigger to warp to 5-1. Perhaps 1P+2P? Or, you could even make it a dipswitch setting, replacing the "extra life at" switch (which is pretty useless) with a "start at Level 5" on/off switch.

Add a key to the high score/insert coin screen: remove the Insert Coin stuff, then use this screen to describe what each indicator shows, and what the button actions do. In-game documentation would be good, otherwise users of this ROM will be dependent on the DKF thread for an explanation. A few things, like the blue pie, will be a total mystery unless explained.

That's all I can think of for now!  :)
Title: Re: Donkey Kong Trainer
Post by: marinomitch13 on May 19, 2016, 03:29:47 pm
since that's the beginning of the real game.

Whtda?!?! Grrrrrr!  >:(  <mad>  <mad>  <mad>

Fttt... bug off, make.
Title: Re: Donkey Kong Trainer
Post by: ChrisP on May 19, 2016, 03:31:50 pm
Troll successful.  Kappa
Title: Re: Donkey Kong Trainer
Post by: tudose on May 19, 2016, 03:41:49 pm
chrisp please...please <Allen>
Title: Re: Donkey Kong Trainer
Post by: Sock Master on May 19, 2016, 04:06:15 pm
Right now I'm working on adding some graphical 'dots' around jumpman, barrels, fireballs, springs.. to indicate travel/jump/decision distances.   Some of these already look like missteps (not useful) but some look like they'll be useful.   Update tomorrow, hopefully.   This will still be a work-in-progress, and not even entirely functional, so just let me know "this dot is useless" because I'm probably already considering getting rid of it.

In terms of clutter, the best option might just be a menu where the user gets to pick what gets displayed.

I'll find out later if there's enough ROM space to allow menus, but another option may be to toggle a few variations of the displays by inserting coins during gameplay.

1. If possible to program I think the spring indicators should be graphical and showing where the first landingspot is on the girder (position 1-15) since training to take notice of this are key in getting good at the spring-levels. I dont think you really train anything by looking at the numbers in the trainer.

2. In addition to the trainer and regarding the pace-info I would REALLY love, if it was possible to enter a "tournament edition" showing the pace informations (deaths included) that we could choose to use while playing for highscores. Of course this would be dependent on DKF (and TG) to accept submissions by this version.

1. Already added, sort of (I'm aiming to post an updated rom tomorrow)  I currently have a graphical dot leading ahead of each spring by one bounce cycle, so you see each spring's trajectory and landing points before they happen.

2. If people agree to it, I could make a version of DK without all the training stuff and just all the pace stuff.  But there's a catch.. even changing one byte of Z80 code changes the results from the RNG.  That means it won't be .INP file interchangeable with the regular DK roms.

When skipping a board, don't add the timer value to the score:

Automatic Free Play:

Remove the intro cutscene:

Reset the hammer score upon grabbing a second hammer:

5-1 Warp:

Add a key to the high score/insert coin screen:

These are all good and I'll try to add these in one form or another as I go.   The cutscene might end up skip-able instead of just gone.   It's already pretty quick to get to 5-1 with a series of button taps during the how-high screen, but I'll consider adding some more direct way to get to 5-1.

Change the input triggers: "tap for function 1, longer press for function 2" is awkward. The problem is that to get the secondary function you have to press the button long enough to not trigger the first function, but if you press it for too long, you'll trigger neither function, and if you press it for 3 seconds, you'll trigger the third function! So getting all of the functions to trigger is actually a bit of a skill in itself. Suggestion:
1P = board replay
2P = board skip
Jump+1P = speed down
Jump+2P = speed up
Reset to attract mode = Jump+1P+2P
Speed reset = drop it. Easy to reset it to 100% with the J+1P=down/J+2P=up method.
It's just too easy to fumble the second function. More explicit input triggers would be better.

This one is difficult to make a best solution for.  I don't want a multi-button combination for speedup-slowdown because it's handy to be able to tap in speed switches mid-gameplay.

I am trying to tweak the short tap/long tap/extra long tap recognition to be more reliable.    The gist of it right now is that a short tap is just a tap.. no holding down.    A medium tap is holding it down for somewheres around 1/4 of a second. and a long tap is anything over 2 or 3 seconds.
Title: Re: Donkey Kong Trainer
Post by: Adam_Mon on May 19, 2016, 04:39:07 pm
This is a terrible suggestion and probably impossible, but I think it would be cool if when you trigger "warp to lvl 5-1" you get something like the intials input menu to show up, only the letters are replaced with numbers and you can key in what start score you want to begin lvl 5 with.
Title: Re: Donkey Kong Trainer
Post by: marinomitch13 on May 19, 2016, 04:51:42 pm
Right now I'm working on adding some graphical 'dots' around jumpman, barrels, fireballs, springs.. to indicate travel/jump/decision distances.

This is an amazing idea. This would literally make learning the leach-each-barrel-twice-at-the-end-of-each-girder technique much easier.
Title: Re: Donkey Kong Trainer
Post by: ChrisP on May 19, 2016, 05:47:40 pm
Another space-saving idea: remove the gameplay sequence of the attract mode and just cycle back and forth between the title screen and the Insert Coin screen. I don't think anybody feels the need to watch demo Jumpman blow it over and over.  :)
Title: Re: Donkey Kong Trainer
Post by: Sock Master on May 20, 2016, 11:17:23 am
An updated version of DK Trainer is now up.

Main additions:

-Graphical dots showing where jumpman will land if he jumps either left or right.
 (at the moment, these and many of the other 'dots' do not calculate for variable terrain... that is, it only shows where jumpman would land on a flat surface.  Even if I did add some of that in, there are cases that would just be too heavy duty for the Z80 to compute time-shifted predictions, like jumping off a girder and onto a moving elevator.)

-Graphical dots showing where barrels will be at by the time jumpman lands from his jump.
 (at the moment this does not calculate taking ladders or free-falling barrels.)

-Graphical dots showing where each spring will be one bounce in the future.
 (this one does cover falling because that calculation is entirely predictable.)

-Graphical dots showing the fireball/firefox decision point locations on-screen (!)
 (this one is really neat to see.   it does not take into account fireballs reversing from reaching ends of girders.   Right side points are solid, but left side points jitter a bit because they are not 100% predictable because of randomness, but the estimations are pretty good and they adjust in real-time.)


The barrel dots don't really seem to be all that helpful, but the firefox dots are really good at showing how their movement logic works.

There's no toggle to turn the 'dot' displays on/off yet.
Title: Re: Donkey Kong Trainer
Post by: xelnia on May 20, 2016, 11:32:09 am
Wow, those fireball decision points are sexy as fk.  Kreygasm
Title: Re: Donkey Kong Trainer
Post by: muscleandfitness on May 21, 2016, 01:40:59 am
Why wasn't i told about this ,,ftttt this abuse im gone  lit
Title: Re: Donkey Kong Trainer
Post by: xelnia on May 21, 2016, 02:26:05 am
Why wasn't i told about this ,,ftttt this abuse im gone  lit

Because it wouldn't help even you.  :)  <stirpot>
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 09, 2016, 12:09:22 pm
I've updated the DK trainer rom a bit, it now calculates pace and displays some scoring tallies in the "How High?" screen between game stages.

The pace calculation tries to predict your pace after every completed stage, so even if you only complete 1-1, it'll start displaying a pace.
(You'll have to take such early pace predictions with a grain of salt, though.. it has to make predictions for board types you haven't even played yet.)

Pace is displayed at the top of the screen where the high score would normally be.

In the "How High?" screen, it'll display score tallies for levels 1 through 22.   On the left side, it'll show individual level totals in white, and the point values for deaths and sacs in amber.

On the right side it'll show the total points after each completed level in white, and display estimated predictions for uncompleted levels in amber.


I think I still have some tweaking to do on the math, but it doesn't seem too off.   If anyone is willing to play some games, some feedback about accuracy of the pace predictions are would be appreciated.   (Keep in mind, it's not going to be super accurate early on.)

Thanks.

http://users.axess.com/twilight/sock/dk/dkong-trainer.zip (http://users.axess.com/twilight/sock/dk/dkong-trainer.zip)
Title: Re: Donkey Kong Trainer
Post by: xelnia on June 09, 2016, 12:46:29 pm
 Kreygasm

I'd like to see the math you're using. I played a test game. I died 3 times before Level 5. After Level 4 my score was 99,400. I played a complete Level 5, scoring 49,900 during that level. 99,400 + (49,900 x 17) = 99,400 + 848,300 = 947,700 expected score after Level 21. The trainer gave me a pace of 890,500 after Level 5.
Title: Re: Donkey Kong Trainer
Post by: xelnia on June 09, 2016, 12:50:41 pm
FYI, my scores for that level were:

Barrel: 8,900
Pie: 8,400
Barrel: 9,300
Spring: 5,700
Barrel: 9,400
Rivet: 8,200
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 09, 2016, 01:11:15 pm
Kreygasm

I'd like to see the math you're using. I played a test game. I died 3 times before Level 5. After Level 4 my score was 99,400. I played a complete Level 5, scoring 49,900 during that level. 99,400 + (49,900 x 17) = 99,400 + 848,300 = 947,700 expected score after Level 21. The trainer gave me a pace of 890,500 after Level 5.

It's likely I'll tweak/revise it, but what it's actually doing is tallying up 4 separate totals, one for barrels, pies, springs and rivets, then dividing each total by the number of completed boards in each category to come up with an average for each board type.   Then it uses those 4 stage type averages to fill in uncompleted board scores.

So it was actually using your L=1 to 4 scores in addition to the L5 scores for the total prediction.

I know comparing L1-4 scores to L5 scores is like comparing apples to oranges, so internally it also tries to convert pre-L5 scores into their L5+ equivalents.

I tried using some of your charts to come up with some formulas to convert L1 to equivalent L5 scores, L2 to L5, L3 to L5, etc.   If there is some magic database/resource of a ton of played games, I'd revise the formulas to be more accurate.

...Or scrap that approach and make the program switch to ordinary pace calculation after L5 is completed.   In either case, both methods have some drawbacks and advantages over each other.   This one uses the L1-L4 scores as part of the prediction model, but their weight will keep diminishing the further the game progresses.

On another note, you've probably noticed all scores always end with 00.   I'm rounding everything to hundreds to keep the load off the poor Z80, reduce code size, and reduce RAM requirements of storing all the individual board scores.
Title: Re: Donkey Kong Trainer
Post by: xelnia on June 09, 2016, 01:47:07 pm
If there is some magic database/resource of a ton of played games, I'd revise the formulas to be more accurate.

There is, sort of. Obviously I have all of my charts, but they're all individual charts and not currently collected into one database...again, sort of. I'm helping Wes with a project that will hopefully create an enormous searchable database of games. Right now there are about 175 games worth of L1 - L4 scores. Since I'm working from higher scores downwards as I add scores to this super secret magic database, the averages are currently "top-heavy", but here are the current values for the first 14 boards:

1-1: 7,837
1-2: 7,617
2-1: 8,033
2-2: 6,513
2-3: 7,868
3-1: 8,998
3-2: 7,980
3-3: 6,859
3-4: 8,589
4-1: 10,565
4-2: 7,951
4-3: 10,411
4-4: 6,199
4-5: 7,633

As I add more scores, the barrel averages will drop by a larger amount than the other boards, but it's a start I guess.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 09, 2016, 02:00:23 pm
Nice John

Really like how the "how high"-screen gives a great overview. This is what I would like to see in a "tournament-edition".  Kreygasm

The logic seems really odd in the beginning tho. I know you said its not perfect early on... but its seems way off in my case: it predicts 650k then slowly rise to 865k when playing from lvl 1-5. Right now it seems more like non-accuate in the beginning. Is it even possible to complete the game at a score of only 650k?
After level 5 it seems more precise. I dont know how precise tho since im unsure of how the built in logic works.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 09, 2016, 04:05:56 pm
Since I'm working from higher scores downwards as I add scores to this super secret magic database, the averages are currently "top-heavy", but here are the current values for the first 14 boards:

Thanks, I'll run some number crunching on those numbers and see how it compares to what I've got.    In the end, I think the optimal solution will be to use an entirely average game as the baseline for converting L1 to L4 scores into L5+ scores and vice versa.

The logic seems really odd in the beginning tho. I know you said its not perfect early on... but its seems way off in my case: it predicts 650k then slowly rise to 865k when playing from lvl 1-5. Right now it seems more like non-accuate in the beginning. Is it even possible to complete the game at a score of only 650k?

Yeah, I have to improve the numbers.   I used data from some very high scoring games to work out the conversion calculations.    Top players play 1-1 much harder than 5-1 and this skews the math.   The early pace projections are lower than they should be because the 1-1 statistics I have probably equate to a pace of 1.4 million at stage 1-1 before dropping to more normal pace after 5-1
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 09, 2016, 05:40:58 pm
Argh, I love this so much!

Huge post, I'm sorry!

However, I'm excited about where this is going, and can see how it could be better, so (as always) I have to make suggestions. :)

Leave PACE blank early on: the PACE number, as implemented here, is literally meaningless until at least level 4 at the very earliest. All that number is, during the early going, is a red-herring that would cause needless confusion. I've tried different styles of 1-1 and I get all sorts of crazy numbers depending on how I play it. If I just run it and skip the hammers, I get a pace of 500K-odd, which is an almost impossibly-low KS score while a weak-ish 7K gives me a 943K pace. I think that number should just stay blank until 6-1, or say "TBD" or "PENDING" or some such. IMO, a projected pace should not appear until it can have some semblance of accuracy.

Toward that end, here are some ideas.

Ignore L1 through L4 boards: Include the level totals in the tally of course, but integrating individual board-type averages from L1 through L4 into the pace is not sensible

First reason: every board up to 4-5 has a different set of rules than what comes after. Without even getting into the differences of the speed/number/behavior of the obstacles, it really boils down to the timer, which, relative to L5+, starts at a lower value, and ticks down more slowly. That one factor really changes everything when it comes to scoring, and makes these boards useless as data points for producing an average from which to extrapolate pace (though one could make the argument that the Level 4 boards are close enough, especially the elevator board, which is identical to L5+).

Consider how much more difficult it is to get 11,000 points on 1-1 than it is to get 11,000 points on 5-1, or how easy it is to get a 9,000 point 1-2 (where leeching Kong can add thousands to your score), versus getting 9,000 points on 5-6 (where leeching is almost useless, and you instead need cooperative fireballs).

Second reason: a player's start strategy often has nothing to do with middle-game strategy. For example, it's common for players who want a low 1 million type score, or even up to 1.05, to simply warp to L5 by speeding through the early boards. But if the early-board numbers are included in the average, whether or not they're somehow calculated with a mind for their "L5 equivalent", they'll muck everything up. Depending on your strategy, you can go for 1.05M with a 100K start, or go for 1M with a 120K start. I think the calculator should only take the player's post-start playstyle into account, because unless you're going for 1.1+, just about any approach to the start (fully-pressed or torn through) can get you the score you're trying to get.

Regardless of how the player approaches them, the early boards are junk data for numerous reasons, and they'll leave a strong taint <Sanders> on the averages until deep in the game.

Don't spot the player ANY death points: death points should be considered a bonus, not an expectation. When the player dies, just add those points to the final projected score. Since most deaths are accidental (unless you're Wes), they can be worth anything from 0 points to over 10,000 points, and they simply can't be predicted or averaged out before-the-fact in any reasonable way. (But if you do ultimately decide to pre-include death points, 8K per death is DEFINITELY too high! The 5K in Pauline is bad enough. I would say no higher than 3,000.)

Until at least Level 10, only calculate "real" averages for the barrel and elevator boards: I've never actually said it out loud, but I have a saying - barrels and springs are about getting what you take. Pies and rivets are about taking what you're given.

If the player's style is consistent, individual barrel and elevator board scores won't deviate much from the mean, because on these board-types, the player has a high degree of control over the score achieved.

But for pie factories and rivets, "you take what you're given," and what you're given will often deviate hugely (on the plus or minus side) from expectation. So if you get an outlier board or two early in the run, they will be super-confounding data points. This can sometimes be a serious problem for pace calculation until fairly deep into the game.

It may be a controversial idea, but I think you should handle L5+ pies and rivets by pre-populating them with 17-times some fairly-reliable average value (something like 8,000 pie, 7,500 rivet), and replace with the actual numbers as the player completes boards.

Early outlier pie and rivets just cause players to over (or under) estimate their pace, and bewilder those who don't understand the problem of averaging from a small, deviant sample. Anything that can be done to prevent JCB and Brian Allen from beaming about their "1.1 million pace" on 6-1 (after just having gotten some silly 10,500 point rivet) would be a good thing. :)

While the trainer will never be able to be used for actual, submittable games, it's worthwhile to get a genuinely good pace-calculator algorithm going, since it would have the potential of being ported over to a standalone pace calculator. I have yet to see or use a pace calculator that isn't deeply flawed, and I'm hopeful about moving toward one that isn't!
Title: Re: Donkey Kong Trainer
Post by: WCopeland on June 09, 2016, 09:06:44 pm
I agree with everything Chris wrote. Spotting death points is such a crippling "feature" of Pauline, I consider it to be a bug in the application. While the average kill screen game does have ~12,000 points in deaths according to the magic secret database, there have been world record games with almost zero in death points.

Everything in deaths should just be considered a bonus in the calculation, and nothing should be assumed because unless you can get all three sacs you're never in control of when you die.
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 09, 2016, 09:47:21 pm
Just some more input on this after some testing: I'm not sure exactly how it works, but including early boards makes the pace calculation very seriously flawed, to the point that Pauline, or even back-of-the-envelope math, is actually a lot more accurate.

I decided to do a "warp"-style start, which is my typical approach, reaching 5-1 with 102,300. (I died on 2-1 for 1K but kept going, so the start is technically 101,300.)

My level 5 netted 55,500. I had a free-pass pie factory, and a 7K rivet, so those are close-to-a-normal-average values.

Now, if I stop here and use the old-fashioned way of calculating pace (start + (level average * total # of levels)), I get 101,300 + (55,500*17) = 1,044,800. This is an accurate number. That is, if I continue to get 55,500 levels until the end of the game, that's exactly the score I'm gonna end up with.

The trainer, though, reported my pace as 996K! That's almost 50K below what it should have been, even WITH the extra 16K it's giving me for my remaining lives.

I decided to keep going, finishing L6 with 54,700 total, then L7 with 57,000 total. Average holding really steady so far, L7 pushed it up a tick, pace now up by about 3K to 1,048,700.

Pace estimate in the trainer = 1,027,900. Still 20K below where it should be and I'm about to start L8.

So, as inaccurate as Pauline can be on 6-1 if you have an outlier pie or rivet, whatever this method is, it's even more inaccurate if you warp to L5. Warping appears to cause the trainer to severely underestimate your pace, and it will take quite a bit of play before the numbers start to converge on reality.

I think the early board-by-board averages really need to be removed from the calculation. If I have to get to L10 for the pace to start being accurate, then the pre-start numbers not only aren't helping, they're hurting.

The simpler way (cumulative score at end of L4) seems to be the better way. :)
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 09, 2016, 10:06:48 pm
The DK trainer rom has been slightly revised to use the averages Jeremy provided as the basis for inter-conversions between L1 through L4 scores into L5 scores and vice versa.   I've made a few other adjustments the prediction math as well.   It should generate more sane pace values now, but this is still a work in progress.

I'll look into dropping the L1-L4 data from the pace prediction after the completion of L=05, in addition to the other suggestions in future revisions.
Title: Re: Donkey Kong Trainer
Post by: aarontruitt on June 09, 2016, 11:04:51 pm
I agree with everything Chris wrote. Spotting death points is such a crippling "feature" of Pauline, I consider it to be a bug in the application. While the average kill screen game does have ~12,000 points in deaths according to the magic secret database, there have been world record games with almost zero in death points.

Everything in deaths should just be considered a bonus in the calculation, and nothing should be assumed because unless you can get all three sacs you're never in control of when you die.

"What's wrong with carpet munching" - Robert Felstein

Lick it Wes
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 09, 2016, 11:45:45 pm
The DK trainer rom has been slightly revised to use the averages Jeremy provided as the basis for inter-conversions between L1 through L4 scores into L5 scores and vice versa.   I've made a few other adjustments the prediction math as well.   It should generate more sane pace values now, but this is still a work in progress.

Wow, it seems to be working much better now. I super-warped to L5 this time, getting a start of 95K, and the pace was something like 849K, which is kinda the quintessential "KS with nothing extra" score.  <Allen>

I'll look into dropping the L1-L4 data from the pace prediction after the completion of L=05, in addition to the other suggestions in future revisions.

Cool, if that's possible. If you dropped the L1-L4 data and reset the calculations after 5-6 it would probably totally solve the issue. And I have to admit, it IS kind of fun to see a pace during the early boards, even if it doesn't mean much. As long as the number becomes accurate after L5, that's what matters.

Also, not that it makes any real difference, but I was just messing around with dipswitches, and if you're on 6+1 settings, you don't get death points for the extra men, and the HOW HIGH screen starts kinda going to hell after your 4th death since there aren't enough "rows" to hold all the levels and death points. ;D I think if it's a "trainer", it probably shouldn't even have any options for lives other than 3+1.

Now that I think about it, I don't think there's a single dipswitch setting that is actually necessary for the trainer. You could re-map all of them to do whatever you want (like toggling the distances/decision point sprites on or off, start on L5, etc.)

Looking forward to more of this.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 11, 2016, 08:26:56 am
Wow, it seems to be working much better now. I super-warped to L5 this time, getting a start of 95K, and the pace was something like 849K, which is kinda the quintessential "KS with nothing extra" score.  <Allen>

It seems to be working pretty well now.  I'm still not satisfied with the 1-1 score conversion (the pace after 1-1 seems too low.  the source statistics I have are too skewed because most people press much harder on 1-1 than other barrels screens.)

Also, not that it makes any real difference, but I was just messing around with dipswitches, and if you're on 6+1 settings, you don't get death points for the extra men, and the HOW HIGH screen starts kinda going to hell after your 4th death since there aren't enough "rows" to hold all the levels and death points. ;D I think if it's a "trainer", it probably shouldn't even have any options for lives other than 3+1.

Now that I think about it, I don't think there's a single dipswitch setting that is actually necessary for the trainer. You could re-map all of them to do whatever you want (like toggling the distances/decision point sprites on or off, start on L5, etc.)

Yeah, I'm probably going to remove options for anything other than 3+1 lives.  Internally, it can support more lives in the calculations, but there just isn't enough real-estate on the screen to display more than 4 sacs/deaths.   The chart ends up wrapping around past the bottom and back to the top of the screen.   I have exactly run out of ROM space at this point too - hopefully removing the dip switch options will free enough ROM space to allow me to add options to toggle the extra in-game graphics on/off.   May have to remove the intro climbing sequence soon
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 13, 2016, 08:14:26 pm
One more update to the pace calculations..  I'm still not 100% satisfied, but it's not too bad - I'll probably tweak it some more.

I'm trying an experimental algorithm that drops one early stage tally from the predicted average after each completed stage from L=05 onwards...   For example, after completing 5-1, it stops using the 1-1 score as part of the future stage average calculation.   After 5-2, the 1-2 score is dropped.  After 5-3, the 2-1 score is dropped,etc... until only scores from L=05+ are used for unplayed stage score prediction.

At that point it becomes the standard pace calculation, except it can calculate a new pace after each completed stage.. and that score predictions for each board are rounded to 100 point values for Z80 sanity, so it's a bit coarser.

It is nice to see pace update immediately after each stage.  You can see the pace go up if you played a good board or down if you didn't - you get instant feedback
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 14, 2016, 11:33:48 am
I figured out what it was, I found a bug in my code that caused it to load incorrect values for early rivets boards in the calculations.  I've fixed the bug and updated the file on my web page.

If I play a consistent game, the reported pace stays pretty consistent... if I play one board a bit better, the pace goes up, if I play a board a bit worse, the pace goes down.   I can reliably 'call' whether it'll go up or down after each board, so it seems to jive with how I think I played.

So, I'm happy with it.   Onwards to finishing up.   (In other news, I've run out of ROM space so that's going to limit adding anything else to really small stuff.)
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 14, 2016, 04:58:23 pm
Sounds GREAT! Is it hard to make an edition with just the pace calculator? (tournament edition or whatever you'll call it).
Title: Re: Donkey Kong Trainer
Post by: tilt on June 14, 2016, 06:44:40 pm
Very cool... so will this be able to be added to the remix pcb(s)?
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 14, 2016, 08:22:48 pm
After I finish the trainer version, I'm going to look into adding just the pace to normal DK.
After that, I'm going to think long and hard about integrating it into the Remix kit.

*If* I manage to do that before the Kong Off, I am considering the possibility that I can update your kits with trainer/pace at Kong Off.   Bring your kit, I update it.   But keep in mind, I have not done this yet - it doesn't exist yet and it takes time to do.  No guarantee that I'll have this ready in time.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 14, 2016, 10:32:47 pm
BIG BIG BIG  Kreygasm
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 14, 2016, 10:36:45 pm
Wow! In just two revisions, this went very, very quickly from "the calculations have some serious flaws" to "this is the best pace calculator I've ever used." ;D

I'm just impressed that you're able to get the Z80 to do the math you need it to do at all. I'm no expert on the subject, but I know that the Z80 is not straightforward. You have to trick the fkn thing just to get it to do something as simple as multiply or divide. It's like some kind of sadistic abacus.

I really like how the early boards get gradually eliminated from the calculation between 5-1 and 7-2, rather than abruptly on 6-1. Keeping some data in there, or something else you're doing, appears to be protective against the "unusually huge or small early conveyor or rivet" problem. The pace isn't flying completely out of whack.

I also like the 1K per death points. That's good. 3,400 death points would be unusually low, but it's safer to go lower, and it's probably true that at least a little something should be added to pace for deaths.

I made a savestate after a 111K start, and starting from that, went in two different directions: I did one sample of L5 through L8 56Kish levels, and another sample where I played L5 through L8 as 47Kish levels. By 8-1, the numbers all seem to be smoothed out, and the pace it gives is pretty much exactly what I would expect, and what I get if I do the "simple" method.

I didn't try any super-high 1.15+ type boards, so I can't say if it works as well for maxout play, but it seems to work fine for anything lower.

I also tried doing other weird things, by cheating and board-skipping and stuff, to try to get it to put out a crazily-wrong number, but I couldn't confuse it.

Awesome!

Now we just need someone to take this algorithm and stuff it into a program that does OCR and Pauline can be updated for the modern age. :)
Title: Re: Donkey Kong Trainer
Post by: Barra on June 15, 2016, 03:42:39 am
words

Ffttt whens 1m


(epic stuff btw John)
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 15, 2016, 05:36:46 am
Just tested and the pace calculator works amazingly here too... began with some terrible boards and pace started at 700-something... then rose quickly to around 850k midst lvl 3 which sounds about right for my games.

Started a new game and tried some dual hammer screens and were quickly paced at above 1M. Like it!

Just cant stand playing with those dots around jumpman  ???
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 15, 2016, 12:47:27 pm
Wow! In just two revisions, this went very, very quickly from "the calculations have some serious flaws" to "this is the best pace calculator I've ever used." ;D

I'm just impressed that you're able to get the Z80 to do the math you need it to do at all. I'm no expert on the subject, but I know that the Z80 is not straightforward. You have to trick the fkn thing just to get it to do something as simple as multiply or divide. It's like some kind of sadistic abacus.

I'm cutting corners to keep things simple, but yeah - there's no divide or multiply in the Z80.    I did write a divide routine to calculate average scores, that was unavoidable, but I didn't bother writing a multiply routine.   I take shortcut substitutions in the case of multiply:
If I needed RESULT = VALUE * 1.3
I used a series of bit shifts and additions instead.   RESULT = VALUE + (VALUE/4) + (VALUE/16)
The result is closer to VALUE * 1.3125, but that's good enough.   Those shortcuts are only used in generating imaginary scores for stage-types that haven't been played yet (like getting a pie average when a pie hasn't even been played yet) or handling pre-L5 scores.

Once it transitions to normal pace calculation, those shortcuts aren't applied anymore so I didn't worry too much being off by a few percent for the sake of keeping things simple.


Now we just need someone to take this algorithm and stuff it into a program that does OCR and Pauline can be updated for the modern age. :)
I can share the recipe when I'm done.   It'll probably surprise everyone how far I simplified/dumbed it down.   The theory is pretty sound, though.

If we had a data set of board score averages between L1-1 to L5-6 for 850K games, and another set for 1M games, I bet I could come up with an algorithm that could predict some pretty eerily accurate pace even early in a game.

From that data it ought to even be possible to work out a way to tell the player that he's playing barrel boards at 900K level, rivet boards at 860K level, etc.. which seems like it might be handy for showing which stage types could use some improvement.

Just tested and the pace calculator works amazingly here too... began with some terrible boards and pace started at 700-something... then rose quickly to around 850k midst lvl 3 which sounds about right for my games.

Started a new game and tried some dual hammer screens and were quickly paced at above 1M. Like it!

Just cant stand playing with those dots around jumpman  ???

Yup, I think that's next..  I have to think of an easy way to toggle the extra displays that won't eat much ROM space.. maybe simply inserting coins to toggle between dots/no-dots/numbers/no-numbers.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 17, 2016, 10:42:07 pm
One more update is up, maybe the last for a while as I've hit the point where it's getting really difficult to free up more ROM space to add anything else to it.

You can now jump start at L=5-1 by pressing the 1P start button for 2 seconds during the intro sequence,
and also toggle the sprite indicator "dots" on or off by inserting coins during gameplay.

There's an on-screen description of the button functions in the attract mode.  I had to keep the text short, though.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 18, 2016, 09:32:52 am
Last features are greatly implemented John. Nice!

One thing... I think that you have mistakenly inverted the sprites for the fireballs/firefoxes?
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 18, 2016, 10:04:34 am
Last features are greatly implemented John. Nice!

One thing... I think that you have mistakenly inverted the sprites for the fireballs/firefoxes?

Oh my.. yes, that was a typo on my part.    Fixed now!   Thanks.
Title: Re: Donkey Kong Trainer
Post by: f_symbols on June 18, 2016, 01:01:34 pm
Last features are greatly implemented John. Nice!

One thing... I think that you have mistakenly inverted the sprites for the fireballs/firefoxes?

Oh my.. yes, that was a typo on my part.    Fixed now!   Thanks.

 ROFL ROFL ROFL
Title: Re: Donkey Kong Trainer
Post by: francoisadt on June 20, 2016, 06:12:30 am
What if: The trainer also do have bottom-line scrolling TIPS, what to do next, so that it will drive a pattern of strategy or some guide what the best next move would be or running path for clearing the board would be.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 20, 2016, 04:22:04 pm
What if: The trainer also do have bottom-line scrolling TIPS, what to do next, so that it will drive a pattern of strategy or some guide what the best next move would be or running path for clearing the board would be.

That would be way beyond the scope of this trainer.  It just gives some basic controls for resetting or skipping screens, and speed controls, so a player can try and try a situation again and again.

For tips, the trainer program code would have to have some sort of AI to deduce what situation the player is in and then formulate a strategy for dealing with it...  this is a wayyy complex thing to do.   Even the human experts won't agree on the best strategy for any given scenario.
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 20, 2016, 08:31:45 pm
I think it's perfect at this point. As perfect as it needs to be at least.

Now I can throw away my save states. :)
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 22, 2016, 05:55:37 pm
Thanks!

I've done some work on the offshoot ROM, Donkey Kong with built-in pace.   (Essentially the trainer with the trainer stuff removed.)

You can find the roms here:
http://users.axess.com/twilight/sock/dk/dkong-pace.zip (http://users.axess.com/twilight/sock/dk/dkong-pace.zip)

notes:
-dip switch settings for lives is ignored.  3 man only.
-coin up not required.
-2 player games not allowed
-no high score table (I use that RAM to calculate pace.)
Title: Re: Donkey Kong Trainer
Post by: tilt on June 22, 2016, 07:24:50 pm
Thanks!

I've done some work on the offshoot ROM, Donkey Kong with built-in pace.   (Essentially the trainer with the trainer stuff removed.)

You can find the roms here:
http://users.axess.com/twilight/sock/dk/dkong-pace.zip (http://users.axess.com/twilight/sock/dk/dkong-pace.zip)

notes:
-dip switch settings for lives is ignored.  3 man only.
-coin up not required.
-2 player games not allowed
-no high score table (I use that RAM to calculate pace.)
Looks incredible, can't wait for this to make its way to the arcade platform... great job sir.
Title: Re: Donkey Kong Trainer
Post by: ChrisP on June 22, 2016, 10:52:52 pm
Since this is just a change to the ROM code, and the ROM space is the same as DK, is there any reason why it WOULDN'T work by just rewriting your ROM chips? You didn't have to do any MAME tricks or modify the dkong driver.

The only potential issue I could see is an actual, physical Z80 having to do these computations, as opposed to an emulated Z80. But the CPU clock and instruction set are emulated accurately are they not? It seems that if this new code was gonna cause buggy behavior, then those problems would show themselves in emulation.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 22, 2016, 11:10:18 pm
Since this is just a change to the ROM code, and the ROM space is the same as DK, is there any reason why it WOULDN'T work by just rewriting your ROM chips?

It should work fine on actual DK hardware.   I haven't tried the pace-only ROM on real hardware yet, but I have tried the DK Trainer and it works fine.    Same size code as DK, the files are split into their 4 individual EPROMs... just burn some EPROMs and shove 'em in.

What I'm aiming to do next is integrate it into a DK Remix kit.   This'll take a while, but the idea is to make it possible to seamlessly soft-switch between all the DK ROM versions with no fuss --- Remix, Deranged, DK PCB ROMs, DK Trainer, DK-pace.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 23, 2016, 08:39:50 am
Thanks!

I've done some work on the offshoot ROM, Donkey Kong with built-in pace.   (Essentially the trainer with the trainer stuff removed.)

You can find the roms here:
http://users.axess.com/twilight/sock/dk/dkong-pace.zip (http://users.axess.com/twilight/sock/dk/dkong-pace.zip)

notes:
-dip switch settings for lives is ignored.  3 man only.
-coin up not required.
-2 player games not allowed
-no high score table (I use that RAM to calculate pace.)

This is the version I have been waiting for! Cool Kreygasm

Besides the interface looking a bit different (more user friendly for viewers imo) I would expect the actual gameplay for sure to be 100% the original right? If yes as I expect, then we should accept scores done with this version here on DKF. Will it be as easy to verify the scores as always if people should vote for it?
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 23, 2016, 04:23:19 pm
This is the version I have been waiting for! Cool Kreygasm

Besides the interface looking a bit different (more user friendly for viewers imo) I would expect the actual gameplay for sure to be 100% the original right? If yes as I expect, then we should accept scores done with this version here on DKF. Will it be as easy to verify the scores as always if people should vote for it?

Gameplay is identical to original DK.  But because this is a modified ROM, I wouldn't hold out much hope that other sites would accept scores.   DKF seems more understanding.   If enough people have played it and can confirm that the gameplay is indeed the same, maybe it'll be accepted here.   I'm all for a vote on it.

Elsewhere, or in general a modded ROM is usually an automatic DQ.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on June 25, 2016, 10:55:19 am
I'm in for a vote too!

In the meantime are you willing to share the exact pace-formula?
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 25, 2016, 12:53:59 pm
I'll post up the pace formula.  ..when I'm up for writing a bunch of words to transcribe the code into human.

It'll be a bit embarrassing, though, as it actually takes a number of liberties to keep things simple and to avoid having to code z80 mathy stuff.   But it would be a good base for an eventual PC version that is more accurate.   With additional data/statistics, we could create better formulas.
Title: Re: Donkey Kong Trainer
Post by: LD on June 30, 2016, 04:49:29 pm
I've used the trainer and it's good.  Thanks for taking the time to make this trainer.  It's cutting my learning curve down considerably.   <Wiebe>
Title: Re: Donkey Kong Trainer
Post by: Sock Master on July 01, 2016, 02:35:49 pm
Here's the latest version of the DK Trainer:
http://users.axess.com/twilight/sock/dk/dkong-trainer.zip (http://users.axess.com/twilight/sock/dk/dkong-trainer.zip)

That's going to be it.  It's just a bit refined over the last version, the Player1 & Player2 buttons are a bit less fussy about the timing to trigger slow-down/speed-up/board-restart/board-skip/etc..   It can also now slow down to zero percent (pause the game) and I've added a millions digit to the score.

I'm not going to update it any more unless there's a bug.  I've run out of rom space.


Here's the lastest version of DK Pace:
http://users.axess.com/twilight/sock/dk/dkong-pace.zip (http://users.axess.com/twilight/sock/dk/dkong-pace.zip)

Just some clean-up in the code, and I've added indicators to show which board type the deaths were on in the score statistics chart.

With the clean up, and because Pace is a derivative of the Trainer, but with the trainer stuff removed.  There is actually now plenty of room to expand on the functions in DK Pace in the future.   Maybe that's something I'll do in the future.

As it is, I think these are versions of these ROMs that I will add as an extra feature to future DK Remix PCBs.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on July 03, 2016, 12:22:42 am
Hi John - I'm happy that the pace program now tracks the board types of the deaths as I have been wishing for! Thx a lot!!! What other features do you have in mind for it?
Title: Re: Donkey Kong Trainer
Post by: mrvaya on July 05, 2016, 11:52:52 am
John theres a bug in the screen names of the registered deaths in your pace rom. I just played a single game in it that turned out to be a new (unsubmitable :) ) pb for me. No problem - if youre good enough you can do the same scores over and over :D But the bug should be corrected. I sent you a pb with my highlight and deaths-times for examples.

Gameplay seems as authentic as it should be tho  :)

Title: Re: Donkey Kong Trainer
Post by: Sock Master on July 05, 2016, 03:44:28 pm
Thanks for finding that.  It's fixed now and the roms (that are linked in my previous post) have been updated with the latest version.

The pace table should always list the correct screens that deaths had occurred on now.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on July 11, 2016, 04:41:25 pm
I've been busy testing a zillion things.   I have the R&D details worked out and I've pretty much figured out how I'm going to pull this off...so...

If you bring your DK Remix + Deranged board to Kong Off, I will be able to update the firmware on your board to add DK Trainer and DK Pace.

The Remix board will run the same as before but will have the ability to switch to two additional versions of DK.  I'm even trying to figure out how to keep your existing high scores intact (this part is not completely worked out yet, so this is not a guarantee.)

Game switching will run the same as before too, so you don't have to cycle through Trainer and Pace if you don't want to.

The service menu will have new options for Trainer and Pace.  They can be enabled or entirely disabled at your choice.   This will bring the kit to play original DK, DK Remix, DK Deranged, DK Trainer and DK Pace.  (If you have a D2K kit + Remix stack, D2K is also still playable.)

For those who have a DK Remix-only kit.  I won't be able to add DK Trainer or Pace to it.  Those kits have a smaller capacity chip and don't have room for the additional ROM data.   I can still update the firmware with the new version - but there'll be no change in games/features  (just improved timing between different models of Z80 chips and DK PCB sets.)

Title: Re: Donkey Kong Trainer
Post by: f_symbols on July 11, 2016, 06:52:07 pm
sounds like a scam  <Tim>
Title: Re: Donkey Kong Trainer
Post by: Sock Master on July 11, 2016, 07:25:23 pm
Yeh.  Just come back to my grey van to have the procedure done.  It's free.
Also, I'll have candy.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on August 03, 2016, 02:25:29 pm
I've just updated the download - there's a new revision to fix a scoring glitch...

If a game was started with a direct warp to L=05, the pace table was pre-populated with data for the skipped screens (as it should be)... but the player score started at zero... which caused a mismatch between the pace and the displayed score.   [-arg... tears hair out-]    The score now starts at 95200 if jumping straight to L=05, to jive with the synthetic data in the tables.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on August 03, 2016, 09:31:21 pm
Bah.  I'm having second thoughts about the last revision... score should probably start at zero if you warp directly to L=05.   Maybe I should have left it like it was (zero)

Opinions?
Title: Re: Donkey Kong Trainer
Post by: ChrisP on August 03, 2016, 10:10:55 pm
I could go either way, since a L5-22 run is not the way I personally use this program, but it would  make more sense to start with the 95,200 as part of the score.

I can imagine that some might want to practice playing through full runs (minus start) at "x" pace, and I think it would be more helpful for them to have a "real" score to look at throughout the game, rather than one that's off by 95K. (Ie, "at the halfway point in Level 12, my score should be this.")

It's a little strange and potentially confusing for the program to report your pace as "x", but for the actual score on L22 to end up at "x-95K". If you're figuring un-earned points into the pace, you should probably figure them into the actual score too.
Title: Re: Donkey Kong Trainer
Post by: zaxx on August 04, 2016, 12:00:49 pm
I hate to be that guy, but where exactly does one copy the extracted files from the trainer zip file in order to get it to work properly.  The instructions in the first post seem simple enough.  However, when I put the extracted files into a folder with my DK roms, all I get is the normal version when I launch it.  I've even tried replacing the original files in the rom with the new ones to no avail.
Title: Re: Donkey Kong Trainer
Post by: mrvaya on August 04, 2016, 12:28:36 pm
Hey there

Extract the trainer files somewhere, then drag and drop them to the unextracted dkong.zip-file and say yes to replace/overwrite the original files within the zip-archieve. Then you can use this new modded version of dkong.zip - hope it makes sense mate.
Title: Re: Donkey Kong Trainer
Post by: zaxx on August 04, 2016, 12:54:08 pm
I had already tried that but went ahead and attempted it again and it still wouldn't work.  But something you said did help me figure out what I was doing wrong.  I guess it only works if it is named 'dkong.zip'?  As soon as I renamed my rom file, it worked perfectly.  Thanks! :D
Title: Re: Donkey Kong Trainer
Post by: mrvaya on August 04, 2016, 01:04:09 pm
No problem sir - yes the unique rom-names shouldnt be altered  :)
Title: Re: Donkey Kong Trainer
Post by: Sock Master on August 05, 2016, 09:37:59 am
I could go either way, since a L5-22 run is not the way I personally use this program, but it would  make more sense to start with the 95,200 as part of the score.

I can imagine that some might want to practice playing through full runs (minus start) at "x" pace, and I think it would be more helpful for them to have a "real" score to look at throughout the game, rather than one that's off by 95K. (Ie, "at the halfway point in Level 12, my score should be this.")

It's a little strange and potentially confusing for the program to report your pace as "x", but for the actual score on L22 to end up at "x-95K". If you're figuring un-earned points into the pace, you should probably figure them into the actual score too.

I've settled on a best of both worlds compromise.

Warping direct to L=05 will preload the score and pace tables with a 100K start.   It's a tiny bit higher than just running boards and lower than pressing for points but it's a super easy number to factor in mentally - You can just mentally remove that "1" if you wanted to and add whatever number your start would normally be without having to do multiple math steps and you'll know what your score could have been if you had played out L01-04.

Title: Re: Donkey Kong Trainer
Post by: Sock Master on August 23, 2016, 01:36:31 pm
A bug in DK Trainer has been discovered by Jason Wade.
If the board skip function is being used while the game is paused, it can muddle up some of the in-game statistics bookkeeping - some desyncing between your score and your pace may occur.

Specifically, it happens if you try to skip a board before it is finished processing an in-progress board skip...  I guess sort of a time distortion in processing.   This can also happen if you set the game speed very slow and try to skip boards twice in quick succession.

The not so bad news is that this can easily be avoided if you know what triggers the glitch.
If you've paused the game or are playing at low speed, avoid skipping boards in rapid succession.

I'll update the ROM with a fix soon.  The fix will simply disable the board skip button at times that it's already in the middle of processing a board skip.
Title: Re: Donkey Kong Trainer
Post by: pser1 on October 10, 2016, 02:06:08 pm
Hi,
I am a newcomer to MAME, I have downloaded v0.178b that works flawlessly
with the standard dkong.zip
As soon as I substitute the four modified roms copying there the new ones
it is no more recognized by MAME that says:
The selected machine is missing one or more required ROM or CHD images.
Please select a different machine
This reminds me something about the CRC of each ROM.
As I change the ROMs, how could I avoid that CRC checking?
Any advice will be greatly appreciated
Thanks beforehand
pere 
Title: Re: Donkey Kong Trainer
Post by: pser1 on October 10, 2016, 02:24:36 pm
Hello,
I am copying here the result of this command for maybe it could help find the solution ...
mame64 -verifyroms dk* >errordk.txt

dkong       : c_5et_g.bin (4096 bytes) - INCORRECT CHECKSUM:
EXPECTED: CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a)
   FOUND: CRC(7ed5a945)
dkong       : c_5ct_g.bin (4096 bytes) - INCORRECT CHECKSUM:
EXPECTED: CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd)
   FOUND: CRC(98e2caa8)
dkong       : c_5bt_g.bin (4096 bytes) - INCORRECT CHECKSUM:
EXPECTED: CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f)
   FOUND: CRC(098a840a)
dkong       : c_5at_g.bin (4096 bytes) - INCORRECT CHECKSUM:
EXPECTED: CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4)
   FOUND: CRC(dd092591)
romset dkong is bad

regards
pere
Title: Re: Donkey Kong Trainer
Post by: Sock Master on October 10, 2016, 04:55:58 pm
This reminds me something about the CRC of each ROM.
As I change the ROMs, how could I avoid that CRC checking?
Any advice will be greatly appreciated
Thanks beforehand
pere

Any new or modified version of a ROM set will not have built-in support in MAME.
The DK trainer ROMs are a plug-in replacement for the regular Donkey Kong ROMs, but as they contain different contents so MAME will report that the CRC does not match the original ROMs.

New versions of MAME when using the GUI (graphical user interface) will prevent you from running a modified ROM.  I'm not sure if there's some setting you can change to allow it.. maybe someone can chime in.
But you can run MAME from the Command prompt and that lets you play the DK Trainer ROM.   Yes, it'll still report that the CRC is incorrect, but you just type OK and it'll run.

Old versions of MAME might allow you to play DK trainer using the GUI, but I'm not sure which.
Title: Re: Donkey Kong Trainer
Post by: pser1 on October 11, 2016, 01:02:24 am
Hello,
thanks a lot!
It works nicely from the command line, I didn't know.
I thought it was mandatory to change the CRC of each file!
I did that to emulate CoCo and Dragon machines to test
different DOS versions and it was painful  :(

You are doing a great job, cheers!
pere
Title: Re: Donkey Kong Trainer
Post by: bdegg on March 04, 2017, 05:29:03 am
 I love this trainer, it's super helpful, but I really find the spring length numbers distracting on the elevator screen. Is there some way to hack those scrolling numbers out of the trainer?

I practiced springs using save states before I found the trainer, and I'm pretty OK at them but when I get to the springs on the trainer I'm terrible because the numbers make that area of the screen a lot busier.  <confused>

I'm comfortable with using a hex editor and I briefly messed with the MAME debugger trying to figure out a way to remove them, but I figured asking in here would be my best bet.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on March 04, 2017, 03:19:42 pm
I love this trainer, it's super helpful, but I really find the spring length numbers distracting on the elevator screen. Is there some way to hack those scrolling numbers out of the trainer?

The older version of DK Trainer had the scrolling numbers on the right side of the screen, but the current version has them on the left, above DK himself.   They're in a less distracting location.

I'm not sure which version of the trainer you're using.  A hack to modify the ROMs would vary depending on version of DK Trainer.   If you have an older version you can go to the first message of this tread and get the .zip file that's linked in it.

Title: Re: Donkey Kong Trainer
Post by: bdegg on March 04, 2017, 04:23:08 pm
I have the current version, with the scrolling numbers on the left above Donkey Kong. Ideally I'd just want to hack them to be gone.

I find that when I'm trying to concentrate on watching the spring placement I can't help being distracted by the numbers and that throws me off, lol. I do much better with the springs on a stock DK rom, I hardly ever die on the elevator screen and when I do it's usually an embarrassing failed jump or fireball mishap.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on March 05, 2017, 12:01:52 pm
I have the current version, with the scrolling numbers on the left above Donkey Kong. Ideally I'd just want to hack them to be gone.

Ok, after some quick checking.. if you modify ROM addresses $3137 and $313C to both contain byte $3A  (originally they both contain $32), it should disable the spring numbers from appearing on the screen.

If you're modifying the .bin files, that would correspond to the $0137th and $013C bytes of the c_5et_g.bin file.   Both originally contain values of $32, replace with $3A.

Title: Re: Donkey Kong Trainer
Post by: bdegg on March 05, 2017, 07:34:17 pm
Did you mean c_5at_g.bin? The c_5et_g.bin didn't have $32 values in those locations but c_5at_g.bin did.

I changed them to $3A and the numbers are definitely affected but they're still there..  looks like only one digit appears now? And the number doesn't seem to be related to the length of the spring. At first they don't scroll but after a couple springs the scrolling resumes.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on March 05, 2017, 08:23:00 pm
Oops, I think I must have miscalculated the location of one of the two addresses listed in my previous message by one.

There should be this sequence of bytes $0C $D6 $0A $32 $86 $77 $79 $32 $A6 $77 $3E $0A in the binary.
Changing both of the $32 values into $3A will prevent the Z80 code from writing the numbers onto the screen.
Title: Re: Donkey Kong Trainer
Post by: bdegg on March 06, 2017, 05:44:57 am
Works perfectly, thank you!  The numbers don't appear any more!

The correct addresses to change from $32 to $3A turned out to be $3133 and $3137.
Title: Re: Donkey Kong Trainer
Post by: QAOP Spaceman on June 17, 2017, 04:14:20 pm

A bit late to this, but  Kreygasm

Such great work, Sock Master...

Thank you!
Title: Re: Donkey Kong Trainer
Post by: captnkong on December 02, 2018, 07:18:17 pm
Can anyone tell me if it’s possible to run this program on a raspberry pie?  I’m thinking that I can find an old. Erosion of MAME or mame4all that will allow a command line game to run it should work with retropie so I was wondering if anyone has done this.
Title: Re: Donkey Kong Trainer
Post by: captnkong on December 04, 2018, 07:45:44 am
Just FYI for anyone who is wanting to do this on a raspberry and or bartop; once I got the program loaded up on a new retropie install I put the rom in the MAME libretto folder. You then need to go into the retropie/bios folder and creat a new folder called mame2003. Once inside that folder u need to creat a file called samples.  In that file put your zipped donkey Kong sound files needed to play to play on older versions of MAME.  This 2003 emulator is the only one I can find that will play the donkey Kong training program within retropie; it does play great from a normal command prompt within any MAME version but I wanted this on a bartop running retropie and now it works.  I’m sure if your handy around a retropie you could get to a command prompt and run it as well but I’m not that savvy.
Title: Re: Donkey Kong Trainer
Post by: Robert on December 04, 2018, 09:09:43 pm
The trainer and pace will be in the next version of HBMAME due out on 26th December.
Title: Re: Donkey Kong Trainer
Post by: hooch66 on January 04, 2019, 10:46:08 am
The trainer and pace will be in the next version of HBMAME due out on 26th December.

Was the trainer in fact added on the 26th?
Title: Re: Donkey Kong Trainer
Post by: Sock Master on October 09, 2022, 08:09:37 pm
It has been noted that the old link to the binary is now broken.

I've not attached the rom files for Donkey Kong Trainer to this post (and also the very first post in this thread).

Thank you!

Just unzip the file and copy the four files into an existing set of Donkey Kong roms to try it out.  Make sure to also save your original Donkey Kong roms so you can restore them to normal.

Title: Re: Donkey Kong Trainer
Post by: Robert on October 19, 2022, 04:55:49 am
The trainer and pace will be in the next version of HBMAME due out on 26th December.

Was the trainer in fact added on the 26th?

Yes it was.
Title: Re: Donkey Kong Trainer
Post by: Kibbey93 on June 23, 2023, 05:36:01 pm
I'm finally getting around to learning bottom hammer, and have been using trainer to practice.

I was wondering how I could go about disabling the hammer timer, as it has a negative effect on me when I go back to playing the screen without it.
Title: Re: Donkey Kong Trainer
Post by: Sock Master on June 27, 2023, 06:35:39 am
I was wondering how I could go about disabling the hammer timer, as it has a negative effect on me when I go back to playing the screen without it.

There isn't a way to do that, but I am starting to wonder if maybe I could make an updated version with a way to do turn those indicators on or off.  The main issue is how because all the game's buttons and inputs are already used for other functions.
Title: Re: Donkey Kong Trainer
Post by: Kibbey93 on June 27, 2023, 05:02:05 pm
Thanks for the reply sir :)

I'm happy to update my trainer rom if it's something as simple as changing a couple values in a file like you mentioned it was for the spring numbers earlier in this thread.

I thought maybe a rom that just loops L5 barrels without any of the additional information would be cool too.
Title: Re: Donkey Kong Trainer
Post by: muscleandfitness on June 27, 2023, 11:26:25 pm
Kibbler PLS lol classic .. cover that section up.. fixed . FailFish FailFish