Basics - 6502 Assembly Crash Course 01

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • Get started with low level 6502 assembly for the NES!
    Support the channel on Patreon: / neshacker
    Examples Project - github.com/NesHacker/Assembly...
    NES Development Environment Video - • NES Development Enviro...
    6502 Instructions Reference - www.masswerk.at/6502/6502_ins...
    Binary & Hexadecimal Video - • Binary & Hexadecimal D...
    Chapters:
    0:00 Introduction
    1:33 What are Programs?
    3:08 6502 Overview
    5:31 Index Registers
    6:28 Example 1: X and Y
    8:51 Running the Example
    12:15 Conclusion

КОМЕНТАРІ • 183

  • @EternalDarknessAboveTheBlueSky
    @EternalDarknessAboveTheBlueSky 2 роки тому +39

    This gets me one step closer to understanding how the original Legend of Zelda and Super Mario Bros. games were made.

    • @NesHacker
      @NesHacker  2 роки тому +11

      One step at a time :)

  • @gabbls_
    @gabbls_ 2 роки тому +96

    For those interested in learning 65816 (SNES Processor) this is where to start. 65816 can perfectly emulate 6502.

    • @randomcreations1079
      @randomcreations1079 Рік тому +1

      Doesn't it more complicated than 6502? I've heard that you better be start from NES and not SNES.

    • @malachigv
      @malachigv Рік тому +10

      @@randomcreations1079 What he was saying is that basic NES coding is a good way to learn basic SNES coding, since its processor does everything the NES can, in practically the same way the NES does it. This is unlike going from the NES to the Gameboy, since that uses a modified Z80

    • @jhonbrayanangaritamedina1047
      @jhonbrayanangaritamedina1047 Рік тому +2

      SNES has more instructions for example LDA in 6502 assembler has 8 addressing modes while that the 65816 LDA has 15 addressing modes y more Register instructions

    • @randomcreations1079
      @randomcreations1079 Рік тому

      @@malachigv got it. Thanks

    • @ClassicTVMan1981X
      @ClassicTVMan1981X 10 місяців тому

      Most of the new opcodes the 65816 had were first introduced in the 65C02, but because the 65C02 only came out the same year the original FamiCom did, the FC/NES never got that one (the Ricoh 2A03 was based on the original 6502).

  • @alucard0712
    @alucard0712 2 роки тому +48

    man...there is something magical about being able to control the console you loved so much in your childhood!
    I wanted to learn programming for myself, for fun but having a big trouble with high-level languages. somehow I've instantly hooked in assembly and today discovered 6502 and NES homebrew! now I found it more fun than UE5, lol.
    thank you a lot!

    • @NesHacker
      @NesHacker  2 роки тому +13

      That. 100%, that’s exactly why I started messing around with NES programming. Knowing others were out there like me was why I started the channel :)

  • @dakotaboy80
    @dakotaboy80 2 роки тому +46

    It is fascinating to learn how the games I loved in my childhood were built. Thank you for this series!

    • @NesHacker
      @NesHacker  2 роки тому +10

      For sure, the whole reason I do these videos is for people like yourself :)

  • @jazzgirl2358
    @jazzgirl2358 Рік тому +10

    Please don't stop this channel 🥺, now I can finally make nes games. I knew programming but never found this content except nesdev which is very complicated to understand

  • @DamianLDF
    @DamianLDF 5 місяців тому +30

    For anyone running into the issue of compiling 'wrapper.s' instead of the example file, I could solve it by changing cl65config.json, adding "input" and changing "params" like this:
    "input": "wrapper.s",
    "params": "--verbose --target nes examples\\01_XandY.s"
    I'm guessing that this has something to do with dependencies and the order in which the files are compiled, and there might be a better way to configure it, but it worked for me.

    • @MystycCheez
      @MystycCheez 5 місяців тому

      Thanks, I was just about to give up

    • @twirlincurtis
      @twirlincurtis 5 місяців тому

      This worked for me, thank you!

    • @AppleTheAnimator
      @AppleTheAnimator 3 місяці тому +1

      OMG THANK YOU SOO MUCH
      THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

    • @runtoday1
      @runtoday1 2 місяці тому

      Yes this solved my problem of build task not created 01_XandY file. Followed exact instructions you laid out and it worked straight away. Thank you.

    • @menitoon8759
      @menitoon8759 Місяць тому

      I changed the file to this and it didn't work
      {
      "executable": "C:\\cc65\\bin\\cl65",
      "input": "wrapper.s",
      "params": "--verbose --target nes examples\\01_XandY.s"
      }
      why ?

  • @deusprogrammer_thekingofspace
    @deusprogrammer_thekingofspace Рік тому +11

    Wanted to thank you. I am working on a new Zelda 2 Randomizer that uses a different approach to the randomization and I used your videos to help me figure out why certain maps in the game don't respect the level exit data, and I was able to follow a trace and find the code. Using your videos and some 6502 ASM wikis I managed to figure it out. For some reasons maps with a map number greater than 29, ignore the level exits and default to all "go outside" exits. Thanks for the help =).

    • @NesHacker
      @NesHacker  Рік тому +5

      That’s super-super-super cool. Helping folks do stuff with oldschool games is kinda the point of the channel, and I am really happy to have helped :D

  • @riyantan9237
    @riyantan9237 2 роки тому +49

    I really like the way you explain about NES Programming e.i. such an intricate topic, it’s so intuitive & concise. Thanks you very much for putting time & effort to do all these stuff which I believe will inspire many people loving retro game. Much appreciated, keep doing your great work man 🙏🏻❤️❤️

    • @NesHacker
      @NesHacker  2 роки тому +6

      Thanks! I really appreciate the kinds words :D

  • @GeneralLee131
    @GeneralLee131 2 роки тому +33

    Absolutely underrated channel. Thanks for the great content! Love learning the deep dark secrets of one of my favorite pieces of tech! Keep up the good work!

    • @NesHacker
      @NesHacker  2 роки тому +5

      Thank you so much! Yeah the NES is near and dear to my heart cause it was the first video game system I had when I was a kid.

  • @r65z40
    @r65z40 9 місяців тому +6

    im 2 years late finding out your channel. but i'll catch up eventually on your latest material.
    these stuff are the "gems" buried in the youtube landfill.
    i hope you always find more inspiration and energy so you can continue making these videos. the way you present and deliver the information shows your talent, knowledge, attention to details, and passion.
    as a non dev and old soul, i get inspired to nerd out about this subject.
    i guess childhood dreams will forever haunt us if we always ignore them.
    thank you for the reminder and showing a direction on how to start this journey.

    • @NesHacker
      @NesHacker  9 місяців тому

      Welcome to the channel, I’m happy you found it and please enjoy 😉

  • @moltony
    @moltony 2 роки тому +12

    great job keeping assembly development very simple. me, who has no assembly experience, easily followed along.

    • @NesHacker
      @NesHacker  2 роки тому +1

      Glad you found the video helpful!

  • @derftastic4322
    @derftastic4322 2 роки тому +8

    'kay like, what the fuck. Like, when I was into NES dev with cc65 a year ago. The best we had was Michael Cheeseburger's series the 'Zero Pages', which don't get me wrong, is pretty okay. But I just looked up NES dev again today and I found this absolute GOLD MINE of nes dev tutorials. You sir, are a god send. These tutorials are so incredibly easy to understand and digestible with your animations and way of explaining things. Keep up the good work man.

    • @NesHacker
      @NesHacker  2 роки тому +3

      Glad you like the channel :D

  • @humbledb4jesus
    @humbledb4jesus 3 місяці тому

    the intellect that takes you from a finite set of instructions on what to do with a 0 or 1 to AI threatening mankind when given free will is quite an accomplishment...

  • @BlueFinch
    @BlueFinch 8 місяців тому

    I'm a SMB3 rom hacker and I am very thankful for your instruction on assembly programming. bitwise operations video helped me a lot.

  • @xard4spl
    @xard4spl 2 роки тому +6

    Your videos kinda remind me of Ben Eater's 6502 series but with NES flavor. I really like your way of explaining this stuff. Keep up the good work!

  • @Adrenailine
    @Adrenailine 2 роки тому +6

    So thankful I stumbled onto your channel. I'm really interested in people two keep continuing to create 8-bit gaming.

  • @phil2768
    @phil2768 Рік тому +1

    Excellent video - please make more. I cannot believe only 39k views! You definitely deserve more.

  • @runtoday1
    @runtoday1 2 роки тому +1

    Again, massive help Ryan. I have been looking at how I can start running Assembly script but also debug at the same time. Thanks again mate. :)

  • @socat9311
    @socat9311 2 роки тому +2

    Love the way you explain. I will start to develop NES based on your content. I got also the book from 8bit workshop, so my childhood dream might come true :) i hope you have time for more videos!

  • @abomaria7192
    @abomaria7192 Рік тому +1

    This lesson is like an icebreaker, against the ice that around assembly language. Thank you a lot

  • @Robert_Shmigelsky
    @Robert_Shmigelsky 11 місяців тому

    Good stuff. The dev cart magazines got me interested in assembly.

  • @pimpingkek4947
    @pimpingkek4947 Рік тому

    This was going to be my next question. Thank you so much. I wanted to know more about 6502

  • @user-cm8zq4mt1x
    @user-cm8zq4mt1x 5 місяців тому

    These videos are an amazing resource! Thank you so much. This has already been very helpful.

  • @LukeAvedon
    @LukeAvedon 2 роки тому +3

    So, so, so, so happy I found this channel!!!!!!!!!

    • @NesHacker
      @NesHacker  2 роки тому +1

      Welcome! I’m currently on a rest month but new videos are starting up in October, glad you’re enjoying the channel thus far!

  • @PanosGeorgiadis
    @PanosGeorgiadis 2 роки тому +2

    Excellent video and unique approach into teaching the basics using the NES ecosystem at the same time. Subscribed :D

    • @NesHacker
      @NesHacker  2 роки тому +3

      Thanks! Yeah I liked the idea of teaching 6502 and helping people get more comfortable with building games at the same time.

  • @jimmeyotoole
    @jimmeyotoole 2 роки тому +2

    Hey mate, I've had a since long stalled nes emulator I was writing in golang. I've wanted to pick it back up again and get it working. It has all the CPU instructions written but goes out of memory and crashes frequently.
    This video really helped get my brain back in gear and thinking about debugging it again. Appreciate it!

  • @flandyknightmaster9961
    @flandyknightmaster9961 2 роки тому +4

    If you got the message "Unknown ROM file format" by FCEUX 2.6.1(or higher). Don't worry. Insert five lines code of demo (begin from .segment "HEADER"...) to your .s file.

    • @SuperSomieStuff
      @SuperSomieStuff 2 роки тому +1

      Please explain more, what do you mean by “demo”?

    • @macsilvano
      @macsilvano 2 роки тому +6

      @@SuperSomieStuff Add the following lines to the beginning of your code:
      .segment "HEADER"
      ; .byte "NES", $1A ; iNES header identifier
      .byte $4E, $45, $53, $1A
      .byte 2 ; 2x 16KB PRG code
      .byte 1 ; 1x 8KB CHR data
      .byte $01, $00 ; mapper 0, vertical mirroring

  • @twobob
    @twobob 9 місяців тому +1

    after 30 years of programming sure I know this but it's all about the delivery. That was fun

    • @NesHacker
      @NesHacker  9 місяців тому

      Nice, I have about the same. I think communicating this stuff is really fun, but it is quite hard to strike a balance for those without many years of programming experience.

    • @twobob
      @twobob 9 місяців тому

      eh you nailed it and when 01010000 01000101 01000010 01000011 01000001 01000011 the teacher is all that matters @@NesHacker

  • @squeezeb0x
    @squeezeb0x Рік тому +2

    Excellent video. Thank you.

  • @thehollowknerd3858
    @thehollowknerd3858 2 роки тому +1

    this channel is underrated

  • @pavelgreddd9635
    @pavelgreddd9635 Рік тому +1

    Wow, what a channel. Keep going man

  • @mykalimba
    @mykalimba 2 роки тому +70

    Former 6502 games programmer here (for C64, not NES, but still the same processor). Never have I ever pronounced the DEX instruction like the word "decks". It's always been DEE-EEE-EX. 🤷‍♂

    • @NesHacker
      @NesHacker  2 роки тому +30

      Haha, yeah… that’s just how I first read it and it stuck with me. Hope it doesn’t put ya on tilt 😆

    • @scootergirl3662
      @scootergirl3662 Рік тому +13

      Anything in tech, you can always expect someone to comment on pronunciation of something

    • @mykalimba
      @mykalimba Рік тому +10

      @@scootergirl3662 I bet if someone pronounced NES as "knees", you'd have something to say about that. Also, I wasn't saying that "decks" is wrong; I just said that in all of the years that I was writing 6502 code, neither I nor anyone I worked with ever pronounced it that way.

    • @acied6200
      @acied6200 Рік тому +4

      How about just "decrease X" ?

    • @e_c6324
      @e_c6324 7 місяців тому +1

      It’s actually decrement X. Just like INX is increment X. So DEX (as it’s spelt) makes sense. “DEE-EEE-EEX” does not make sense. DEX is also easier to say, with less palette movement, which is the purpose of acronyms. Leave the man alone and be word by yourself.

  • @mizumeh4214
    @mizumeh4214 8 місяців тому +3

    When I run build task on any of the examples, it builds a rom of the wrapper. The key difference is that when you do it it executes the task directly but on my terminal it executes the task in the folder.

    • @shootmepleasedotnet
      @shootmepleasedotnet 8 місяців тому

      Same issue here. If I figure it out I will update how.

    • @kaboom569
      @kaboom569 7 місяців тому

      I got the execute the task in the folder when I used the git bash, but I use cmd prompt it works fine. I got the wrapper as well, the contents is the same as those in the video.

  • @Bianchi77
    @Bianchi77 2 роки тому +2

    Keep it up, nice video clip, thank you for sharing it :)

  • @diegolopes8737
    @diegolopes8737 Рік тому +1

    thank for you video. great class about it.

  • @keltonpennel5841
    @keltonpennel5841 2 роки тому +8

    So, this has been a great resource so far. I have been learning a lot, especially with VS code. However, I have run into a snag. When I try to run the code for Lesson 1, I get an error code like this, "ld65: Warning: C:\cc65\cfg/nes.cfg:63: Segment 'HEADER' does not exist", for this , "STARTUP", "VECTORS", and "CHARS". I did not change anything in the .json file. Any thoughts as to what I might be missing?

  • @pfever
    @pfever 2 роки тому +1

    Amazing video!

  • @wildside4822
    @wildside4822 10 місяців тому

    Great tutorial, very helpful, thanks

    • @NesHacker
      @NesHacker  9 місяців тому

      You’re welcome ☺️

  • @german69692007
    @german69692007 23 дні тому

    Stay away from me!!!!!!!!!!!!!! You're too smart. Love your Tutorial

  • @kurtcpi5670
    @kurtcpi5670 8 місяців тому

    The 6502 was an amazing CPU in its day, and remains one of the best choices for microcontroller foundations 50 years later. It's architecture and assembly language offer a straightforward path to creating sophisticated apps without high-level languages/compilers. It has a few things that have to be digested, like the difference between indirect-indexed and indexed-indirect modes (also known as indirect-x and indirect-y), but the ability to use either as the situation demands is super power, and permits C-like pointers and pointers to pointers to be easily created in assembly. It's a time-tested chip with utility that extends far beyond the typical useful life of such a complex-purpose unit.

    • @NesHacker
      @NesHacker  8 місяців тому

      I agree wholeheartedly. I think 6502 is my favorite assembly language to work in because it is incredibly expressive given such a concise instruction set. While working in on comparable architectures like Z80 I really miss the indexed addressing modes 😭

  • @wlcrutch
    @wlcrutch 6 місяців тому +1

    Lemme guess: You’re a professional programmer? I’m a CS student taking my first assembly course, for an Atmega16. I LOVE it. Being a big fan of C and HATING courses in Android and .NET, dev, it’s so enriching and fun to mess with hardware. Hardware is the platform! ❤

    • @NesHacker
      @NesHacker  6 місяців тому

      I was for many years, but now I’m a UA-camr 😂

  • @macelapine1573
    @macelapine1573 2 роки тому +2

    You're a legend. Thanks!

  • @artstechnology7809
    @artstechnology7809 24 дні тому

    Respect for you genius ❤❤❤

  • @Jadair215
    @Jadair215 Рік тому +2

    I'm having some problems on the debbuging phase, i reset the ROM file into de FCEUX and add the breakpoint, but the counter just starts at 0000 address. What can i do?

  • @AliAbdullah-oi3wc
    @AliAbdullah-oi3wc 2 роки тому +5

    Wow it's scary 😭 I hope you do a hello world example

    • @NesHacker
      @NesHacker  2 роки тому +5

      Haha, the scary part is that hello world is way more complex than most of the examples I’ve shown on the channel thus far. I will do one… just need to build up to it a bit ;)

  • @sergeykish
    @sergeykish Рік тому +2

    Thank you. I've compiled with `cl65 01_XandY.s --verbose --target nes -o 01_XandY.nes` on Linux and it failed with "Unknown ROM file format". It is great that you have provided DevEnvironmentDemo. I had to add header
    .segment "HEADER"
    ; .byte "NES", $1A ; iNES header identifier
    .byte $4E, $45, $53, $1A
    .byte 2 ; 2x 16KB PRG code
    .segment "VECTORS"
    ;; When an NMI happens (once per frame if enabled) the label nmi:
    .addr 0
    ;; When the processor first turns on or is reset, it will jump to the label reset:
    .addr Main
    Without vectors it failed to reach 8000

  • @SignatureScentReviews
    @SignatureScentReviews Рік тому

    Finally got my dev environment working on my M1 Mac!

  • @pdrobautista
    @pdrobautista Рік тому +1

    Nice content, I was specting some kind of app to program nes games no raw assembly code

  • @misterretrowolf1464
    @misterretrowolf1464 2 роки тому +1

    GREAT!!

  • @thehollowknerd3858
    @thehollowknerd3858 2 роки тому

    this is best channel

  • @pastaprod3297
    @pastaprod3297 5 місяців тому

    Not here for the gaming stuff but really interesting!

  • @wirebus379
    @wirebus379 2 роки тому +1

    I like your video, simple and informative . I have 2 questions:
    1-how can I start 6502 programming?
    2- what software are you using for programming 6502?
    keep up the good work

    • @NesHacker
      @NesHacker  2 роки тому +2

      Check out my “NES Dev Environment” video. I show how to get started and what software to use there.

  • @hiukas.
    @hiukas. 2 роки тому

    Deserves more views...

  • @hitsuji-m
    @hitsuji-m Рік тому

    Hello, great video ! I wanted to start learning and creating games for NES for a while (more than 1 year) and you made me start, so thanks for being able to break my lazyness xD !
    Could you share the code that helps to prevent the grey screen on FCEUX ? I visited some websites but don't really understand if it's due to the emulator, an error in the code or just basic NES functionning.
    Also, do you plan on creating a video about the base code of a NES game (explaining VECTORS/HEADER segments, how to display a simple sprite on the screen, etc...) ? I really think it would be helpful, especially from you !
    I hope you're having a great day !

  • @fungo6631
    @fungo6631 Рік тому +2

    I suggest Mesen for the NES emulator as it's much more accurate than FCEUX and it also has an excellent debugger.

  • @bojiden
    @bojiden 7 місяців тому

    6502 was also used in slight variations on Atari 2600s and Commodore 64, if you want to program games for those consoles.

  • @qwerty4o4
    @qwerty4o4 Рік тому

    At 6:28, you mentioned not to worry about the lines that started with the dot. Could you explain what those lines do? I get that they provide information to the assembler, but what information do they give? Why are they necessary?

  • @objectobjectobject4707
    @objectobjectobject4707 10 місяців тому

    Do instructions contain the data by itself lie OPCODE and OPERAND ?
    Thanks for the series !!!

  • @the_unforseen8224
    @the_unforseen8224 10 місяців тому

    This is random and may or may not help someone but I know it’s helped me remember the difference between data and storage. Data comes from the Latin verb do dare which means to give, data is it’s perfect passive participle meaning things having been given. So storage is where you store the things having been known or given 🙂

    • @NesHacker
      @NesHacker  9 місяців тому

      *reply with mind explosion gif* 😳

  • @glauco_rocha
    @glauco_rocha 11 місяців тому +1

    One thing that strikes me right in the nerd feels when I think about programming is: the distinction between code and data is purely conceptual. In the real world, code is just data that works on other data.

    • @NesHacker
      @NesHacker  9 місяців тому

      I was reading something somewhere where this concept is really only central to von Neumann architectures. But since for serial computing that basically just means “any computer” it feels like this concept is fundamental.

  • @christopherjackson2157
    @christopherjackson2157 2 роки тому +2

    The 6502 in the nes, is it a stock 6502 with simply some features removed? Does it have a proprietary pin-out or could a nes be repaired with a standard 6502?

    • @cletusthefetus23
      @cletusthefetus23 Рік тому +1

      I know this is 2 month old comment lol. The 6502 for the NES was manufactured by Ricoh, and lacks the decimal mode of the original MOS6502. The same package also contains the sound generator. So I wouldn't expect it to work if you replaced it with some other 6502.

    • @christopherjackson2157
      @christopherjackson2157 Рік тому

      @@cletusthefetus23 Thanks! That line lines up pretty well with what I've read since. :)

  • @stevethemagicninja
    @stevethemagicninja Рік тому

    Nice shirt!

  • @SuperSomieStuff
    @SuperSomieStuff 2 роки тому +2

    I’m trying to follow this, but “run build task” just makes an .o file that FCEUX can’t use. Any idea of how to make it work would be appreciated

    • @oscarw.alcantara4459
      @oscarw.alcantara4459 Рік тому

      Don’t know if this will help, but try it.
      1st. Make sure you have a working assembling process (on his video NES Development)
      2nd. You have to change the “input” and “params” lines on the cl65config.json code to indicate what’s the target and end result.
      For example:
      If you create a .s file named “example.s”, then your cl65config.json has to read (if you have the exact default setup that he explains in the NES development video) this:
      {
      ”executable”: “C:\\cc65\\bin\\cl65”,
      “input”: “example.s”,
      “params”: “-verbose -target nes -o example.nes”
      }
      Note how you have to change the input (which code are you targeting) and params (to what do you want to change that code).

  • @olds86307
    @olds86307 2 роки тому +1

    i'm kinda hoping this is done for snes stuff as well

  • @nolancarey6244
    @nolancarey6244 7 місяців тому +1

    When doing the run and build for the XandY code, the compiler kept building the wrapper file instead of the XandYs. I configured the default build task to be on the XandYs, although I don't know if that does anything different. Either way, after compiling, it doesn't make a .NES file, it just makes a blank file that can't be used by the emulator. I don't know why it does this.

    • @RoastedPistachi0
      @RoastedPistachi0 4 місяці тому

      if you rename the file to include .nes at the end of the file, an emulator should be able to open it

  • @Wojtek_1777
    @Wojtek_1777 6 місяців тому +1

    What do i do if it compiles wrapper.s instead of 01_XandY.s

  • @canofsoda
    @canofsoda 8 місяців тому

    what parameters should i use in the cl65config.json file? the default params dont work and ive tried the ones shown on the github and the files they make dont work with FCEUX.

    • @NesHacker
      @NesHacker  8 місяців тому +3

      Interesting, let me take a look at it as sometimes software gets updated and the steps may have changed.

    • @canofsoda
      @canofsoda 8 місяців тому +1

      @NesHacker goof point. I've noticed that while it doesn't make the correct file for 01_XandY, it does make it for the "wrapper" file which is interesting

  • @maxmuster7003
    @maxmuster7003 2 роки тому +1

    I used 6502 assembly at first and then i used x86 assembly and it is much easier to have 16 bit and 32 bit register.

  • @fawfulmark2
    @fawfulmark2 8 місяців тому

    For some reason when I get to the step at 8:50 it doesn't make the additional XandY file and instead keeps doing it to Wrapper. was there a step I missed?

    • @ttermit
      @ttermit 8 місяців тому +2

      I also had this problem. Go to the file that points to cl65 on the first line. In input chang buffer.s to XandY.s and in output change buffer.nes to XandY.nes

  • @anthonyleedickinson3491
    @anthonyleedickinson3491 8 місяців тому

    Hi just a quick one. I got myself a nes programming course. It teaches 60hz programming, and would like to know how easy or difficult it would be to convert to 50hz has it doesn't teach that. Thanks in advance.

    • @NesHacker
      @NesHacker  8 місяців тому

      Well the difference is gonna be in the feel of the game. You should be able to use most emulators to see how it feels in 50 vs 60hz. Other than that the core programming concepts should be pretty much the same. Happy hacking!

    • @minirop
      @minirop 5 місяців тому

      most games just didn't gave a %%%% so the game just runs 17% slower. and a couple just had different constants (like increased speed)

  • @SignatureScentReviews
    @SignatureScentReviews Рік тому

    I need a 6502 book I think. I have an original book form the 80's that I got for programming my Commodore 64, will it work?

    • @NesHacker
      @NesHacker  Рік тому +1

      My primary reference is the MOS Microcomputers 6502 Programming manual. The only big thing to watch out for is that the 2A02 on the NES doesn’t have the decimal mode circuitry (they replaced it with the APU), so that stuff doesn’t work… But otherwise yeah, everything else is pretty much the same when it comes to the CPU.

  • @CartoonFinder
    @CartoonFinder 2 роки тому +2

    I ran the build task, but I got this error:
    _cl65 : The term 'cl65' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling_ _of the name, or if a path was included, verify _
    _that the path is correct and try again._

    • @NesHacker
      @NesHacker  2 роки тому +1

      Did you install CC65 as part of setting up your development environment? I have a video detailing all the steps that are required to perform builds using VSCode here: ua-cam.com/video/RtY5FV5TrIU/v-deo.html. Lemme know if you're still seeing issues, and cheers!

    • @CartoonFinder
      @CartoonFinder 2 роки тому

      @@NesHacker yes, I did. And thanks, I'll take a look at ir

    • @CartoonFinder
      @CartoonFinder 2 роки тому

      Still not working...

    • @NesHacker
      @NesHacker  2 роки тому +1

      Sorry for the late reply! Okay, if you’re seeing that error then it means that windows cannot find the cl65.exe file on your computer. The cl65config.json file in the source repository expects it to be at exactly “C:\cc65\bin\cl65.exe” so that would be the first thing to check to ensure that it is there (which it should be given you’ve followed the instructions from the development environment video). Other than that it might be an issue with not having permission to access the file… though that seems unlikely. Unfortunately I cannot think of another reason why this might be happening :(

    • @CartoonFinder
      @CartoonFinder 2 роки тому +1

      @@NesHacker Hello again! I waited for a month or 2... and It works! :D

  • @antoinefortin1386
    @antoinefortin1386 Рік тому

    Wadawow!

  • @samuelsathler9586
    @samuelsathler9586 Рік тому

    When I try to build the rom, I get the message "no build task to run found".

  • @russellsnyderjr7523
    @russellsnyderjr7523 4 місяці тому

    Awesome Video, But When I Follow The Link, There Is No "Demo Repository".

  • @lays6341
    @lays6341 8 місяців тому

    for some reason it keeps generating me wrapper file instead of the 01_XandY file, even tho i’ve followed exactly your manipulation

  • @snowiethetoolguy
    @snowiethetoolguy 8 місяців тому

    Build a EFI computer and a CNC lathe with a C64 a fair while back. All with Assembly.

  • @dr.ignacioglez.9677
    @dr.ignacioglez.9677 Рік тому

    I LOVE C64 👍🥂🎩

  • @BGDMusic
    @BGDMusic 11 місяців тому +2

    i know the first thing about 6502 assembly, just not the second thing.

  • @ttermit
    @ttermit 8 місяців тому

    I know this video's kinda old, but when i try to run smth except the hello program, fceux just says "unknown ROM file format". Can anyone help?

    • @NesHacker
      @NesHacker  8 місяців тому +1

      You’re not the only one who’s said this recently. I gotta check it out and see what is going on…
      Might be time for me to make an updated video :)

    • @ttermit
      @ttermit 8 місяців тому

      ​@@NesHackerhow do you respond that quickly?😂

    • @ttermit
      @ttermit 8 місяців тому

      ​@@NesHackeralso idk if this will help but when you build the example project in console it talks about startup, vector, chars and some other segments, but when i compile the same code, i get warnings about segments CHARS, VECTORS, STARTUP and HEADER not existing. Thanks for help though

    • @ttermit
      @ttermit 8 місяців тому

      @NesHacker i added this code:
      .segment "HEADER"
      .byte "NES"
      .byte $1A
      .byte $02
      .byte $01
      .byte $00
      .segment "STARTUP"
      RESET:
      INFLOOP:
      JMP INFLOOP
      NMI:
      RTI
      it doesn't make any errors and shows a grey screen. There is code at address 8000, but X is 0, although i set it to 5 in the code. Also, it's visible that you have a lot of code in the file when you open it in the debugger, so i think these files may be a problem. Hope that helps

  • @doctorx0079
    @doctorx0079 12 днів тому

    If we have cc65, why not use C?

  • @Gitbizy
    @Gitbizy Рік тому

    Was good at 6502 back in the 80’s. Very nice limited size instruction set compared to todays CPUs

    • @NesHacker
      @NesHacker  Рік тому +1

      Haha, I wasn't... but you're not joking. Even modern micro controllers make the 6502 look like it was invented shortly after the wheel 😆

    • @Gitbizy
      @Gitbizy Рік тому

      @@NesHacker your videos are very interesting. I learned by reverse engineering code on the Atari 800 using Omnimon which was a real-time editor/debugger that you could jump into anytime with a two key sequence. Learned a whole lot that way… those were the fun days of computers… your videos bring back a lot of memories for me. Thanks and nice job.

  • @finngomezgamer
    @finngomezgamer 2 роки тому

    how could we make games for the snes because the processor core is still 6502

    • @NesHacker
      @NesHacker  2 роки тому

      I’m hoping to branch out and do some snes stuff too in the future. Focusing on the nes for now until I get more of the bases covered for the system :)

  • @adamford4167
    @adamford4167 Рік тому +1

    I assume this could be used for making Atari games.

  • @shahriarrafsun7078
    @shahriarrafsun7078 4 місяці тому

    I don't know what is happening but whenever I want to make my own workspace and follow your command it never works! But your code is perfectly working without any fault. Even I copied all of your code into a new workspace and it's not working

  • @zerospacer
    @zerospacer 2 роки тому

    STAGE0 got me here

  • @or4cl3br
    @or4cl3br Місяць тому

    Why my code in debugger start in index $8070?

  • @E.T.S.
    @E.T.S. Рік тому

    At 7:00 you start with an assembler without explaining it is an assembler. Try to explain MC with a simple MC editor only before jumping into assembler editors.

  • @hangonsnoop
    @hangonsnoop Рік тому +1

    I triple dog dare you to talk about self-modifying code.

  • @trxgreder
    @trxgreder 8 місяців тому +1

    i am GOING to learn 6502 for a SCHOOL PPROJECT in 6 WEEKS. wish me luck, i HOPE its possible

    • @NesHacker
      @NesHacker  8 місяців тому

      I bet you can learn it in a week or two if you really buckle down and work on some serious projects 😀

    • @trxgreder
      @trxgreder 8 місяців тому

      @@NesHacker why thank you for the support!

  • @jell0goeswiggle
    @jell0goeswiggle 4 місяці тому

    Hi Ryan, UA-cam recently recommended you yo me. I like your stuff and am doing a little diving through your back catalog.
    1. I know why you dropped it, but the intro is bitching.
    2. omg the shirt in this one.

  • @JarppaGuru
    @JarppaGuru 4 місяці тому

    if want learn 6502 assemply. then not focus NES. just assembly forget system specific this is is this address. just assembly moving bytes. even better build own computer and sure it has no video card so basic moving bytes is all you need learn. next step is use that to control devices

  • @2SUB-TV_space
    @2SUB-TV_space 2 місяці тому

    Assembly language is difficult for many people. Why not make lessons for the C language?

    • @NesHacker
      @NesHacker  2 місяці тому +1

      Because most games were made in assembly back in the day, it gives you more control, it's very useful to know when debugging, essential for ROM hacking, and most important of all: because I like assembly ;)

    • @2SUB-TV_space
      @2SUB-TV_space 2 місяці тому

      @@NesHackerAssembly languages are also different. It is important to mention which one is used. Otherwise, assembler of brain occurs.. 🙂

  • @davidgari3240
    @davidgari3240 2 роки тому

    Classic. "Hold down the CTRL (control) key and press 'C'. Now fire up the debugger and re-write the BIOS code to change the function of Ctrl-C".
    Try again.

  • @Adam-kx9gi
    @Adam-kx9gi Рік тому +1

    i bet all you see is code and this is the matrix were living in...right?? 🤣

    • @NesHacker
      @NesHacker  Рік тому +1

      Honestly? Mostly all I see these days are editing and animation timelines 😂

  • @hadeseye2297
    @hadeseye2297 Рік тому

    No, I'm not feeling comfortable with your head attacking my private space so aggressively.

  • @rarrmonkey
    @rarrmonkey Рік тому

    there are no numbers, only voltages and logic states
    computers do not know what a 1 or 0 is only responding to voltage levels.
    1 and 0 are for us to understand the voltages...

    • @NesHacker
      @NesHacker  Рік тому

      The goal was to explain how we use voltages as an analog to represent the values for 0 and 1. While you're correct that there are only voltages and digital circuits responding to those voltages, the important part is how we interpret the physical states so as to understand and manipulate them. At least that was what I as trying to communicate.

  • @steveHoweisno1
    @steveHoweisno1 Рік тому

    Talk about asmr

  • @masterpenky
    @masterpenky Рік тому

    I‘d love to watch some of your videos, but getting advertisements literally every 30 seconds. Sorry, this is just too much.

    • @NesHacker
      @NesHacker  Рік тому

      Huh, there should only be ads at the beginning, in the middle, and at the end. I am not sure why you'd see so many 🤔

  • @canofsoda
    @canofsoda Рік тому

    anyone else still having a problem loading it into an emulator even when adding:
    ;.byte "NES", $1A ; iNES header identifier
    .byte $4E, $45, $53, $1A
    .byte 2 ; 2x 16KB PRG code
    .byte 1 ; 1x 8KB CHR data
    .byte $01, $00 ; mapper 0, vertical mirroring
    Hoping to god im not the only one.

    • @canofsoda
      @canofsoda Рік тому

      Yeah so i just copied his code then added that and it worked. no clue why

    • @canofsoda
      @canofsoda Рік тому

      now the breakpoint wont work. i believe i quit for now.