http://www.twingalaxies.com/showthread. ... ons/page11
I've recently been playing a bit of Kangaroo over at High Scores Arcade in Alameda. I noticed the same thing that others have brought up here. The Gorilla never comes out as often as it does with the current MAME romsets. I also used to play Kangaroo at my local pizza joint when I was a wee lad as well. The Gorilla never came out over and over.
I wrote a speculative post about this the other day and then decided rather than guess (deleted the post), I would dust of my ol' debugging skills and dive into the Kangaroo code via the MAME developer debug build (run Kangaroo ROM with the -debug switch). That MAME debugger is pretty sweet. It was fun to go back digging through code again. It just took me a few days to figure out what "exactly" was going wrong (as much as I could without a DUMP of the missing ROM anyway).
As others have posted here, the current Kangaroo romset's are missing the mb8841.ic29 rom, which is a custom micro-controller "security chip" that has yet to be emulated properly from what I have just uncovered. The MAME developers made a quick and "dirty" fix that does not work properly (the Gorilla coming out over and over is specifically linked to the missing ROM chip and how the MAME driver tries to mimic it).
I will share the specifics (code, code and more code) in a more detailed post this weekend (in the "Emulation Gaming" Forum), but basically the MAME driver poorly "spoofs" the "security chip" which is really a "random" timer using values from 0-F (1-10) to help decide specifically when the Gorilla appears and when it comes back out. Unfortunately, this "band-aid" leads to the Gorilla appearing over and over after the initial appearance (it also does not add the correct "random" delay to the Gorilla first coming out like the Arcade does)(I haven't looked at the code yet, but the Bonus Timer is slightly "off" as well).
I know this for a fact because I have reverse engineered the specific chunk of Kangaroo code in question (Gorilla related). There are two "timers" in the code that determine when the Gorilla comes out on the screen, and when it comes out again for a second time+ (@ $E162 and $EF00). All this vital information is located/accessed in one routine within the main Kangaroo code (CALL $351C).
The first timer ($E162) counts up to about 16 seconds (0-10 HEX) from the start of each Board. This routine also does a check to see if it is Board 4 or not, when the Gorilla does not come out (only on 1-3). Once the first timer reaches 10 (HEX), a second timer takes over (using values that come from $EF00, which happens to be the "security chip" input/output in memory). A combination of one static timer and one random timer control the Gorilla release and re-appearance on each Board (1-3).
The second timer uses the values within/generated by the missing ROM chip to set an additional "random" wait time on top of the initial 16 seconds the first timer counted to. The Gorilla will not come out until the second timer sets the right value to allow the code to bypass a conditional jump or not (directly based on values being read from the missing ROM I/O at $EF00). Once that data triggers this, the routine drops down to specific code that first finds the current Kangaroo position on the screen, and then sets the initial Gorilla appearance position in memory relative to that (vertical and horizontal coordinates on the screen at $E118). Also, after the Gorilla goes off screen, this same timer based on values from $EF00 is responsible for deciding when to send the Gorilla out again (or not).
Other routines draw the Gorilla on the screen, play related music/FX and do collision detection etc using those Gorilla location values set at ($E118). But the code in question simply does not work properly because the "random" values that the MAME driver for Kangaroo generates are not correct at all. I was at High Scores today with a notebook writing down when the Gorilla appeared through levels 1-4 (using the Bonus Timer as reference). The arcade machine definitely has a "random" factor in play after the initial 16 seconds timer. The current MAME version is mainly using that first "static" timer to decide because the "random" values at $EF00 cause the code that makes the Gorilla appear to improperly execute over and over, unlike the Arcade version with the custom chip in place.
Sorry kids, but all those super high MAME scores for Kangaroo are "no good", as far as being set on an actual Kangaroo game as originally coded (at least in MAME where the scores are heavily based on leeching the re-appearing Gorilla). They are maybe worthy of a separate "track" because it does take some skill to exploit, but the MAME version acts like a "pirated" Arcade machine would which isn't exactly to "spec".
It seems that the designers specifically coded the game this way so that they could "identify" counterfeit machines back in the 80s. As the MAME developers found, you can "spoof" the custom security chip with some other timer to get the game to "run". But, if you don't have an exact copy of that custom micro-controller, then the Gorilla will behave in a very obviously "wrong way" (which most casual players would not notice, nor complain about given the scoring bonanza that occurs because of this).
If anyone tried to bypass that custom security micro-controller (or did not emulate it properly) by using some other random timer, they would end up with the same or similar results as the current MAME romsets. The Gorilla would almost always appear at around 1800-1700 Bonus Time (16 seconds give or take). Then after it was punched out, stole your gloves and ran away, or walked off the screen it would then almost immediately appear again and keep coming out until you died or the current Board ended.
I would definitely question the "Undisputed" status of any and all Kangaroo scores that heavily rely on leeching the always re-appearing Gorilla (MAME or Arcade) given this information (the super high TG Arcade scores are all from the early 80s and were "referee" verified?). No disrespect to those who worked hard to get those really high scores, but the game was not originally coded to allow for unchecked Gorilla leeching (MAME at least).
*** NON TG POST NOTE ***
I also just noticed this morning that when the security chip is not emulated properly (like in the MAME romsets), it gives the player an unfair advantage on the first Board on later levels (scoring aside). I have been playing Kangaroo (arcade machine) and have had trouble getting by Board 1 on Level 4-5+ because you have to fight past a bunch of monkeys throwing tons of apples at you to make it to the top almost every time. My usual "pattern" on these higher levels is to run right up to the third platform (avoiding monkeys on the first and second ones). But when you come up the ladder to the third platform on the left side (right around 1800-1700 bonus time btw), you have to cross the whole screen to the right while fighting off a pile of monkeys waiting for you on the right side of the screen guarding the ladder you need to go up to finish the level (with the other one above dropping apples on you too).
I watched the top MAME scores on Kangaroo here and noticed that because the Gorilla always comes out around 1800-1700 bonus time, it causes less monkeys to gang up on you at this specific point from Level 4+ (which players benefit from unfairly it seems). In those games the other players do the same thing I do in the arcade: race up to the left side of platform three on Board 1 right around 1800 bonus points. Then the Gorilla very predictably comes out on the right side opposite the Kangaroo on the left. When the Gorilla is out usually only about 1-2 monkeys throw apples at you, while the other ones don't come out on the same platform the Gorilla is on (they go up or down away from you...maybe some game limitation on objects?). After those monkeys throw just one "wave" of apples, they take off, while other monkeys climbing the tree skip platform three as the Gorilla walks across towards the Kangaroo (leaving you a very wide open window of opportunity to get to and up that last ladder that you don't seem to ever get in the arcade version). Because the "random Gorilla appearance timer" is "broken" in MAME, you can count on the Gorilla appearing on that platform, at this critical timing, and that in turn makes it much easier to get across and up that last ladder.
In the arcade, specifically the machine at High Scores in Alameda, CA, the random Gorilla appearance factor leaves you up on platform three alone many times trying to battle an almost endless wave of apples being thrown by monkeys on the right (and more monkeys keep coming as soon as others have thrown all their apples at you). I played a bunch of games the other day and took notes on when the Gorilla was appearing across Board 1-3 on levels 1-4. Some games it would come out three times, sometimes twice (and always with a random amount of time after the initial 16 static second counter). Sometimes it would not even come out until 800 bonus time or less for the first and only time on Board 1. It even occasionally comes out almost back to back (but you would only see that maybe once in a whole game or bunch of games unlike with MAME right now).
It can be nearly impossible to get by this Board 1 monkey/apple onslaught from Level 4+ without being able to rely on a Gorilla popping up on cue at 1800 bonus time at the same place. This may explain why all the "recent" Kangaroo scores set on arcade machines are only around 90-116k (that's the right score for being on Board 1 around Level 4-5 ish). It makes me wonder if the old arcade scores from the 80s in the many hundreds of thousands were on some "pirated" version of Kangaroo that did not have the security chip, or used some other random timer the way the MAME developers tried to do (allowing Gorilla leeching on an arcade machine).
So it's not the roms, it's not a case of different versions, it is actually based on the poor MAME driver emulation/bypass of the missing security rom in question (which may be reflected on the arcade machines with pirated versions of the game that have the same or similar issues). This oddball Gorilla behavior specifically happens because of the very very clever security the designers put in place. Like I said above, the current scores are a great achievement, but done on a non-legit version of Kangaroo (MAME anyway). Maybe someday soon we can get a good dump of the missing chip and then we will see what kind of high scores players can really get on Kangaroo (with the proper randomizer in place for Gorilla appearances).
cheers
jerky (JRK)
http://www.highscoresarcade.com/pro-scores.html
(when I get some time this weekend I will try to post the actual Kangaroo code I recent debugged with some notes)
*** UPDATE ***
I also forgot to mention that being able to rely on the Gorilla coming out at 1700-1800 points all the time due to the failed "security chip" emulation has a similar "advantage effect" on Board 3 (The Tower of Monkeys). From Level 4-5+ the monkeys throw fairly relentless streams of apples at you as you try to punch out enough monkey statues to get to your baby Kangaroo (and dodge apples from above at the same time).
Again, like Board 1, when the Gorilla comes out it causes incoming monkeys to climb away from the platform you and he are on. In this case you just have to dodge 1-3 initial monkeys and all the apples they throw (4-5 per monkey at this level?). Then when the Gorilla makes his prompt appearance, you get another break from apples I have yet to see in any arcade game I have played since the early 80s.
I tested this with my "No Gorilla" rom-hack on levels 4-5. You have to survive a near endless stream of apples throw by monkey after monkey. There is little to no break when the Gorilla does not come out at all (or randomly waits to 1000 bonus time or less like it does in the arcade sometimes).