How NES Games Are STILL Made in 40KB

  Рет қаралды 86,704

Inkbox

Inkbox

Ай бұрын

The Nintendo Entertainment System (released as the Family Computer in Japan) is the world's most iconic home game console. With a Ricoh 2A03 CPU based on the popular MOS 6502, it had 2KB of RAM, 2KB of VRAM, and with the built in Picture Processing Unit and Audio Processing Unit, was used to run some of the world's most popular games ever released.
Although early NES games were design for 40KB cartriges (32KB of PRG ROM and 8KB of CHR ROM), later advancements led to larger chips being used, and more game content being added, but the system itself remained the same. In order to bridge this gap, Mapper Chips were developed to allow the system access to certain parts of the PRG or CHR ROM sections.
I've created a new NES title to show how programming an NES game from scratch can be accomplished. No Internet for the NES is available now: notin.tokyo/nointernet
Development help:
www.nesdev.org/wiki/Nesdev_Wiki
Further reading:
www.copetti.org/writings/cons...

Пікірлер: 208
@soryabuscompany
@soryabuscompany Ай бұрын
I've never seen a more thorough technical explanation of the NES in such a short time
@gblargg
@gblargg Ай бұрын
Came here to say that as well. It sounds like it will be a quick gloss over, but then covers the important conceptual details of how subtle things like split-screen scrolling work. Well-done.
@Arcad3n
@Arcad3n Ай бұрын
The game boy color has one of my all time favorite visual styles for a retro console. Games like Mina the Hollower demonstrate how great it looks, it’s so appealing! Excited for that episode.
@ego-lay_atman-bay
@ego-lay_atman-bay Ай бұрын
The end really caught me off guard. It was such a scott the woz ending.
@itskdog
@itskdog Ай бұрын
*3D Dot Game Heroes
@ego-lay_atman-bay
@ego-lay_atman-bay Ай бұрын
@@itskdog Yeah, I know, but I feel like that song is most commonly associated with scott the woz.
@Therap3
@Therap3 Ай бұрын
​@@itskdogwow I had no idea it was from that game. Thanks!
@dagaffalads
@dagaffalads 23 күн бұрын
A Scott vid was recommended after this lol
@JadeLombax
@JadeLombax Ай бұрын
I got into coding super tiny games a few years ago. I've made scaled-down Mario & Zelda games in about 1KB, working on some ideas for Metroid.
@InkboxSoftware
@InkboxSoftware Ай бұрын
That's sounds way cool, do you have any stuff I can check out?
@JadeLombax
@JadeLombax Ай бұрын
​@@InkboxSoftwareI have an Itch page w/ some of my games (Jadelombax is my username there), tried to post a link, but KZbin keeps deleting my responses.
@themadmallard
@themadmallard Ай бұрын
1kb? what platform are they made for?
@JadeLombax
@JadeLombax Ай бұрын
​@@themadmallard Been using Pico-8 due to its ease of use and short syntax. It's not assembly, but things can still get crazy cryptic when you're optimizing bytes.
@s3rverlord
@s3rverlord Ай бұрын
You can imagine that game in your brain and play it.
@bassguitarbill
@bassguitarbill Ай бұрын
I love your NES videos, but as I actually have a bit of experience programming on the DMG, I'm looking forward even more to your future projects!
@stefanmilicevic5322
@stefanmilicevic5322 Ай бұрын
The amount of effort you put into each programming project is truly inspiring. Keep up the great work!
@essayharper
@essayharper Ай бұрын
The way the Famicom/NES handles data will never fail to amaze me
@StereoMadnessss
@StereoMadnessss Ай бұрын
Assembly is just amazing really on how small its code can be when it's compiled
@williamdrum9899
@williamdrum9899 Ай бұрын
6502 in particular is tiny. Most modern cpus use 4 bytes per instruction at all times but we have much more room now so it hardly matters. NES code size is mostly negligible when it comes to file size. It's the data tables that hog the most cartridge space
@bradallen8909
@bradallen8909 Ай бұрын
Assembly isn’t compiled. It’s assembled.
@rethardotv5874
@rethardotv5874 Ай бұрын
Shouldn’t be C with modern compilers as efficient as writing assembly?
@rya3190
@rya3190 Ай бұрын
​​@@rethardotv5874If you cut out bigger libraries (or go without a standard), and remove the elf file cushions, you can get C down to assembly sized programs. A guy made a QR-based snake game a little while back and was finding his assembly program was larger than his trimmed down C. edit: I should probably note, this is likely due to the optimization for a very common architecture, x86. I'm not sure how efficient one for say the 6502, PowerPC, or Risc-v would be...
@Roid33
@Roid33 Ай бұрын
Scott the Woz outro whatt
@shinyagumon7015
@shinyagumon7015 Ай бұрын
My guess is black magic or programming if there's a difference between the two 😂
@error.delete4945
@error.delete4945 Ай бұрын
a great programmers code is like a master close up magicians act: nothing flashy under the surface, super efficient and seamless. The average programmers code is like a magician you hired last minute for your kids birthday party: it kind of works sometimes but is otherwise a total mess of copied tricks and a pigeon in a hat, and the pigeon is dead and useless but they kept it in the act anyway.
@dacueba-games
@dacueba-games Ай бұрын
"Is this too much voodoo?"
@angeldude101
@angeldude101 Ай бұрын
As a programmer and self-proclaimed sourcerer, no; there isn't a difference.
@designator7402
@designator7402 Ай бұрын
​@@error.delete4945 I will not remove the KillPidgeon() method from my code, no matter who the IRS sends!
@KertaDrake
@KertaDrake Ай бұрын
Simply speak the binary incantations and technomagic will occur. You use hex for hexes, of course.
@FloatingSunfish
@FloatingSunfish Ай бұрын
The NES will always be my favorite console. It helped save the video game industry!
@alexandredecarvalho4357
@alexandredecarvalho4357 Ай бұрын
We need more of these!! :D thank you for your explanations!
@famitronic9870
@famitronic9870 Ай бұрын
This is one of the best summarized explanations on how to build an nes game from scratch that I’ve seen! Thanks for the great video. 👍
@Willfa_
@Willfa_ Ай бұрын
can't wait to see what you do on the gameboy. Love your videos!
@Sinistar1983
@Sinistar1983 Ай бұрын
Can't wait to see what game you make on the GBC. Its a personal favorite of mine to code on as well. And with how awesome GB studio is its now more accessible than ever to work with. And in case you're wondering my GBC game is called Eternal Memory.
@Bobbias
@Bobbias Ай бұрын
It's a shame their visual programming interface is awful though. Makes doing anything reasonably complex a nightmare without learning the actual scripting language.
@Sinistar1983
@Sinistar1983 Ай бұрын
@@Bobbias I don't think its that bad honestly plus it's actually really competent at making more complex games. I've managed to create a pseudo real time reflection using just the stock visual scripting.
@mcleodautomation
@mcleodautomation Ай бұрын
Your audio is SOO good - keep it up! Love the dry mic sound tbh.
@merman1974
@merman1974 10 күн бұрын
That was a brilliant explanation and a fun game as a result. Great work.
@thechosenone729
@thechosenone729 15 күн бұрын
Amazing video as always thanks for your work.
@huskenator857
@huskenator857 Ай бұрын
Love your videos dude, can’t wait to see you unpack the gameboy color. Also Scott The Woz jump scare
@MoustiluigiRandom
@MoustiluigiRandom Ай бұрын
Amazingly well explained.
@Holital
@Holital Ай бұрын
Yooooo I love your channel!!!
@Controllerhead
@Controllerhead Ай бұрын
What a wonderful explanation, sure with i had this video when i started years ago. Great work!!!
@1008md
@1008md Ай бұрын
That was amazing. I didn’t understand a lot but was still mesmerized!
@skRapKlan
@skRapKlan Ай бұрын
Nice work! Thanks for the cool video!
@williamdrum9899
@williamdrum9899 Ай бұрын
Later games used "bank switching" to fit more code/data than the NES's 64k address space would typically allow
@mukulnag1578
@mukulnag1578 Ай бұрын
This is amazing... As some how now works closely with cpu hardware and firmware learning about the limitation that we went through is fascinating... And i see how some of the stuff/limitations from 90 is till there in mordern cpu... We just find more ways to go around them
@Adiee5Priv
@Adiee5Priv Ай бұрын
Sidenote: Image data is NOT loaded into vram, PPU reads image data directly from chr rom, that's why image data is stored in a separate chip from program itself
@ricarleite
@ricarleite Ай бұрын
But vram stores the pallet and table name information doesn't it
@Adiee5Priv
@Adiee5Priv Ай бұрын
@@ricarleite yes, but that's something else
@ricarleite
@ricarleite Ай бұрын
@@Adiee5Priv I mean he didn't claim vram stores a bitmap representation of the screen
@Adiee5Priv
@Adiee5Priv Ай бұрын
@@ricarleite ah, yes, i was reffering to a one scene, where it was visualised that way, but it seems like i didn't include the timestamp
@Squigdude13
@Squigdude13 Ай бұрын
went from a random recommended video to wanting to get one of those romhack carts from back in the day you could load games onto
@golvellius6855
@golvellius6855 Ай бұрын
Incredible😮 i learned a lot in this video❤❤❤
@cdkw2
@cdkw2 13 күн бұрын
I would love to see the gbc videos, good luck!
@IraKane
@IraKane Ай бұрын
I have been programming games for over 10 years now, C#, gdscript and back in the days of the NES I programmend in BASIC using an MSX....but I'm nobody! You are my hero!🤪
@aplanebagel
@aplanebagel Ай бұрын
Well explained !
@RareSun
@RareSun Ай бұрын
Can't wait to watch the episode where you program a 3D Mario for the GameCube in 10 years.
@EWARS_2
@EWARS_2 Ай бұрын
Scott the Woz outro?! (Breakout?)
@dinaariaudio4944
@dinaariaudio4944 Ай бұрын
ive been making a 32kb game for pico-8 and now i appreciate the wizardry that is needed to truly craft something playable within the limitations
@spg3331
@spg3331 Ай бұрын
Loved playing the game boy color as a kid!
@codeway4374
@codeway4374 Ай бұрын
Nice vid !
@ehippo1
@ehippo1 Ай бұрын
Nice video ❤
@jumbledfox2098
@jumbledfox2098 Ай бұрын
What an epic video!
@intangiblematter_misc
@intangiblematter_misc Ай бұрын
I wasn't going to comment, just a really solid video. Then the Scott the Woz ending whiplash hit
@Mobik_
@Mobik_ Ай бұрын
The good thing about the GBC is that you can actually use cool things, like C instead of Assembly. I did the iconic DVD bouncing logo and made it run into original hardware (GBC and GBA)
@InkboxSoftware
@InkboxSoftware Ай бұрын
You can use C for the NES, too, I just prefer assembly
@FernieAriel
@FernieAriel Ай бұрын
1:40 that’s the music from Goal 2, one of the best soccer games of all time. I’d recognize it anywhere.
@maazali6283
@maazali6283 Ай бұрын
Your my inspiration to become a better programmer
@OmeedNOuhadi
@OmeedNOuhadi 6 күн бұрын
Congratulations!
@anon_y_mousse
@anon_y_mousse Ай бұрын
If you were using C, it'd be awesome to have a C23 compliant compiler to handle resource embedding. Towards that end, the oscar64 project intrigues me. It's intended for the C64, but it shouldn't be too difficult to modify it for other 6502 based systems.
@deltapi8859
@deltapi8859 Ай бұрын
beautiful svg art in the video.
@VideoGamer945
@VideoGamer945 Ай бұрын
I learned something today!
@Guilhermeabcd
@Guilhermeabcd Ай бұрын
loved it!
@alexela_
@alexela_ Ай бұрын
Am I on time?! I'm enjoying it already
@Tavg123
@Tavg123 Ай бұрын
great video
@HollowProject
@HollowProject Ай бұрын
Yay! Waiting for GBA videos!
@adryanlucas096
@adryanlucas096 Ай бұрын
Clicked as soon as i saw the notification 🔥🔥🔥🔥🔥 ur videos are always the best!
@NegaafellagaTV
@NegaafellagaTV Ай бұрын
Really cool!
@sippingthepeachsoda
@sippingthepeachsoda Ай бұрын
seems like the audio was fit into 40 kilobytes too😂😂
@bootime265
@bootime265 Ай бұрын
time for a cool video
@eboatwright_
@eboatwright_ Ай бұрын
Very cool!
@Mrwaffles-gr3so
@Mrwaffles-gr3so Ай бұрын
I totally understood everything.
@ShinoSarna
@ShinoSarna Ай бұрын
You inspired me to try to make a version of Minecraft for NES.
@Clancydaenlightened
@Clancydaenlightened Ай бұрын
Hint they didn't do it with only 32k rom and ppu rom Kirby on nes was around a 1megabyte cartridge
@taagoallas3336
@taagoallas3336 Ай бұрын
It's always a good day when Inkbox uploads!
@user-fu1dp3xl9t
@user-fu1dp3xl9t 25 күн бұрын
would you be willing to do a video with an in depth explanation of mappers? I've been digging around on nes games that are over 40kb, but I'm having trouble grasping the concept
@InkboxSoftware
@InkboxSoftware 25 күн бұрын
I've mentioned mappers in this video here: kzbin.info/www/bejne/gpeUm5iobd5phsU Basically a mapper facilitates bank switching, where a section of memory can be switched out for another portion of memory from the cartridge.
@coolbrotherf127
@coolbrotherf127 Ай бұрын
It's so cool that Nintendo invented golf.
@Mobik_
@Mobik_ Ай бұрын
Scott the Woz?! Is that you at the end?!
@ChaossX7
@ChaossX7 Ай бұрын
Real original ending music.
@lafcursiax
@lafcursiax Ай бұрын
What a great idea for a homebrew NES game! It would have been cool if a game like this had been built into the NES so we could have played something even without a cartridge inserted. I wonder how feasible it would be for someone to hack that feature into an NES...
@cube2fox
@cube2fox Ай бұрын
Now I'm really interested in the difference between NES and GBC. Especially black cartridge games look quite similar to NES games, apart from the resolution.
@KingF-hi4wg
@KingF-hi4wg Ай бұрын
I’d like to see this guy cover sega master system homebrew
@cdkw2
@cdkw2 13 күн бұрын
3:56 I wouldn't be surprised if they were morse code lol
@tomyyoung2624
@tomyyoung2624 Ай бұрын
Yes internet!
@hirschlord341
@hirschlord341 Ай бұрын
Pls can you review the megaman 2 ,3 and ducktales architecture ?
@9a3eedi
@9a3eedi Ай бұрын
You'd be surprised by how much you can do if you have a couple of kilobytes of storage space, if you just didn't have any of the bloat of modern software
@DerKlemm-Crafter
@DerKlemm-Crafter Ай бұрын
You are one of the best programmers I have ever seen, though I don't understand much😅
@mwk1
@mwk1 Ай бұрын
Szanuję! 😎
@fredharding5087
@fredharding5087 Ай бұрын
I had very little understanding of anything in this video but enjoyed it all the same
@Storin_of_Kel
@Storin_of_Kel Ай бұрын
Explain to us how Final Fantasy on the NES was made in only 40 KB please
@mathchessdnd
@mathchessdnd Ай бұрын
Inkbox forgot to mention memory mappers. I'm dumb, so please accept this attempt: 40KB is the "working memory" of the NES. Final Fantasy had something like 256KB of data. Games could hold more data, as long as they had a mechanism to control what part of data the NES could see (called something like a "memory mapper chip".) The NES can only see 40KB at once, but the game decides what 40KB its seeing. It's like having some books open on your desk -- When your desk is full, you can put away one book to make room for another. For instance, the overworld might be handled by one "book" with instructions to handle camera movement and entering caves/towns. Going from the overworld into a battle, it could put away "the overworld book" to open "the battle book" with instructions to process battles and display monsters.
@flameofthephoenix8395
@flameofthephoenix8395 Ай бұрын
@@mathchessdnd Towards the end of the video he did mention this.
@MarkRayers
@MarkRayers 7 күн бұрын
Super mario bros was made in assembly and most of the prg rom isnt full because compiled assembly code isnt that big and they moved the compiled assembly to the rom and they made sure it didnt go to the blank prg area so that is how super mario bros was made in 40k (a lot of the rom is 0s) Thank you for reading.
@chobies5383
@chobies5383 Ай бұрын
SCOOT THE WOZ OUTRO MUSIC?
@modlich_303
@modlich_303 Ай бұрын
what about the Minecraft? since you are moving on from NES, and that Minecraft is on NES, what's gonna be with that?
@FordTransitvan
@FordTransitvan Ай бұрын
Very interesting but also too complicated for me, love it though
@deltapi8859
@deltapi8859 Ай бұрын
what language is the source code shown? never seen if and endif in assembly.
@johneygd
@johneygd Ай бұрын
No mentioning why 40KB games are still made by homebrewers,except at how nes games are made along with some history behind it,mmmm.
@enderben2805
@enderben2805 16 күн бұрын
eyyyy I love this topic
@jonsena1373
@jonsena1373 7 күн бұрын
are you still working on the 8 bit minecraft project?
@PanoptesDreams
@PanoptesDreams Ай бұрын
Restrictions birth creativity
@LettersAndNumbers300
@LettersAndNumbers300 Ай бұрын
What about a game like Shadowgate? How did they fit that?
@minirop
@minirop 6 күн бұрын
golf on mars has been demaked on the NES? 😲
@chrisray9653
@chrisray9653 Ай бұрын
Before the libraries of 50k lines of code that put a dialogue screen up.
@maxasaurus3008
@maxasaurus3008 Ай бұрын
When I saw the no internet screen I was certain it was a segue to a vpn commercial
@aze4308
@aze4308 Ай бұрын
nice
@potatogameryt
@potatogameryt Ай бұрын
Wait is it actually 60 frames per second for a CRT? I thought it was 24?
@dstyKchp
@dstyKchp Ай бұрын
Notification squad where u at
@geckoo9190
@geckoo9190 Ай бұрын
What?, the controller data in the nes is a fkn byte?, that knowledge would have saved me a lot of troubles back in the days when I spent hours trying to fix my controllers.
@InkboxSoftware
@InkboxSoftware Ай бұрын
Actually, the controller is polled and relays each button's current state in a sequence. That process takes quite a few clock cycles, but you can take that sequence and fit it all on one byte for reference.
@nunyabeeznutz5286
@nunyabeeznutz5286 Ай бұрын
Fun fact you know what is also 40 KB? the maximum allowed size for metadata for images. Hmm makes you think...
@flamshiz
@flamshiz Ай бұрын
but how did they fit all the data into 4k??
@ErdrickHero
@ErdrickHero Ай бұрын
I hope you're not just using GB Studio. A channel like this needs real programming.
@InkboxSoftware
@InkboxSoftware Ай бұрын
I've doing it all in assembly for now, but I might use some music tools later since making music for these machines is like writing a whole program on its own
@chrishuta7027
@chrishuta7027 Ай бұрын
What happened to the audio quality?
@SendFoodz
@SendFoodz Ай бұрын
I feel like that open license ending music is unwritten-rule copyrighted lol
@the_box13
@the_box13 Ай бұрын
And he uses Scott the Woz outro
@champion_ofcloud-var
@champion_ofcloud-var Ай бұрын
i heard it
@enderbo
@enderbo Ай бұрын
why is the audio very compressed
@mrfun216
@mrfun216 Ай бұрын
Can you make this game for the Atari 2600?
@InkboxSoftware
@InkboxSoftware Ай бұрын
Sure, why not?
@mrfun216
@mrfun216 Ай бұрын
@@InkboxSoftware will you do it in a video?
@InkboxSoftware
@InkboxSoftware Ай бұрын
No, I've never touched the Atari 2600
@mrfun216
@mrfun216 Ай бұрын
@@InkboxSoftware you could use a tutorial like Truttle1 did
@retroboi128thegamedev
@retroboi128thegamedev Ай бұрын
@@mrfun216 i can't believe that truttle1's video on the atari came out only like less than a day before this video came out
Programming Temple Run for the Game Boy
16:27
Inkbox
Рет қаралды 45 М.
I Made Fruit Ninja Into a REAL 8-Bit NES Game
11:03
Inkbox
Рет қаралды 252 М.
ISSEI funny story 😂😂😂Strange World 🌏 Green
00:27
ISSEI / いっせい
Рет қаралды 81 МЛН
Điều cuối cùng mẹ có thể làm cho con || Sad Story  #shorts
01:00
Иран ударил по израильскому аэропорту
00:14
TRT на русском
Рет қаралды 3,7 МЛН
This 1990 NES Soundtrack Just BLEW Me Away
13:29
Charles Cornell
Рет қаралды 210 М.
I built my own 16-Bit CPU in Excel
16:28
Inkbox
Рет қаралды 1,2 МЛН
The best websites for retro fans
17:36
Retro Tech Dreams
Рет қаралды 17 М.
Is 8-Bit Minecraft Possible?
13:56
Inkbox
Рет қаралды 1 МЛН
How Graphics worked on the Super NES | MVG
12:19
Modern Vintage Gamer
Рет қаралды 475 М.
I Tried a Disney Secret Project!
11:33
Marques Brownlee
Рет қаралды 2,3 МЛН
Why is @ on your computer keyboard?
7:08
Inkbox
Рет қаралды 1,2 МЛН
Your Keyboard Cannot Comprehend These Noodles
12:27
Inkbox
Рет қаралды 308 М.
Why Are Controller Buttons Like That?
34:07
Lextorias
Рет қаралды 351 М.
This Company Made Seemingly IMPOSSIBLE Games
14:55
pojr
Рет қаралды 80 М.
Skibidi Toilets vs Hammers and Bollards Part 74 #beamngdrive #skibiditoilet
0:10
VS Car Crash BeamNGDrive
Рет қаралды 25 МЛН
floor is lava SCARY TEACHER Baby in yellow
0:15
WOAH SHOW
Рет қаралды 13 МЛН