UPDATE: There are multiple issues with how I treat the negative flag in this episode. Both DEX and SBC set the Negative Flag whenever the result has the 7th bit set. This means the flag will be set by a DEX when X = 255, and again with SBC for 200 - 50 = 150 (*1*0010110 in binary). Big mistake on my part, I apologize. Thank you very much to @TheWoodsieLord for pointing the error out! It's been a while! Hope you all like the video and let me know if there's a specific topic you'd like me to tackle next 😁
You're videos are really great, I've struggled with the ".byte" ".word" or ".data" directives. I see them a lot in NES disassembly and I have a hard time getting my head around them.
Indeed it's been a while, but totally worth the wait. Assembly is still hard for me to 'digest' but it gets much easier when it's explained in an interesting way and within a fun subject like the almighty NES. Keep 'em coming whenever possible man, we know life gets in the way most of the time. And sorry for my crappy english.
Great video! It's nice to have you back. :) I personally would like a video explaining how Zelda's initial screen works. Specifically, how the waterfall, heart and fairy (in the scrolling screen) are animated, and how to change palettes on the fly. Cheers!
Sure I can do something about that, it’s a pretty easy technique called palette cycling. I’m hoping to do another graphics video with more of a focus on programming at some point, so keep an eye out :)
I just love love LOVE how the carry flag between the Z80 and the 6502 behave in largely the same way, unless you're comparing and subtracting where it works exactly backwards.
I should totally do videos on GameBoy programming, that will give me an excuse to dust off my *very* neglected Z80 assembly skills (oh the days of TI-85 game programming... how I miss you).
Man, you're PURE GOLD ! A huge thank you and never stop this... it's one of the best if not the best NES related channel EVER MADE ! Again, thanks a lot !🙏
It's not even that this is the best NES programming series. This is the best series for programming and programming concepts in general. There are college classes that don't go this hard. If you ever decide to teach any other topics, you can bet I'll be on board.
@@NesHacker There are other ways to motivate: I am a professor from a Brazilian university, working with Physics simulations, and programming 6502 for fun. Because of you and the way you organize your topics, I felt motivated to give a short course on 6502 asm myself. You see, in general Brazilians know no other languages and they miss so much because of it. So I translated the easy6502 page and used it for a 3h crash course. The feedback was amazing. So, thank you for motivating me 😉 BTW, I have a science education channel in Portuguese called @Cienplifica and I haven't publish anything in three months or so, because of my classes and research. So I understand 👍
Before i learn asm, i learnt how CPU works, Logisim is a good simulator for learn this. After i learn CPU logic then i wondered how assembly codes are understandable by CPU and where they kept.. and brought me to ROMs, compilers, lexical analysis, parses,tokes... etc.. i dig and dig to the core.. this is how i find videos like yours. Thanx
Thank you! Did you know that the graphics work take the majority of the time of a video? About 75% of the overall time is spent in editing, graphics, and post production. So your compliment feels particularly nice 'cause I put a lot of time into that part of the process :D
That's by far the best series to learn assembler! I wanted to learn assembler a long time ago, and now I have a solid basic understanding of it. Thank you very much!
Next amazing video! Thousand thanks, your videos helped me a lot! I can use nesdev and know what's what and why :D I might be wrong, but: 10:23 11111110(254) still sets the negative flag, any number ranging from 128(10000000) to 255(11111111) will in fact set the negative flag! The negative flag is just the 7th byte of a number. The numbers on NES range from -128 to 127 or 0 to 255. EDIT : 14:50 BPL ==> BCS. Also the carry will be set if it didn't have to borrow when subtracting. I love your vids though! I think I've seen each of your videos on NES minimum twice lol
@@NesHacker The overflow flag would be most useful. I think it is set when the boundaries of signed numbers get crossed. (Nope, it gets way complicated then lol) Glad to could have helped! You're most welcome! ^ ^
@@NesHacker Right now I got interested, how to fix that in a program, you know for HP to work using the whole 0-255 we have. Ok, yeah, you'd probably need to use N V C and Z, all these flags, to distinguish the cases and for the program to act accordingly. That really does seem complicated ;-; I was making a table of that in paint, lol my brain explodes C to see if we crossed the byte boundary. V to see if the sign changed ONCE ( if it changed twice, then our C will tell us that :D) N to see the sign Z to check if the HP is 0 Got it, there are 6 possibilities :D for N+ : V+ C+ | Impossible - did change sign, did cross the byte, positive V- C- | 20-5 = 15, didn't change sign, didn't cross the byte, positive V- C+ | 20-180 = (-160) = 95, didn't change sign, did cross the byte, positive V+ C- | 160 - 40 = 120, did change sign, didn't cross the byte, positive for N- : V+ C+ | 50 - 60 = (-10) = 245) did change sign, did cross the byte, negative V- C- | 160 - 5 = (-100) = 155 didn't change sign, didn't cross the byte, negative V- C+ | 140 - 180 = (-40) = 215 didn't change sign, did cross the byte, negative V+ C- | Impossible - did change sign, didn't cross the byte, negative Why two are impossible? N- V+ C+ | it has to cross, has to change the sign(so start as negative) and be positive the smallest negative number is 128. 128 - 100 = 28, didn't cross, 128 - 200 = -72, crossed but is negative, 128-255 = -127, crossed, but still is negative. N+ V+ C- | it cannot cross, has to change the sign(so start as positive) and be positive Whatever number we can subtract from a positive number, we cannot make it go negative all of a sudden without crossing the byte.
@@thinksie Easiest way I can think to do the check is compare the HP value prior to the subtraction to the amount of damage. If the damage >= current HP then branch to the "lda #0", otherwise perform the subtraction and jump to the "sta $0300, x". But yeah that's way more complex than just "check a flag" 🤦♀ hahaha
Once again I find myself comparing this channel to my assembly language course from my CS degree decades 8-| ago. Makes me wish they taught 6502 instead of x86.
NES Hacker is awesome. Thank you so much for providing this knowledge to us! I've been lurking around assembly language for quite a while but I've never found someone who does into a deep dive like this in a easily consumable way. PLEASE Keep doing these videos!
I was literally just at Pinball Pete's last weekend and took that same photo (of the SFII/MVC machines w/ the pinball in the background)! Had to do a double take.
My only feedback is you're basically offering the most clear and understandable explainations of 6502 on youtube altogether. You're one of the easiest to actually grasp what you're saying although I should totally rewatch as it's been too long since I started originally. You must work really hard to make this stuff I'm so grateful you see I'm not entirely learning to be a game developer I'm- Interested in Assembly programming and I just am studying via the NES because it's so old tech that it's frustratingly limited and I just feel like when developers had to deal with those limits they wrote code that performed better and the current era has tragically given way to agile development that puts things together as quicky as possible and to hell with how it actually performs and as someone studying coding I just don't want to fall into the camp that doesn't give a fuck if my code actually executes on my machine quickly. I'm not as new to coding as i can come across i just don't have my name on a major project because it's hard to stay consistently on the path.
I want to make sure I got this right. Since X is an offset, we're storing the value of 100 at addresses $0307, $0306, $0305, etc? lda #100 ldx #7 initialize_hp_loop: sta $0300, x dex bpl initialize_hp_loop
I enjoyed the video. Off topic, but I'm wondering if you have heard of the 65c02-based Commander X16 and what you think about it. I totally understand if you are only interested in the NES, its what your channel is about after all.
I hadn't heard of it, but after a quick search I found some info about it on the C64 Wiki. Looks like a cool idea from what I can tell, though I still think there's something a bit more magical about getting programs to run on original vintage hardware ;D
Still an enigma when it comes to code, but still fun to watch This is something for much later, but I’d love to see your thoughts on a program out their called NES maker. It’s a cool project that’s supposed to help with nes dev. Would love to see what you think
Mmm, iirc that's a commercial development product for making NES games? I've not used it personally so I don't know if it is good or bad. Mostly I just hack from scratch :)
@@NesHacker it is commercial. About $40. Whether it’s worth the investment is up to the individual. But it is a neat thing developed by a few dudes in their free time. I still think it’s pretty neat In it’s current state
Yep, it sure can. Though like any other machine the depth of the recursion is limited by the stack. I was thinking of doing an episode on subroutines and covering this a bit there.
Good video! I was concerned that perhaps you had stopped. This is probably all really weird feedback. You could probably lower your production style significantly, and still get your points across just fine. IMO the essential things are stuff like highlighting the code in the editor, and also the illustration of an arrow pointing at addresses. All the images, video clips, little animated vector art, game screenshots and footage, seem like they would take a lot of time to me! They do add a very polished feel to the video though! Could be I'm wrong about the time because I'm terrible at editing. You might also want to assume a bit more knowledge in the audience. Probably (I speculate) most viewers who find your videos will know something about a loop but be unfamiliar with how they are done in assembly language. So the card analogy might be unneeded then, and you could perhaps instead contrast asm with python or something. There's a bit of a disconnect in having github link, project people would build with command line stuff, etc and not assuming some slight programmin' experience. Maybe some audience survey could help on the community page? Could emphasize that people should go download and follow along through the video perhaps? Might get more people to take the plunge. "Here we can see on line X...", "Stepping through this in Mesen we see..." type of comments in the video or something. Visually, it's there, but I dunno. We also do not get a clear view of the whole file visually, introducing it. "In X file from github..." Anyway, maybe some of that is useful, or I could be just nuts. Next video suggestions: NMIs and how they complicate execution and design, Going through a game's code interacting with the PPU (probably early, simple, single screen game), Audio
Woah, lots of thoughts there! Thanks for sharing. I think the graphics add a lot and allow me to talk about deeper concepts than just the code. As far as the target audience and what to cover and not to cover, I struggle with that a lot since I don't want to alienate the uninitiated... but I also know my vids can get tedious for those who just want to jump into the code. I've thought about it a lot and mostly just decided to keep trying things out and experimenting. Hopefully I'll find the sweet spot someday :)
Great vid. I'm a little confused, the code in the Github repo is different to the code in the video?? At 07:25 you are explaining the .byte directive but it is not in the example repo. Thanks again.
@@NesHacker Yes, that's definitely a limiting factor but it's also not super common that you need that many iterations of something. If execution time is not that critical, you can even add a byte of zero page as part of your counter, or if both X and Y are constantly needed in the body of your loop. But that's why assembly is awesome, you can always try to adapt things to the situation at hand.
Unnamed labels are ~poor~ code design for lazy devs haha. Definitely judge anyone who uses them and claiming to come from a professional developer background.
Well, technically yeah, I would agree, but for /some/ simple loops it actually wouldn't make sense to give names to each and every one. At least I think so.
UPDATE: There are multiple issues with how I treat the negative flag in this episode. Both DEX and SBC set the Negative Flag whenever the result has the 7th bit set. This means the flag will be set by a DEX when X = 255, and again with SBC for 200 - 50 = 150 (*1*0010110 in binary). Big mistake on my part, I apologize. Thank you very much to @TheWoodsieLord for pointing the error out!
It's been a while! Hope you all like the video and let me know if there's a specific topic you'd like me to tackle next 😁
It’s been a wend.
@@RufusTodd Did you just make a VBA joke? hahaha
Yes!!! So happy to see you're still at it!
This comment should be pinned, editing deletes the pin. xD
You're videos are really great, I've struggled with the ".byte" ".word" or ".data" directives. I see them a lot in NES disassembly and I have a hard time getting my head around them.
Not even VS Code can make Assembly programming painless.
Really makes you appreciate how far we've come in terms of game programming.
It can certainly make editing and organizing the files less of a chore, but yeah… assembly is assembly.
@@NesHacker- Assembly/machine code programming is like doing anal instead of regular sex. Enjoyable for some, not for others. lmao
The last time checked, you had somewhere around 300 subscribers, and now you've blown well past 10k! Well done!
I think it was like over the course of a month the channel went from 1k to 10k subs, been growing at a good rate ever since.
@@NesHacker That's super awesome! Keep on going up, friend!
37K+ now. He's on fire!
@@LorenHelgeson- The loops are working great, branching out even more. ;)
Let’s go, another video!
Yeppers :), I hope you enjoy it!
The return of the king
Hope you stay doing more videos.
:) that's the plan!
@NesHacker these videos help me better understand how they work
Indeed it's been a while, but totally worth the wait. Assembly is still hard for me to 'digest' but it gets much easier when it's explained in an interesting way and within a fun subject like the almighty NES. Keep 'em coming whenever possible man, we know life gets in the way most of the time. And sorry for my crappy english.
It's a whole thing: learning assembly is rough, but *very* doable for most folks. Also: your English is superb :)
Great video! It's nice to have you back. :) I personally would like a video explaining how Zelda's initial screen works. Specifically, how the waterfall, heart and fairy (in the scrolling screen) are animated, and how to change palettes on the fly. Cheers!
Sure I can do something about that, it’s a pretty easy technique called palette cycling. I’m hoping to do another graphics video with more of a focus on programming at some point, so keep an eye out :)
I just love love LOVE how the carry flag between the Z80 and the 6502 behave in largely the same way, unless you're comparing and subtracting where it works exactly backwards.
I should totally do videos on GameBoy programming, that will give me an excuse to dust off my *very* neglected Z80 assembly skills (oh the days of TI-85 game programming... how I miss you).
@@NesHacker I'd have to get used to not having IX/IY if I ever did anything on the GameBoy, but it would be fun to try it out!
Man, you're PURE GOLD !
A huge thank you and never stop this... it's one of the best if not the best NES related channel EVER MADE !
Again, thanks a lot !🙏
I will have you know I consist mostly of hydrogen, oxygen, and carbon ;). Thanks, and I hope to make many more videos in the future!
@@NesHacker May the Lord of MOS hear you ! 😉
Probably the coolest way I could think of to learn assembly programming! Please keep making great videos like these
Absolutely, there are a lot more to come :)
I really enjoy how well you explain this! 😎👍
And I really enjoy explaining it, thanks so much for watching :)
It's not even that this is the best NES programming series. This is the best series for programming and programming concepts in general. There are college classes that don't go this hard. If you ever decide to teach any other topics, you can bet I'll be on board.
That's incredibly high praise. Thank you :)
Early Christmas, lovely work!
I give the gift of knowledge by way of crispy, fast-paced, and irreverent graphics ;)
Thank you for returning! Great breakdown of the loop process and explaining unnamed loops
Oh I never left, I just got a little sidetracked by "life stuff".
@@NesHacker I totally understand. If you ever need anything else other than subscribers and likes, let us know!
I’m really happy to see you again 👏
I won't complain about how long it take between your videos. I know how it is. Besides, it is worth the wait 😎
Maybe you should complain more so it motivates me to put out videos faster haha xD
@@NesHacker There are other ways to motivate: I am a professor from a Brazilian university, working with Physics simulations, and programming 6502 for fun. Because of you and the way you organize your topics, I felt motivated to give a short course on 6502 asm myself. You see, in general Brazilians know no other languages and they miss so much because of it. So I translated the easy6502 page and used it for a 3h crash course. The feedback was amazing. So, thank you for motivating me 😉
BTW, I have a science education channel in Portuguese called @Cienplifica and I haven't publish anything in three months or so, because of my classes and research. So I understand 👍
@@GustavoValdiviesso That's super cool, it's awesome to hear that I had such an impact :D
Before i learn asm, i learnt how CPU works, Logisim is a good simulator for learn this. After i learn CPU logic then i wondered how assembly codes are understandable by CPU and where they kept.. and brought me to ROMs, compilers, lexical analysis, parses,tokes... etc.. i dig and dig to the core.. this is how i find videos like yours. Thanx
Very well explained and some entertaining infographics. Thanks!
Thank you! Did you know that the graphics work take the majority of the time of a video? About 75% of the overall time is spent in editing, graphics, and post production. So your compliment feels particularly nice 'cause I put a lot of time into that part of the process :D
@@NesHacker I'm not surprised. But a treat tob watch.
That's by far the best series to learn assembler! I wanted to learn assembler a long time ago, and now I have a solid basic understanding of it. Thank you very much!
You’re very welcome! I am very happy to hear that the series helped :)
Just THANK YOU. The production quality is massive as usual with your videos.
No problem, I like making these as much as you all like to watch them :)
Love this channel, thank you for your videos! Keep it up!
PS: do you have a Patreon?
Thanks! No Patreon yet, but make sure you’re subbed cause I’ll be announcing something about that soon…
Your explanations are both deep and very, very , very clear. Hard to find something like that when it comes to programming nowadays. Congratulations.
Glad to see you back.
It's good to be back :)
Also, totally jealous of those original NES classics you have there. :)
Next amazing video! Thousand thanks, your videos helped me a lot! I can use nesdev and know what's what and why :D
I might be wrong, but:
10:23 11111110(254) still sets the negative flag, any number ranging from 128(10000000) to 255(11111111) will in fact set the negative flag! The negative flag is just the 7th byte of a number. The numbers on NES range from -128 to 127 or 0 to 255.
EDIT : 14:50 BPL ==> BCS. Also the carry will be set if it didn't have to borrow when subtracting.
I love your vids though! I think I've seen each of your videos on NES minimum twice lol
Yep, you’re right. I goofed hard. Thanks for pointing it out, I’ll make sure to update the errata in the pinned comment.
@@NesHacker The overflow flag would be most useful. I think it is set when the boundaries of signed numbers get crossed. (Nope, it gets way complicated then lol)
Glad to could have helped! You're most welcome! ^ ^
@@thinksie Added an update to the pinned comment, but still a huge bummer. I need to *not* rush the testing of the programs I put out there :(
@@NesHacker Right now I got interested, how to fix that in a program, you know for HP to work using the whole 0-255 we have.
Ok, yeah, you'd probably need to use N V C and Z, all these flags, to distinguish the cases and for the program to act accordingly. That really does seem complicated ;-;
I was making a table of that in paint, lol my brain explodes
C to see if we crossed the byte boundary.
V to see if the sign changed ONCE ( if it changed twice, then our C will tell us that :D)
N to see the sign
Z to check if the HP is 0
Got it, there are 6 possibilities :D
for N+ :
V+ C+ | Impossible - did change sign, did cross the byte, positive
V- C- | 20-5 = 15, didn't change sign, didn't cross the byte, positive
V- C+ | 20-180 = (-160) = 95, didn't change sign, did cross the byte, positive
V+ C- | 160 - 40 = 120, did change sign, didn't cross the byte, positive
for N- :
V+ C+ | 50 - 60 = (-10) = 245) did change sign, did cross the byte, negative
V- C- | 160 - 5 = (-100) = 155 didn't change sign, didn't cross the byte, negative
V- C+ | 140 - 180 = (-40) = 215 didn't change sign, did cross the byte, negative
V+ C- | Impossible - did change sign, didn't cross the byte, negative
Why two are impossible?
N- V+ C+ | it has to cross, has to change the sign(so start as negative) and be positive
the smallest negative number is 128. 128 - 100 = 28, didn't cross, 128 - 200 = -72, crossed but is negative, 128-255 = -127, crossed, but still is negative.
N+ V+ C- | it cannot cross, has to change the sign(so start as positive) and be positive
Whatever number we can subtract from a positive number, we cannot make it go negative all of a sudden without crossing the byte.
@@thinksie Easiest way I can think to do the check is compare the HP value prior to the subtraction to the amount of damage. If the damage >= current HP then branch to the "lda #0", otherwise perform the subtraction and jump to the "sta $0300, x". But yeah that's way more complex than just "check a flag" 🤦♀ hahaha
Once again I find myself comparing this channel to my assembly language course from my CS degree decades 8-| ago. Makes me wish they taught 6502 instead of x86.
Totally worth the wait ! Keep up the good work!
NES Hacker is awesome. Thank you so much for providing this knowledge to us! I've been lurking around assembly language for quite a while but I've never found someone who does into a deep dive like this in a easily consumable way. PLEASE Keep doing these videos!
Another fantastic explanation 👌🏻
Thank you!
I was literally just at Pinball Pete's last weekend and took that same photo (of the SFII/MVC machines w/ the pinball in the background)! Had to do a double take.
That’s awesome, I got that shot off a stock site though 😂
I love these videos so much. You and Retro Game Mechanics Explained are so, so, so joyous to listen to.
I consume a lot of deeply technical content, but I am pretty damn sure I've never seen that content look this good
These videos are gold. Thank you so much. I hope you make more very soon
Thank you, I’m working on them full time now :)
Yo you're back! Yes!
Heckin' yeah I am :D
This has value applied to modern day things for sure. Even higher level languages 🤔
Mhm, that’s the cool part about CS fundamentals: they’re applicable in all sorts of contexts.
How I have missed you!
My only feedback is you're basically offering the most clear and understandable explainations of 6502 on youtube altogether. You're one of the easiest to actually grasp what you're saying although I should totally rewatch as it's been too long since I started originally.
You must work really hard to make this stuff I'm so grateful you see I'm not entirely learning to be a game developer I'm- Interested in Assembly programming and I just am studying via the NES because it's so old tech that it's frustratingly limited and I just feel like when developers had to deal with those limits they wrote code that performed better and the current era has tragically given way to agile development that puts things together as quicky as possible and to hell with how it actually performs and as someone studying coding I just don't want to fall into the camp that doesn't give a fuck if my code actually executes on my machine quickly. I'm not as new to coding as i can come across i just don't have my name on a major project because it's hard to stay consistently on the path.
YO,YOUR BACK!
Yah, and hopefully for a good while :D
You are back.🙂
Extremely cool video, enjoyed it a lot! Can't wait to learn how negative arithmetic works. Please do more videos, I simple can't wait! =D
I want to make sure I got this right. Since X is an offset, we're storing the value of 100 at addresses $0307, $0306, $0305, etc?
lda #100
ldx #7
initialize_hp_loop:
sta $0300, x
dex
bpl initialize_hp_loop
"This is called Lupin" :^)
Just wait until the 3rd installment...
I enjoyed the video. Off topic, but I'm wondering if you have heard of the 65c02-based Commander X16 and what you think about it. I totally understand if you are only interested in the NES, its what your channel is about after all.
I hadn't heard of it, but after a quick search I found some info about it on the C64 Wiki. Looks like a cool idea from what I can tell, though I still think there's something a bit more magical about getting programs to run on original vintage hardware ;D
Still an enigma when it comes to code, but still fun to watch
This is something for much later, but I’d love to see your thoughts on a program out their called NES maker. It’s a cool project that’s supposed to help with nes dev.
Would love to see what you think
Mmm, iirc that's a commercial development product for making NES games? I've not used it personally so I don't know if it is good or bad. Mostly I just hack from scratch :)
@@NesHacker it is commercial. About $40. Whether it’s worth the investment is up to the individual. But it is a neat thing developed by a few dudes in their free time. I still think it’s pretty neat In it’s current state
yai you are back
Yes I am :)
Darn that was fast, i think i need to rewatch some videos and this one in slow-motion :)
Dawg where you been...it's been months!
I’ve been around but I’ve also been really busy, haha ;)
Can 6502 do recursion?
Yep, it sure can. Though like any other machine the depth of the recursion is limited by the stack. I was thinking of doing an episode on subroutines and covering this a bit there.
Good video! I was concerned that perhaps you had stopped.
This is probably all really weird feedback.
You could probably lower your production style significantly, and still get your points across just fine.
IMO the essential things are stuff like highlighting the code in the editor, and also the illustration of an arrow pointing at addresses.
All the images, video clips, little animated vector art, game screenshots and footage, seem like they would take a lot of time to me!
They do add a very polished feel to the video though!
Could be I'm wrong about the time because I'm terrible at editing.
You might also want to assume a bit more knowledge in the audience.
Probably (I speculate) most viewers who find your videos will know something about a loop but be unfamiliar with how they are done in assembly language.
So the card analogy might be unneeded then, and you could perhaps instead contrast asm with python or something.
There's a bit of a disconnect in having github link, project people would build with command line stuff, etc and not assuming some slight programmin' experience.
Maybe some audience survey could help on the community page?
Could emphasize that people should go download and follow along through the video perhaps? Might get more people to take the plunge. "Here we can see on line X...", "Stepping through this in Mesen we see..." type of comments in the video or something. Visually, it's there, but I dunno. We also do not get a clear view of the whole file visually, introducing it. "In X file from github..."
Anyway, maybe some of that is useful, or I could be just nuts.
Next video suggestions:
NMIs and how they complicate execution and design,
Going through a game's code interacting with the PPU (probably early, simple, single screen game),
Audio
Woah, lots of thoughts there! Thanks for sharing. I think the graphics add a lot and allow me to talk about deeper concepts than just the code. As far as the target audience and what to cover and not to cover, I struggle with that a lot since I don't want to alienate the uninitiated... but I also know my vids can get tedious for those who just want to jump into the code. I've thought about it a lot and mostly just decided to keep trying things out and experimenting. Hopefully I'll find the sweet spot someday :)
I vote yes on the PPU
Great vid. I'm a little confused, the code in the Github repo is different to the code in the video?? At 07:25 you are explaining the .byte directive but it is not in the example repo. Thanks again.
Ah, OK, I figured it out. I think the Gihub code is a simplified version. Figuring out the .byte directive was the key
Amazing video editing, how do you do that?! I used to work as C programmer together with asm programmer who wrote the engine on a 8051/8051 chips
After effects and final cut pro, just like everyone else haha :D
there are multiple advanced techniques you saved for other videos, bring those videos please
brotato addiction triggered
I had no idea what "Brotato" was and now I am all like, "I need to go try that game now..." >.>
@@NesHacker it was the soundtrack, its certainly a fun little game that can soak 100 hours or more if youre not careful :)
Your face looks as though it is meant to house a magnificent beard.
You’d think that, but mostly I just grow a good mustache xD
It's always a teeny tiny bit more efficient to count down in 6502 loops because of that convenient N flag behavior.
Yeah but you can do 128 iterations max because the N flag is set when bit 7 is set, no?
@@NesHacker Yes, that's definitely a limiting factor but it's also not super common that you need that many iterations of something. If execution time is not that critical, you can even add a byte of zero page as part of your counter, or if both X and Y are constantly needed in the body of your loop.
But that's why assembly is awesome, you can always try to adapt things to the situation at hand.
Unnamed labels are ~poor~ code design for lazy devs haha. Definitely judge anyone who uses them and claiming to come from a professional developer background.
Well, technically yeah, I would agree, but for /some/ simple loops it actually wouldn't make sense to give names to each and every one. At least I think so.
first lol
Your video was awesome! This content desperately needs Promo`SM!!