Register - Login
Views: 87390365
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
11-21-17 05:24:50 AM

Jul - Game Research/Hacking/Modding - Migrating Pokémon from Generation 2 to 3 New poll - New thread - New reply
Pages: 1 2 3 4 5Next newer thread | Next older thread
Rena

Star Mario
Fennel
Level: 127


Posts: 5171/5239
EXP: 23298064
For next: 428502

Since: 07-22-07
From: RSP Segment 6

Since last post: 94 days
Last activity: 52 days

Posted on 06-25-14 04:05:12 PM Link | Quote
I wonder if you could use a Gamecube or Wii to do the transfers on real hardware. On Gamecube, you have the Gameboy Player which can run GBC games, and you can connect GBAs by link cable. IIRC, games running on the GB Player can access some GC hardware, like its controllers, so maybe they can talk to a GBA that way. Or maybe GC games can access the save files of GBC carts this way? (Though running code on a Gamecube could be a pain.)

On the Wii, again you have the GBA link cable; since it doesn't have that box in the middle (I think it's just a direct connection from GC controller pins to some of the GBA's link pins), maybe it's possible for a GBC game to talk to the Wii using that.
GuyPerfect
Catgirl
Level: 65


Posts: 978/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 06-25-14 07:39:01 PM Link | Quote
Game Boy Player pretends to be another Game Boy Advance. It uploads a multiboot program to a connected GBA, which then uses normal link cable messages to communicate and interpret the GBA's input as actual controller input. Because of this, a GBA is only useful with a GameCube while in 32-bit mode, and as such the 8-bit cartridge data won't be accessible.
Gabu

Star Mario
Placeholder Ikachan until :effort: is found
Level: 160


Posts: 9336/9708
EXP: 52609597
For next: 343402

Since: 08-10-09
From: Santa Cruisin' USA

Since last post: 2 days
Last activity: 2 days

Posted on 06-26-14 03:26:32 PM Link | Quote
I'm finding myself looking over to the right, where I have both a Game Boy Player installed and one of these babies. I remember connecting it to my computer just fine while it was plugged into the Gamecube (albeit turned off). It could be another massive can of worms, but could such a device be used as an intermediary (or I guess even at all)?

Then again I doubt the GBP 'reads' either memory card slot, but could a device both have GBC/GBA hardware installed and potentially trick a Gen 2 game into thinking it's transferring to another Gen 2 game, have the data be flashed in said device and translated with software also installed in said device, then switch modes and trick the GBP into thinking it's interfacing with a GBA with Gen 3 data?

Essentially, would doing the following:
- Connect a Gen 2 game to another 'Gen 2 game' under the same specs that downloads transfer data
- Takes said transfer data and translate from Gen 2 to Gen 3 using installed software
- Switches specs to GBA standards
- Uploads data to Gen 3 game under the guise of a 'Gen 3 game'

Be a possibility?
GuyPerfect
Catgirl
Level: 65


Posts: 980/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 06-26-14 08:49:06 PM Link | Quote
I'm not sure the Game Boy Player even allows the GameCube to access cartridge data, though I may be mistaken. As far as I can tell, it's just a Game Boy Advance where the output gets piped into the GameCube instead of a built-in speaker and screen.
Rena

Star Mario
Fennel
Level: 127


Posts: 5173/5239
EXP: 23298064
For next: 428502

Since: 07-22-07
From: RSP Segment 6

Since last post: 94 days
Last activity: 52 days

Posted on 07-05-14 03:41:06 AM Link | Quote
Not sure if it does. I mentioned controllers though because the GBA game is able to read Gamecube controllers. (I think Four Swords uses this.) So it might be able to communicate with another GBA in 8-bit mode, using the GBA-to-GC-controller cable. (Some GC games such as Wind Waker used that to display maps on the GBA.)
Joseph22Ocarina
Random nobody
Level: 2


Posts: 1/1
EXP: 34
For next: 12

Since: 07-18-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-18-14 08:55:33 PM Link | Quote
Woooooow... All of this, GuyPerfect, is really promising and amazingly intricate/complex... Such programming skills are admirable!!! I really look forward to staying around for whenever this project is completed and ready to go... Hope for my pokes! Success and cheers for your work!
porkypig101
Random nobody
Level: 3


Posts: 2/2
EXP: 99
For next: 29

Since: 06-20-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 08-25-14 06:21:44 PM Link | Quote
This thread had better not have died on me. I NEED MY POKEMON.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 183


Posts: 12171/12211
EXP: 83114041
For next: 1387062

Since: 07-03-07
From: 52-2-88-7

Since last post: 2.0 years
Last activity: 2.0 years

Posted on 09-03-14 08:59:55 PM Link | Quote
I know a way to move it from software to hardware, at least on the GCN side.

What you do is edit a save data of Pokemon COlleseum so as to have it inside the inventory of the character in the 1P mode of that game, and have the save data pre-set to allow trades between GCN and RSE (given after you beat the game and collect all shadow pokemon)

Then you can trade it into RSE and at that point it can escape all the way into the most modern game (provided it survives the checks on the Pokemon Bank)

As for getting the old pokemon in, that one is a bit more difficult and depends on some means of reading cartridges or Pokemon Stadium data into your PC.
Gabu

Star Mario
Placeholder Ikachan until :effort: is found
Level: 160


Posts: 9363/9708
EXP: 52609597
For next: 343402

Since: 08-10-09
From: Santa Cruisin' USA

Since last post: 2 days
Last activity: 2 days

Posted on 09-04-14 12:04:28 PM Link | Quote
We probably wouldn't even need to play Colosseum, given one has that special third party memory card with the usb port.
For some reason I forgot all about Pokemon Bank. That could be an unintended bottleneck should Gen 1/2 Pokemon be considered 'illegal' (unintended since, you know, Nintendo isn't expecting people to bring gen 1/2 pokes to current gen). Hopefully it shouldn't be a problem if Gen 3-5 cartridges reads these as legit or puts in a flag that more or less whitelists them, given the standard blacklisted flags for hacked pokemon aren't activated.

I'm also curious; what WOULD happen if Missingno was migrated upward as far as it could go? I know migration is possible for Missingno between 1/2, though the data gets changed up a bit. I'm not fully keen on what happens, but if we manage to get a Red/Blue Kanto starter to X/Y, it'd be fun/hilarious/terrifying if put into the wrong hands to see the effects. Though probably not, if glitch pokemon are also blacklisted.

One more thing about blacklisted pokemon: what about event pokemon from 1/2? I'm thinking in the vein of surfing Pikachu.
krutomisi
2480
my heart is beating
in a different way

Level: 88


Posts: 2410/2480
EXP: 6592886
For next: 57778

Since: 02-01-10


Since last post: 1.0 years
Last activity: 51 days

Posted on 09-04-14 12:46:55 PM Link | Quote
I've just skimmed the thread but if peeps are
looking to move the data from the computer to the actual games

with an NDS flashcart you can change the savefiles on the GBA
http://gamebrew.org/wiki/GBA_Backup_Tool
(insert the pokemon into the games's save)

or with two NDSes, a flashcart, and an actual game
you can insert it into the sav on the flash and trade it over to the legit card

oooor prob the quickest would be to setup a fake GTS for it with the newer games
(I believe it will still work even with the actual one down)
http://pokecheats.net/forum/showthread.php?4742-How-to-set-up-a-fake-GTS-server



Originally posted by Gabu
One more thing about blacklisted pokemon: what about event pokemon from 1/2? I'm thinking in the vein of surfing Pikachu

if you model its owner / date around one of the ones that knows surf -
http://www.serebii.net/events/dex/025.shtml
it should be able to make it thru the bank (most likely)
GuyPerfect
Catgirl
Level: 65


Posts: 995/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 09-05-14 04:40:14 PM (last edited by GuyPerfect at 09-05-14 04:45:19 PM) Link | Quote
Originally posted by krutomisi
I've just skimmed the thread but [...]


Skim the thread title too. This isn't about moving Pokémon between emulators and physical game cartridges.

EDIT:
Weeeeell, I guess I could give you the benefit of the doubt. If what you're suggesting is recreating Pokémon from generation 2 by outside means and implementing them into the physical game cartridges, then I concede that is a valid approach to the problem. However, the aim of this project is to do a genuine data migration from a Game Boy/Color game to a Game Boy Advance game wholesale, just like Nintendo's genuine migrations going forward to DS and 3DS.
krutomisi
2480
my heart is beating
in a different way

Level: 88


Posts: 2411/2480
EXP: 6592886
For next: 57778

Since: 02-01-10


Since last post: 1.0 years
Last activity: 51 days

Posted on 09-05-14 08:43:12 PM Link | Quote
yeah that's what I was talking about,
keying in your old data and having it spit out the new stuff

anything done with physical means seems like you have to design actual hardware for it

kickstart it lol
Gabu

Star Mario
Placeholder Ikachan until :effort: is found
Level: 160


Posts: 9364/9708
EXP: 52609597
For next: 343402

Since: 08-10-09
From: Santa Cruisin' USA

Since last post: 2 days
Last activity: 2 days

Posted on 09-06-14 08:04:35 AM (last edited by Gabu at 09-06-14 08:07:58 AM) Link | Quote
Arduino to the rescue!

(it's plausible to try out, and anybody willing to shell out $20 for one, install the software and generally put it all together, would likely do so)

((also I know that it wouldn't be that simple, though would something along those lines work just fine?))
krutomisi
2480
my heart is beating
in a different way

Level: 88


Posts: 2412/2480
EXP: 6592886
For next: 57778

Since: 02-01-10


Since last post: 1.0 years
Last activity: 51 days

Posted on 09-06-14 01:30:56 PM Link | Quote
Originally posted by Gabu
Arduino to the rescue!

yea looks like there is a fairly well documented project for it

it's not as cool as having a single device for it
but I believe the best way to handle it would be a computer program

gameboy saves go in, .pkm format pokes come out

people will have to provide the hardware to get the saves where they need to be
but it would be possible to work with legit game pokemon in that manner


that would be helpful as it can also then be run thru things
like the legality checker

so you would be able to tell if it will be able to make it thru the bank
GuyPerfect
Catgirl
Level: 65


Posts: 999/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 09-15-14 12:20:58 PM (last edited by GuyPerfect at 09-15-14 01:53:56 PM) Link | Quote
Hey, good news! Mew and Celebi can be migrated in such a way that they'll be accepted by Poké Transporter (I don't want to say the B-word because Google sees everything). Turns out the almighty validation algorithm doesn't really validate a whole lot. Its reputation of being a hardass is really just perpetuated by the internet because they haven't looked too closely at it, and they're afraid of getting banned from the service.

The short version of the story is that the following fields, and only the following fields, are required to let Mew and Celebi slip through. I realize I might be dooming us all by posting this to the public, but at this time, on this 15th day of September in the year of 2014, the following is true:

Mew
  • OT ID must be 06930, 20078, 50716 or 60510
  • "Secret ID" must be 000000
  • Level must be at least 5
  • Game of origin must be one of the main-series GBA games
  • Fateful Encounter flag must be set
Celebi
  • OT ID must be 00010, 60623 or 60720
  • "Secret ID" must be 00000
  • Level must be at least 10
  • Game of origin must be one of the main-series GBA games
  • Cannot be shiny
Everything else doesn't matter, provided they still conform to the regular rules of Pokémon validation--abilities must be accurate, moves must be learnable by the current level, etc. But nature, IVs, and whatever else can be set to anything at all.

Curiously, the following fields are not validated, even though in the popular mind they ought to be:
  • Nickname
  • OT name
  • Poké Ball
  • Language
Need some proof? Didn't think so, but here it is anyway:



So basically, when migrating from generation 2, the user will just need to be prompted for Poké Transporter compatibility. If it's desired, then the OT ID needs to be set, level needs to be promoted if applicable, and shininess needs to be changed if applicable.
__________

EDIT:

I scrounged up a complete list of all OT IDs used in Mew and Celebi distributions in Gen 3. All such Mew can be shiny, but no such Celebi can be shiny. The language and creation date aren't validated, so as long as the OT ID matches, it will work.
GuyPerfect
Catgirl
Level: 65


Posts: 1002/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 09-20-14 09:47:28 PM Link | Quote
I'm revisiting the personality value generation algorithm for a couple of reasons. Certain attributes of Pokémon really ought to be reigned into a tighter scope, and I want the produced value to have as uniform a distribution as possible. I'm not really sure if there's a way to do it in a timely manner on the GBA's processor, but we can certainly cut a few corners and get some results that are good enough for government work.

To convey my thoughts on the matter, please indulge this post full of bulleted lists.

The following Pokémon characteristics are linked to the personality value (henceforth known as PID):
  • Shininess (depends on OT ID and Secret ID)
  • Nature
  • Ability (1 or 2, though single-Ability species always use the first one)
  • Gender (including the specie's gender ratio)
  • Unown's letter
Exactly what values to use for each of those is one of the topics covered by this project. My new goals are as follows:
  • OT ID will match the one in the gen 2 game, except for Mew and Celebi where applicable.
  • Secret ID will be some hash of the OT name so that they remain unique to the trainer, but multiple Pokémon will still be recognized as having the same original trainer.
  • Since Nature affects stats, then in the interest of keeping with gen 2-style mechanics, the only Natures migrating Pokémon should receive are stat-neutral: Bashful, Docile, Hardy, Quirky or Serious. Exactly which one is selected at random.
  • The value of the Ability bit should be selected at random prior to selecting a PID value.
The ideal PID generation algorithm will satisfy each of the following characteristics:
  • Produces a value that works for all given PID attributes
  • Runs in O(1) time
  • Results are random with uniform distribution--That is, for the n qualifying PID values for the given set of attributes, each one should have a 1 / n chance of being selected
I haven't crafted such a perfect algorithm, and I don't know if it's feasible. A brute force approach is certainly simple, but time-consuming. It can be trimmed down a bit, though:
  • Nature is defined as PID % 25. So for any given Nature, qualifying PID values will be 25 apart.
  • Ability is defined as PID & 1. Since there's an odd number of Natures, this means qualifying PID values are 50 apart.
A problem is that, for all combinations of personality attributes, there is not a simple distribution pattern that applies to everything. Gender and Unown's letter are tricky, and I don't know how to locate a qualifying PID value that satisfies for them more directly than simply picking a value and seeing if it works. So for this, I ask for the assistance of anyone bold enough to step up to this difficult computer theory problem.
__________

What I wound up doing in the short-term was generating a random value, then "fixing" it by adjusting it to the nearest value that satisfies both Nature and Ability. From there, it just counts up by 50 and checks to see if the new value matches all attributes. It's like 80% brute force this way, but at least it's fifty times faster than a fully-naïve approach. In practice on the GBA hardware, the algorithm doesn't run too poorly searching for shinies. It averages around 75-120 frames or so, but on the bad end I was getting runtimes closer to and slightly above 200 frames (which comes out to between 3 and 4 seconds of realtime).

If you're migrating your esteemed collection of 35 shiny Pokémon, imagine having to sit there and wait for two solid minutes while it was formatting the new data. This is why I'd like a more efficient algorithm.

On the bright side, I have some handy experience squeezing performance out of time-sensitive processes, so I can think of a few techniques to use the current algorithm in such a way that the user won't have to wait. It all depends on the way the user will have to take a few seconds to actually select the Pokémon they want to migrate and move it into the destination PC box. I don't know about you, but except when I'm selecting whole boxes at a time, I don't think I can move something within a 5-second window.
GuyPerfect
Catgirl
Level: 65


Posts: 1004/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 09-22-14 06:58:16 PM Link | Quote
Originally posted by GuyPerfect
I can't think of any context where it's ever been the case that the original trainer of a traded Pokémon mattered, since it's an outsider no matter what. For two outsiders to have the same original trainer, unless there's something I'm not thinking of, is entirely meaningless. Unless you already happened to know that the upper 16 bits differed, there'd be no way you'd ever find out.

For the record, I am at times mistaken, and this was one of those times. The original trainer will matter when breeding Pokémon: parents with different original trainers will be more likely to produce eggs. Therefore, it's now a matter of necessity rather than preference that the secret ID of gen 2-to-3 Pokémon remains consistent according to the original trainer.
__________

Since Unown's letter winds up having its least significant bit in the bit 0 position of the PID, it means that Ability just so happens to be letter & 1. Adding an even number to an odd or even number will result in another odd or even number respectively. Since there's an even number of Unown letters, the implication is that certain combinations of letter and Ability aren't possible on Unown. When migrating, the Pokémon's letter must necessarily dictate which value to use for its Ability bit. It's just as well it can only have Levitate, eh?

Anyhoo, I've made a better algorithm.

See, shininess is determined by XORing the OT ID, secret ID, and each halfword of the PID, then ANDing the result with 0xFFF8 (aka -8). If the result is zero, the Pokémon is shiny. The observation to be made here is this: for any combination of bits in the upper 16 bits of the PID, there are exactly 8 combinations of the lower 16 bits that can be shiny. Those 8 combinations are consecutive, begin at PID >> 16 & 0xFFF8, and end at 7 more than that.

There are 4,294,967,296 (232) possible personality values, and of them, exactly 524,288 can be shiny regardless of the OT ID and secret ID. Even if we have to check every single one of those (and we never will), then an impossibly-worst-case scenario only has just over 500,000 checks. I ran some trials on my previous algorithm that didn't check shiny values exclusively, and found on the bad end it was getting some hits at over 700,000 attempts. In other words, my algorithm was spending more tries to find a satisfying value than there were even potentially satisfying values to begin with.

The new algorithm adds a distinct logic branch if shininess is desired. That particular branch just checks all the shiny values in a rather boring approach. It does make use of the Ability bit to skip every other value, though, so it's not totally naïve. My trials with this algorithm were typically clocking in at south of 1,000 checks for the worst-case PIDs, meaning that even in a terrible situation it's 700 times as fast as the old algorithm.

I did come across a few strays with higher counts, though. Not sure what it is, but certain mixtures of OT ID, secret ID and shininess can make for some abominable searches, in one case even taking a good 133,699 checks for a shiny Unown. Not a huge deal, as there's always a hack one can pull off to boost performance, but it's a mite discouraging and I wouldn't want something like that to hold up the works after this thing is put into production.

I put together a GBA program to test it out. You can download it here:

Dropbox to the rescue

And it looks kinda like this:



Controls are as follows:
  • Select - Randomize the whole blessed thing
  • Up/Down - Increase/Decrease the species index by 1
  • R/L - Increase/Decrease the species index by 10
  • A - Randomize the Pokémon while retaining the current species
  • Start - Generate a new PID without changing anything
The PID and number of tries will be cleared from the screen while generation is taking place, so in the event the program gets caught in an endless loop, it'll stay that way. Otherwise, it will reappear with the results, hopefully without taking so long that the red "OMG!" appears next to the number of tries.

That's where I need you guys to give it a go. Give it a whirl and see if you can cause any problems.
GuyPerfect
Catgirl
Level: 65


Posts: 1007/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 10-02-14 09:01:52 PM Link | Quote
A few stray Pokémon can't be bred, and therefore their game of origin must fit within the validator's expected values. I encountered this for the first time when I got Ruby in the mail, and some Action Replay generated Unowns were rejected from the Poké Transporter.

The following Pokémon can only originate from FireRed or LeafGreen (plus Ditto, which can also be found in Emerald):
Ditto
Articuno
Zapdos
Moltres
Mewtwo
Unown
Raikou
Entei
Suicune

The following Pokémon can be obtained in generation 2, but not generation 3 except in side games:
Lugia
Ho-Oh

Setting Lugia's or Ho-Oh's game of origin to the generic "Met in a trade" value will work with any OT information as far down as level 40 (and maybe lower), which is the minimum level they can be encountered in generation 2. I haven't investigated the Johto beasts yet--they're found at level 50 in gen 3 but level 40 in gen 2.

All of these Pokémon are allowed to be shiny, and none of them require the Fateful Encounter flag to be set.
GuyPerfect
Catgirl
Level: 65


Posts: 1042/1093
EXP: 2219731
For next: 115897

Since: 07-23-07


Since last post: 129 days
Last activity: 87 days

Posted on 12-06-14 07:46:18 PM Link | Quote
Just jotting this down since I happen to be thinking about it... In some cases, a Gen2 Pokémon's stats might be representable in Gen3 using a non-neutral Nature, where a neutral Nature might not get the same numbers. On a more abstract level, certain Natures might be able to get closer to the actual numbers than a netural Nature. So when selecting a Nature during migration, the algorithm should pick the closest one rather than just invariably select a neutral Nature.
gridatttack

Buzzy Beetle
Rarity FTW
Level: 39


Posts: 367/375
EXP: 398307
For next: 6464

Since: 08-26-09


Since last post: 314 days
Last activity: 84 days

Posted on 12-07-14 03:19:11 PM Link | Quote
Originally posted by GuyPerfect
I scrounged up a complete list of all OT IDs used in Mew and Celebi distributions in Gen 3. All such Mew can be shiny, but no such Celebi can be shiny. The language and creation date aren't validated, so as long as the OT ID matches, it will work.


I wonder, does the same as celebi can be applied to Jirachi?

IIRC poketransporter doesnt accept a shiny jirachi from the Colosseum bonus disc, but theres like 7 different shiny Jirachis possible to be gotten from it.
Pages: 1 2 3 4 5Next newer thread | Next older thread
Jul - Game Research/Hacking/Modding - Migrating Pokémon from Generation 2 to 3 New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

31 database queries, 10 query cache hits.
Query execution time: 0.157396 seconds
Script execution time: 0.020984 seconds
Total render time: 0.178380 seconds