Programming the NES - Everything you need to know

  Рет қаралды 61,423

Inkbox

Inkbox

Күн бұрын

Пікірлер: 133
@mattgio1172
@mattgio1172 2 жыл бұрын
I doubt I'll ever make a game - but you do such an amazing job of explaining it all! It's super interesting! Also - the music is SO good!
@jatoxo
@jatoxo Жыл бұрын
I wrote an NES emulator but this was still pretty entertaining. For once seeing things from the perspective of the developer instead of the hardware
@StephenAnimations
@StephenAnimations 4 ай бұрын
How'd you handle converting the ntsc signal to a pixel color?
@jatoxo
@jatoxo 4 ай бұрын
@@StephenAnimations The PPU still works with pixels, so you can just map the NTSC color byte for the current pixel from the PPU's current color palette to an RGB color using a pre generated color palette (which might be different depending on the console region) and fill an image buffer with the color while the PPU goes through each pixel
@anon_y_mousse
@anon_y_mousse 2 жыл бұрын
It's almost like there's some cosmic force pushing me to write a game. I have had some ideas floating around for a few decades. Though I'm not so sure I'd want to be limited by the NES, I suppose it would actually work for what I want to do.
@InkboxSoftware
@InkboxSoftware 2 жыл бұрын
Just do it 🗸
@jc_dogen
@jc_dogen Жыл бұрын
maybe try pc engine/turbografx? it's still 6502 but running a lot faster, with more ram, sprites, colors, etc
@victor_silva6142
@victor_silva6142 Жыл бұрын
Just do-it-yourself!🎉🎉🎉
@dingusbingus7463
@dingusbingus7463 Жыл бұрын
@@jc_dogenDepends on the game he wants to make, NES/FC has a lot of charm, the PCE wasn't as popular because of its original price, a lot of people missed out on it because of the price difference until now
@Nbrother1607
@Nbrother1607 Жыл бұрын
another interesting option is the x16 (i haven't tried it yet)
@RealHubertCZGameplayLetsPlay
@RealHubertCZGameplayLetsPlay 2 жыл бұрын
Great video. I dont plan to program anything on NES, but its cool to see how its done. BTW you deserve well more subs and views
@BryanChance
@BryanChance Жыл бұрын
Super! All in one video to get started with NES programming.
@wormwoodroadshow
@wormwoodroadshow 2 жыл бұрын
Thanks for the excellent starter guide. I believe that programming games for the NES in C is also viable (though it comes with drawbacks of its own). The book "Making Games for The NES" by Steven Hugg is a good tutorial.
@thinksie
@thinksie 2 жыл бұрын
If you have a good compiler, then maybe, but sometimes trying to make sense of something not working correctly would be much harder in C in my opinion, because if you make it in C you may not know some quirks that exist and can destroy your day lol
@eldiesoft2198
@eldiesoft2198 Жыл бұрын
I got that book, and while it is a pretty good tutorial, it does have its drawbacks. For one thing, it is a book, and unlike an online forum, it can't be updated if new info or techniques come out. A lot of the software that the book recommends is either from an abandoned project, like Famitracker for the music, or were not made in English, and do not have the best English translation (unfortunately, documentation seems to be a problem across the board with programmers). Secondly, the book is specifically for making a platformer. If you want to make a game that is anything but a platformer that scrolls on the Y-axis, then you are probably out of luck. It tells you that you CAN make these types of games, but not HOW. Thirdly, it uses a specific IDE (integrated development environment) called 8BitWorkshop, which has its own sprite sheets, sound libraries and compilers, so it doesn't tell you how to make games with something like VSCode (I know that's kinda petty, but I like VSCode). Finally, it has great information about sprite and music data, but but doesn't go much further than their own tutorials. If you want to make a sprite that's bigger than 8x8 pixels or import your own audio or music, the guide pretty much says "figure it out," without providing any resources or other guides, and when they do, it's probably a dead link, like Famitracker (sorry to bring that up again, but that is what gave me the most grief when working with it). But besides that, it gives a great foundation for making NES games and understanding NES hardware. I would pick it up if you are interested.
@EricGranata
@EricGranata 2 жыл бұрын
Yeah! I remember when you had 16 subs. 😊 Congrats on the success.
@iRemainNameless
@iRemainNameless Жыл бұрын
How does one ever first start understanding this? Impressive for sure
@EndlessLands
@EndlessLands Жыл бұрын
Depending on the assembler and linker, there can be issues with: .byte "NES" .byte $1A On some, this will result in the hex dump of the header showing as "CE C5 D3 1A" which will be an incorrect header. There are some ways to fix this that I haven't figured out yet. It seems to be related to PETSCII character translation. But an easy work around is to use this instead as the first header line: .byte $4E, $45, $53, $1A This will ensure the "NES" is properly in the header.
@cuphead8891
@cuphead8891 5 ай бұрын
Thanks man, helped me a lot :) But still the file is 41 KB help :(
@cuphead8891
@cuphead8891 4 ай бұрын
nvm im just dum :)
@YourAppleSalesman
@YourAppleSalesman Жыл бұрын
This is a great video, while i don’t understand 6502 assembly, i definitely wanna learn it and start development for the nes, im not exactly sure where or what to start with, but your video has made me view the nes/famicom in a completely different angle, in a good way
@whodidthissmh
@whodidthissmh 2 жыл бұрын
I was looking for this exactly the other day!
@theleviathan3902
@theleviathan3902 Жыл бұрын
everybody sleepin on my boy inkbox when he makin some good shit, def gonna get my old ass NES out and try some dis
@storebrandchocopops8041
@storebrandchocopops8041 Жыл бұрын
Inkbox: "So we need to set this to $FF, not $00, to make sure the VBlank registers are ready for writing and now we'll store the variable at the CHRROM address..." Me, enjoying the computer words and comprehending nothing: "ah yes, of course" Fr though, really enjoyed this, I became curious as to how older games were programmed back in the day out of nowhere and this was a really interesting and somehow terrifying insight into what an absolute nightmare Assembly is to program in!
@InkboxSoftware
@InkboxSoftware Жыл бұрын
Assembly might seem complicated, but these old machines are really simply designed and the documentation is very thorough. 6502 Assembly isn't harder than any other programming language, I would highly recommend giving it a go.
@stevenschiro1838
@stevenschiro1838 3 ай бұрын
I'd recommend you check out Retro Video Game Mechanics Explained, and Displaced Gamers, if you like this sort of thing
@AnonymousAccount514
@AnonymousAccount514 Жыл бұрын
KZbin is the best thing ever
@NonTwinBrothers
@NonTwinBrothers Жыл бұрын
Darn, no description link to the chiptune cover of Gymnopedies?
@ShahabSheikhzadeh
@ShahabSheikhzadeh Жыл бұрын
You deserve 100k+ subscriptions. This is a great educational video.
@CelestialHunter-
@CelestialHunter- Жыл бұрын
That Gymnopedie 1 rendition is from heaven
@martin128
@martin128 10 ай бұрын
Great video, thanks for explaining all of this. This would be just a headache if i didnt know any of this.
@KrunchyTheClown78
@KrunchyTheClown78 7 ай бұрын
You should do this type of video for the the Atari 7800, because it also deserves to have a much larger homebrew community, its even more interesting than the NES.
@wawztzta8296
@wawztzta8296 Жыл бұрын
holy shit i was listening to this in the background and noticed the awesome rendition of chopin's ballade no 1!
@shuttittuppitt9355
@shuttittuppitt9355 Жыл бұрын
Not (much) related, but the guys that programmed "Disney's Pocahontas" for the Sega Genesis (a good game) said that they also tried to port it to the SNES, but that it was a LOT more difficult to do that, leading them to eventually give up.
@violator1017
@violator1017 Жыл бұрын
After your amazing video, I have nothing to say... except : please, make other NES related videos ! You're SO GOOD man that even a half moron like me is able to understand the way the NES works... Fantastic teaching skills soooooo INSTA-SUB here ! 👍👍👍
@NunyaBizznezz6969
@NunyaBizznezz6969 Жыл бұрын
Great video. And if I may, thank goodness for high level programming languages!
@Weirdo_Studios206
@Weirdo_Studios206 Жыл бұрын
Honestly didn't even realize that you can code for an NES still. I gotta try making a game at some point on it.
@thedave4369
@thedave4369 Жыл бұрын
Awesome! I would love to see such a video for the Game Boy as well!
@Xplouding
@Xplouding Жыл бұрын
Excellent video!! I think everything is very clear, thank you! It would be nice, a high level explanation like in this video, but about mappers. Nice channel, greetings!
@guestguest8278
@guestguest8278 2 жыл бұрын
New upload?
@StephenAnimations
@StephenAnimations Жыл бұрын
Underated channel
@Nikku4211
@Nikku4211 Жыл бұрын
Mesen is a more accurate NES emulator and has a really good debugger as well.
@retrogamestudios6688
@retrogamestudios6688 2 жыл бұрын
Excellent keep it up
@Koridai011
@Koridai011 Жыл бұрын
I used theses methods on wine with my mac, can you use batch with wine
@AkamiChannel
@AkamiChannel 7 ай бұрын
I don't know, but you can figure out how to execute the commands just in your terminal on mac. You may need to figure out where the ca65 and ld65 files are located so you can execute them as commands
@papipunkrock
@papipunkrock 4 ай бұрын
Came for the info, stayed for the music
@lilithcal
@lilithcal Жыл бұрын
My assembly from that era is 8080/Z80. Does the assembler give you the ability to give names to the common addresses you regularly use?
@InkboxSoftware
@InkboxSoftware Жыл бұрын
Yes it does
@Destroyanad
@Destroyanad Жыл бұрын
How do i reference cc65 in my .bat file at 10:22 ?
@draynaruegames
@draynaruegames 9 ай бұрын
This has been a huge help in getting me started on NES game development. Only issue I'm running into right now is that I can't get YY-CHR to create an 8kb .CHR file, for whatever reason any new file I create is 16kb big instead of 8kb. Any tips on how I can create an 8kb file?
@InkboxSoftware
@InkboxSoftware 9 ай бұрын
I have not yet found a way to create anything other than the default 16KB file through YYCHR itself, what I do is copy an another 8KB file (usually a CHR ROM file from another project), open it in YYCHR, then clear the contents for a fresh start
@bb.cute.channel
@bb.cute.channel 2 жыл бұрын
How about programming for SNES and Wii? 👍👍👍👍
@elipticalecliptic481
@elipticalecliptic481 2 жыл бұрын
pretty sure you could program in C or another high-level language for the Wii that being said, I'd also be super interested in a video for that
@anon_y_mousse
@anon_y_mousse 2 жыл бұрын
@@elipticalecliptic481 You could program in C for the NES too, it'd just be a bit harder in some areas and easier in others.
@4rumani
@4rumani Жыл бұрын
@@anon_y_mousse No
@nickgennady
@nickgennady 2 жыл бұрын
Wow very helpful. Subscribed. Can RESET and NMI be written after segments, or do they need to be defined prior to being referenced like functions in C? I am very picky about how my code is structured.
@InkboxSoftware
@InkboxSoftware 2 жыл бұрын
No such restrictions, feel free to reference it in any order
@famitronic9870
@famitronic9870 11 ай бұрын
I’m a bit confused, I’m trying to compile my background, but it only loads the first 16 lines, so it only draws half of the background. How can I get my full background to draw if I’m using a full 960 bytes (32 rows) for the background?
@InkboxSoftware
@InkboxSoftware 11 ай бұрын
Make sure that when you copy your background data to VRAM your loop runs 960 (3C0) times. Reach out with your code if you're still having trouble.
@famitronic9870
@famitronic9870 11 ай бұрын
@@InkboxSoftware Thank you! I’m gonna give it a shot when I got free time 👍
@famitronic9870
@famitronic9870 11 ай бұрын
@@InkboxSoftware I couldn’t quite figure it out, so I reached out via email if you get the chance.
@digitalalchemy1438
@digitalalchemy1438 Жыл бұрын
Why do you need a CLI to evoke the NMI, as it is non maskable?
@InkboxSoftware
@InkboxSoftware Жыл бұрын
Earlier in the program we used the instruction SEI, the Set Interrupt Disable instruction, to return to normal NMI functionality we use CLI, the Clear Interrupt Disable instruction.
@trxgreder
@trxgreder Жыл бұрын
very cool, one thing though. in command prompt, it doesnt do anything when i run compile.bat
@ramakrishnamishra8179
@ramakrishnamishra8179 2 жыл бұрын
awesome
@artmanstudios7037
@artmanstudios7037 Жыл бұрын
Can you tell us on how would you go about making your very own console and game from this in making your own brand? Instead of making it for the NES system. And Talk about the hardware and software side,
@ClassyJacket
@ClassyJacket Жыл бұрын
Great video but I got lost on the batch file segment. The cmd gave me errors just like you said might happen in that one part. It says this: cc65\bin\ca65 program\cart.s -o program\cart.o -t nes program\cart.s:15: Error: ':' expected cc65\bin\ld65 program\cart.o -o program\cart.nes -t nes ld65:Error: Input file 'program\cart.o' not found Did I make a syntax mistake or is there something more to the problem I don't understand?
@InkboxSoftware
@InkboxSoftware Жыл бұрын
It looks like on line 15 of your assembly code you have an error, fix that and it should compile.
@ClassyJacket
@ClassyJacket Жыл бұрын
@@InkboxSoftware It was such a simple issue, so embarrassed not really but you know what I mean thank you very much for helping!!!🤘👽👍
@juliocesarcastaneda8215
@juliocesarcastaneda8215 Жыл бұрын
Could you do a tutorial on how to put NESOS on the NES
@DavidCarrizoGuitarra
@DavidCarrizoGuitarra Жыл бұрын
It's a rom link in that video
@TheBxzr
@TheBxzr Жыл бұрын
I keep getting errors about how "....\ca65" is not recognized as an internal or external command, and it doesn't seem like the batch file is recognising it as a command. Is my cc65 okay, because there is no bin folder either?
@InkboxSoftware
@InkboxSoftware Жыл бұрын
Make sure your command points to wherever your ca65.exe is located, you may just want to use the full path from your C drive if you're having troubles with the syntax
@gwrgrw4077
@gwrgrw4077 22 күн бұрын
what's the background song?
@m4ank
@m4ank 6 ай бұрын
4:05 Wrong. The .PNG format was created in 1994, ~10 years after the NES was first released, or even created.
@PloopChute
@PloopChute Ай бұрын
You might want go back and listen again. He said "The NES was around long BEFORE the .jpg or .png existed" If you want to be an insufferable pedant, at least pay attention before you rush in with your eager "Ackchyually" comments.
@m4ank
@m4ank Ай бұрын
@@PloopChute na bru dis was 4 months ago
@PloopChute
@PloopChute Ай бұрын
@m4ank So? You were still wrong. 5 day ago, 5 months ago, even 5 years ago, still wrong.
@m4ank
@m4ank Ай бұрын
@@PloopChute ok jah,,,
@PloopChute
@PloopChute Ай бұрын
@m4ank Lol. It's funny when someone can't admit they were wrong, so they turn into a clown rather than admit it. Life must be going well for you. /s.
@cheesirehat
@cheesirehat 8 ай бұрын
How do i get my palette data?
@perguto
@perguto Жыл бұрын
9:55 nice totally legit Visual Studio you got there. +100 Social Credit
@micknin-
@micknin- Жыл бұрын
How can I configure the size of the Chr rom? games like Kirby’s Adventure, super mario Bros 3 and gimmick! has the Chr rom bigger than 8k.
@doomtho42
@doomtho42 Жыл бұрын
The 4th byte under the “HEADER” segment determines the “amount of CHR ROM in 8K units.” So, for example, if you were to change that value from $01 to $02 you would have a CHR ROM of 16K. The PRG ROM can be changed in a similar manner with the 3rd byte in that segment, except for that one each unit of memory equates to 16K instead of 8K.
@Nbrother1607
@Nbrother1607 Жыл бұрын
maybe you should do another one for the x16
@kez963
@kez963 Жыл бұрын
Omg thank you! 😄
@deafomega
@deafomega 2 жыл бұрын
it took me a while to realize the odd sounds i kept hearing were part of the background music
@brockpiano
@brockpiano Жыл бұрын
Is it possible to manually write sprite data? Like just using a text editor instead of YYCHR.
@InkboxSoftware
@InkboxSoftware Жыл бұрын
Sure, at the end of the day the CHR ROM is just binary data, you can use a byte editor to directly edit a file as you wish.
@brockpiano
@brockpiano Жыл бұрын
@@InkboxSoftware Alright, thanks Also, i'm trying to compile the code (9:48) in ca65 but it's giving me: Error: Symbol 'RESET' is undefined Error: Symbol 'NMI' is undefined Nevermind, I don't know what I did but it works now
@SHD69
@SHD69 2 жыл бұрын
nice!
@aweawd
@aweawd Жыл бұрын
I can't do this, I did exactly what you said, and I'm still only getting a gray screen when I should be getting a mushroom.
@InkboxSoftware
@InkboxSoftware Жыл бұрын
I'd check your code for a loop that isn't properly closed, and make sure you've allowed interrupts at the end.
@aweawd
@aweawd Жыл бұрын
@@InkboxSoftware Thank you I've fixed it.
@andyortlieb3768
@andyortlieb3768 Жыл бұрын
You know it's retro when notepad++ shows up
@flameofthephoenix8395
@flameofthephoenix8395 Жыл бұрын
Oh, I see. I thought this was talking about programming an emulator. Either way it's interesting.
@pedroxdw
@pedroxdw Жыл бұрын
Hi, Inkbox! I hope this question isn't stupid... In YY-CHR (build 2021/06/06) when I click on "File > New" I get a new file, but, it has 1 024 tiles instead of 512 and that's why my code doesn't compile. Is there a solution? By the way, your videos are great! Keep going! (Sorry if my English grammar/orthography isn't perfect, English isn't my native language.)
@InkboxSoftware
@InkboxSoftware Жыл бұрын
That's something that happens to me too, and I don't know how to create a default smaller file. What I do is just copy a file of the size I want and then treat that like my new file. There are ways to increase the amount of CHR ROM in an NES file, but if you want the standard amount, just follow the above.
@pedroxdw
@pedroxdw Жыл бұрын
@@InkboxSoftware OK. Thank you for your help!
@thalison-dev
@thalison-dev 5 ай бұрын
How does one learn that? nesdev wiki isn't a fun place to start out, there is no example codes for you to compile and get code running. nerdy nights isn't suited for cc65.
@InkboxSoftware
@InkboxSoftware 5 ай бұрын
I think a lot of new NES developers start out following video tutorials similar to this one, then once we understand how the basics of the machine works nesdev wiki really becomes the bible to you. At least, that's how I got started.
@Adiee5Priv
@Adiee5Priv 2 жыл бұрын
so you've basically covered most of the nerdy nights in one video?
@kennyroger22
@kennyroger22 Жыл бұрын
faz esse tutorial para SNES.. sou do brasil
@JarppaGuru
@JarppaGuru 10 ай бұрын
this is all we need know. now we can make NES BASIC. pad is byte you can make keyboard LOL
@The-E-Base
@The-E-Base Жыл бұрын
0:29 -- Well, there goes this option... ------ Guess i'll lose hope
@R2AUK
@R2AUK Жыл бұрын
🤯 ❤
@LunaticEdit
@LunaticEdit 9 ай бұрын
I feel stupid for spending 30 minutes trying to understand why rts was failing but realized he was clearing the stack segment ($100). So if you're following along and use procs, make sure you DONT clear the stack, you kinda need it.
@InkboxSoftware
@InkboxSoftware 9 ай бұрын
Did you call JSR for your PROC?
@LunaticEdit
@LunaticEdit 9 ай бұрын
Yup. The problem was obvious once I debugged with Mesen and saw RTS was returning to $0000.@@InkboxSoftware
@WindowsDrawer
@WindowsDrawer Жыл бұрын
I make geometry dash in nes soon it seems easy to do
@Destroyanad
@Destroyanad Жыл бұрын
How did it turn out?
@WindowsDrawer
@WindowsDrawer Жыл бұрын
@@Destroyanad I didn't finish it i only made flappy bird bc the scrolling things were too hard and vacation ended
@ltecheroffical
@ltecheroffical 6 ай бұрын
Some emulators emulate the NES better than FCEUX by taking into account the fact due to stuff in the real world then the RAM doesn't start at zero, but random values
@TimelessGamingSoftware
@TimelessGamingSoftware 3 ай бұрын
Dang u can program anything I wish
@LifeIsGood-qg3xv
@LifeIsGood-qg3xv 8 ай бұрын
"Everything you need to know" **only shows how to display a sprite**
@jengelenm
@jengelenm Жыл бұрын
I want to make a NES game, wtf did i get myself into OH LORD!
@Destroyanad
@Destroyanad Жыл бұрын
How did your project turn out? I'm learning how to make an NES game too, but i'm thinking the same thing XD
@b213videoz
@b213videoz 10 ай бұрын
Oh please.. NES... Genesis!
@retrogamestudios6688
@retrogamestudios6688 2 жыл бұрын
Fourth
@hemsaks1695
@hemsaks1695 Жыл бұрын
Bruh
@Potatogaming47
@Potatogaming47 8 ай бұрын
ill code'
@crawhey
@crawhey Жыл бұрын
lol mor on sprites lol
@khayoblego3294
@khayoblego3294 2 жыл бұрын
First
@hemsaks1695
@hemsaks1695 Жыл бұрын
Bruh
@beforth
@beforth Ай бұрын
Unreadable code... next time use light letters over dark background.
@Tutterzoid
@Tutterzoid 4 ай бұрын
Hope in future video tuts that you DON'T play that background music AT ALL :(
@thepeternetwork
@thepeternetwork Жыл бұрын
I'll stick to Mario Maker. I do better visually.
Is 8-Bit Minecraft Possible?
12:58
Inkbox
Рет қаралды 1,4 МЛН
Programming a 40KB NES Game (in Assembly)
14:33
Inkbox
Рет қаралды 160 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
NES Architecture Explained
18:28
NesHacker
Рет қаралды 291 М.
Creating an Operating System for the NES
11:11
Inkbox
Рет қаралды 792 М.
A simple BIOS for my breadboard computer
21:53
Ben Eater
Рет қаралды 361 М.
How we fit an NES game into 40 Kilobytes
12:04
Morphcat Games
Рет қаралды 3,6 МЛН
NES Sprites, OAM, and the Battle for Priority - Behind the Code
19:17
Displaced Gamers
Рет қаралды 46 М.
Your Keyboard Cannot Comprehend These Noodles
12:27
Inkbox
Рет қаралды 366 М.
NES Graphics Explained
17:23
NesHacker
Рет қаралды 246 М.
Running "Hello World!" in 10 FORBIDDEN Programming Languages
18:07
I Made Fruit Ninja Into a REAL 8-Bit NES Game
11:03
Inkbox
Рет қаралды 268 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,3 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН