NES Emulator Part #2: The CPU (6502 Implementation)

Ғылым және технология

In this video I build a 6502 emulation in C++. I pay close attention to the instructions that can cause problems, ADC and SBC. Then I build a lightweight application to analyze running 6502 programs.
Source: github.com/OneLoneCoder/olcNES
KZread: / javidx9
/ javidx9extra
Discord: / discord
Twitter: / javidx9
Twitch: / javidx9
GitHub: www.github.com/onelonecoder
Patreon: / javidx9
Homepage: www.onelonecoder.com

Пікірлер: 748

  • @vspecky6681
    @vspecky66814 жыл бұрын

    Can we just take a moment and appreciate the fact that this guy didn't put a single ad on an hour long video?

  • @javidx9

    @javidx9

    4 жыл бұрын

    Thanks! Or any of my videos as it happens 😊

  • @cecilectomy

    @cecilectomy

    4 жыл бұрын

    Never has, and doesn't intend to, iirc. Doesn't care about monetizing the channel, only cares about the community, code, and knowledge.

  • @CB3ROB-CyberBunker

    @CB3ROB-CyberBunker

    4 жыл бұрын

    don't even think you can monetize videos when the account is registered on most parts of the world other than the usa. can't find it anywhere in my account for one thing. lol. youtube never understood much of the 'open one office in pakistan and just send everyone bitcoin' thing and think they have to open 'local offices' with 'local payment bullshit' everywhere. lol. for all i care they just pop the cash in an envelope. works anywhere where there is a mailman ;)

  • @Empathia2k7

    @Empathia2k7

    4 жыл бұрын

    can i be your patron? :>

  • @javidx9

    @javidx9

    4 жыл бұрын

    @@Empathia2k7 you certainly can!

  • @74LS_NE555
    @74LS_NE5554 жыл бұрын

    Life goals, having a wife that can double check my opcodes

  • @user-cz9ss4yq4x

    @user-cz9ss4yq4x

    3 жыл бұрын

    "men only want one thing and it's disgusting"

  • @user-cz9ss4yq4x

    @user-cz9ss4yq4x

    3 жыл бұрын

    @Serena Williams No, having a wife that can double check your opcodes

  • @baileyharrison1030

    @baileyharrison1030

    2 жыл бұрын

    @Serena Williams Wants ≠ responsibilities

  • @tinker7722

    @tinker7722

    2 жыл бұрын

    😅👍

  • @waseinmalwar1854
    @waseinmalwar18544 жыл бұрын

    1 hour of David speaking about opcodes? Is this heaven?

  • @javidx9

    @javidx9

    4 жыл бұрын

    Not only do you learn about code, but its an awesome insomnia remedy too!

  • @hadis93

    @hadis93

    4 жыл бұрын

    west Virginia

  • @lupinedreamexpress

    @lupinedreamexpress

    4 жыл бұрын

    machine code is great for those cold winter nights.

  • @aphexon.

    @aphexon.

    4 жыл бұрын

    Defeated swordsman pretty sure it's hell

  • @fdelduquenobre

    @fdelduquenobre

    4 жыл бұрын

    No. Just mean you are crazy, like the rest of us!

  • @emiljaszczuk1
    @emiljaszczuk14 жыл бұрын

    Dude, your content is pure gold. I love the fact that you thoroughly explain every concept and not only show the code, while still being concise.

  • @javidx9

    @javidx9

    4 жыл бұрын

    Thanks remique!

  • @proxy1035

    @proxy1035

    4 жыл бұрын

    which is not only rare but also really awesome as you can follow along while programming in another language!

  • @slickmashable

    @slickmashable

    2 жыл бұрын

    Man we don’t deserve this!!!! Holy shit

  • @code-dredd
    @code-dredd4 жыл бұрын

    Chemists have The Periodic Table of Elements. We Software Engineers have The Mnemonic Table of Opcodes.

  • @skilz8098

    @skilz8098

    4 жыл бұрын

    Hardware Engineers have the Truth Tables, State Tables, Transition Tables, Implication Tables, and K-Maps of your Basic Logic Gates and the combinations of them!

  • @loernius

    @loernius

    4 жыл бұрын

    Of each processor

  • @bpark10001

    @bpark10001

    3 жыл бұрын

    ...but there is only one "machine" in chemistry, with a universal set of codes, versus many for the software guys! Can we compile C++ to chemistry?

  • @VanillaMidgetSSBM

    @VanillaMidgetSSBM

    2 жыл бұрын

    @@bpark10001 I mean Silicone is a chemical compound sooooo 🤔🤔🤔

  • @InfiniteQuest86
    @InfiniteQuest864 жыл бұрын

    Wow, you have a very patient and understanding wife.

  • @greatbullet7372
    @greatbullet73724 жыл бұрын

    You are the personification for actual, usefull qualitycontent about c++. Be proud!

  • @javidx9

    @javidx9

    4 жыл бұрын

    Thanks Great Bullet! I just want to show that fun applications are possible and far better to learn from than text books XD

  • @josemaria2094

    @josemaria2094

    4 жыл бұрын

    TheChernoProject, Universo Programado and Bisqwit are too, :)

  • @greatbullet7372

    @greatbullet7372

    4 жыл бұрын

    @@javidx9 thats my speech, books are outdated crap for the biggest part.

  • @greatbullet7372

    @greatbullet7372

    4 жыл бұрын

    @jj zun i have experience yes but understanding the whole background of a system is another level of expertise you have to gather, and im thankful for every useful plate someone is able to serve.

  • @Xd4LEM4ObX

    @Xd4LEM4ObX

    3 жыл бұрын

    @@josemaria2094 All the channels that i like... You're brazilian right?

  • @victornpb
    @victornpb4 жыл бұрын

    I’m on KZread since 2005, I never been so excited to see a part 2 video in my entire life!

  • @VirtuelleWeltenMitKhan
    @VirtuelleWeltenMitKhan4 жыл бұрын

    The test ROMs are a super nice thing to have. A wife which is willing to check your code is even better.

  • @zlatkovnik
    @zlatkovnik4 жыл бұрын

    Why are you much more interesting than my college professor when talking about the same subject? Good work!

  • @Simple_Simon_UK
    @Simple_Simon_UK4 жыл бұрын

    I can't stop giggling. You have taken me right back in time. I wrote a 6800 Emulator (Dissassembler) in Pascal, during my second year at University in 1984! The Ureka moment for this most daunting of tasks was when I devised the table of Instructions and Addressing Modes. Once I'd created the table, the implementation of the CPU was a doddle. I love the elegance of your C++. You are a very clever cookie.

  • @kkeanie

    @kkeanie

    4 жыл бұрын

    jesus! Do you still have the code!

  • @Simple_Simon_UK

    @Simple_Simon_UK

    4 жыл бұрын

    @@kkeanie Sadly no. My wife's de-cluttering got rid of my history many years ago.

  • @skilz8098

    @skilz8098

    4 жыл бұрын

    @@Simple_Simon_UK Bad wife; bad wife!

  • @Simple_Simon_UK

    @Simple_Simon_UK

    4 жыл бұрын

    @@skilz8098 Nah. She's a fantastic Wife. She has put up with my s#it for over 37 years. She just likes to de-clutter once in a while.

  • @w3ll1ngt0nd14s
    @w3ll1ngt0nd14s4 жыл бұрын

    YES! I was looking forward to second part of this new series.

  • @whatamievendoing

    @whatamievendoing

    4 жыл бұрын

    Same! I'm totally satisfied with this episode too, all the juicy details I wanted are included in a way which makes more sense than it ever did before!

  • @boredfish80
    @boredfish80Ай бұрын

    It takes some skill to create something that a curious layman can follow and yet someone more tech-minded can actually use without being condescending. Hats off to you, sir. There’s something for everyone here!

  • @javidx9

    @javidx9

    Ай бұрын

    Thanks boredfish, I appreciate that, as it's what I aim for in my videos.

  • @lallenlowe
    @lallenlowe4 жыл бұрын

    Oh man, this series is coming at the best time. I love you. May I recommend Ben Eater's 8 bit computer on bread boards series for anyone wanting to understand the electrical underpinnings of a CPU.

  • @skilz8098

    @skilz8098

    4 жыл бұрын

    Already Watched it; and if you want the math background check out 3Blue1Brown and for In Depth C++; check out Jason Turner!

  • @deathscreton

    @deathscreton

    4 жыл бұрын

    @@skilz8098 I wanna throw out "The Cherno" as well, his tutorials into C++ are succinct and to the point.

  • @skilz8098

    @skilz8098

    4 жыл бұрын

    @@deathscreton Yeah, he's good too!

  • @asandax6

    @asandax6

    3 жыл бұрын

    Interesting I am subscribed to all the people named here.

  • @joedempseysr.3376
    @joedempseysr.33764 жыл бұрын

    Congratulations on your 100th video, David! Thoroughly enjoyed it and am looking forward to more. Thanks!

  • @saraweber312
    @saraweber3124 жыл бұрын

    This is honestly amazing! This is basically a college course that's free. Keep up the good work man!

  • @DDD-vs2pe
    @DDD-vs2pe4 жыл бұрын

    Dude you have explained everything and implemented everything so abstractly and succinctly that I watched the whole last one, saw this one come out and watched it straight away.. Thanks for a great video, and I really hope you make this a great series! It's absolutely fascinating!

  • @StuBonham
    @StuBonham4 жыл бұрын

    Incredible stuff - I programmed 6502 back in the day, and this brought back a lot of memories.

  • @funposting8912
    @funposting89124 жыл бұрын

    It’s beautiful seeing a deep-dive into the 6502 like this in video form. Even the simplest of microprocessor trainers don’t get this absolutely simple, I love it! Can’t wait to see you go through the rest of the NES’s hardware like this, this series is taking my knowledge from a rough, “good enough but never great” understanding to something much more refined and even simplified. Thank you very much for everything you’ve done so far, and I can’t wait for the rest of this series!

  • @WagnerSchmitt
    @WagnerSchmitt4 жыл бұрын

    Since your first video I already started building my own Emulator. You were right, it is such a wonderful project to work on. It was something I also wanted to do a long time ago, and your videos gave me the motivation to start. Thank you for that, and for making the videos so didactic.

  • @spjewkes
    @spjewkes4 жыл бұрын

    Thank you for yet another interesting and informative video. Also, congratulations on your 100th one. It’s been a fantastic journey so far and I’m looking forward to many future videos :)

  • @Heisenberg2097
    @Heisenberg20974 жыл бұрын

    Fills so many gaps I never cared about to fill back in the days though it was all in front of me... had to care about so many other things. Great video.

  • @dtg5790
    @dtg57904 жыл бұрын

    This is amazing work. I've been trying to get a 6502 emulator going in Common Lisp for the last few months and it has been slow... Your work is extremely useful! You've inspired me to revisit my own implementation.

  • @BackyardFilms2
    @BackyardFilms24 жыл бұрын

    Finnaly to the end. took me a few sessions. This was an amazing video thank you!

  • @manuellehmann267
    @manuellehmann2674 жыл бұрын

    Uhhhh... I was so looking forward for this! I just wanted to say: Thx for your awesome work here! I'm learning so much from every single video you are posting. So much detail, so much passion. Again: Thx for sharing this stuff with us.

  • @javidx9

    @javidx9

    4 жыл бұрын

    Hey my pleasure donnerbrenn!

  • @angulo_
    @angulo_4 жыл бұрын

    Wow. Thank you! I'm studying computer science and I was having a bad time understanding assembly code and instructions. This project helped me a lot! Just finished writing my implementation in dotnet:)) looking forward for the next episode!!

  • @vtomasr5
    @vtomasr54 жыл бұрын

    I think I'm more exited about the well organized and educational content rather than the NES emulator itself ;)

  • @TheBeanhacker
    @TheBeanhacker4 жыл бұрын

    Incredible! Been eagerly awaiting this video all week. There's a crater in my office floor where I've been nervously tapping my foot! Awesome video, it paints processor emulation in a simple and elegant light, and makes it appear very achievable.

  • @renarsdilevka6573
    @renarsdilevka65734 жыл бұрын

    David, you are great, just so easy to understand and watch. Every your video inspires me. Thank you!

  • @fabuloss77
    @fabuloss774 жыл бұрын

    What a gold mine.. you have one of the best youtube channel ive came across. I can feel how passionate your are about this subject through your explanations and it shows in the overall quality of the content. Amazing work.

  • @code-dredd
    @code-dredd4 жыл бұрын

    @53:43: This is an attempt to clarify a potential point of confusion for others who may not be too familiar with the stack. Normally, the stack pointer (i.e. `stkp`) should be pointing to the element at the top of the stack. However, in the code as shown, the `stkp` isn't really pointing directly to the top element. Rather, it's pointing to the (logically) "empty" location where the next element should go when pushed, which is why the `write(0x0100 + stkp, a)` call is made first in `PHA` before decrementing the pointer with `stkp--`. Consistent with this, in `PLA`, you can see that the `stkp` is first incremented before reading, so that it moves from the (logically) "empty" stack position down to the actual top element in the stack. I mention this because "normally", you'd expect the `stkp` to be pointing to the top element directly at all times, which would mean that on push, you'd be `stkp--` and then `write(...)`, and on pop you'd be doing `read(...)` and then `stkp++`, in that order. BTW, if you're wondering why `stkp` is decremented in value when the stack itself is supposed to be growing in size (and vice-versa), the reason is that stacks grow from high memory addresses down to lower memory addresses. GG

  • @marklandgraf7667

    @marklandgraf7667

    4 жыл бұрын

    Thank you. I was confused.

  • @senatorpoopypants7182

    @senatorpoopypants7182

    3 жыл бұрын

    you misspelled stkp as stpk in some instances

  • @code-dredd

    @code-dredd

    3 жыл бұрын

    @@senatorpoopypants7182 Fixed. Thanks.

  • @sakealex
    @sakealex4 жыл бұрын

    Thanks for your work sir, I binged on your vids the past week, I was off from work. I wish you the best of luck in all your endeavors.

  • @RetroWK
    @RetroWK4 жыл бұрын

    Excellent Video! Congrats on 100 videos and thanks for your work & time!

  • @josephholten5088
    @josephholten50884 жыл бұрын

    wow, this is just amazing! i have only taken a short course on c++ at uni but understood most of what you were talking about, it was all very clear and super interesting. i would have never thought i'd get that much involved into c++

  • @schweizerd6303
    @schweizerd63034 жыл бұрын

    Excellent content, very easy to understand and follow. Love how you break everything down and the object oriented nature of C++ makes everything so much easier to visualise. I am trying to emulate IA64 architecture and hopefully get it to run Linux and Windows

  • @skilz8098
    @skilz80984 жыл бұрын

    I've tried to do something similar on my own before from reading the documentation from nesdev, and from listening to others but the one thing I kept struggling with was the different addressing modes. After following your source and typing it by hand in my own IDE, as I was reading through the mnemonics or functions and seeing how you implemented them in C++ then I started to understand the actual internal hardware of the CPU. I've worked in Logisim to create simple 4 bit single phase single address CPUs which are quite easy to build from basic gates, but now I think I finally got the full grasp of the different addressing modes of the 6502. I really appreciate videos like this; they help to fill in the gaps! After you complete this series I think building the 6502 - NES in Logisim as a step by step set of tutorial videos would be another exemplary set of worthwhile videos! I was hoping that Ben Eater would take his 8-bit Bread Board CPU and do the same in Logisim! Who know's maybe one day!

  • @kb3khs
    @kb3khs4 жыл бұрын

    Got a Sir David Frederick Attenborough vibe at 1:05:35 Your inflection was good. And the resolution inflection made me feel like I was watching David on the BBC nature channel. LOL. I admire your work, and your choice to not put ads in your videos.

  • @Seftdelmer
    @Seftdelmer4 жыл бұрын

    Wow, these videos are excellent, with clear and concise explanations. You can tell a lot of time and effort went into making these videos by their quality. Thank you for making them and keep up the good work.

  • @samljer
    @samljer4 жыл бұрын

    Ive been refreshing your channel since part 1... this is SO GUD.

  • @JeremiahKellogg
    @JeremiahKellogg4 жыл бұрын

    This is amazing! I know it's a labor of love, but thanks so much for sharing. It really removes some of the more mysterious aspects behind how CPUs work. I'm really looking forward to the rest of the series.

  • @frankk6416
    @frankk64164 жыл бұрын

    Thanks for putting this together. Your presentation is spot on and easy to follow - a pleasure to watch.

  • @teslastellar
    @teslastellar4 жыл бұрын

    Thanks a lot David. Wonderful series. The time and effort you put into these videos is immensely appreciated.

  • @Ali-io9lw
    @Ali-io9lw4 жыл бұрын

    Hi Javidx9! I just want to thank you for making this available!!! In my early teens I wanted to program my own emulator but never knew where to start. I was around the time when NeoRage (first neogeo emulator) was being developed purely in assembly in the 90s and was fascinated by the coders accomplishments. Forward 20 odd years later here I am trying to learn how to make a Nes emulator in C++. I don't have a strong programming background so I have had to watch this several times. I now understand most of your code in this video. I look forward to watching the rest of the series and seeing Nes emulating on my screen. Thank you for making this happen!

  • @jeanjcl
    @jeanjcl4 жыл бұрын

    Amazing content. This is pure gold to someone who is learning systems programming and low level stuff in general. Thank you!

  • @bitchain
    @bitchain4 жыл бұрын

    Totally hooked on this series having both played NES as a kid and later gone into _higher_ level programming; this brings back CompSci memories but if only those lectures were taught in this way.

  • @zgolkar
    @zgolkar4 жыл бұрын

    Outstanding. Simply outstanding. 10/10. Great explanations, great approach of showing the code incrementally, engaging at all times. Thanks a lot, I will be looking forward to the rest of the series!

  • @tomkirbygreen
    @tomkirbygreen4 жыл бұрын

    Fab video David! :-) I learned lots and as ever the process was entirely enjoyable!

  • @podborski
    @podborski4 жыл бұрын

    Wow. What a great content!!! I'm waiting for the next part! Thank you, javidx9

  • @amisner2k
    @amisner2k4 жыл бұрын

    You did your whole presentation, outside, in the heat and didn't take one sip of your soda. You absolute legend. XD

  • @delnarlt
    @delnarlt4 жыл бұрын

    Amazing Video. I'm having fun cause I'm converting the code to C#. I've always wanted to write a NES emulator and I'm a C# guy so your video is a perfect match. You're helping me understand how they wrote a NES emulator in Javascript and other languages.

  • @speedyc88
    @speedyc884 жыл бұрын

    Just watched Part 2 of your emulator video, Javidx9 nice job, more please

  • @keigezellig
    @keigezellig8 ай бұрын

    I just found this series and it inspired me to build a Z80 emulator. It has a lot more instructions than 6502 but i use the ideas presented in this video/series during development. Thank you!

  • @frisnitfrisnit
    @frisnitfrisnit4 жыл бұрын

    Great stuff, loving the series so far! As an ex 6502(ish) console coder for the SNES and a current C++ coder, it’s interesting to be thinking of both simultaneously. Looking forward to the rest

  • @jacksmith3183
    @jacksmith31834 жыл бұрын

    Super impressed, just blown away with how awesome this video series is

  • @shampavmancg
    @shampavmancg2 жыл бұрын

    Very very well articulated. Having written device drivers for the early part of my life, I know how difficult it was to visualize things.. this is very well done

  • @mikemontana7436
    @mikemontana74364 жыл бұрын

    I am really enjoying this! Thank you! Brings back the days of typing in pages of POKES from Antic magazine!

  • @lozD83
    @lozD834 жыл бұрын

    Only 5 minutes in and I can already tell this video is a great resource for anyone interested in 6502 and probably any processor/microcomputer understanding. Thanks for taking the time to explain things so well 😁

  • @philipthatcher2068
    @philipthatcher20684 жыл бұрын

    An excellent and very well paced explanation. Great video.

  • @jeyko666
    @jeyko6664 жыл бұрын

    I literally started reseraching this a week ago, and your videos are godsent man, ch8 m8

  • @tecnoplayer
    @tecnoplayer4 жыл бұрын

    I'm very glad you're making this series. The acronyms and abbreviations of the code make it fast to read and write (r/w) but is far from being intuitive to grasp at first.

  • @taik0
    @taik06 ай бұрын

    Such an amazing video. Perfect explanation. 10/10 quality. There's a game called Turing Complete that helped me a lot to understand a lot of concepts about CPUs addressed in this video.

  • @xotmatrix
    @xotmatrix4 жыл бұрын

    Really good. Easy to understand structure and excellent explanation of ADC/SBC and Overflow. Extra good for introducing your olcPixelGameEngine engine and the handy mass:werk assembler.

  • @javidx9

    @javidx9

    4 жыл бұрын

    Thanks xot!

  • @mannhansen9337
    @mannhansen93373 жыл бұрын

    Excellent video. You are a great teacher with very good presentation skills. I'm a self-taught 6502 programmer on a KIM-1 back in 1980-81.Some years later when I got an IBM PC and developed a 6502 table driven assembler in Quick Basic,later Turbo Pascal.

  • @quincy1048
    @quincy10484 жыл бұрын

    In 1985 I was in computer science school and we did a course where you did a simulation of a assigned processor archeture and proceeded to write an assembler to feed the first program you wrote. So I fired up my new ibm clone with 256ram and two 360k drives and i put turbo pascal 3 in it with a tsr to give me source level debugging and off I went. Our processor was limited so you got the idea of address modes and instruction variants without the repeated details of even a 6502. But yes this was a awesome walk down memory lane watching this video. I was yes, Yes, and YES the whole way through. Nice for you to say this was not your first effort on this but a refined result. Because it looked VERY refined...awesome.

  • @Damaniel3
    @Damaniel34 жыл бұрын

    I actually tried my hand at writing a 6502 emulator many years ago (I wanted to try making an NES emulator too), and I've got the code open while looking at what you're doing. Unsurprisingly, your implementation is *much* nicer - I used giant switch statements to process opcodes instead of function pointers, for example, and I never implemented a proper bus, choosing to just create a single 64K block of RAM, which meant I would have had to refactor things to get the other devices hooked up once I got past the mere CPU emulation stage. I doubt I'll revisit the project again, but I really enjoy watching someone that knows what they're doing go through the same steps that then-20-year old me did so many years ago.

  • @schnert0
    @schnert04 жыл бұрын

    Funny that you happened to be writing an NES emulator at the same as me! Maybe I’ll be able to learn what I’ve been doing wrong when I run into emulation errors. Thanks for your awesome vids, can’t wait for part 3

  • @FritsvanDoorn
    @FritsvanDoorn4 жыл бұрын

    I am half through this video and man this is pure fun of the highest level. Thank you so much for making these videos!!!!

  • @victorjosegonzalez1829
    @victorjosegonzalez18294 жыл бұрын

    this man is incredible, your content is amazing

  • @greje656
    @greje6562 жыл бұрын

    just getting into this serie, so far its soooo good

  • @krrishxxx
    @krrishxxx4 жыл бұрын

    The 2nd part is here and it is very informative, I learned a lot, thank you so much, I can't wait for the other parts :)

  • @walterdiaz2003
    @walterdiaz2003 Жыл бұрын

    I really enjoy learning from this channel. Excellent and high quality content and free. Reminds me of the channel "Self Sufficient Me", similar accent :) Thanks for sharing.

  • @suvetar
    @suvetar Жыл бұрын

    This is great work and very motivating; I really will get off my behind and start doing my own dream project! Thank you so much!

  • @jdragyn
    @jdragyn4 жыл бұрын

    Hobbyist programmer here, but I haven't had the opportunity to write any software in years. Watching you write this NES Emulator is both so incredibly satisfying (your presentation, voice, style and knowledge is amazing) and inspiring (I wanna write something like this now - you make this large project seem do-able!). Thank you for sharing your obvious passion!

  • @theronster345
    @theronster3454 жыл бұрын

    System Designers back in the day were geniuses. I had to design a Single Cycle CPU that performed all the bit wise operations and arithmetic operations for my computer organization class. It fried my brain by the end of the semester. Thanks for the vid it improved my knowledge of system design but also C++.

  • @Oingoboingo710
    @Oingoboingo7104 жыл бұрын

    This is so nice, this series is going to be really awesome!

  • @javidx9

    @javidx9

    4 жыл бұрын

    I hope so Mah Moud, thanks!

  • @tjw_
    @tjw_3 жыл бұрын

    I'm following along but using SFML as my graphics library, so far so good! The only thing I didn't type by hand is the look up table after you said it took two days. Don't mind copy and pasting a little code! Thank for all your hard work!

  • @icupiii
    @icupiii4 жыл бұрын

    This is one of the best series on YT. Thanks!

  • @nikola8345
    @nikola83454 жыл бұрын

    Love your videos!After finishing learning the core language ill start with libraries and your guides!

  • @veganfoodsYOUTUBE
    @veganfoodsYOUTUBE4 жыл бұрын

    Keep up the good work looking forward to the refinement in these areas thanks 🙏

  • @xM0nsterFr3ak
    @xM0nsterFr3ak4 жыл бұрын

    man i am addicted to these videos. keep up the good work!

  • @user-ij5sm2wk7y
    @user-ij5sm2wk7y4 жыл бұрын

    What a great instructional video! You tell potential emulator writers first to choose the level of detail at which the emulation will take place, then consistently explain coding choices for staying at that level. I wish I could explain things just as well.

  • @jszoja
    @jszoja2 жыл бұрын

    Usually I'm watching videos like this with x1.75 speed to get quickly what I need to know, but there is no need to do that with your videos. Very good work. Much appreciated. God bless.

  • @borgy33771
    @borgy337714 жыл бұрын

    Man you are so good at explaining things! Good work!

  • @bruno-zl9qn
    @bruno-zl9qn Жыл бұрын

    Brilliant. I'm writing a Z80 emulator in Rust, and I am using your video for that purpose. Thanks a lot for the hard work put in those videos.

  • @nathonbrown3596
    @nathonbrown35964 жыл бұрын

    This video did not disappoint. Great job. Can't wait for another one

  • @christianbuendia5794
    @christianbuendia57944 жыл бұрын

    how much i learn with this 2 videos thanks a lot! P.D. supporting ur channel is the only way can i say thanks.

  • @ContractCAD
    @ContractCAD4 жыл бұрын

    I taught myself 6502 30-odd years ago as a 15 yr old and guessed at what your emu code would look like (which in fact was my assumption as to how I’d write one). This tho has been a masterclass. I can’t wait for the rest. Thank you sir!

  • @javidx9

    @javidx9

    4 жыл бұрын

    Thanks Matt, I'm approaching the series with broad strokes, and the devices get more complicated as we progress so it will need a bit of "filling in the gaps" later.

  • @Inevitablerizzler
    @Inevitablerizzler4 жыл бұрын

    Again, nice to see useful information being spread to people about this sort of stuff, nice job!

  • @FinnT730
    @FinnT7304 жыл бұрын

    There need to be more people like you in the world! This is some top notch sh*t, and a very few people explain things this good, and let alone make this good of docs + source available for everyone to use (with credits of course :P ) Keep it up, and don't stop teaching!

  • @atarixle
    @atarixle3 жыл бұрын

    big thumb up for showing how to emulate the 6502, which is also in my passionated computer the Atari 8 Bit line of Home Computers. Thank you!

  • @WinLoveCry
    @WinLoveCry2 жыл бұрын

    Fantastic work and great implementation

  • @GeneralVanRyberg
    @GeneralVanRyberg4 жыл бұрын

    This is a super-duper-awesome video. I can't imagine this video being much better... Thank you so much!

  • @javidx9

    @javidx9

    4 жыл бұрын

    Cheers!

  • @cameronball3998
    @cameronball39983 жыл бұрын

    I didn't expect to watch the entire hour+, but here I am. This was awesome

  • @johnhammer8668
    @johnhammer86684 жыл бұрын

    Wow. This channel has very unique and rare content. I did not knew i lacked so much basic knowledge until i watched David's videos.

  • @danorjestad4605
    @danorjestad46054 жыл бұрын

    The video was wonderful, interesting, educational,easy to understand and decently paced. I also greatly appreciate the little things to do in your code for clarity, such as "x + 0" when getting the low byte of an adress so you don't think x is one greater than it actually is.

  • @javidx9

    @javidx9

    4 жыл бұрын

    Its interesting Dan, people than "can" code already tend to give me grief about doing things like that, but I firmly stand by it as a way of enforcing mental clarity. Glad to see others appreciating its value!

  • @danorjestad4605

    @danorjestad4605

    4 жыл бұрын

    @@javidx9 I really dislike is the, maybe subconscious, "elitism" you sometimes see. Code which is undocumented just because it's a cool trick trick that only "proper" coders would understand, etc. I say keep doing what you're doing! The videos are properly educational and exciting to watch, clearly made by someone who knows their stuff.

  • @DIDIJEANPHI
    @DIDIJEANPHI3 жыл бұрын

    Where was I when you released this series ???.. Awesome video & very instructive. Congratulations

  • @felixmerz6229
    @felixmerz62294 жыл бұрын

    I stumbled over this when I was writing an emulator for Redcode (the assembly language for Core Wars, a Programming Game). It's fun watching you solve very similar problems than I faced and I kind of wish I could have used C++ as well, but it had to be JS.

  • @javidx9

    @javidx9

    4 жыл бұрын

    lol you use the word "solve" very optimistically, thanks Felix!

  • @tiagomelojuca7851
    @tiagomelojuca7851 Жыл бұрын

    Hey javid, thanks for this piece of art. Best IT channel in KZread. Seriously. Thanks for all the knowledge :)

  • @NeilRoy
    @NeilRoy4 жыл бұрын

    This takes me way back. The first assembly language programming I ever learned was the C64 assembly, which has a 6510 (which is basically a 6502). It was the easiest and most fun I had programming assembly I think. I also watched another video where a guy built a simple computer. That is, he built a CPU using off the shelf electronics, wiring it all up and explaining how the CPU works electrically. It was a great education. Each clock cycle you have electronic "switches" (logic gates etc) which does one thing, like, it gets the instruction, clock cycle, then it maybe read LDA, so the next cycle it transfers the contents of memory into the accumulator. For addition, those four cycles may be that cycle 1 it loads one value into the accumulator, then it loads another into say Y for the next cycle, then it adds the two, and finally, perhaps transfers the result to the accumulator, or maybe sets/clears a flag. The faster the clock, the faster things get done, but it was quite educational. There really isn't any other "programming code" inside the CPU, just a set of electrical switches that are changed around for each cycle of an instruction to complete what it needs to do. Fascinating anyhow, this just adds to that knowledge for me. If you're interested in the series where he builds a CPU, check out his videos, they're amazing in how he explains how exactly a CPU operates, and he explains it like you explain things. Easy to understand. kzread.info/dash/bejne/eq2u0NSddLa5d7A.html

  • @RetroMarkyRM
    @RetroMarkyRM4 жыл бұрын

    amazing work and fab videos. Thanks for putting in so much effort into them and I can't stress how much I 'm learning :)

  • @javidx9

    @javidx9

    4 жыл бұрын

    My pleasure Retro Marky!