It seems that TASing this game carries some kind of curse. Two rejected submissions, a published run that was beaten in real time about two weeks later, and now this.
Gambatte had three bugs that I knew of (and reported in #tasvideos). Only two are relevant to the Coin Case exploit, though.
The GB CPU has a few undefined opcodes; they all do nothing but lock up the CPU. Gambatte ignored those, allowing exploits which would freeze up the real console.
Furthermore, under certain conditions (not an expert on this one), the STOP instruction should lock up the CPU as well, but it was simply ignored in Gambatte. (This turned out to be an issue in runs of Gold when somebody reported new strats under Bizhawk, only for them to be revealed to freeze console two days later)
The third bug has to do with MBC3 (and possibly MBC5 behavior); when bankswitching to bank 0, bank 1 should be accessible at 4000-7fff. Gambatte showed bank 1. This is observable in Pokémon Red, where the naming screen would have a glitchy tile in place of ED in the bottom right corner if the bug is present.
Question:
Looking through the damage calculation formula for Gen II, I noticed something that I've never really heard mentioned before at all:
http://www.dragonflycave.com/battle.aspxhttp://www.upokecenter.com/content/pokemon-gold-version-silver-version-and-crystal-version-damage-calculation
Apparently, in Gen II only, when you use a damaging move, if you have the Badge corresponding to the type of that move, the move's damage is multiplied by 9/8. This is in addition to the 9/8 boost that four of the Badges already apply to the user's stats.
Can anyone with disassembly knowledge confirm this? These are the only two sites that mention this mechanic (although they are definitely quite reputable). (A site like Smogon, which does really detailed breakdowns of most battle mechanics, wouldn't mention this at all since it doesn't apply in multiplayer.)
http://bulbapedia.bulbagarden.net/wiki/Badge
It's not mentioned in Bulbapedia.
Earth Badge is still corresponding to Ground when Ethan and Kris get there? Didn't know Giovanni's presence has such effect even after 3 years.
This is true. In real-time speedruns, it's what makes Fury Cutter viable against the Azalea rival.
It's handled by function DoBadgeTypeBoosts (currently in main.asm).
DoBadgeTypeBoosts: ; fbe24
ld a, [InLinkBattle]
and a
ret nz
ld a, [$cfc0]
and a
ret nz
ld a, [hBattleTurn]
and a
ret nz
push de
push bc
ld hl, .BadgeTypes
ld a, [KantoBadges]
ld b, a
ld a, [JohtoBadges]
ld c, a
.CheckBadge
ld a, [hl]
cp $ff
jr z, .done
srl b
rr c
jr nc, .NextBadge
ld a, [$d265] ; move type
cp [hl]
jr z, .ApplyBoost
.NextBadge
inc hl
jr .CheckBadge
.ApplyBoost
ld a, [CurDamage]
ld h, a
ld d, a
ld a, [CurDamage + 1]
ld l, a
ld e, a
srl d
rr e
srl d
rr e
srl d
rr e
ld a, e
or d
jr nz, .asm_fbe6f
ld e, 1
.asm_fbe6f
add hl, de
jr nc, .Update
ld hl, $ffff
.Update
ld a, h
ld [CurDamage], a
ld a, l
ld [$d257], a
.done
pop bc
pop de
ret
.BadgeTypes
db FLYING ; zephyrbadge
db BUG ; hivebadge
db NORMAL ; plainbadge
db GHOST ; fogbadge
db STEEL ; mineralbadge
db FIGHTING ; stormbadge
db ICE ; glacierbadge
db DRAGON ; risingbadge
db ROCK ; boulderbadge
db WATER ; cascadebadge
db ELECTRIC ; thunderbadge
db GRASS ; rainbowbadge
db POISON ; soulbadge
db PSYCHIC ; marshbadge
db FIRE ; volcanobadge
db GROUND ; earthbadge
db $ff
Thank you very much!
With this information, I figured out that the Pokerus routine in Gold/Silver is at 2C95D (B:495D). Furthermore, the Pokerus check occurs at the end of battle after KOing or catching a wild Pokemon, and at the end of a trainer battle which the player has won. There is no check when running away from battle, or when losing (white out) to a trainer.
I used the debugger BGB to verify this (since vba-sdl-h only works with GBA).
Edit: When catching a wild Pokemon, the game will add this Pokemon to your party before running the Pokerus routine.
main.asm doesn't contain everything; in fact, it's in the proccess of being split into smaller files. If you haven't yet, definitely check out the entire disassembly. There may already be interesting things in battle/, engine/ etc.
About Pokérus, yeah, though the probabilities are really low, so I don't know how feasible it would be to manipulate. (I haven't tried RNG manipulation yet.)
I attempted to do the map distortion route on Silver and failed.
ABRA with the name of GEODUDE didn't create bad clone. (However I might have done something wrong.)
The bad clone glitch itself shouldn't be version specific; the requirement is simply to switch between two nearly-full boxes. Since the boxes are so full, the game will lag for about ~1 frame while saving; you must hard reset during this time. It won't work if the boxes aren't full enough since there's no lag.
I doubt Pokemon species or nickname has anything to do with it; that affects the map distortion patterns after the crash.
Yeah you are right. I was being silly :P
However, the game freezes and auto-resets after I choose "POKEMON" in the menu. This applies to both Gold and Silver.
I'm using Bizhawk 1.6 beta. I was using the same strategy that was used in the published run, except that Abras have different genders and Croconaw's name is "U".
Is it caused by the reason FractalFusion and Sanqui talked about?
The latest version of Bizhawk 1.6.0 has the following changes for GBHawk:
* Fix problems with STOP opcode
* Implement the undefined opcodes, which lock up the system.
We could probably do a catch 'em all run with crystal and any first gen game.
Here are some links to help you in TASing.
Pokémon in the Medium Slow experience groupVersion-exclusive PokémonCelebi Egg Trick
Trading, cloning glitches, the trainer fly glitch in RBY, MissingNo. in Red/Blue, experience glitch with medium slow experience gains, GS Ball to catch Celebi.
Glitch a level 1 Bayleef, Quilava, Croconaw, Flaaffy in GSC.
Glitch lots of Nidoran♂ Male for lots of rare candy.
Glitch lots of Primeape for lots of Exp. Share.
Which Missingno. you get is not very RNG-dependent; if you're getting it via the Cinnabar Island method, it depends on the character's name (with the RNG only used to decide which letters from the name matter). Basically, all the Missingno.s are different Pokémon internally in index number terms (and thus separate species for most purposes), they just happen to have incredibly similar stats.
You can't glitch a GS Ball to get Celebi; not only do you have to have the item in your Pack, but you also have to set some event flag (which is normally triggered upon receiving the item through the event).
To get Celebi you'd either have to glitch one directly, or do some fancy stuff with arbitrary code execution to set that flag.
T'was my idea. I realized that we could reset for an useful trainer ID, much like the TAS does. With no reliance on Return and Wooper it was almost guaranteed to be faster than the existing WR regardless of the chances (number of resets).
2/65536 turned into ~200/65536 turned into 2/256 turned into 4/256 (1/64), and Dabomstew actually made the route and Shenanagans ran it and here we are.
This is the second time I've ruined this category.
Here's a first - ACE done over the Game Boy link cable! PWN your friends on the playground, if it was the 2000s and people still played this game! ;)
Link to video
So apparently it's possible to warp to the end in Crystal too, even though the Coin Case text end byte glitch was fixed:
http://wiki.pokemonspeedruns.com/index.php/Pok%C3%A9mon_Crystal/Any%25_Guide
Looks very recent as well (page was created yesterday).
The page says that "Glitch Pokédex Modes can execute Arbitrary code", and the very end of the route has a part where simply opening the Pokedex will cause the program counter to jump to RAM. As with all Gen II glitched runs, the run plays normally up to Goldenrod City, whereupon a bad clone(s) is created and the Daycare used to stabilize them before the resulting messed-up memory is used to set up everything.
Anyone think a TAS of this would be feasible or accepted? With the method decently different from the Gold/Silver run it should be noteworthy.