I think the issue with the gs codes not working is due to your sorting. I don't exactly know much about gs codes but I know if they're written in a certain order, you should keep them in that order.
I used a hex editor to make pokemon hacks. It was really incredible when I could do something without a tutorial, even if it was changing a simple text.
Fun fact; Pokémon Stardium Gold Silver /2 has a full-fledged Pokémon and save editor build into it. It's hidden away in the retail version, but there's a ROM out there where its enabled.
There's also a n64 gameshark version with a parallel port on the back that you can use to upload codes. I think it needs to be version 3.2 since 3.3 revisions had parts removed that it needs to work. The software is pretty ancient though and only works on Windows XP. You can also use it to dump carts or read the games memory on real hardware which is cool.
Yeah definitely considered this, but most USB-to-parallel converters for modern machines seem to only work with printers, and otherwise id have to grab some 2000s hardware running xp to probably interface with it. Maybe something for a future vid tho!
@@ChromaLock Seems my reply got shadow removed. Thanks youtube. But yeah, I had an old PC with a printer port on it and messed around with this stuff a few years ago. I still have the wepage bookmarked with a ton of information if you want it. Some guy even made an open source tool for communicating with it on Linux which worked much better iirc
This is kinda nostalgic to me, as someone who also looked at the Stadium pokemon data structure, I remember the exact same confusion about why they had trainer name in two different encodings (and yet not the nickname)... Anyway, looking forward to see more from the channel for sure.
Great video! I really like your channel. The sorting algorithm you're using for the gameshark codes is essentially the same as an algorithm called "selection sort"
@@drdca8263 it's still selection sort, the only difference is that it's sorting the list based on a derived value (edit distance from the previous item) rather than by the values directly.
RUclips recommended your 3 most recent videos to me a few weeks apart, and I have to say they exactly caught my interest and earned you another subscriber.
Holy crap. You did it! Well since you made a video idea out of my last comment, now I'm going to ask you to make an Arduino device that allows a game boy color to communicate with a 3DS wirelessly so that you can trade pokémon between your 3DS saves and your cartridge games. I know that you can buy 3DS Wi-Fi cards, and when you try to trade between 3DS pokémon virtual console games, it kind of enters this pause mode for the 3DS's to connect. So theoretically, if you can get something to mimic a 3DS wireless signal to connect to that plugs in to a game boy colors, trade cord slot, you could connect an actual gen 1 game with a virtual console game. This idea forever but I'm a junior developer and I do not understand enough to build it myself 😅.
Your production values are excellent considering the size of your channel. I've been really enjoying your content and wish you the best of luck here on youtube :)
I really like how this personal project is going for you. And it's even more amazing how entertaining you show it to other people. And hey it's Pokemon Stadium (guy)✌️
2:10 I wonder if the two trainer names are "original trainer" and "current trainer", so for example, if the Pokemon is traded it would have two different names there. I'm not sure if that information is ever used in the final game, but for sure it would make sense someone thought to program it in during development.
Though I fully appreciate the commitment to your specific approach, I can’t help but consider the more straightforward paths. The GameShark could’ve had codes set using the parallel port, or perhaps even save editing the GameShark itself. And then of course, there’s the fact that Pokémon Blue save editing is exceptionally mature. Dumping the save, modifying with PKHeX, then restoring the modified save would’ve been the most obvious and direct approach.
Agreed for all practical intents. Though I will say I had a hard time finding resources to interact with the gameshark parallel port on modern machines, since most USB-to-Parallel converters seemed to only work with printers. I purchased a GB Operator recently just to try out some stuff and definitely using that would be the simplest. I guess this approach would be for those who, like me, have a lot of random retro hardware like gamesharks and arduinos lying around.
@ChromaLock I appreciate the tinkering you do instead of using someone else's stuff. Doing it is how we learn as humans, not just relying on someone else to do it.
@@titanisback1absolutely agreed! I hope I didn’t come off as detracting from the work here. Using the tools you already have can make for some interesting constraints and problem solving. Just using PKHeX or a parallel port would have completely deprived us of exploring Pokémon Stadium’s RAM, learning the data layout used to store Pokémon, figuring out the N64 controller communication protocol, etc. It’s all great stuff and has the makings to bootstrap future projects. Having a microcontroller run the inputs, for instance, makes it possible to play back a Pokémon R/B/Y arbitrary code execution TAS in Stadium, which could let you program all sorts of crazy things.
I vaugely remember that RBY stores the trainer name twice and it interacts with the OLD MAN catching tutorial as the game temporarily changes the player name to OLD MAN before reverting it. I could be totally off though.
Nah, that's not what that's for. It's more likely that the second copy of the name attached to each Pokémon is the original trainer's name, for when you trade the Pokémon to someone else. The copy made by the game when running that tutorial doesn't exist at all until you run that tutorial. It works by copying your trainer name to the place in memory where encounter data is stored, running the encounter, and then copying the player name back. That's why the Cinnabar Island surf glitch works the way it does. It winds up using the bytes of the player's name as the Pokémon encounter data.
Yeah! Its only on the pro versions AFAIK, my 2.1 version doesnt have it but my 3.2 version does. I dont know much about it but I know you can use it to update firmware on other gamesharks and also to dump n64 cartridge roms.
Cool. I was wondering if you could also use it to upload codes. Also do you mean a race condition between the GameShark and the n64 reading code data? It would seem weird to me because my understanding is the GameShark is doing code replacement, not executing anything on the n64. Maybe you are trying to load too many codes and the GameShark is failing silently? Sorry if I'm speaking out of my ass.
Very true, I havent done much research into it but it looked like most the software ran on windows xp/95 era hardware, and required a parallel port. It also seems like most commercially available usb to parallell adapters dont play well with it so Id need to grab a MOBO with parallel ports. Definitely something id be interested in for a future video though 🤔
Man I don't know. I can follow most of this and did a bunch of tinkering with game genie in the late 90's without any formal cs knowledge. I should think that intermediate knowledge is either much higher or much lower than figuring out how to hex edit.
@@alexs7670 its easy to follow along when someone has already done all the heavy lifting for you, I'm talking about doing exactly what he did, no tutorial, no video to follow along, nothing.
So, I haven’t looked at it since I became old enough to drive, 15 years ago, so I have no idea how useful this would actually be, but DK64 had a ludicrously long Enable Code that might be worth looking at. I would imagine that if there is some kind of method of dealing with using a metric ton of GS codes at once, it’ll be in that Enable Code.
On the serial rate: Did you use the hardware serial pins on your board? Because all pins can emulate serial, but higher speed timings might get unreliable. And that might vary wildly in every way conceivable.
Using USB serial, which i believe is hardware serial on the nano. I think its likely that the nintendo library im using is disabling interrupts, and because I'm sending controller status to the console so often, its probably disabling interrupts long enough to cause issues with receiving serial data. Just a rough hypothesis though
@@ChromaLock Yes, the USB serial connection is probably only wired to hardware serial pins. So your hypothesis makes more sense. But in that case you could just use a vastly more powerful controller the atmega328 is ancient technology. RP2040 based boards are abundant and cheap. I could not find the N64 controller lib you used so I don't know how hard the port would be.
Thanks! The values can be found in github.com/pret/pokered Move IDs are in the file move_constants.asm Pokedex IDs are in pokedex_constants.asm Species IDs are in pokemon_constants.asm Hope that helps!
Dropping the baud rate might be because you're overloading the buffer before it can finish. Are you waiting for the code to finish inputting before sending it another? Also, with a simple state machine, you could have different button press delays to speed up the time it takes to input them. As for the race condition, unless changing the order of the codes messed with how they work, it's possible the gameshark maybe can't interrupt the console in time for values to actually be changed. But, I'm not sure. 🤔
Yeah. For the baud rate issue Im wondering if the nintendo library was using some interrupts, and therefore causing issues with uart. I didnt mention, but to speed up some sections i have a "Fast Delay" during button presses in areas without menus, which does speed up the entry a bit, but its still like 1.5s to ensure nothing ever gets dropped. Definitely still an open question when it comes to the race condition.
@@ChromaLock Hm, interesting. I'd have to look into the library. 300 shouldn't be necessary for something so simple. Dang, 1.5s and still dropping inputs? That's weird. Either the Gameshark is really slow to process the inputs or something else is screwy with the library.
Well if you would like a challenge could you create a code for stadium 2 to make the game think you beat rounds 1 and 2 to unlock Dodrio mode for the gen 2 games?
You have done a service to PJ64 users everywhere. Also that’s receiving payment for Nintendo stuff they shouldn’t(sure it’s only delay of service but does Nintendo ever do that to us? No, they haven’t , especially not like this) because yeah it’s payment to remove that window. You’ve effectively given the people the method to make PJ64 truly free
Im a dumb and forgot to actually mention the exact library I'm using: github.com/NicoHood/Nintendo
I think the issue with the gs codes not working is due to your sorting. I don't exactly know much about gs codes but I know if they're written in a certain order, you should keep them in that order.
Yup! Really curious how you’re sorting all of this
using ghidra on an executable with a compilable open source project is much funnier than it has any right to be.
Like... its open source?!?! If you have the knowledge to use ghidra, you can remove a single line of code and compile from source
pit stopping to remove the popup is so funny to me
As someone who has opened a hex editor once in my entire life, I find these videos really interesting and fascinating.
I used a hex editor to make pokemon hacks. It was really incredible when I could do something without a tutorial, even if it was changing a simple text.
"So I'm gonna get rid of it"
Lost my shit when the Ghidra logo came up
Fun fact; Pokémon Stardium Gold Silver /2 has a full-fledged Pokémon and save editor build into it. It's hidden away in the retail version, but there's a ROM out there where its enabled.
fun fact: some models of N64 gameshark have parallel ports in back specifically to upload new codes to them
Non N64 example:
the X-Ploder I have for my PS1.
fun fact: you can also use it to rip ROMs
@@NeoTechni you can? neat
Also useful for changing firmware, or in my instance, un-bricking it because i put a flash cart on top of it
The GameShark in this very video has the port on the back.
There's also a n64 gameshark version with a parallel port on the back that you can use to upload codes. I think it needs to be version 3.2 since 3.3 revisions had parts removed that it needs to work. The software is pretty ancient though and only works on Windows XP. You can also use it to dump carts or read the games memory on real hardware which is cool.
Yeah definitely considered this, but most USB-to-parallel converters for modern machines seem to only work with printers, and otherwise id have to grab some 2000s hardware running xp to probably interface with it. Maybe something for a future vid tho!
@@ChromaLock Seems my reply got shadow removed. Thanks youtube. But yeah, I had an old PC with a printer port on it and messed around with this stuff a few years ago. I still have the wepage bookmarked with a ton of information if you want it. Some guy even made an open source tool for communicating with it on Linux which worked much better iirc
@@ChromaLock I'd be happy to send you a very useful webpage with a bunch of info on this
It works on some 3.3 models.
@@bkacjiosthat's awesome, thanks for sharing
The "second" trainer name might be the trainer/catcher id. It's the thing the game checks for to see if the pokemon was traded for the exp bonus.
Knowing next to zero about Pokemon, that was my guess too.
This is kinda nostalgic to me, as someone who also looked at the Stadium pokemon data structure, I remember the exact same confusion about why they had trainer name in two different encodings (and yet not the nickname)... Anyway, looking forward to see more from the channel for sure.
Great video! I really like your channel.
The sorting algorithm you're using for the gameshark codes is essentially the same as an algorithm called "selection sort"
Is it? This isn’t using a total order on the entries, just a metric..
@@drdca8263 it's still selection sort, the only difference is that it's sorting the list based on a derived value (edit distance from the previous item) rather than by the values directly.
one more pokemon stadium video and tou will forever be know as the guy obsessed with pokemon stadium
I forgot you're such a small channel because of how good your video is. I live those other channels you draw inspiration from too.
Thanks! Yeah Im hyped to see where the Wii-U tablet saga goes
RUclips recommended your 3 most recent videos to me a few weeks apart, and I have to say they exactly caught my interest and earned you another subscriber.
Holy crap. You did it! Well since you made a video idea out of my last comment, now I'm going to ask you to make an Arduino device that allows a game boy color to communicate with a 3DS wirelessly so that you can trade pokémon between your 3DS saves and your cartridge games. I know that you can buy 3DS Wi-Fi cards, and when you try to trade between 3DS pokémon virtual console games, it kind of enters this pause mode for the 3DS's to connect. So theoretically, if you can get something to mimic a 3DS wireless signal to connect to that plugs in to a game boy colors, trade cord slot, you could connect an actual gen 1 game with a virtual console game. This idea forever but I'm a junior developer and I do not understand enough to build it myself 😅.
Your production values are excellent considering the size of your channel. I've been really enjoying your content and wish you the best of luck here on youtube :)
I really like how this personal project is going for you. And it's even more amazing how entertaining you show it to other people. And hey it's Pokemon Stadium (guy)✌️
oh I know I'm gonna love this video and would kill for a stadium 2 version of this (gen 2s my favorite generation)
2:10 I wonder if the two trainer names are "original trainer" and "current trainer", so for example, if the Pokemon is traded it would have two different names there. I'm not sure if that information is ever used in the final game, but for sure it would make sense someone thought to program it in during development.
8:11 You could probably speed it up by having it check the last character before moving onto the next one.
I trust that one day, I'll be the first guy to make the Game Boy tower work
Do you think that the second trainer name is space for the original trainer name in case it’s been traded?
“Oh say can you see, by the dawns early light…”
Though I fully appreciate the commitment to your specific approach, I can’t help but consider the more straightforward paths. The GameShark could’ve had codes set using the parallel port, or perhaps even save editing the GameShark itself. And then of course, there’s the fact that Pokémon Blue save editing is exceptionally mature. Dumping the save, modifying with PKHeX, then restoring the modified save would’ve been the most obvious and direct approach.
Agreed for all practical intents. Though I will say I had a hard time finding resources to interact with the gameshark parallel port on modern machines, since most USB-to-Parallel converters seemed to only work with printers. I purchased a GB Operator recently just to try out some stuff and definitely using that would be the simplest. I guess this approach would be for those who, like me, have a lot of random retro hardware like gamesharks and arduinos lying around.
@ChromaLock I appreciate the tinkering you do instead of using someone else's stuff. Doing it is how we learn as humans, not just relying on someone else to do it.
@@titanisback1absolutely agreed! I hope I didn’t come off as detracting from the work here. Using the tools you already have can make for some interesting constraints and problem solving. Just using PKHeX or a parallel port would have completely deprived us of exploring Pokémon Stadium’s RAM, learning the data layout used to store Pokémon, figuring out the N64 controller communication protocol, etc. It’s all great stuff and has the makings to bootstrap future projects.
Having a microcontroller run the inputs, for instance, makes it possible to play back a Pokémon R/B/Y arbitrary code execution TAS in Stadium, which could let you program all sorts of crazy things.
or just get a gameboy gameshark lol. couldnt be simpler.
I vaugely remember that RBY stores the trainer name twice and it interacts with the OLD MAN catching tutorial as the game temporarily changes the player name to OLD MAN before reverting it. I could be totally off though.
Nah, that's not what that's for. It's more likely that the second copy of the name attached to each Pokémon is the original trainer's name, for when you trade the Pokémon to someone else.
The copy made by the game when running that tutorial doesn't exist at all until you run that tutorial.
It works by copying your trainer name to the place in memory where encounter data is stored, running the encounter, and then copying the player name back.
That's why the Cinnabar Island surf glitch works the way it does. It winds up using the bytes of the player's name as the Pokémon encounter data.
@@Acorn_Anomaly Thanks! I wasn't too sure about my comment, but this seems a lot more reasonable than what I thought!
Does your GameShark have the serial port? I remember seeing that as a kid and always wondering what it was for
Yeah! Its only on the pro versions AFAIK, my 2.1 version doesnt have it but my 3.2 version does. I dont know much about it but I know you can use it to update firmware on other gamesharks and also to dump n64 cartridge roms.
Cool. I was wondering if you could also use it to upload codes. Also do you mean a race condition between the GameShark and the n64 reading code data? It would seem weird to me because my understanding is the GameShark is doing code replacement, not executing anything on the n64. Maybe you are trying to load too many codes and the GameShark is failing silently? Sorry if I'm speaking out of my ass.
I thought it was a Parallel Port...
Anyway, yeah. You can definitely use it to import codes. I did so in the old days.
There are versions of the N64 GameShark with a Parallel Port that is there for the purpose of uploading codes from your computer...
Very true, I havent done much research into it but it looked like most the software ran on windows xp/95 era hardware, and required a parallel port. It also seems like most commercially available usb to parallell adapters dont play well with it so Id need to grab a MOBO with parallel ports. Definitely something id be interested in for a future video though 🤔
It also works in Linux surprisingly enough.
Some n64 game sharks had a parallel port interface you could program them with
meanwhile here i am, with a CS degree, a master's , and half a PhD and i can't do anything near what you do, i feel useless
You wasted your money then. Anyone with intermediate cs prowess should be able to figure all of this out within a few hours of tinkering.
Man I don't know.
I can follow most of this and did a bunch of tinkering with game genie in the late 90's without any formal cs knowledge.
I should think that intermediate knowledge is either much higher or much lower than figuring out how to hex edit.
@@alexs7670 its easy to follow along when someone has already done all the heavy lifting for you, I'm talking about doing exactly what he did, no tutorial, no video to follow along, nothing.
@@turnkey_hole it's almost as if you didn't read that last part about feeling useless
We all have e the things we are good at and not good at. Don't feel bad about it, learn about it.
I came for the pokemon stadium, i stayed for the pokemon stadium
The algorithm has blessed me this day.
Your content is great, and I look forward to what you end up doing in the future!
Cool video! There's a parallel port on the back of the GameShark 64, right? At least the ones I have have one. Couldn't that be used to upload codes?
This is cool as hell dawg
So, I haven’t looked at it since I became old enough to drive, 15 years ago, so I have no idea how useful this would actually be, but DK64 had a ludicrously long Enable Code that might be worth looking at. I would imagine that if there is some kind of method of dealing with using a metric ton of GS codes at once, it’ll be in that Enable Code.
good tip!
Any chance you could drop that sick as hell chemical plant zone remix you used in the video? Great video, btw, this is genuinely fascinating!
ruclips.net/video/YO5n6FUcwDA/видео.html
and thanks!
On the serial rate:
Did you use the hardware serial pins on your board?
Because all pins can emulate serial, but higher speed timings might get unreliable. And that might vary wildly in every way conceivable.
Using USB serial, which i believe is hardware serial on the nano. I think its likely that the nintendo library im using is disabling interrupts, and because I'm sending controller status to the console so often, its probably disabling interrupts long enough to cause issues with receiving serial data. Just a rough hypothesis though
@@ChromaLock Yes, the USB serial connection is probably only wired to hardware serial pins.
So your hypothesis makes more sense.
But in that case you could just use a vastly more powerful controller the atmega328 is ancient technology.
RP2040 based boards are abundant and cheap. I could not find the N64 controller lib you used so I don't know how hard the port would be.
its the pokemon stadium guy !!!!
If there's a way to get rom hacks like Yellow Legacy and Crystal Legacy to work in the Stadium games, people would immediately flock to it.
been loving the videos, just as good as matt and abe if you ask me.
I have an idea for you: pokemon red ace to jail break from pokemon stadium
A random look on the internet makes me think that the mhz of your chip was something weird.
✅ Can't RTFM
✅ Loves ZIF sockets
✅ Fw weird outdated hardware for fun
✅ Dropped out of CS
Oh my god he's just like me fr
6:45 don't worry, having more CS knowledge would only allow you to know that there is no perfect solution :> (it's NP complete)
Fantastic video. How do you figure out what the values are for specific species id and moves?
Thanks! The values can be found in github.com/pret/pokered
Move IDs are in the file move_constants.asm
Pokedex IDs are in pokedex_constants.asm
Species IDs are in pokemon_constants.asm
Hope that helps!
@@ChromaLock It worked thanks!
2:06 the gen 1 trainer name was probably for cross compatibility
Can you recompile the game and make a pc port? Like those new zelda pc ports?
Dropping the baud rate might be because you're overloading the buffer before it can finish. Are you waiting for the code to finish inputting before sending it another?
Also, with a simple state machine, you could have different button press delays to speed up the time it takes to input them.
As for the race condition, unless changing the order of the codes messed with how they work, it's possible the gameshark maybe can't interrupt the console in time for values to actually be changed. But, I'm not sure. 🤔
Yeah. For the baud rate issue Im wondering if the nintendo library was using some interrupts, and therefore causing issues with uart.
I didnt mention, but to speed up some sections i have a "Fast Delay" during button presses in areas without menus, which does speed up the entry a bit, but its still like 1.5s to ensure nothing ever gets dropped.
Definitely still an open question when it comes to the race condition.
@@ChromaLock Hm, interesting. I'd have to look into the library. 300 shouldn't be necessary for something so simple.
Dang, 1.5s and still dropping inputs? That's weird. Either the Gameshark is really slow to process the inputs or something else is screwy with the library.
Pretty awesome man!
The trainer data is there twice because of trading, I believe.
I'm also a fan of lego island man
What happens if you took a broken named Pokemon into the later games in the series?
As a pokemon stadium fan I approve
Well if you would like a challenge could you create a code for stadium 2 to make the game think you beat rounds 1 and 2 to unlock Dodrio mode for the gen 2 games?
Im sure its a simple boolean flag, but finding the exact location would be a cool challenge :D
At this point you should just make your own Gameshark
You have done a service to PJ64 users everywhere.
Also that’s receiving payment for Nintendo stuff they shouldn’t(sure it’s only delay of service but does Nintendo ever do that to us? No, they haven’t , especially not like this) because yeah it’s payment to remove that window.
You’ve effectively given the people the method to make PJ64 truly free
Oooh is that Professor Layton music I hear
you know it
Did you bite your blue cartridge?
mmmmmmmmmmmmm
in reality no its from somebody else, came damaged
Really cool video!
is "green drink" a "brown bricks" joke?
Shout out mattkc
You should have just use that game shark to re-enable the debug menu in Pokemon stadium 2 rather than all of this complex work
You also dont have charming/creepy smile of MattKC, but none the less, keep up the good work!
Good stuff
Never stop
No Cat
Neat
how do you only have 2000 subs, crazy
Real fed hours
If you were trying to write out “N64” in Japanese it would be ん64 and not na or ナ64
it says "nano 64", due to having an arduino nano in it
@@ChromaLock haha! That makes sense lol
Could of made life easier by buying a game shark for gameboy lol
Epic.
brainy a f
Lol i get that intro, once i hacked out the license check from a thunderbird addon😊