great video, though i'd have hoped you actually told us how gold&silver worked. like e.g. how the 2 maps were layouted in memory to faciliate the gameboy's bank switching logic efficiently
Is this like filling up a notebook with notes from Math class and History class with organizational skills that I cannot even comprehend? As in, filling every little white space, every blue line, even the header and the space after the pink line?
yep, and then going back over it with a highlighter to mark places where you can optimize the notes so you understand them better, and rewriting the notes until the entire class can be summed up on two sides of a note page.
wow i have new appreciation for the gift that was having the kanto region in pokemon silver/gold/crystal games! great video, really informative/inspirational/enjoyable!
I’d like to thank this man for making my childhood. The GBA, DS, and Gamecube was my life when I was younger. It’s a shame that he passed the way he did but he left a lasting impression and legacy. RIP, good sir, and thank you again.
I just recently got my first experience working with an assembly language. That early games were built entirely using this kind of programming absolutely boggles my mind. Respect for any programmer who knew it well enough to be efficient with it.
I enjoyed this video a lot! I'm computer engineer and I don't think I could have explained it better. Thank you for your videos! I'm also amazed of how "badass programmers" people had to be in the past. Iwata truly deserved every praise people tell about him, as a badass programmer and as the Nintendo CEO.
I'm a bit of a noob, but... Is not basically any language capable of being used to write a compiler? Wouldn't that mean all languages can, whether or not they are, be compiled by a compiler written in the same language?
@@seigeengine true.. of course, you need to write the first compiler/interpreter in assesmbly itself, but after you did that, any complete programming-language will do to write a parser that turns high-level-language into assembly.
@r4rev2 As a general rule, not really. In the end, machine code is machine code. How you arrived there doesn't really matter. If you are targeting a platform other than x86[-64], modern ARM, or modern PPC platforms, it can actually be very untrue. The quality of code you get out of a compiled language is 100% dependent on the toolchain, and not all platforms have toolchains for C++ that are as robust as gcc, clang, or icc are on x86-64.
Dang, he seems to be as badass as the original programmers of Elite. One thing they did was to transform all multiplications and division to logarithms, because the hardware that day (CS Specturm etc) couldn't handle those calculations well, but they were pretty good at adding and subbing. They just added shitloads of logarithmic tables in their limited disc space to make it work. Also there were some other programming wizardry involved that blew my mind while reading it.
I was wondering when you are going to actually explain how said games work. Your answer was not what i expected but It still was pretty interesting. This video is a year long so I guess you already have noticed that buildup was bit long.
I learned MIPS in college. It is so beautiful in its simplicity. And the reason for the extra ALU Op field tacked on to the end of the instruction makes perfect sense when you see how a MIPS processor decodes instructions.
Thank you so much for this tribute. Mr. Iwata is one of my idols and inspirations and you just took one of my favourites of his achievements and made me realize how incredible it actually was. I just discovered your channel, but your content is exactly what I'm passionate about. Can't wait to watch more of your videos. Subscribed!
This remind me that great book Racing the Beam, about Atari 2600. Yars Revenge used the own code to generate the random explosion effect between levels, also taking advantage from the lack of video memory in the 2600.
Gameboy is an 8-bit system so it wouldn't access memory in 4 byte chunks. The memory alignment is more of a modern problem. I doubt that careful memory placement is the answer to how essentially two games worth of map could be fit into a single cartridge. He must have used some sort of compression algorithm.
4:14 I love how you started drawing a stick-person and then were like "hmmm nope, that's not what we draw on this channel" Also golden: cat in a Pikachu costume
Great tribute to Satoru Iwata :] Do you think programming at such a low level has become obsolete, given the advancement of hardware, or does it still play an important part?
siegeO2 I don't think any modern games are developed with assembly. However, it's definitely still used to develop and interface with hardware all over the place. And it's important for all programmers to have a mastery of; I use the concepts of computer architecture every day.
+Wizard of OS Not so much in games, but a lot in high end software, like Photoshop, Logic, Premiere etc, where performance is really important. Usually most of the program is written in a high level language (C, C++, C#, etc.), and then some of the performance critical functions are written in assembly
Obsolete? For PCs, its just less useful, with optimizing compilers in the market. Assembly is however still used in areas, where code needs to be tightly timed.
amazing the work of old programers! also a good language to learn assembly programing is motorolla 680x0 the Amiga computer and some retro apple computer
Matt Cliatt exactly. This video was garbage. It didn't mention anything he actually did to optimize space. Does the narrator really think that all he did was optimize alignment? Please.
Is byte alignment important on the gameboy? I didn't think it was because it has an 8bit cpu. I know the source address of sprite DMA needs to be in aligned to 256 bytes, but that's the only case I can think of where alignment is important.
Yeah I believe she pulled that out of her as. Maybe it is in MIPS but MIPS also isnt relevant to Z80. I've worked with Z80 and I never had to worry about it. It was customized chip but doubt Nintendo would troll the devs with such high limitations.
What a missed opportunity. You didn't talk about any of the actual things he did to optimize memory. How about how he reworked the way they stored sprites, to save tons of space? While dealing with alignment was important, there were much larger things he did to save space. Adding in the entire second region would not have been made possible simply by optimizing alignment.
It is an awesome achievement, but realistically, the Kanto of Gold & Silver is very basic. and reuses tilesets from Johto. Anywhere that would require custom tilesets or new locations were just omitted - Seafoam islands, Pewter Museum, the Safari Zone, even Veridian Forest and the Unknown Dungeon. At the time I thought it was exciting to return to Kanto, but was disappointed in the lack of basic locations that not even the 2MB Pokemon Crystal fixed.
Looking at ROM sizes... Pokemon Gold and Silver are also 2MB. If I recall adding areas or rooms is a lot more difficult then adding additional graphics - like what they did with the animations. The animations are rather simplistic, It ether edits certain 8x8 tiles or does a palette swap. Its actually kinda clever, since each animation takes less room then the graphic of a whole new pokemon would. - Totodile for example is made of 24 tiles, and it's animation only has 22 'new' tiles, despite being 19 frames of animation. - I don't know exactly how true this is, but If I recall every animation is ~22 new tiles actually... which means the animations all took... a little over 86KB of unused space.
Satoshi Matrix Yeah but you said "disappointed in the lack of basic locations that not even the 2MB Pokemon Crystal fixed" - and Im pointing out that Crystal and G/S are the same rom size. Crystal they squeezed a little bit more. but I don't think significantly more. since the animations were only 86KB worth of data.
Wow, thanks for those!! It's so cool to play around with this, I managed to start with a level 99 mew by tweaking some lines and also deactivate that event where oak prevents you from leaving pallet without a pokémon but then the game freezes. Amazing work man!
Yea assembly language is cool it gives you total controll over the machine, the programs are smaller and most of the time, faster, but in return is very difficult to use and since it's machine specific, is not very portable. Is more or less like the nether in minecraft, a site that you don't visit unless you have something very important to do there.
I'm pretty sure this is basically wrong. Assembly can in theory be smaller and faster, but in practice modern compilers are good enough that maybe only an expert is going to do a better job, and with much more work.
If you look at the C compiler for the NES, for example, it still requires knowledge of the specific hardware and memory requirements. You'd face the same challenges even if C is easier to write in.
The C compiler you probably know nowadays is unofficial and wasn't even made yet back then when Pokemon was made. (Assuming you are talking about GBDK) Using a high level language such as C on a Gameboy was impractical because the compilers back then were no where near as efficient as the ones we have now. Memory was also a concern. Assembly took significantly less space than C and ran faster on the CPU. Also, Satoru Iwata used special data compression techniques along with memory alignment to fit Pokemon Gold/Silver on the cartridge.
I was just speculating because Junichi Masuda contributed to some of the programming on the first games and He mentioned on his blog that he studied C programming on Unix. Here my source: www.gamefreak.co.jp/blog/dir_english/?p=27. Also thanks for the response I didn't think about the memory issue. Compilers now are way better.
I normally like this channel, but this video really bothers me. The video goes off on multiple tangents about how "assembly is hard" and "you need to use memory efficiently" which aren't exactly wrong, but devoid of any details that would make them directly relevant to Pokemon Gold and Silver. She groups C++ with Ruby and Python as high level languages with compilers/interpreters written in C, which is completely wrong for C++. C++ is at about the same level as C (maybe a *tiny bit* higher) and the compiler is usually written in C++. MIPS is given as an example of assembly because it's what the creator knows, but the Gameboy and Gameboy Color use a 8080/Z80 mix commonly called the SM83 that is arguably much simpler. There was no reason to go into detail about how MIPS instructions are encoded in binary other than pushing the video to 10 minutes and contributing to the "assembly is hard" point by falsely implying that assembly programmers need to know/convert how the instructions are encoded at the binary level. Another completely irrelevant thing falsely implied by the MIPS analogy is memory alignment/management. The SM83 instruction set does not care about memory alignment at all. You are free to put whatever oddly sized variables and any weird spot you want (in writable memory), which can be exemplified by a Wayback Machine look of the first link in the description. The only time alignment of any kind is needed is for DMA, a faster way to copy large blocks of data, and bank switching. It's also worth noting that the ROM for the Generation 2 games was TWICE THE SIZE as the generation 1 games (1MB for gen 1 and 2MB for gen 2). I really don't mean to insult Satoru Iwata, and his achievements are still very impressive even with more memory and less limitations than implied in the video, but this video gives almost no specific information and even pushes some false info.
If you really want to learn how Pokemon Gameboy games work, check out our recreated assembly source code: github.com/pret/pokered github.com/pret/pokecrystal
I feel sorry for anyone who has to optimise memory usage on that kind of level. A few bytes of memory is not worth the optimisation now. This is a really nice basic overview of ASM and low level memory management by the way. you made it a lot more interesting than my college.
Well I love working with Mega Drive and doing some crazy tricks to save CPU time or memory. Its really fun to look at piece of code, and find a way to make it better.
i loved this! i’m really into pokémon RBY and GSC glitches and it’s so hard to find a (competently explained) video on how the coding works in the gameboy era pokémon games work. do you know any videos that/could you make a video on how code is recalled in those games / why the game might call code from the wrong areas / how glitches can overwrite code?
interesting video . what I find really intriguing is the comparison in RAM and disk memory size between the modern machines and the 90's devices such as the GBC. basically, if I'm not mistaken , this means that if someone was to, hypothetically, take up the task of reprogramming a modern game on such a deep level, they would be faced with a task a 100,000 times (or more) bigger than what Iwata did. which is obviously not possible. imo, that's quite some food for thought.......
ᑎᗩTᔕᑌᗰI I wasn't talking about replicating it on earlier hardware, just about the idea of someone going down to a lower programming level to reprogram a game manually the way Iwata did, but in a modern scenario
fishy peril Oh right, sorry. That is 100% possible but will be just more time consuming and will lead to many different incompatability issues. At least if done on PC, its likely easier on consoles as they usually have unchanging hardware specs and operating systems.
ᑎᗩTᔕᑌᗰI well that's what I was talking about. it's possible in theory, but for 1 person to do it would be impossible since there would be incomparably more work to be done. which is kinda thought provoking to me, since that means that todays programmers are actually a lot further away from understanding how the machines work on a core level, than old school programmers like Iwata were
fishy peril yeah, its really sad that nowadays programmers are so out of touch with the base hardware and actual bits and bytes using the high level languages. If you ask me, every programmer should learn at least one assembly language and work with one on the level where you end up having to optimize and clean code, as well as optimize memory usage. Too often I have to use bloated applications with memory leaks, poorly written code or they use a ridiculous amounts of memory when its not really needed, just because the programmer behind it does not even think optimization is a thing people do.
Wait. MIPS the assembly language? MIPS THE BUNNY??? WHAAAAAAAAAT?????? I personally thought that 6502 was a more user friendly language than MIPS, probably because 6502 was one of the first programming languages I really learnt. Oh welll.
you used c for dreamcast, ps1 and 2, hell even n64, imagine coding 3d htaphics in asm. it would have taken forever. c is still low level and gets compiled in binaries..
May I correct you that c++ is not an interpreted language thus its translated in machine code / assembly at compile time. Basically it happens once and translation has to finish before c++ code can be executed.
How would it be to honor this man with a small "...from scratch"-Tutorial, where you create a clone (or just proof of concept) of one of his games in SDL/SFML? :)
Pretty much, but the limitation isn't with the Processor, but in software. Storage devices divide up their addressable space into _blocks_ at the smallest level, and File Systems consequently layout files as a collection of blocks, with files unable to "share" blocks. Older disks use a block size of 512 bytes, while newer ones use 4096 bytes(your '4kB'). Though if you're using NTFS, you can make files
I forced myself to learn x86 assembly as my first language (Intel syntax, if you want to know, I'll never understand why you would ever want to use AT&T IMHO) God, I hate assembly languages for CISC computers so much, you have to memorize 100+ instructions you'll would never actually use...
My first experience was with MIPS. RISC assembly is so romantic and tender. It will take you to dinner, pay for it, then invite you for coffee upstairs and blow you. CISC on the other hand is a sadistic and manipulative bitch with a BDSM fetish.
I loved your explanation but please stop telling people that assembly is hard. It really isn't and the stigma around its difficulty means that a lot of good programmers miss out on the opportunity to enjoy assembly programming.
well from my experience writing in assembly is easy provided that you want to create a simple program. The major problem that I had is that with all the movement on registers and every single thing taking 2-3 instructions, I could not disengage from that easily and think in a higher level. If I wanted to write something in higher level, like programming the battle ai for example, I would first write it in a higher level language like C and translate into assembly. And that's they way many programs written in assembly were synthesized. They would often write them in C and translate into assembly because compilers were shit back then compared to today's. Summing up, the hard thing in assembly is that it confines you mentally in registers and instructions.
Iwata is one skilled old school programmer.
:(
He’s passed away
How Pokemon Gold & Silver Work ??
>explain how add in binary
There's nothing her fans won't upvote.
That's not fair
well there is worse on youtube this has at least some educational purpose
i only program in voltage
You mean binary? [Voltage on : 1, Voltage : 0]
You don't program lol.
Not only did you need to know z80 assembly but you had to learn the modifications for the gbz80 chip
great video, though i'd have hoped you actually told us how gold&silver worked. like e.g. how the 2 maps were layouted in memory to faciliate the gameboy's bank switching logic efficiently
8:48 4 MB ~ 4 bytes * 1 million, not 10,000
The human element
This didn't go into any detail about what Satoru actually did, it was more of a handwavey explanation of CPU instruction sets.
I just randomly clicked on this video after finishing writing a Mips Processor for hw... I can't get away from it...
Is this like filling up a notebook with notes from Math class and History class with organizational skills that I cannot even comprehend? As in, filling every little white space, every blue line, even the header and the space after the pink line?
yep, and then going back over it with a highlighter to mark places where you can optimize the notes so you understand them better, and rewriting the notes until the entire class can be summed up on two sides of a note page.
I believe the large cost of memory in recent years is primarily taken up by graphics.
and unoptimised code.
has always been....
wow i have new appreciation for the gift that was having the kanto region in pokemon silver/gold/crystal games! great video, really informative/inspirational/enjoyable!
Rest in piece Satoru iwata
I’d like to thank this man for making my childhood. The GBA, DS, and Gamecube was my life when I was younger. It’s a shame that he passed the way he did but he left a lasting impression and legacy. RIP, good sir, and thank you again.
I think this was an appropriate tribute to Iwata.
I just recently got my first experience working with an assembly language. That early games were built entirely using this kind of programming absolutely boggles my mind. Respect for any programmer who knew it well enough to be efficient with it.
1. Assembly is hard
2. Circuits are hard
3. I'm hard
I enjoyed this video a lot! I'm computer engineer and I don't think I could have explained it better. Thank you for your videos! I'm also amazed of how "badass programmers" people had to be in the past. Iwata truly deserved every praise people tell about him, as a badass programmer and as the Nintendo CEO.
Saying that C++ is written in C is selling it short. Many modern C++ compilers are written in C++ these days.
well she probably meant that the first c++ compiler was written in c.
I'm a bit of a noob, but...
Is not basically any language capable of being used to write a compiler?
Wouldn't that mean all languages can, whether or not they are, be compiled by a compiler written in the same language?
@@seigeengine true.. of course, you need to write the first compiler/interpreter in assesmbly itself, but after you did that, any complete programming-language will do to write a parser that turns high-level-language into assembly.
@r4rev2 As a general rule, not really. In the end, machine code is machine code. How you arrived there doesn't really matter. If you are targeting a platform other than x86[-64], modern ARM, or modern PPC platforms, it can actually be very untrue. The quality of code you get out of a compiled language is 100% dependent on the toolchain, and not all platforms have toolchains for C++ that are as robust as gcc, clang, or icc are on x86-64.
Just call the the ram 'memory' and the non-volatile memory 'storage'.
Or, call the RAM, 'RAM' and the non-volatile memory, 'ROM'
Memory is extremely vague term. Storage on the other hand isnt vague enough. Bad terms.
Or call RAM, RAM and non-volatile memory, NVRAM.
;)
Ryan Jones No thats really dumb :P
Read Only Memory describes it very well
+ᑎᗩTᔕᑌᗰI Thank you.
Dang, he seems to be as badass as the original programmers of Elite. One thing they did was to transform all multiplications and division to logarithms, because the hardware that day (CS Specturm etc) couldn't handle those calculations well, but they were pretty good at adding and subbing. They just added shitloads of logarithmic tables in their limited disc space to make it work. Also there were some other programming wizardry involved that blew my mind while reading it.
I was wondering when you are going to actually explain how said games work. Your answer was not what i expected but It still was pretty interesting. This video is a year long so I guess you already have noticed that buildup was bit long.
Wow, a year long video?
Great video explaining how programming and computers work! RIP Mr. Iwata.
This video sounds like my Computer Science class :D
I learned MIPS in college. It is so beautiful in its simplicity. And the reason for the extra ALU Op field tacked on to the end of the instruction makes perfect sense when you see how a MIPS processor decodes instructions.
it still feels like iwata died only yesterday.
he was a legend.
Thank you so much for this tribute. Mr. Iwata is one of my idols and inspirations and you just took one of my favourites of his achievements and made me realize how incredible it actually was. I just discovered your channel, but your content is exactly what I'm passionate about. Can't wait to watch more of your videos. Subscribed!
While this may be deeper than I explore with coding, your videos are very informative and watchable.
Best channel ever
But gameboy doesn't need alignment or padding... it's 8-bit, so everything is "aligned" to 1 byte
He saved us. He saved all Pokemon games and made Pokemon X and Y better with the end theme
in other words, they were literally ninjas in programming and hardware.
This remind me that great book Racing the Beam, about Atari 2600. Yars Revenge used the own code to generate the random explosion effect between levels, also taking advantage from the lack of video memory in the 2600.
Gameboy is an 8-bit system so it wouldn't access memory in 4 byte chunks. The memory alignment is more of a modern problem.
I doubt that careful memory placement is the answer to how essentially two games worth of map could be fit into a single cartridge. He must have used some sort of compression algorithm.
Compression and bank switching to be exact.
i absolutely love this detailed explanation! Thank you!!
4:14 I love how you started drawing a stick-person and then were like "hmmm nope, that's not what we draw on this channel"
Also golden: cat in a Pikachu costume
Great tribute to Satoru Iwata :]
Do you think programming at such a low level has become obsolete, given the advancement of hardware, or does it still play an important part?
siegeO2 I don't think any modern games are developed with assembly. However, it's definitely still used to develop and interface with hardware all over the place. And it's important for all programmers to have a mastery of; I use the concepts of computer architecture every day.
as she said it's more used to program hardware, I use assembly to program microcontrollers
+Wizard of OS Not so much in games, but a lot in high end software, like Photoshop, Logic, Premiere etc, where performance is really important. Usually most of the program is written in a high level language (C, C++, C#, etc.), and then some of the performance critical functions are written in assembly
Obsolete? For PCs, its just less useful, with optimizing compilers in the market.
Assembly is however still used in areas, where code needs to be tightly timed.
Wizard of OS
if someone builds a chip, they need to write the firmware in low level C or assembly.
alone in your phone theres plenty of them
amazing the work of old programers! also a good language to learn assembly programing is motorolla 680x0 the Amiga computer and some retro apple computer
and Sega Mega Drive
Just found your channel a few days ago, you definatly deserve much more subs!! :D
RIP satoru iwara he is an absolute legend
This was not at all about Pokemon Gold and Silver, and definitely not a tribute to Satoru Iwata.
Matt Cliatt exactly. This video was garbage. It didn't mention anything he actually did to optimize space. Does the narrator really think that all he did was optimize alignment? Please.
Is byte alignment important on the gameboy? I didn't think it was because it has an 8bit cpu. I know the source address of sprite DMA needs to be in aligned to 256 bytes, but that's the only case I can think of where alignment is important.
Yeah I believe she pulled that out of her as. Maybe it is in MIPS but MIPS also isnt relevant to Z80. I've worked with Z80 and I never had to worry about it. It was customized chip but doubt Nintendo would troll the devs with such high limitations.
What a missed opportunity. You didn't talk about any of the actual things he did to optimize memory. How about how he reworked the way they stored sprites, to save tons of space? While dealing with alignment was important, there were much larger things he did to save space. Adding in the entire second region would not have been made possible simply by optimizing alignment.
Wait a minute... Did they name that rabbit in sm64 after their CPU assembler?
I know this is a month late and you probably figured out the answer by now, but yes.
It is an awesome achievement, but realistically, the Kanto of Gold & Silver is very basic. and reuses tilesets from Johto. Anywhere that would require custom tilesets or new locations were just omitted - Seafoam islands, Pewter Museum, the Safari Zone, even Veridian Forest and the Unknown Dungeon. At the time I thought it was exciting to return to Kanto, but was disappointed in the lack of basic locations that not even the 2MB Pokemon Crystal fixed.
Satoshi Matrix That explains a lot, actually.
Looking at ROM sizes... Pokemon Gold and Silver are also 2MB.
If I recall adding areas or rooms is a lot more difficult then adding additional graphics - like what they did with the animations.
The animations are rather simplistic, It ether edits certain 8x8 tiles or does a palette swap.
Its actually kinda clever, since each animation takes less room then the graphic of a whole new pokemon would.
- Totodile for example is made of 24 tiles, and it's animation only has 22 'new' tiles, despite being 19 frames of animation.
- I don't know exactly how true this is, but If I recall every animation is ~22 new tiles actually... which means the animations all took... a little over 86KB of unused space.
You're talking about Crystal, not Gold & Silver.
Satoshi Matrix
Yeah but you said "disappointed in the lack of basic locations that not even the 2MB Pokemon Crystal fixed" - and Im pointing out that Crystal and G/S are the same rom size.
Crystal they squeezed a little bit more. but I don't think significantly more. since the animations were only 86KB worth of data.
WOW!! This video made my day..It will forever count as one of the best experiences on UA-cam..
I think a better video name is "How Satoru Iwata fit both Johto and Kanto in Pokemon Gold & Silver"
Much like how Iwata removed the padding from the memory alignment, you could've removed the padding from this video.
And there is this: github.com/pret/pokered
A disassembly of pokemon red/blue! haha
Don't forget our disassembly of Pokemon Yellow:
github.com/pret/pokeyellow
Or our disassembly of Pokemon Crystal:
github.com/pret/pokecrystal
Assembly FTW!
Wow, thanks for those!!
It's so cool to play around with this, I managed to start with a level 99 mew by tweaking some lines and also deactivate that event where oak prevents you from leaving pallet without a pokémon but then the game freezes. Amazing work man!
That's cool! You can do some pretty exciting things with the source code
how about a video on the original elite game? :)
Math makes no sense to me. My brain short-circuited during this video.
Chris Sawyer wrote RCT2 entirely in assembly.
Apparently a quantum bit is represented by a 2. You can look up quantum bits online.
can you do a video of how pokemon is organized and programmed in specific?
Amazing video! Thank you.
Excellent content. I'm totally amazed🙏🙏
I had no idea that assembly language was used for SO long. Enjoyed this very much.
It is still used
Yea assembly language is cool it gives you total controll over the machine, the programs are smaller and most of the time, faster, but in return is very difficult to use and since it's machine specific, is not very portable. Is more or less like the nether in minecraft, a site that you don't visit unless you have something very important to do there.
STFU n00b
You dork, I go to swim in lava quite often for the fun of it
God, the fact that you made that comparison makes me cringe...
I'm pretty sure this is basically wrong. Assembly can in theory be smaller and faster, but in practice modern compilers are good enough that maybe only an expert is going to do a better job, and with much more work.
God dang video game Ads, I'm trying to watch a video about video games!
But we actually don't how they made Pokemon. How can you say for sure they used assembly? I believe there was a C SDK for gameboy games too.
If you look at the C compiler for the NES, for example, it still requires knowledge of the specific hardware and memory requirements. You'd face the same challenges even if C is easier to write in.
I see thanks for the response, and great video!
*Pokemon Go Unlimited Pokecoins* twitter.com/linda_smith015/status/759040787594162182?v=XGFBtVbBgnM?v=XGFBtVbBgnM
The C compiler you probably know nowadays is unofficial and wasn't even made yet back then when Pokemon was made. (Assuming you are talking about GBDK) Using a high level language such as C on a Gameboy was impractical because the compilers back then were no where near as efficient as the ones we have now.
Memory was also a concern. Assembly took significantly less space than C and ran faster on the CPU. Also, Satoru Iwata used special data compression techniques along with memory alignment to fit Pokemon Gold/Silver on the cartridge.
I was just speculating because Junichi Masuda contributed to some of the programming on the first games and He mentioned on his blog that he studied C programming on Unix. Here my source: www.gamefreak.co.jp/blog/dir_english/?p=27. Also thanks for the response I didn't think about the memory issue. Compilers now are way better.
I normally like this channel, but this video really bothers me. The video goes off on multiple tangents about how "assembly is hard" and "you need to use memory efficiently" which aren't exactly wrong, but devoid of any details that would make them directly relevant to Pokemon Gold and Silver.
She groups C++ with Ruby and Python as high level languages with compilers/interpreters written in C, which is completely wrong for C++. C++ is at about the same level as C (maybe a *tiny bit* higher) and the compiler is usually written in C++.
MIPS is given as an example of assembly because it's what the creator knows, but the Gameboy and Gameboy Color use a 8080/Z80 mix commonly called the SM83 that is arguably much simpler. There was no reason to go into detail about how MIPS instructions are encoded in binary other than pushing the video to 10 minutes and contributing to the "assembly is hard" point by falsely implying that assembly programmers need to know/convert how the instructions are encoded at the binary level.
Another completely irrelevant thing falsely implied by the MIPS analogy is memory alignment/management. The SM83 instruction set does not care about memory alignment at all. You are free to put whatever oddly sized variables and any weird spot you want (in writable memory), which can be exemplified by a Wayback Machine look of the first link in the description. The only time alignment of any kind is needed is for DMA, a faster way to copy large blocks of data, and bank switching. It's also worth noting that the ROM for the Generation 2 games was TWICE THE SIZE as the generation 1 games (1MB for gen 1 and 2MB for gen 2).
I really don't mean to insult Satoru Iwata, and his achievements are still very impressive even with more memory and less limitations than implied in the video, but this video gives almost no specific information and even pushes some false info.
I'm confused as to what this really has to do with Pokemon at all. This is just basically explaining how assembly languages work.
If you really want to learn how Pokemon Gameboy games work, check out our recreated assembly source code:
github.com/pret/pokered
github.com/pret/pokecrystal
I feel sorry for anyone who has to optimise memory usage on that kind of level. A few bytes of memory is not worth the optimisation now. This is a really nice basic overview of ASM and low level memory management by the way. you made it a lot more interesting than my college.
Well I love working with Mega Drive and doing some crazy tricks to save CPU time or memory. Its really fun to look at piece of code, and find a way to make it better.
well in many embedded systems the optimization is worth it.
What happened back then is still going on just in different systems.
i loved this! i’m really into pokémon RBY and GSC glitches and it’s so hard to find a (competently explained) video on how the coding works in the gameboy era pokémon games work. do you know any videos that/could you make a video on how code is recalled in those games / why the game might call code from the wrong areas / how glitches can overwrite code?
interesting video . what I find really intriguing is the comparison in RAM and disk memory size between the modern machines and the 90's devices such as the GBC.
basically, if I'm not mistaken , this means that if someone was to, hypothetically, take up the task of reprogramming a modern game on such a deep level, they would be faced with a task a 100,000 times (or more) bigger than what Iwata did. which is obviously not possible. imo, that's quite some food for thought.......
You can not replicate a game properly on earlier hardware without a lot of sacrifices and quality loss
ᑎᗩTᔕᑌᗰI I wasn't talking about replicating it on earlier hardware, just about the idea of someone going down to a lower programming level to reprogram a game manually the way Iwata did, but in a modern scenario
fishy peril Oh right, sorry. That is 100% possible but will be just more time consuming and will lead to many different incompatability issues. At least if done on PC, its likely easier on consoles as they usually have unchanging hardware specs and operating systems.
ᑎᗩTᔕᑌᗰI well that's what I was talking about. it's possible in theory, but for 1 person to do it would be impossible since there would be incomparably more work to be done.
which is kinda thought provoking to me, since that means that todays programmers are actually a lot further away from understanding how the machines work on a core level, than old school programmers like Iwata were
fishy peril yeah, its really sad that nowadays programmers are so out of touch with the base hardware and actual bits and bytes using the high level languages.
If you ask me, every programmer should learn at least one assembly language and work with one on the level where you end up having to optimize and clean code, as well as optimize memory usage. Too often I have to use bloated applications with memory leaks, poorly written code or they use a ridiculous amounts of memory when its not really needed, just because the programmer behind it does not even think optimization is a thing people do.
Thanks
I wanna know how (a lot of) games works and did tricks WITH THE CODE; HOW WERE WRITTEN THE CODES; HOW THE CODES WORKS!!!
"wow level programming"
I know this video is old, but don't you mean 1 million time bigger on the 4 MB song at 8:30 or so?
Assembly language programming doesn't require knowledge of any circuitry.
and neither are all CPUs MIPS based
The words are like my handwritting.
Actually R/G/B/Y were written in C and converted by an interpreter into Z80 assembly. Crazy right?
Why would anyone dislike this :(
very informative video thank u
i thought they would program on an sdk computer that edited a lot of the game.
5:42 did you get 1 and 2 swapped?
Actually they left some rom banks empty.
What level is notepad batch programming ?
Misleading title. Just talks about assembly and low level programming.
Barely talks about either of those things too, the topics covered are actually not relevant to the gameboy lol.
Wait. MIPS the assembly language? MIPS THE BUNNY??? WHAAAAAAAAAT?????? I personally thought that 6502 was a more user friendly language than MIPS, probably because 6502 was one of the first programming languages I really learnt. Oh welll.
you used c for dreamcast, ps1 and 2, hell even n64, imagine coding 3d htaphics in asm. it would have taken forever. c is still low level and gets compiled in binaries..
May I correct you that c++ is not an interpreted language thus its translated in machine code / assembly at compile time. Basically it happens once and translation has to finish before c++ code can be executed.
Could u make a vid about Ed Boon?
Really ipressive look.
How would it be to honor this man with a small "...from scratch"-Tutorial, where you create a clone (or just proof of concept) of one of his games in SDL/SFML? :)
Try to talk about how Gameboys work... talk about MIPS assembly instead of Gameboy assembly... :/
Exactly... I was facepalming hard when I was watching because of this. But good video otherwise
You know what, nevermind.
And then they fucked things up with the clock bug
Damn. That's crazy.
I have a gba sp now I love it more
Ah good old days when Nintendo and Sony weren't utter shit
Very great video. : D But you said Unity and Gamemaker....no love for Unreal Users? : (
Last I had worked with it was free to use. If you sell your game commercially then they take a cut of the profit up to a certain cap.
I know some of these words
i think you deviate a lot from the main theme , but i still like the video
So it is basically the same like the smallest file on my PC is always 4kb on disk.
Pretty much, but the limitation isn't with the Processor, but in software. Storage devices divide up their addressable space into _blocks_ at the smallest level, and File Systems consequently layout files as a collection of blocks, with files unable to "share" blocks. Older disks use a block size of 512 bytes, while newer ones use 4096 bytes(your '4kB'). Though if you're using NTFS, you can make files
Akriashi Yes. I have used partition programs before, that don't take bytes as input but sectors...
fuck me I am reading for an exam in Operating Systems and reading a book by Tannenbaum about that.
You summed up 5 hours of reading in 5 lines.
I forced myself to learn x86 assembly as my first language (Intel syntax, if you want to know, I'll never understand why you would ever want to use AT&T IMHO)
God, I hate assembly languages for CISC computers so much, you have to memorize 100+ instructions you'll would never actually use...
My first experience was with MIPS. RISC assembly is so romantic and tender. It will take you to dinner, pay for it, then invite you for coffee upstairs and blow you. CISC on the other hand is a sadistic and manipulative bitch with a BDSM fetish.
Wait, 4 bytes = 4 x 1.000.000 bytes, not 4 x 10.000
Damien Doury
4 MB ~= 4 x 1'000,000 bytes
Alejandro García true
This video is a lot of teasing, random rambling, and no substance whatsoever. GG.
Cool
He died
"Very stock photo" hahaha
I loved your explanation but please stop telling people that assembly is hard. It really isn't and the stigma around its difficulty means that a lot of good programmers miss out on the opportunity to enjoy assembly programming.
well from my experience writing in assembly is easy provided that you want to create a simple program.
The major problem that I had is that with all the movement on registers and every single thing taking 2-3 instructions, I could not disengage from that easily and think in a higher level. If I wanted to write something in higher level, like programming the battle ai for example, I would first write it in a higher level language like C and translate into assembly. And that's they way many programs written in assembly were synthesized. They would often write them in C and translate into assembly because compilers were shit back then compared to today's.
Summing up, the hard thing in assembly is that it confines you mentally in registers and instructions.