Fun fact (and of course I can't find the source now... maybe someone with better google-fu than me can): The decimal mode logic is still in the Ricoh chip, just disconnected. The prevailing idea behind this is that they disabled BCD mode to skirt around some patent stuff. The NES CPU *is* a 6502 clone, after all, made by Ricoh and not MOS.
@@NesHacker I don't know if I can link here without it getting flagged, but search the nesdev forums for "Difference between 6502 and 2A03 CPU core" (topic 9813), a thread from early 2013. Yeah, they didn't rip it out to add audio. They literally cut the lines, but kept them there, to avoid needing to pay for patents.
AIUI the BCD mode on the CPU is disabled because MOS had a patent on the particular implementation. The more common method (used in the competing Z80 and Intel's 8088 & 8086 families) was to have a "half-carry" flag that showed when a bit had been carried from the lower nibble to the higher nibble, and the programmer could use that to correct the results of a normal ADD instruction into BCD; the 6502 instead had a BCD mode flag that, when set, would cause the add and subtract instructions to handle the corrections automatically. Ricoh was a "second source" manufacturer of the 6502, which meant they were allowed to manufacture and sell MOS's design*, but the patent meant they would have to pay MOS a licensing fee for the patent, so to avoid that they just disconnected the BCD mode flag and called it a day. A little inconvenient for programmers, but it made it a lot cheaper to produce. Fun fact: the CPU in the sound subsystem of the SNES is also a 6502 derivative, but there the BCD mode was *replaced* with a half-carry flag like the Z80. I have no idea why they bothered since that chip (which was custom made for the SNES) never has to deal with converting numbers to readable form. But there you go. *"Second sourcing" is a common arrangement where the company that designs a chip allows other companies to manufacture it. This is because companies that buy chips don't like to base their designs around a part that could suddenly become unavailable if one manufacturer goes under.
@@NesHackerYep, funny enough all The BCD circuitry is still in the NES CPU. There were maybe four or five small circuit paths cut to just disable it. It's pretty clear they use the same die for the core but just skirted around the patent.
They weren't a second source. Back then ROM masks were not protected by copyright, so Ricoh was free to copy the chip exactly so long as they did not run afoul of patents. It was the smart and correct thing to do.
According to one source, the decimal flag still functions (in the sense that the instructions to set and clear it still work), but it was the adjustment lines in the ALU that were cut. Basically, even when you tried to do a "decimal" addition, the decimal adjustment circuitry was circumvented, so you just got the binary sum anyway.
Also, this fractional damage tracking in the background is super common in games even today. I've spent a lot of time explaining to people that games like Starcraft and Warcraft III do not just use integers. Starcraft uses "fp8" fixed-point binary numbers for many values like HP and energy, while WC3 uses "real" single-precision floating-point numbers (with quirky behavior). A lot of games hide fractions behind user interfaces that only show integers (or for Zelda, half-integers). Heck, this channel has discussed movement in Mario, which hides subpixel positioning behind a display made of whole pixels.
True facts. Fixed point math is a very important concept in game programming so I guess I'm trying to touch upon it from multiple perspectives... All while trying to make a compelling narrative. 😅
the Genesis game Alien Soldier lets you choose between a bar, a hard number, or concealing the value entirely, for each of your health, the ammo for your equipped weapon, and the boss's health. you can choose between a lot of combinations of these three options for a total of 26 combos (which you may find odd as 1 less than would cover every possible combination... i just checked and found out there's a few that just seem like duplicates; i don't know where they differ if at all, and i haven't found information about it when i looked online briefly. famously the game was unfinished as the release was rushed to keep within the genesis' relevancy, so i'm gonna just assume that it's a mistake). the discussion of why Zelda displays health the way it does just reminded me of that for some reason and i always just thought it was kinda neat
It's always a joy to see you're uploading new videos :D In my case you didn't trick me. I've known for a very long time that you give explanations on the subjects you present. For me, this video served as a reminder on how BCD works as well as getting more knowledge on how the NES actually worked. Keep up the great work
It’s really easy, and kinda boring how I did it… I spent four years straight learning how to make them then many many hours putting that knowledge to practice for the video 😂
Love it. 1337 work. Now I kinda wanna play Zelda with pixels for health. 🤠What if that boss dropped... 256 pixels and I had to pick them all up one at a time :P! 🎩
Imagine how devastating it is to learn that you missed the SMB1 record because the flag only drops by 255 subpixels per frame instead of 256 for some reason. You lose a whole frame to a fraction of a pixel that you literally can't see or normally even control. And then losing that one frame makes you miss a cycle, so you actually lose 21 frames. The difference between first place and seventh. Cause they did the flag movement weird. (Thankfully there is now a very consistent strat for this, but still...)
1:59 While I now know this information, if I were a kid watching this, my mind would've just expanded hugely. That was a cool way to put how 8-bit generally works
I was wondering a while back, and I guess still sometimes wonder, about the origin of "score inflation." Games where scores are larger than they need to be for no apparent reason. Tennis is perhaps the silliest example of this (and there are numerous theories about where it comes from), but the first time I could find it happening among lots of related games was in card games in the late 19th century. This may have developed out of contract bridge, which has an incomprehensible scoring system. In particular, all scores are multiples of 10, while people usually gambled in units of 10 or 100 points. There is an actual explanation though. Bridge scoring was once even more complicated, and the points were all different (e.g. 6/7/8/9 points per trick for clubs/diamonds/hearts/spades). The current score is a result of a simplification, and the extra 0 was left on for consistency with older scoring. (Also, wealthy people did regularly bet a penny a point, which might have contributed.) I wonder how many other games have similarly satisfying explanations. Does Ski-Ball have a good reason for its inflated scores? Or is the extra 0 just exciting? What about Mario? They had to dedicate a whole extra sprite for 00 and logic to handle it. They felt that extra 0 mattered somehow. But why? Just cause bigger is better?
Fun fact: Nintendo actually disabled the BCD mode due to the fact that the 65xx processor family was owned by Commodore, and they disabled it as a way to avoid patent infringement. But the APU theory is valid as well. And glad to see another video from you!
The relevant patent (US3991307A) was owned by MOS Technology, not Commodore International. The whole chip was created by MOS Technology, but presumably Ricoh could reduce cost by circumventing that particular patent.
@@EebstertheGreat Commodore purchased MOS in 1976. Even though MOS was a subsidiary, it's not wholly inaccurate to say Commodore. The same way many people call new Star Wars works by the parent company "Disney" even though Lucasfilm is still a subsidiary and still puts their name, not Disney's, on Star Wars.
@@EebstertheGreatThat is correct, though around that time MOS was owned by Commodore International (I'm pretty sure, i may be incorrect though. If I am please do let me know :))
@@lolodiculous Dang, you're right. Although MOS Technology was a private company in 1975 when it made the 6502, Commodore International bought it the next year.
Having the actual value of the heart stored as a separate value is also a trick akin to how they stored values to the right of the decimal point. Today we use floating-point variables, but back then they used fixed-point variables. They'd use a whole integer to represent the fractional values, which mathematically would work just like a whole number, but they treat it as if it were a fraction. It makes a lot of sense in this face, because it is literally tracking what fraction of the heart the player has.
Another reason for the weird version of the 6502 is licensing. With it modified how it is, they would have to pay for a license to use a 6502 to commodore.
Pretty sad that in the 80s Nintendo cut processor lines to avoid paying for patent infringement and now they're suing someone else using patents they filed after the competitor's game was announced.
I remember working with BCD on the TI-83+ family of calculators. It uses a Zilog Z80 family CPU regardless of model, and the operating system uses BCD quite extensively! It also is just as handy for games on that arcane hardware as it ever was for its older siblings 😁
Nuh uh. The BCD macroblock on the 6502 was PATENTED. Ricoh did not have a license from MOS to fabricate the 6502, so they copied it, deleting the BCD circuits, which left a sizable hole in the die. When Nintendo came to Ricoh for a chip, this was mentioned, and during negotiations, it was asked if a simple sound circuit could be added.
As for why coins are binary and not BCD, I can't read Nintendo developer minds, but I have some ideas. For one, coins never exceed 100, so they are well within the 127 limit for signed integers the 6502 natively handles. Second, of the things that are BCD, only time is ever "used", as in time-up deaths and extra points for remaining time when clearing a level. Score is just kinda there and is never "used". Coins however, are used during full gameplay (as in not a scripted scene like the level end cutscene) both for extra lives and determining if the invisible 1-up should show up in the first level of each world. Having them in binary makes the code MUCH simpler, and importantly, smaller, in a game that is already pushing NROM storage limits (PRG in CHR). Always enjoy trying to answer the tough questions in your videos!
The removal of the decimal mode and the audio processing capability are almost certainly unrelated. If you look at a die of the 2a03 (the NES cpu) there more or less intact 6502 core in one of the quadrent, and the rest is the audio and additional I/O. The decimal circuitry is still there, just physically cut down to be disabled. We don't know why ricoh did this, but the most popular guess is for patent reasons. It was not necessary to make room or free resources for the APU.
This is a good series, thanks. I have been playing with PC Engine / Turbografx16 development for a while. It is a lot like the NES but you have a bit more power and flexibility, but it's still quite a simple system overall.
Funny that you didn't get into more explanation of hexadecimal. With 8-bit computers like this, you learn why a "single-memory" value can be from 0 - 255 [00 - FF] (e.g. the amount of rupees Link has), and a "double-memory" value be from 0 - 65535 [0000 - FFFF] (e.g. experience points in Final Fantasy).
For some reason makes me think of Fire Pro Wrestling where for whatever reason, wrestler attributes, which have a maximum of 10, go up to 253. I figured they'd only be a nybble each to conserve RAM and memory card space. If you go and hack your save file(don't forget to fix the checksums) to give someone 253 in punch, you can make someone who can win a match with a single jab. If you're wondering why 253 is max, there are 0, -1 and -2 states because wrestlers' abilities go down when the body part used for that stat gets injured. For instance, someone with a 1 in punch with a level 3 injured arm will have -2 in punch and strength, and someone with 1 in kick with a level 1 injured leg will actually have 0 in kick. I believe you actually take damage(don't quote me on that) when attacking with a part that is in minus.
I'm guessing points and coins were counted differently since coins maxed out to two digits (1up before 100 is displayed!), and double dabbling takes longer the more digits there are. Plus, points increase more often than coins?
Yo bro I thought you left, 5 months no release is a lot. Maybe you could program a game from scratch and show the public? Would love to see it with your production value. gg
I'm now going to teach my kid about binary. He's 5, and does fractions relatively well. I think I can do this. He's already going on about 1 bit, 2 bit, etc. He knows an EGA display shows 4 bit color (thanks, Gen X dad!)
Not with normal gameplay. That counter is only touched when Mario collects a coin, or when you start a new game. The only way you could do this is by "cheating" with corrupted RAM when warm-booting the console, which could only happen with something like a cartridge swap or hardware manipulation. At least, as far as I know. No ACE for SMB1 (without a cart swap) has been announced.
@@brandonkellner2920 Packed BCD stores 2 decimal digits per 8-bit byte, and unpacked BCD stores 1 decimal digit per byte. Packed BCD requires half the memory, but it often takes longer to unpack the numbers to use them. The NES used both packed and unpacked formats for different purposes, with software for addition and subtraction, but the original 6502 supported hardware addition and subtraction only for packed BCD.
more complicated than you thought it was in 1985
A wee bit 😅
@@mariocraft987 The games seem simple until you see the binary gymnastics they had to perform to make it all work.
Fun fact (and of course I can't find the source now... maybe someone with better google-fu than me can): The decimal mode logic is still in the Ricoh chip, just disconnected. The prevailing idea behind this is that they disabled BCD mode to skirt around some patent stuff. The NES CPU *is* a 6502 clone, after all, made by Ricoh and not MOS.
I remember reading/hearing about that too, but for the life of me cannot remember where.
@@NesHacker LowSpecGamer, "Nintendo's Cheating Console" chapter "When Commodore Investigate Nintendo" Dec 2021.
@@stvmty heck yeah, that's it exactly!
@@NesHacker I don't know if I can link here without it getting flagged, but search the nesdev forums for "Difference between 6502 and 2A03 CPU core" (topic 9813), a thread from early 2013. Yeah, they didn't rip it out to add audio. They literally cut the lines, but kept them there, to avoid needing to pay for patents.
@@NesHacker I read this in the book called
"I Am Error"
The Nintendo Family Computer / Entertainment System Platform
by Nathan Altice
You didn't trick me. I wanted to learn math anyways.
I just learned last week in university what is BCD, now I can implement this to a NES Game!
AIUI the BCD mode on the CPU is disabled because MOS had a patent on the particular implementation. The more common method (used in the competing Z80 and Intel's 8088 & 8086 families) was to have a "half-carry" flag that showed when a bit had been carried from the lower nibble to the higher nibble, and the programmer could use that to correct the results of a normal ADD instruction into BCD; the 6502 instead had a BCD mode flag that, when set, would cause the add and subtract instructions to handle the corrections automatically. Ricoh was a "second source" manufacturer of the 6502, which meant they were allowed to manufacture and sell MOS's design*, but the patent meant they would have to pay MOS a licensing fee for the patent, so to avoid that they just disconnected the BCD mode flag and called it a day. A little inconvenient for programmers, but it made it a lot cheaper to produce.
Fun fact: the CPU in the sound subsystem of the SNES is also a 6502 derivative, but there the BCD mode was *replaced* with a half-carry flag like the Z80. I have no idea why they bothered since that chip (which was custom made for the SNES) never has to deal with converting numbers to readable form. But there you go.
*"Second sourcing" is a common arrangement where the company that designs a chip allows other companies to manufacture it. This is because companies that buy chips don't like to base their designs around a part that could suddenly become unavailable if one manufacturer goes under.
Woah knowledge bomb, appreciate it!
@@NesHackerYep, funny enough all The BCD circuitry is still in the NES CPU. There were maybe four or five small circuit paths cut to just disable it. It's pretty clear they use the same die for the core but just skirted around the patent.
They weren't a second source. Back then ROM masks were not protected by copyright, so Ricoh was free to copy the chip exactly so long as they did not run afoul of patents. It was the smart and correct thing to do.
According to one source, the decimal flag still functions (in the sense that the instructions to set and clear it still work), but it was the adjustment lines in the ALU that were cut. Basically, even when you tried to do a "decimal" addition, the decimal adjustment circuitry was circumvented, so you just got the binary sum anyway.
Also, this fractional damage tracking in the background is super common in games even today. I've spent a lot of time explaining to people that games like Starcraft and Warcraft III do not just use integers. Starcraft uses "fp8" fixed-point binary numbers for many values like HP and energy, while WC3 uses "real" single-precision floating-point numbers (with quirky behavior). A lot of games hide fractions behind user interfaces that only show integers (or for Zelda, half-integers). Heck, this channel has discussed movement in Mario, which hides subpixel positioning behind a display made of whole pixels.
True facts. Fixed point math is a very important concept in game programming so I guess I'm trying to touch upon it from multiple perspectives... All while trying to make a compelling narrative. 😅
the Genesis game Alien Soldier lets you choose between a bar, a hard number, or concealing the value entirely, for each of your health, the ammo for your equipped weapon, and the boss's health. you can choose between a lot of combinations of these three options for a total of 26 combos (which you may find odd as 1 less than would cover every possible combination... i just checked and found out there's a few that just seem like duplicates; i don't know where they differ if at all, and i haven't found information about it when i looked online briefly. famously the game was unfinished as the release was rushed to keep within the genesis' relevancy, so i'm gonna just assume that it's a mistake). the discussion of why Zelda displays health the way it does just reminded me of that for some reason and i always just thought it was kinda neat
It's always a joy to see you're uploading new videos :D
In my case you didn't trick me. I've known for a very long time that you give explanations on the subjects you present. For me, this video served as a reminder on how BCD works as well as getting more knowledge on how the NES actually worked. Keep up the great work
Bro, HOW DID YOU MAKE ALL THESE GRAPHICS FOR THE VIDEO, THEY ARE AMAZING!!
Excellent video too!
It’s really easy, and kinda boring how I did it… I spent four years straight learning how to make them then many many hours putting that knowledge to practice for the video 😂
@NesHacker Any chance you have or can make a blogpost on the tools used and some pointers to get started? Any help is appreciated!
I like all the purple friend sprites c:
His name is Noboru! I introduced the character back in "The Code that Makes Mario Move" and he's great :D
Love it. 1337 work. Now I kinda wanna play Zelda with pixels for health. 🤠What if that boss dropped... 256 pixels and I had to pick them all up one at a time :P! 🎩
Imagine how devastating it is to learn that you missed the SMB1 record because the flag only drops by 255 subpixels per frame instead of 256 for some reason. You lose a whole frame to a fraction of a pixel that you literally can't see or normally even control. And then losing that one frame makes you miss a cycle, so you actually lose 21 frames. The difference between first place and seventh. Cause they did the flag movement weird. (Thankfully there is now a very consistent strat for this, but still...)
That is so neat, learning about the math that goes on behind the scenes in your favorite NES games.
1:59 While I now know this information, if I were a kid watching this, my mind would've just expanded hugely. That was a cool way to put how 8-bit generally works
I was wondering a while back, and I guess still sometimes wonder, about the origin of "score inflation." Games where scores are larger than they need to be for no apparent reason. Tennis is perhaps the silliest example of this (and there are numerous theories about where it comes from), but the first time I could find it happening among lots of related games was in card games in the late 19th century. This may have developed out of contract bridge, which has an incomprehensible scoring system. In particular, all scores are multiples of 10, while people usually gambled in units of 10 or 100 points.
There is an actual explanation though. Bridge scoring was once even more complicated, and the points were all different (e.g. 6/7/8/9 points per trick for clubs/diamonds/hearts/spades). The current score is a result of a simplification, and the extra 0 was left on for consistency with older scoring. (Also, wealthy people did regularly bet a penny a point, which might have contributed.) I wonder how many other games have similarly satisfying explanations. Does Ski-Ball have a good reason for its inflated scores? Or is the extra 0 just exciting? What about Mario? They had to dedicate a whole extra sprite for 00 and logic to handle it. They felt that extra 0 mattered somehow. But why? Just cause bigger is better?
In the arcades the bigger numbers had a psychological factor. It's all about dropping the quarters and the dopamine.
Fun fact: Nintendo actually disabled the BCD mode due to the fact that the 65xx processor family was owned by Commodore, and they disabled it as a way to avoid patent infringement. But the APU theory is valid as well. And glad to see another video from you!
The relevant patent (US3991307A) was owned by MOS Technology, not Commodore International. The whole chip was created by MOS Technology, but presumably Ricoh could reduce cost by circumventing that particular patent.
@@EebstertheGreat Commodore purchased MOS in 1976. Even though MOS was a subsidiary, it's not wholly inaccurate to say Commodore. The same way many people call new Star Wars works by the parent company "Disney" even though Lucasfilm is still a subsidiary and still puts their name, not Disney's, on Star Wars.
@@EebstertheGreatThat is correct, though around that time MOS was owned by Commodore International (I'm pretty sure, i may be incorrect though. If I am please do let me know :))
@@lolodiculous Dang, you're right. Although MOS Technology was a private company in 1975 when it made the 6502, Commodore International bought it the next year.
@@EebstertheGreat I never figured out WHY they were bought though. But yeah, good discussion :)
Wow. That was the cleanest way to throw an ad in! Well done!
Having the actual value of the heart stored as a separate value is also a trick akin to how they stored values to the right of the decimal point. Today we use floating-point variables, but back then they used fixed-point variables. They'd use a whole integer to represent the fractional values, which mathematically would work just like a whole number, but they treat it as if it were a fraction.
It makes a lot of sense in this face, because it is literally tracking what fraction of the heart the player has.
Damn it, you trickster! I didn't want to learn math willingly!
Muahahaha
Another reason for the weird version of the 6502 is licensing. With it modified how it is, they would have to pay for a license to use a 6502 to commodore.
And yet nowadays Nintendo licenses technologies from companies like Microsoft, Epic Games, and Unity.
Pretty sad that in the 80s Nintendo cut processor lines to avoid paying for patent infringement and now they're suing someone else using patents they filed after the competitor's game was announced.
It's almost as if corporate entities have no shame
Always makes my day when you release a new video. This was a really fun topic to cover. Great work!
Thanks so much, hopefully I won’t keep you waiting too long for the next one 😊
This was fantastic, so good to see you back. Can't wait to see what's next (but I gladly will!)
I remember working with BCD on the TI-83+ family of calculators. It uses a Zilog Z80 family CPU regardless of model, and the operating system uses BCD quite extensively! It also is just as handy for games on that arcane hardware as it ever was for its older siblings 😁
I think my next video is going to feature a little bit on Z80, keep an eye out for it :)
Nuh uh.
The BCD macroblock on the 6502 was PATENTED.
Ricoh did not have a license from MOS to fabricate the 6502, so they copied it, deleting the BCD circuits, which left a sizable hole in the die.
When Nintendo came to Ricoh for a chip, this was mentioned, and during negotiations, it was asked if a simple sound circuit could be added.
1:17 "Leet", elite. I'm with you bro. HPAVC for life.
As for why coins are binary and not BCD, I can't read Nintendo developer minds, but I have some ideas. For one, coins never exceed 100, so they are well within the 127 limit for signed integers the 6502 natively handles. Second, of the things that are BCD, only time is ever "used", as in time-up deaths and extra points for remaining time when clearing a level. Score is just kinda there and is never "used". Coins however, are used during full gameplay (as in not a scripted scene like the level end cutscene) both for extra lives and determining if the invisible 1-up should show up in the first level of each world. Having them in binary makes the code MUCH simpler, and importantly, smaller, in a game that is already pushing NROM storage limits (PRG in CHR).
Always enjoy trying to answer the tough questions in your videos!
The removal of the decimal mode and the audio processing capability are almost certainly unrelated. If you look at a die of the 2a03 (the NES cpu) there more or less intact 6502 core in one of the quadrent, and the rest is the audio and additional I/O. The decimal circuitry is still there, just physically cut down to be disabled. We don't know why ricoh did this, but the most popular guess is for patent reasons. It was not necessary to make room or free resources for the APU.
Great video, recently seen the one by displaced gamers on Tetris, similar stuff. Good job ! Thanks
thanks for share!!
Glad you enjoyed it! 😁
This is a good series, thanks. I have been playing with PC Engine / Turbografx16 development for a while. It is a lot like the NES but you have a bit more power and flexibility, but it's still quite a simple system overall.
Love the videos man! Keep them coming! ❤
You got it!
You’ve nurtured this audience! You should know us better than to think you’ve tricked us into learning at this point. 😉
Man, that hits different. I am glad I am able to help people learn like this, it's really a lot of fun :)
Amazing ! as always
Thank you! 🙏
That “double dabble” logo is great
DABBLED!
Funny that you didn't get into more explanation of hexadecimal. With 8-bit computers like this, you learn why a "single-memory" value can be from 0 - 255 [00 - FF] (e.g. the amount of rupees Link has), and a "double-memory" value be from 0 - 65535 [0000 - FFFF] (e.g. experience points in Final Fantasy).
I kinda have to pick my battles and stay focused or I'll end up with 10 hour videos that are impossible to produce 😆
@@NesHacker It's best to know this when hacking with the Game Genie =)
For some reason makes me think of Fire Pro Wrestling where for whatever reason, wrestler attributes, which have a maximum of 10, go up to 253. I figured they'd only be a nybble each to conserve RAM and memory card space. If you go and hack your save file(don't forget to fix the checksums) to give someone 253 in punch, you can make someone who can win a match with a single jab.
If you're wondering why 253 is max, there are 0, -1 and -2 states because wrestlers' abilities go down when the body part used for that stat gets injured. For instance, someone with a 1 in punch with a level 3 injured arm will have -2 in punch and strength, and someone with 1 in kick with a level 1 injured leg will actually have 0 in kick. I believe you actually take damage(don't quote me on that) when attacking with a part that is in minus.
I'm guessing points and coins were counted differently since coins maxed out to two digits (1up before 100 is displayed!), and double dabbling takes longer the more digits there are. Plus, points increase more often than coins?
Is this method an alternative to Ben Eater's method, right? Are there any other methods?
Glad to see a new video, very well made
Thank you, and yeah I’m already working on the next one 😊
Good video. It would be nice to see you talking about audio with the NES 🙏
Yo bro I thought you left, 5 months no release is a lot. Maybe you could program a game from scratch and show the public? Would love to see it with your production value. gg
Yeah I wish I would have posted more too... Life sometimes gets in the way of a good UA-cam schedule. 🤓
Another great video, thanks!!
For sure :D
Love the videos and the TWRP shirt! keep up the good work!!
I feel like they're exactly the band you'd expect me and my audience to enjoy 🤣
....So hearts in Zelda work the same way power gaugevin Super Mario 64, it's a large amount of hit points hidden and shown with graphics.
you should do more videos. Very nice content
That's the idea 😅
Great video!
Thanks!
7:50 jokes on you I came here for the math
I'm now going to teach my kid about binary. He's 5, and does fractions relatively well. I think I can do this. He's already going on about 1 bit, 2 bit, etc. He knows an EGA display shows 4 bit color (thanks, Gen X dad!)
Wonder what is making you more happy, getting over 100k subs or the Detroit Lions???
Let's just say it's been a very good fall :)
Converting the coins like that is wild. Seems like you could hack the game by changing that code …with gameplay? 🤔
Not with normal gameplay. That counter is only touched when Mario collects a coin, or when you start a new game. The only way you could do this is by "cheating" with corrupted RAM when warm-booting the console, which could only happen with something like a cartridge swap or hardware manipulation. At least, as far as I know. No ACE for SMB1 (without a cart swap) has been announced.
"I tricked you"
No, you didn't. I am a computer programmer, this is exactly what I came here for!
ok but how does the game determine how many hearts to display at a given time
divide the life total by the number of hearts x 2, drop the remainder and run an algorithm to display the correct sprites
Ah yes, the dope chiptune processor, the real reason why the NES has better music than the Sega Master System.
On IBM machines, it's called packed decimal. I'm not sure why it has a different name since it appears to be the same thing.
SMB does not use packed decimal, becuase it is easier to access the number unpacked.
@@enochliu8316 I was talking about how they don't call it BCD
@@brandonkellner2920 Packed BCD stores 2 decimal digits per 8-bit byte, and unpacked BCD stores 1 decimal digit per byte. Packed BCD requires half the memory, but it often takes longer to unpack the numbers to use them. The NES used both packed and unpacked formats for different purposes, with software for addition and subtraction, but the original 6502 supported hardware addition and subtraction only for packed BCD.
@@EebstertheGreat Maybe I should repeat myself? IBM doesn't call it BCD. They call it packed decimal.
@@brandonkellner2920 No, IBM calls packed BCD "packed decimal." They do not call unpacked BCD "packed decimal." Cause it's unpacked.
Does Bubble Bobble use Double Dabble?
Undoubtedly, and that fact is just wonderful 🤣
Cheers great video
hah you thought you tricked me, but in fact I tricked YOU into making quality content because I subscribed to you! muahaha, my evil scheme is working
Dang, imagine how "got" I would be if you told everyone you knew and got them to subscribe too...
Damn it! I almost learnt something.
Almost?! I'm clearly not doing my job... 😅
@NesHacker It's not your fault. I'm old and learning impaired.
Keep it up. This was very interesting.
next do how zelda 1 maps are generated. its the worst
So you want me to spread the pain, eh? 🤣
That just bothers me that your name doesn't capitalize "nes"
Yeah, but camel case makes it easier to read.
the transition to the ad read was BRILLIANT! Great video.
Yeah I was pretty proud of that one :)
are you 1337?
Sadly, no... but I aspire to be!
Lol
I've been tricked!