I Made My Own 40KB NES Game

Поделиться
HTML-код
  • Опубликовано: 1 мар 2024
  • 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...
  • ИгрыИгры

Комментарии • 239

  • @soryabuscompany
    @soryabuscompany 4 месяца назад +163

    I've never seen a more thorough technical explanation of the NES in such a short time

    • @gblargg
      @gblargg 4 месяца назад +8

      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.

  • @ego-lay_atman-bay
    @ego-lay_atman-bay 4 месяца назад +118

    The end really caught me off guard. It was such a scott the woz ending.

    • @itskdog
      @itskdog 4 месяца назад +4

      *3D Dot Game Heroes

    • @ego-lay_atman-bay
      @ego-lay_atman-bay 4 месяца назад +7

      @@itskdog Yeah, I know, but I feel like that song is most commonly associated with scott the woz.

    • @Therap3
      @Therap3 4 месяца назад +2

      ​@@itskdogwow I had no idea it was from that game. Thanks!

    • @NotSomebodyThatYouUsedToKnow
      @NotSomebodyThatYouUsedToKnow 3 месяца назад +3

      A Scott vid was recommended after this lol

    • @kirabey8946
      @kirabey8946 Месяц назад

      Its the old one too...

  • @JadeLombax
    @JadeLombax 4 месяца назад +70

    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  4 месяца назад +21

      That's sounds way cool, do you have any stuff I can check out?

    • @JadeLombax
      @JadeLombax 4 месяца назад

      ​@@InkboxSoftwareI have an Itch page w/ some of my games (Jadelombax is my username there), tried to post a link, but RUclips keeps deleting my responses.

    • @themadmallard
      @themadmallard 4 месяца назад +11

      1kb? what platform are they made for?

    • @JadeLombax
      @JadeLombax 4 месяца назад

      ​@@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 4 месяца назад +19

      You can imagine that game in your brain and play it.

  • @Arcad3n
    @Arcad3n 4 месяца назад +87

    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.

  • @StereoMadnessss
    @StereoMadnessss 4 месяца назад +64

    Assembly is just amazing really on how small its code can be when it's compiled

    • @williamdrum9899
      @williamdrum9899 4 месяца назад +16

      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 4 месяца назад +2

      Assembly isn’t compiled. It’s assembled.

    • @rethardotv5874
      @rethardotv5874 4 месяца назад

      Shouldn’t be C with modern compilers as efficient as writing assembly?

    • @rya3190
      @rya3190 4 месяца назад

      ​​@@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...

    • @rusi6219
      @rusi6219 29 дней назад

      ​@@rethardotv5874if that was the case you'd never see inline assembly in C code

  • @stefanmilicevic5322
    @stefanmilicevic5322 4 месяца назад +22

    The amount of effort you put into each programming project is truly inspiring. Keep up the great work!

  • @bassguitarbill
    @bassguitarbill 4 месяца назад +33

    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!

  • @essayharper
    @essayharper 4 месяца назад +9

    The way the Famicom/NES handles data will never fail to amaze me

  • @Roid33
    @Roid33 4 месяца назад +36

    Scott the Woz outro whatt

  • @coolbrotherf127
    @coolbrotherf127 4 месяца назад +4

    It's so cool that Nintendo invented golf.

  • @FloatingSunfish
    @FloatingSunfish 4 месяца назад +14

    The NES will always be my favorite console.
    It helped save the video game industry!

  • @alexandredecarvalho4357
    @alexandredecarvalho4357 4 месяца назад +3

    We need more of these!! :D thank you for your explanations!

  • @famitronic9870
    @famitronic9870 4 месяца назад +3

    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_ 4 месяца назад +8

    can't wait to see what you do on the gameboy. Love your videos!

  • @Sinistar1983
    @Sinistar1983 4 месяца назад +8

    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 4 месяца назад +2

      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 4 месяца назад +1

      @@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.

  • @huskenator857
    @huskenator857 4 месяца назад +4

    Love your videos dude, can’t wait to see you unpack the gameboy color. Also Scott The Woz jump scare

  • @mcleodautomation
    @mcleodautomation 4 месяца назад +1

    Your audio is SOO good - keep it up! Love the dry mic sound tbh.

  • @1008md
    @1008md 4 месяца назад

    That was amazing. I didn’t understand a lot but was still mesmerized!

  • @Controllerhead
    @Controllerhead 4 месяца назад

    What a wonderful explanation, sure with i had this video when i started years ago. Great work!!!

  • @Holital
    @Holital 4 месяца назад +2

    Yooooo I love your channel!!!

  • @MoustiluigiRandom
    @MoustiluigiRandom 4 месяца назад +1

    Amazingly well explained.

  • @merman1974
    @merman1974 3 месяца назад

    That was a brilliant explanation and a fun game as a result. Great work.

  • @thechosenone729
    @thechosenone729 3 месяца назад

    Amazing video as always thanks for your work.

  • @skRapKlan
    @skRapKlan 4 месяца назад

    Nice work! Thanks for the cool video!

  • @mukulnag1578
    @mukulnag1578 4 месяца назад +1

    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

  • @shinyagumon7015
    @shinyagumon7015 4 месяца назад +202

    My guess is black magic or programming if there's a difference between the two 😂

    • @error.delete4945
      @error.delete4945 4 месяца назад +33

      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 4 месяца назад +10

      "Is this too much voodoo?"

    • @angeldude101
      @angeldude101 4 месяца назад +18

      As a programmer and self-proclaimed sourcerer, no; there isn't a difference.

    • @designator7402
      @designator7402 4 месяца назад

      ​@@error.delete4945 I will not remove the KillPidgeon() method from my code, no matter who the IRS sends!

    • @KertaDrake
      @KertaDrake 4 месяца назад +2

      Simply speak the binary incantations and technomagic will occur. You use hex for hexes, of course.

  • @Squigdude13
    @Squigdude13 4 месяца назад +1

    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

  • @cdkw2
    @cdkw2 3 месяца назад

    I would love to see the gbc videos, good luck!

  • @IraKane
    @IraKane 4 месяца назад +1

    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!🤪

  • @golvellius6855
    @golvellius6855 4 месяца назад

    Incredible😮 i learned a lot in this video❤❤❤

  • @Adiee5Priv
    @Adiee5Priv 4 месяца назад +6

    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 4 месяца назад +1

      But vram stores the pallet and table name information doesn't it

    • @Adiee5Priv
      @Adiee5Priv 4 месяца назад +2

      @@ricarleite yes, but that's something else

    • @ricarleite
      @ricarleite 4 месяца назад

      @@Adiee5Priv I mean he didn't claim vram stores a bitmap representation of the screen

    • @Adiee5Priv
      @Adiee5Priv 4 месяца назад

      @@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

  • @jumbledfox2098
    @jumbledfox2098 4 месяца назад

    What an epic video!

  • @aplanebagel
    @aplanebagel 4 месяца назад

    Well explained !

  • @adryanlucas096
    @adryanlucas096 4 месяца назад +10

    Clicked as soon as i saw the notification 🔥🔥🔥🔥🔥 ur videos are always the best!

  • @ehippo1
    @ehippo1 4 месяца назад

    Nice video ❤

  • @EWARS_2
    @EWARS_2 4 месяца назад +5

    Scott the Woz outro?! (Breakout?)

  • @dinaariaudio4944
    @dinaariaudio4944 4 месяца назад

    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

  • @wingedsaviour7327
    @wingedsaviour7327 2 месяца назад

    Loved it!

  • @codeway4374
    @codeway4374 4 месяца назад

    Nice vid !

  • @lazysh508
    @lazysh508 2 месяца назад

    really helpful

  • @spg3331
    @spg3331 4 месяца назад

    Loved playing the game boy color as a kid!

  • @Tavg123
    @Tavg123 4 месяца назад

    great video

  • @OmeedNOuhadi
    @OmeedNOuhadi 3 месяца назад

    Congratulations!

  • @Guilhermeabcd
    @Guilhermeabcd 4 месяца назад

    loved it!

  • @Mobik_
    @Mobik_ 4 месяца назад +1

    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  4 месяца назад +3

      You can use C for the NES, too, I just prefer assembly

  • @FernieAriel
    @FernieAriel 4 месяца назад

    1:40 that’s the music from Goal 2, one of the best soccer games of all time. I’d recognize it anywhere.

  • @intangiblematter_misc
    @intangiblematter_misc 4 месяца назад +1

    I wasn't going to comment, just a really solid video.
    Then the Scott the Woz ending whiplash hit

  • @williamdrum9899
    @williamdrum9899 4 месяца назад +3

    Later games used "bank switching" to fit more code/data than the NES's 64k address space would typically allow

    • @lemdixon01
      @lemdixon01 29 дней назад +1

      That sounds a bit like multiplexing which gives more capability to a limited resource by working on one bank or area of the screen at one time, which happens so fast that the person playing the game can't see this.

    • @williamdrum9899
      @williamdrum9899 29 дней назад +1

      @@lemdixon01 It's more like an HDMI splitter where you can have your Switch, Xbox, and DVD player all plugged in at once but you can only see one at a time

  • @eboatwright_
    @eboatwright_ 4 месяца назад

    Very cool!

  • @bootime265
    @bootime265 4 месяца назад +1

    time for a cool video

  • @NegaafellagaTV
    @NegaafellagaTV 4 месяца назад

    Really cool!

  • @deltapi8859
    @deltapi8859 4 месяца назад

    beautiful svg art in the video.

  • @Oler-yx7xj
    @Oler-yx7xj 29 дней назад

    Now I want to try to make NES games again. Touching it really made me appreciate how big a kilobyte is

  • @VideoGamer945
    @VideoGamer945 4 месяца назад

    I learned something today!

  • @alexela_
    @alexela_ 4 месяца назад +1

    Am I on time?! I'm enjoying it already

  • @HollowProject
    @HollowProject 4 месяца назад

    Yay! Waiting for GBA videos!

  • @maazali6283
    @maazali6283 4 месяца назад +1

    Your my inspiration to become a better programmer

  • @RareSun
    @RareSun 4 месяца назад +1

    Can't wait to watch the episode where you program a 3D Mario for the GameCube in 10 years.

  • @Mrwaffles-gr3so
    @Mrwaffles-gr3so 4 месяца назад

    I totally understood everything.

  • @PanoptesDreams
    @PanoptesDreams 4 месяца назад +3

    Restrictions birth creativity

  • @Mobik_
    @Mobik_ 4 месяца назад

    Scott the Woz?! Is that you at the end?!

  • @ShinoSarna
    @ShinoSarna 4 месяца назад +1

    You inspired me to try to make a version of Minecraft for NES.

  • @taagoallas3336
    @taagoallas3336 4 месяца назад +2

    It's always a good day when Inkbox uploads!

  • @freddyfazbear29470
    @freddyfazbear29470 18 дней назад

    Daaaaam, this guy knows everything about hardware

  • @cdkw2
    @cdkw2 3 месяца назад

    3:56 I wouldn't be surprised if they were morse code lol

  • @ChaossX77
    @ChaossX77 4 месяца назад

    Real original ending music.

  • @KingF-hi4wg
    @KingF-hi4wg 4 месяца назад

    I’d like to see this guy cover sega master system homebrew

  • @Clancydaenlightened
    @Clancydaenlightened 4 месяца назад +1

    Hint they didn't do it with only 32k rom and ppu rom
    Kirby on nes was around a 1megabyte cartridge

  • @cube2fox
    @cube2fox 4 месяца назад

    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.

  • @tomyyoung2624
    @tomyyoung2624 4 месяца назад

    Yes internet!

  • @mwk1
    @mwk1 4 месяца назад

    Szanuję! 😎

  • @Sky_kidharry
    @Sky_kidharry 2 месяца назад

    A few swag genesis games utilize alternating color palettes as a way to save space as frames of a sprite are stored in individual colors of the sprites, with the limitations of the nes having it so sprites can only alternate 3 colors, this can allow only 2-3 sprites created by alternate color palettes but nonetheless could this be utilized so background sprites can be “animated” if you can change the colors of the palettes?

  • @DerKlemm-Crafter
    @DerKlemm-Crafter 4 месяца назад +2

    You are one of the best programmers I have ever seen, though I don't understand much😅

  • @hirschlord341
    @hirschlord341 4 месяца назад

    Pls can you review the megaman 2 ,3 and ducktales architecture ?

  • @lafcursiax
    @lafcursiax 4 месяца назад

    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...

  • @9a3eedi
    @9a3eedi 4 месяца назад +2

    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

  • @fredharding5087
    @fredharding5087 4 месяца назад

    I had very little understanding of anything in this video but enjoyed it all the same

  • @minirop
    @minirop 3 месяца назад

    golf on mars has been demaked on the NES? 😲

  • @oa_math
    @oa_math 16 дней назад

    Careful using Nintendo characters in your game, they might swat your house

  • @deltapi8859
    @deltapi8859 4 месяца назад

    what language is the source code shown? never seen if and endif in assembly.

  • @ZeroGDucks
    @ZeroGDucks 4 дня назад

    1:50 - Whats stopping you from building and programming a cartridge with an attached RJ45 port, for whatever godforsaken purpose? 😉

  • @Storin_of_Kel
    @Storin_of_Kel 4 месяца назад +2

    Explain to us how Final Fantasy on the NES was made in only 40 KB please

    • @mathchessdnd
      @mathchessdnd 4 месяца назад +2

      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 4 месяца назад

      @@mathchessdnd Towards the end of the video he did mention this.

  • @enderben2805
    @enderben2805 3 месяца назад

    eyyyy
    I love this topic

  • @flamshiz
    @flamshiz 4 месяца назад

    but how did they fit all the data into 4k??

  • @user-fu1dp3xl9t
    @user-fu1dp3xl9t 3 месяца назад

    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  3 месяца назад

      I've mentioned mappers in this video here: ruclips.net/video/Lf1jer8y6Pc/видео.html
      Basically a mapper facilitates bank switching, where a section of memory can be switched out for another portion of memory from the cartridge.

  • @chobies5383
    @chobies5383 4 месяца назад +1

    SCOOT THE WOZ OUTRO MUSIC?

  • @LettersAndNumbers300
    @LettersAndNumbers300 4 месяца назад

    What about a game like Shadowgate? How did they fit that?

  • @FordTransitvan
    @FordTransitvan 4 месяца назад

    Very interesting but also too complicated for me, love it though

  • @maxasaurus3008
    @maxasaurus3008 4 месяца назад

    When I saw the no internet screen I was certain it was a segue to a vpn commercial

  • @modlich_303
    @modlich_303 4 месяца назад +3

    what about the Minecraft? since you are moving on from NES, and that Minecraft is on NES, what's gonna be with that?

  • @chrisray9653
    @chrisray9653 4 месяца назад

    Before the libraries of 50k lines of code that put a dialogue screen up.

  • @chrishuta7027
    @chrishuta7027 4 месяца назад

    What happened to the audio quality?

  • @heterodoxagnostic8070
    @heterodoxagnostic8070 4 месяца назад

    nice

  • @anon_y_mousse
    @anon_y_mousse 4 месяца назад +1

    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.

    • @rusi6219
      @rusi6219 29 дней назад +1

      C23 is what happens when python script kiddies infiltrate an established programming language

    • @anon_y_mousse
      @anon_y_mousse 29 дней назад

      @@rusi6219 For a lot of the things I see getting added to C and C++ both these past few revisions, yeah. I hate constexpr and consteval and they're adding constexpr to C.

  • @potatogameryt
    @potatogameryt 4 месяца назад

    Wait is it actually 60 frames per second for a CRT? I thought it was 24?

  • @enderbo
    @enderbo 4 месяца назад

    why is the audio very compressed

  • @jonsena1373
    @jonsena1373 3 месяца назад

    are you still working on the 8 bit minecraft project?

  • @MarkRayers
    @MarkRayers 3 месяца назад

    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.

  • @NikodAnimations
    @NikodAnimations 2 месяца назад

    I think a jump is better represented by a parabola, with the amount going up constanly reduced by a constant number.

  • @nunyabeeznutz5286
    @nunyabeeznutz5286 4 месяца назад

    Fun fact you know what is also 40 KB? the maximum allowed size for metadata for images. Hmm makes you think...