Пікірлер
@flueritv
@flueritv 23 сағат бұрын
6:21 isn't the stack pointer only an 8 Bit register?
@iAmStinkie
@iAmStinkie Күн бұрын
L cuz
@MonitorSmith
@MonitorSmith Күн бұрын
Great :) I remember doing it as a Msc. comp-sci student - we were emulating the Motorola 6800 using C and assembler. Deep nerdery but fun and very satisfying being able to run stuff on the finished emulator.
@nicobzz1
@nicobzz1 6 күн бұрын
i guess it would be very more efficient if you used an array of pointer to function rather than case statement, because each time an instruction is run it requieres to check at average half of the case statements.
@iukhymova8457
@iukhymova8457 8 күн бұрын
Thank you, good person 🙏
@bbrother92
@bbrother92 16 күн бұрын
Now make games for this emulator
@stevedickson4744
@stevedickson4744 18 күн бұрын
We had a university assignment in 1984 to write an 8080 intel chip that could run machine code. We wrote it in VAX-Basic, because there were operators for bit-wise AND and bit-wise OR functions.
@stevedickson4744
@stevedickson4744 18 күн бұрын
We had a university assignment in 1984 to write an 8080 intel chip that could run machine code. We wrote it in VAX-Basic, because there were operators for bit-wise AND and bit-wise OR functions.
@lukasjetu9776
@lukasjetu9776 21 күн бұрын
noob, i can emulate it in real life /j
@mrdarbab
@mrdarbab 23 күн бұрын
This was my childhood. I learned machine code real quick. Even bought the big book.
@LeMonke3
@LeMonke3 23 күн бұрын
Your last name is poo
@ktreier
@ktreier 24 күн бұрын
In 1985 (at age 21) I taught Civil Aviation Authority engineers machine code and assembly language programming and microprocessor architecture and digital system troubleshooting using a 6502 single board computer. Back then we thought it, then the 6809 and Z80 were amazing.
@MaddGameMaker
@MaddGameMaker Ай бұрын
AT 41:25, your FetchWord() function is already handling endianness. You wouldn't need to swap the bytes; you already loaded the bytes and decoded them into a word in the correct byte order.
@joefuentes2977
@joefuentes2977 Ай бұрын
Better to do it with FPGA
@KameronMazuda
@KameronMazuda Ай бұрын
Definitely will go though the playlist! Hope to learn a lot!
@szilagyimiklos4757
@szilagyimiklos4757 Ай бұрын
Wouldve been nice to use more descriptive variable names, this topic is convoluted enough as it is
@avatar2233
@avatar2233 2 ай бұрын
What?
@elalemanpaisa
@elalemanpaisa 2 ай бұрын
I thought I heard it had only 3 Registers? PC, Stackpointer and Flagregister are also Registers.
@kumar-jatin-2000
@kumar-jatin-2000 Ай бұрын
A, X and Y are 3 general purpose registers.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 19 күн бұрын
@@kumar-jatin-2000which is still weird because A can’t be used for addressing and XY cannot do logic.
@fire7878
@fire7878 2 ай бұрын
I am having a hard time to put the whole google test on my project, could you help me with what to do? I was following curiously on your first video and started learning a lot about cpu 6502 but then I got stuck upon starting this episode and i want to keep going but I cant...
@fire7878
@fire7878 2 ай бұрын
you just started this video with file of code but like i don't know how to follow along without doing so
@pramodkumarkar6573
@pramodkumarkar6573 2 ай бұрын
Very Nice!!!
@spicy_wizard
@spicy_wizard 2 ай бұрын
touch on memory ordering, CPU cache coherence and such
@Xenthera
@Xenthera 3 ай бұрын
Missed the *or will it? at 17:25 and spent more time than i'm proud of trying to debug why asserting the negative flag as false was failing lol edit: wrote that before finishing the video lol
@oglothenerd
@oglothenerd 3 ай бұрын
Wouldn't it be smarter to execute the instructions before a HLT instruction is encountered? I am not familiar with 6502 ASM/ISA, but I bet it has a HLT instruction.
@oglothenerd
@oglothenerd 3 ай бұрын
If you have a little-endian CPU, shouldn't the instructions also be stored in little-endian format?
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 19 күн бұрын
At least this is the case with 6502 and Intel CPUs . You mean immediates?
@oglothenerd
@oglothenerd 18 күн бұрын
@ArneChristianRosenfeldt No, I meant the instructions themselves. Like, the opcode would come last in memory.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 15 күн бұрын
@ oh no. Opcode comes first even on 68k . Endian is all about numbers. Little is good for adding. Big is good for routing based on IP address? Like a path to a file? DRAM memory addresses were Big Endian: first select Row and then byte within. Multiplexing.
@oglothenerd
@oglothenerd 15 күн бұрын
@@ArneChristianRosenfeldt I see.
@oglothenerd
@oglothenerd 3 ай бұрын
Thank you Mr. Poo!
@retardogames6284
@retardogames6284 4 ай бұрын
Can you teach how to integrate C# in C++?
@luchong11
@luchong11 4 ай бұрын
This is one of the greatest explanation videos I've ever watched. Concise, clear, and explores multiple real life problems/solutions. Thanks for sharing
@gato100mal6
@gato100mal6 4 ай бұрын
alr here is a new project, running a emulating a cpu inside a cpu inside a game running on my cpu on my computer
@oglothenerd
@oglothenerd 4 ай бұрын
Thank you Mr. Poo!
@toutch2050
@toutch2050 4 ай бұрын
I will use some things here in my project, thanks!
@aymaneeljahrani2280
@aymaneeljahrani2280 5 ай бұрын
40:46 Why adding the | after shifting ? Gold mine thanks for sharing this !
@denisgorbunov4355
@denisgorbunov4355 5 ай бұрын
This tutorials are treasure! Wish I could have watch all of these when I was at college
@ChandTv-sz6ht
@ChandTv-sz6ht 5 ай бұрын
just did this on python for CS50-Python project. Thank you!!!
@AndrewErwin73
@AndrewErwin73 5 ай бұрын
one way you might think about the processor status flags is as an 8 digit binary number. Since 0 through 65535 would each represent unique setting.. you could then just use the hex representation 0x0 - 0xFFFF, Then you can just use an integer to represent the flags. and write a function that encodes and decodes the state of the flags.
@Berrada-kh
@Berrada-kh 5 ай бұрын
Hello dave, How can I get to this level of expertise in C++ I'm currently studying network engineering, I want to become a c++ master like this, is tere some secret recipe ?
@davidschroeder3272
@davidschroeder3272 6 ай бұрын
Thank you! This was wonderful. I've been studying the weak interactions, and the CKM and PMNS rotation matrices play key roles in understanding how parity and CP violation are generated in the quark and lepton sectors, respectively. I really didn't exactly know what a rotation matrix was. I had a general idea, but this clarifies it completely, without the messy complications of trigonometry. I now see a clear pathway to being able to calculate the outputs of the aforementioned matrices from the actual numerical inputs. Just have to brush up on my trigonometry, which I took in school many decades ago.
@therealjjjay
@therealjjjay 6 ай бұрын
what year of vs are you using?
@twilightaspect
@twilightaspect 6 ай бұрын
I know this video was made 3 years ago but as a CS student going into their Senior year, I was wondering what topics would be good to learn when looking to emulate my first CPU. I took an organization & architecture class already but the implementation of a lot of the material feels foreign. Great video nonetheless!!!
@xsamuelx3603
@xsamuelx3603 6 ай бұрын
:)
@xsamuelx3603
@xsamuelx3603 6 ай бұрын
:)
@bcmf4041
@bcmf4041 6 ай бұрын
thank you very much for this course .l want to understand how proteus simulate 6502 cpu picture schematic runs a simple program like to turn on and off 2 leds attached to 2 of its pins
@ColinRichardson
@ColinRichardson 6 ай бұрын
13:13 I am glad you said this, because in my head I remember doing some simple assembly years ago, and remembered the the stack was backwards.. But, I just assumed I was wrong..
@oldlonecoder5843
@oldlonecoder5843 6 ай бұрын
I am late. Jumping on the train and landed here . Why playing with cycles as a counter?? Why waste efficiency on useless meaning because the cycles are already calculated for each opcode and it is there to be used not as a decrement counter but in fact it is a value to be used in the call to "usleep(addrmod::cycles)" !! Having the real time delay between opcode executions in today's gigahertz CPU. The 6502/10 is exactly 1 mhz! And usleep(unsigned long cycles ) is also exactly cycles x 1/1 000 000 ! So we Can simply apply the above simple call to usleep...
@anhnhat35
@anhnhat35 6 ай бұрын
thanks
@ucngominh3354
@ucngominh3354 6 ай бұрын
hi
@ColinRichardson
@ColinRichardson 6 ай бұрын
8:15 does that work nicely with memory management? I remember back back BACK when I was young, we used to do structs with was very careful with where we placed nibbles and bit flags, so that we kept them in chucks on 8 when definding the struct, so if we did `bit, byte, bit` it would take up 3 bytes in memory, but if we did `bit, bit, byte` it would only use 2 bytes. Does `Byte C : 1; Byte Z: 1; ` do the same niceity where it knows you are only using 1 bit of a whole byte, it can squeeze them all into the same byte?
@pinyok
@pinyok 7 ай бұрын
I often return to this video, super solid demonstrations and explanations. Love it!
@arminiuscherusci4410
@arminiuscherusci4410 7 ай бұрын
Can somebody tell me what exactly constexpr does? I know it’s has something to do with the compile time, but that’s it
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 19 күн бұрын
I guess that it throws an error when you have variables in the expression.
@rohithbhandari7836
@rohithbhandari7836 7 ай бұрын
I dont really understand why there is CPUcopy ?
@GeorgeGeorgievCA
@GeorgeGeorgievCA 7 ай бұрын
You should probably include a note that 0xFFFC is not where the PC is set at reset but rather where the PC is loaded from. Of course, this would make you first implement "Load PC from memory" fuction, rather that LDA ;)
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 19 күн бұрын
Jump loads the PC from the PC . That other jump loads it from immediate. I don’t see this here.