What an amazing explanation of the digital logic used to make things happen on the C64. It really is a lesson that can be used for integrated circuits as a whole (in my opinion). Computers understand two things; voltage and the lack of voltage. Yes, analog exists, but not for the sake of processing without software to make decisions based on such things. I really enjoyed this. Thanks for the killer content.
The schematic and all of the documentation was available back then too. The Programmer's Guide contained an exhaustive description of the chip registers and KERNAL functions. The Internet had nothing to do with it becoming available.
This is a really good explanation. I repair arcade game hardware which works almost identically. Modern systems aren't too different you just write to abstracted hardware through libraries but under the hood an enable line is set and data passes along a bus.
Ya I would liken it to sending mail on a postage bus. The old time computers you just said, "here!" IBM followed the DEC model more, with interrupts handling everything on the bus.
Still hoping for a fourth episode. But I really need to let you know, that this video of 18 minutes has given me more insight than 40 books and it's true. Please make more videos because what this 18 minutes has given me capabilities to do is amazing and others experience the same.
That was a brilliant explanation and I loved how you traced the programming instructions through the hardware schematics of the C64 to show what is going on in the machine and I wish I had known what you have just shown me here back in the late 1970's and into the 1980's when I started programming in Commodore BASIC and 6502/6510 Assembly Language and I soon realized back then that I was much better at debugging programs than coding from scratch although my programming skills got better with more experience ! ! ! 👍👍👍👍👍👍👍
I bought one in 1982 (and I had to charge it to do it as 595$ was alot for me back then). I loved it then and wrote many programs with it but I moved on from it to bigger and better but I never really enjoyed what came later as much. Now I'm back using a c64 maxi and I love it. I can write my silly programs and have some fun and I get to get on youtube and look for interesting info from the past. Loved this video. I don't know if you made more of these about the c64 but if you did I will be watching them.
That PLA went bad in my C64 when I was a kid. Thanks to the schematic, I was able to track down the problem and replace the chip. I forget exactly what the behavior was, but I remember the computer still worked, but the video was all messed up and I was able to type in enough POKE commands to determine that memory wasn't being banked properly. Good times.
'Active low/active high' is the industry standard term...Ive never heard anyone say 'asserted or unasserted' ever. In boolean algebra it's very common to refer to things in terms of 'not' or 'bar'....I think he was actually thinking in terms of boolean algebra while thinking aloud. It's a good approach in any case when you are following a logic structure on a wiring diagram. Both ways are able to be understood and his explanations were detailed and easy to follow. One further point I would like to make is that the I/O and the CIAs actively played a role in how the chip was used. In fact, I once had a black screen on a commodore 64, and the problem ended up being the 6526 CIA! I removed it, and the computer turned on just fine...because it defaulted to 0 on the register(since it wasn't there anymore). The CIA would control the bank area of where the chip would look for it's data. This feature allowed for variable screen map locations even though the chip could technically only see 16K at once. You could change where that 16K was! In contrast, the VIC-20 doesn't have this feature, and the graphics are thus hardwired to the low memory area, and cannot be moved at all. This is annoying at times and results in some rather silly code and ridiculous loading schemes where you would have to poke values around before running the games. The PLA actually made all this complicated logic possible on the commodore 64 without making to overly expensive(or at all awkward), as well as DRAM refreshing...which _dramatically_ reduced the cost in comparison with the competition who were all using expensive SRAM to make things easier/reliable on the manufacturing side.
Lovely clear video - many thanks. Seeing how a poke command becomes binary and where it REALLY pokes the chip is an insight that helps truly understand how/why commands work. I plan to learn machine code and assembly language and will check out all your guides - thanks a mill, great work!
This shows how old I am:- I first learned to program in BASIC and POKE-ing and PEEK-ing to memory on a Tandy TRS-80 series 2 and series 3 (also Known as the Trash-80 ! ! !). 👍👍👍👍👍👍👍
Wow, I knew these things were complicated but had no idea. It's one thing understanding -- it's another designing, testing and mass-manufacturing at a competitive price. I can only imagine what the architecture of modern, high-end chips looks like o.o
If you consider that the entire specs for the hardware fit on (essentially) 2 standard sheets of paper, its amazingly simple. A modern motherboard.... I mean a modern cellphone is kind of simple considering almost everything is on one chip, but still...
Man this was great. I've been scratching my head over how memory mapping was actually implemented. I've seen other vids on the subject but never had that 'aha' moment.
Woah... not for the casual C64 fan. :) Still gave it a thumb's up because it sounds like an awesome explanation to those that enjoy electronics engineering.
Nothing about the bank switching state? There is also RAM on 53280 if you choose to bank switch it in. Fact is that RAM also takes up the entire address space but you will have to bank switch to use it.
Omg the memories ... also $0314 and $0315 for kernal irq handling and ofc from vic $d020 (border color), $d021 (background color) and $d012 (raster irq) :D
THE RETRO PROGRAMMER, If the RAM range is 2000- 23FF. How do I compute the RAM's range like how can I manually compute and get that 2000-23FF hexadecimal numbers? If the RAM range is 3000-31FF by looking at the decoder chip how can you get the RAM ranges manually without having or getting the memory map to tell you the rams ranges. What determines the RAMS starting and ending ranges?
oof, this is the first watch i've given it so far, and i feel like i am going to need many more to understand it, but i thoroughly enjoy this approach. thank you ever so much for this awesome tutorial!
Very cool video but I think you didn't reveal the magic of poking 0 and peeking 240 back :) My guess: decimal 240 is 11110000 binary and since we can have 16 colours only which is log_2(16) = 4 that leaves us with 4 bits, the other 4 are not used (possibly do not physically exist within the VIC) to store colour code and seem to be always returned as "high", that's why 0 is being read as 240(11110000), 1 as 241 (11110001) etc.
Can you explain more about the PROM chips and how the graphics spirits characters get displayed on the CTR screen by the counter chips sync signals. So program a graphic spirit and character how would this be done because the color PROM chip has all the color information that gets encoded. The CRT monitor has a decoder chip to decode the color information from the PROM chip. The X and Y coordinates are done by the V & H counter chips not in the character ROM or spirit ROM or color color PROM chip. How does the X and Y coordinates get applied to the graphics ROM chips?
Thanks for taking the time to make this, I've just got into C64 programming and this makes poke and assembly so much easier to understand. Any chance you'll do some more?
This could been explained much more logical than this. Hi-byte and Low-byte (both 8 bit) determines these 16-bit addresses you talk about. This is something you learn when going into machine code language and is basically how the computer finds it's way through the memory map (which goes from $0000-$FFFF).
Snap! Anyway it is more complicated than that on the C64. It has all kinds of bank switching, ram refresh, IO space with ram underneath at the same address, the CIA partially controlling the video chip etc. The Commodore 64 seems deceptively simple, but in reality the memory map is anything but simple. In terms of program memory I would entirely agree! In fact, that is exactly right down to the 74LS245's and the HIRAM and LOWRAM !CS lines etc. but once you get into the I/O...oh geez...They had to do some wizardry to fit 96K on a machine with 64K addresses and memory that erases itself every 100 microseconds.
Great video! I am very interested in learning machinr language, so I hope you will make more videos about it. And you have a very easy-to-understand way of explaining it :)
glad you liked it! I hope you saw the next video that I just posted the other day, with an intro to Machine Language? th-cam.com/video/ozKcF6Q6DhI/w-d-xo.html
I spent my whole childhood with a C64. I thought this was an interesting video. I have questions though. 1. How did you know why to use the VIC as your inference starting point? 2. You've only discussed the address lines that receive ones. But if a PLA receives 2 ones over address lines and then gives 0 as output over another line, then I assume that in another place on the schematic, a 1 could be outputted when receiving multiple zeroes? 3. How did you know that the first poke number corresponds to address lines and the second one to value lines?
The alleged story about Commodore and Microsoft and BASIC is an urban legend - Microsoft as a rule did not offer perpetual licensees to MS-BASIC. So while Commodore might not have agreed to the royalty fee Microsoft was looking for, they without a doubt agreed to a lessor amount.
Okay, well if you can get inside their minds a little, why might they think it's better to use the last 16 decimal-based numerals of 256 for the colors instead of just the first 16?
I think you are talking the method called "bank-switching", widely used in games are'nt you? One bank would be the current 1024 bytes showing on the screen and meanwhile another screen would be built in another bank and be switched on to when needed for smooth transitions between scenes with no loading.
I have a feeling that you are not writing to or addressing the VIC at all. The VIC does not appear to look at the A5 address line, so that bit cant possibly mean anything to the VIC, yet it does mean something to the system itself, so it is not insignificant... Rather, I think that the act of writing to address D020 in this circumstance causes the "COLOR RAM" chip to be selected, because the COLOR RAM chip takes in all address lines from A9..A0 therefore A5 does mean something to it - and only data lines from D3..D0 (see below) are connected to COLOR RAM which has some significance... Writing a value of 1 and reading back a value of 241 (0xF1) can be explained as follows... COLOR RAM is connected only to D3..D0, corresponding to the lower nibble. D7..D4 are not connected to COLOR RAM. Therefore when you write to COLOR RAM, only the lowest nibble even matters - you can put any value you want in the higher nibble and it is simply ignored. As for reading ... TTL chips tended to have weak pull ups on their inputs, which meant that if those pins were left floating, they would be reasonably stable at a logic high. Therefore, when you read a value from COLOR RAM, and it places its value on to D3..D0 only, D7..D4 are effectively floating and therefore pulled high and thus read as high by the CPU. Hence you get all ones in the upper nibble, and the value of that memory location in the lower nibble. I think it is important to note that it may not be as simple as the address alone that determines which chip is selected. There are a lot of other input signals to the PLA which can influence which output(s) are activated. Without knowing the product terms of the PLA it would be hard to say. What does cause me some doubt, however, is that on the schematic the COLOR RAM chip is labelled as having a memory range of D800-DBFF. But given what I can see from the schematic, I am fairly confident in what I wrote above.
Actually I just found a PDF called "The C64 PLA Dissected", I cant post links but try googling it. This seems to contain the product terms for the PLA along with a wealth of other information about it. I think it satisfies what I wrote above in terms of selecting the VIC or COLOR RAM.
The color RAM chip with its memory range of D800-DBFF is for the 1000 tiles for a text screen memory. Each tile makes each text character capable of being a different color. Wherever the screen memory is, usually 1024 to 2023 decimal, is matched up with color RAM's value. What a poke to $D020 does is set a register to cause the VIC to make the border color what you want it to be. Likewise poking to $D021 makes the background all one color. This way you do not have to change 1000 color locations, the VIC does the hard work for you. The VIC is an amazing chip that actually does RAM refresh and other tasks, and it can even put the processor on hold and use time slots for its own purposes. The VIC and the 6510 take turns accessing the data and address buses using the system clock as the task switcher. Very clever multiplexing scheme, and elegant.
I think your order is quite wrong today's computers have multiple cores - up to 18, generally 2-6 each core have multiple execution units - AMD K6 had 6 of them, AMD Athlon had 10 of them (3 ALUs, 3FPUs, 3AGUs, Load/Store) today CPUs are capable of executing very complex operations, which does more then one thing and sometimes it would render more then one operation per clock per execution unit. considering just that 4GHz / 1MHz = 4000 10 execution units - 40000 say 4 cores - 160000 now we are much closer 6502 had 0 cache, 1 execution unit, 2 registers. Just considering number of registers (not even touching register renaming) we are talking about 8 times more registers on x86_64 we may be very well close to million times faster
@Chris2: Depends on how much you limit yourself in THIS particular topic by such beliefs of having an average IQ. ;) It only takes a longer concentration on details at the beginning phase of learning. Later - it's just pleasant and fun. BTW. Love and interest for something overweights obstacles.
Chris, this video assumes knowledge in a number of subjects. While I understand it entirely, 4 years ago I would be utterly lost. You can learn this computer inside and out. I recommend getting one! They are an amazing way to teach you everything about computers, and they aren't that expensive yet. If you do buy one on ebay, make sure it is "tested and working". Not just "turns on". Some people think the little red LED means it is working, or in fact they know it is broken and are trying to rip people off.
When learning this kind of stuff, I've found it better to apply some level of abstraction , even at this level. When you become comfortable with the larger concepts, you can then start looking at implementation details, how the circuits work etc. About 6 months ago, i gave myself the goal of building a computer from scratch. I had only minimal knowledge of computer architecture and programming. While i now understand the concepts shown in the video, i definitely could not say the same a half a year ago. As long as you put your mind to it, as long as you don't give up and spend time on it, you'll eventually get there
Sorry, there is a big mistake in the first few minutes. The BASIC that was laying around ( = Dartmouth BASIC) was adapted by Microsoft for the Commodore 64, and there was very well paid for. Back in those days 25.000 US Dollars was a huge sum of money. You could buy a house or a big luxury car for that. And besides that, Microsoft adapted BASIC for other 6502 computers before, so it must have been not to much work.
What an amazing explanation of the digital logic used to make things happen on the C64. It really is a lesson that can be used for integrated circuits as a whole (in my opinion). Computers understand two things; voltage and the lack of voltage. Yes, analog exists, but not for the sake of processing without software to make decisions based on such things. I really enjoyed this. Thanks for the killer content.
The schematic and all of the documentation was available back then too. The Programmer's Guide contained an exhaustive description of the chip registers and KERNAL functions. The Internet had nothing to do with it becoming available.
This is a really good explanation. I repair arcade game hardware which works almost identically. Modern systems aren't too different you just write to abstracted hardware through libraries but under the hood an enable line is set and data passes along a bus.
Ya I would liken it to sending mail on a postage bus. The old time computers you just said, "here!"
IBM followed the DEC model more, with interrupts handling everything on the bus.
Still hoping for a fourth episode. But I really need to let you know, that this video of 18 minutes has given me more insight than 40 books and it's true. Please make more videos because what this 18 minutes has given me capabilities to do is amazing and others experience the same.
In 1990 we built a Eprom burner out of a Vic-20 to burn the chips from nintendo nes carts to blank chips.. Love all things commodore
That was a brilliant explanation and I loved how you traced the programming instructions through the hardware schematics of the C64 to show what is going on in the machine and I wish I had known what you have just shown me here back in the late 1970's and into the 1980's when I started programming in Commodore BASIC and 6502/6510 Assembly Language and I soon realized back then that I was much better at debugging programs than coding from scratch although my programming skills got better with more experience ! ! ! 👍👍👍👍👍👍👍
I bought one in 1982 (and I had to charge it to do it as 595$ was alot for me back then). I loved it then and wrote many programs with it but I moved on from it to bigger and better but I never really enjoyed what came later as much. Now I'm back using a c64 maxi and I love it. I can write my silly programs and have some fun and I get to get on youtube and look for interesting info from the past. Loved this video. I don't know if you made more of these about the c64 but if you did I will be watching them.
That PLA went bad in my C64 when I was a kid. Thanks to the schematic, I was able to track down the problem and replace the chip. I forget exactly what the behavior was, but I remember the computer still worked, but the video was all messed up and I was able to type in enough POKE commands to determine that memory wasn't being banked properly. Good times.
POKE 56000 , 100
READY.
PRINT PEEK(56000)
32
READY.
What the f....?
POKE 56000, 100000000000
?ILLEGAL QUANTITY
ERROR
READY.
I had the same problem.
What did you guys replace it with? Were the original chips available at the time? Or was there already a market for aftermarket Commodore 64 PLAs?
@@gregorymalchuk272 This was around 1994, original PLAs were available from Jameco.
Loved seeing you trace through the schematics of the C64. Fascinating!
I don't think I'd say "not active," usually I've heard it stated as "active low"
+Eric Poulsen good point
Even better, use "asserted" and "deasserted". That way it doesn't matter if it's active high or low.
'Active low/active high' is the industry standard term...Ive never heard anyone say 'asserted or unasserted' ever. In boolean algebra it's very common to refer to things in terms of 'not' or 'bar'....I think he was actually thinking in terms of boolean algebra while thinking aloud. It's a good approach in any case when you are following a logic structure on a wiring diagram. Both ways are able to be understood and his explanations were detailed and easy to follow.
One further point I would like to make is that the I/O and the CIAs actively played a role in how the chip was used. In fact, I once had a black screen on a commodore 64, and the problem ended up being the 6526 CIA! I removed it, and the computer turned on just fine...because it defaulted to 0 on the register(since it wasn't there anymore). The CIA would control the bank area of where the chip would look for it's data. This feature allowed for variable screen map locations even though the chip could technically only see 16K at once. You could change where that 16K was!
In contrast, the VIC-20 doesn't have this feature, and the graphics are thus hardwired to the low memory area, and cannot be moved at all. This is annoying at times and results in some rather silly code and ridiculous loading schemes where you would have to poke values around before running the games. The PLA actually made all this complicated logic possible on the commodore 64 without making to overly expensive(or at all awkward), as well as DRAM refreshing...which _dramatically_ reduced the cost in comparison with the competition who were all using expensive SRAM to make things easier/reliable on the manufacturing side.
I have always referred a 0, 1 or H (for tristate high impedance o/p) as low or active low (when referring to circuit diagrams) etc.
@@peterlamont647 Great insight.
Lovely clear video - many thanks. Seeing how a poke command becomes binary and where it REALLY pokes the chip is an insight that helps truly understand how/why commands work. I plan to learn machine code and assembly language and will check out all your guides - thanks a mill, great work!
You just filled in a huge info gap for me! Thanks. More like this please 😀
flashback to when programers were programers and coders were secret agents.
It tells me that i must make a PAL Chip first then i shall build the VIC Chip in a CPLD or FPGA - Cool Thank you for telling us this!
This shows how old I am:- I first learned to program in BASIC and POKE-ing and PEEK-ing to memory on a Tandy TRS-80 series 2 and series 3 (also Known as the Trash-80 ! ! !). 👍👍👍👍👍👍👍
I learnt to code on this - remember hacking a star trek game that was written in basic but hidden (not well) from the ability to see the code
According to Jack's son, the offer was $1 and his father set the deal with a $50K check...
It might take me longer to understand the math behind this (not my strong subject in HS) but you've earned a sub
Wow, I knew these things were complicated but had no idea. It's one thing understanding -- it's another designing, testing and mass-manufacturing at a competitive price. I can only imagine what the architecture of modern, high-end chips looks like o.o
If you consider that the entire specs for the hardware fit on (essentially) 2 standard sheets of paper, its amazingly simple. A modern motherboard.... I mean a modern cellphone is kind of simple considering almost everything is on one chip, but still...
Oh and this was my first programmable calculator, a hand me down of a hand me down, and the 3rd device I ever programmed: www.rskey.org/fx4000p ;)
Me midways watching the video: It sounds like Jason Turner talking. 🤔
Me looking at ending dialog: aha!
Please make more c64 vids!
Jack really said that to Bill? He’s my hero!
Man this was great. I've been scratching my head over how memory mapping was actually implemented. I've seen other vids on the subject but never had that 'aha' moment.
Great video indeed! A very deep journey inside C64 memory map.
The ram was addressed with 8 lines and using a cas and ras line to do an 8 x 8 matrix for the memory
Damn, I'll have to learn so much
C64 and VB? Nice
1s and 0s got on the bus, and went to the PLA and that group sent them to VIC ...to get stored
As someone who grew with the C64, and just finished my first emulators (Color GB, SMS and NES), this is really fun. Subbed =)
Ahh 1982 an excellent year for me
Woah... not for the casual C64 fan. :) Still gave it a thumb's up because it sounds like an awesome explanation to those that enjoy electronics engineering.
Great video, love your work. Only just found this channel. Been 4 years TRP, any new videos coming?
Yes, yesterday!
Fantastically clear explanation of how memory-mapped peripherals work! Awesome!
Nothing about the bank switching state? There is also RAM on 53280 if you choose to bank switch it in. Fact is that RAM also takes up the entire address space but you will have to bank switch to use it.
I used to do assembly language on the C64. I still remember 53280 = $D020.
Omg the memories ... also $0314 and $0315 for kernal irq handling and ofc from vic $d020 (border color), $d021 (background color) and $d012 (raster irq) :D
The computer i'm most familiar with from back then is the Apple IIe.
THE RETRO PROGRAMMER, If the RAM range is 2000- 23FF. How do I compute the RAM's range like how can I manually compute and get that 2000-23FF hexadecimal numbers?
If the RAM range is 3000-31FF by looking at the decoder chip how can you get the RAM ranges manually without having or getting the memory map to tell you the rams ranges.
What determines the RAMS starting and ending ranges?
oof, this is the first watch i've given it so far, and i feel like i am going to need many more to understand it, but i thoroughly enjoy this approach. thank you ever so much for this awesome tutorial!
I want that demo music from 1:35 :D Awesome!
csdb.dk/release/?id=146723
Enjoy! :-)
Thank You :)
Very cool video but I think you didn't reveal the magic of poking 0 and peeking 240 back :)
My guess: decimal 240 is 11110000 binary and since we can have 16 colours only which is log_2(16) = 4 that leaves us with 4 bits, the other 4 are not used (possibly do not physically exist within the VIC) to store colour code and seem to be always returned as "high", that's why 0 is being read as 240(11110000), 1 as 241 (11110001) etc.
You are right. But now: Only on emulators do you always get 1111 in the upper half of the byte! On real hardware, you get a random value.
@@samwilson5544 Can the other half of the byte be used for something or does it just not exist?
Can you explain more about the PROM chips and how the graphics spirits characters get displayed on the CTR screen by the counter chips sync signals. So program a graphic spirit and character how would this be done because the color PROM chip has all the color information that gets encoded. The CRT monitor has a decoder chip to decode the color information from the PROM chip. The X and Y coordinates are done by the V & H counter chips not in the character ROM or spirit ROM or color color PROM chip. How does the X and Y coordinates get applied to the graphics ROM chips?
Great video mate, thank you very much 🤙
Thanks for taking the time to make this, I've just got into C64 programming and this makes poke and assembly so much easier to understand.
Any chance you'll do some more?
LOL already laughed at your first sentence! Thumbs Up!
This could been explained much more logical than this. Hi-byte and Low-byte (both 8 bit) determines these 16-bit addresses you talk about. This is something you learn when going into machine code language and is basically how the computer finds it's way through the memory map (which goes from $0000-$FFFF).
You could always make you're vid...
Snap!
Anyway it is more complicated than that on the C64. It has all kinds of bank switching, ram refresh, IO space with ram underneath at the same address, the CIA partially controlling the video chip etc. The Commodore 64 seems deceptively simple, but in reality the memory map is anything but simple.
In terms of program memory I would entirely agree! In fact, that is exactly right down to the 74LS245's and the HIRAM and LOWRAM !CS lines etc. but once you get into the I/O...oh geez...They had to do some wizardry to fit 96K on a machine with 64K addresses and memory that erases itself every 100 microseconds.
Great video! I am very interested in learning machinr language, so I hope you will make more videos about it. And you have a very easy-to-understand way of explaining it :)
glad you liked it! I hope you saw the next video that I just posted the other day, with an intro to Machine Language? th-cam.com/video/ozKcF6Q6DhI/w-d-xo.html
Would be good to see such techniques used for making c^$ games work on the C64GS cartridge system which sadly had little support.
I spent my whole childhood with a C64. I thought this was an interesting video. I have questions though.
1. How did you know why to use the VIC as your inference starting point?
2. You've only discussed the address lines that receive ones. But if a PLA receives 2 ones over address lines and then gives 0 as output over another line, then I assume that in another place on the schematic, a 1 could be outputted when receiving multiple zeroes?
3. How did you know that the first poke number corresponds to address lines and the second one to value lines?
The alleged story about Commodore and Microsoft and BASIC is an urban legend - Microsoft as a rule did not offer perpetual licensees to MS-BASIC. So while Commodore might not have agreed to the royalty fee Microsoft was looking for, they without a doubt agreed to a lessor amount.
thank you for sharing.
Fantastic video!
Nicely explained :)
Okay, well if you can get inside their minds a little, why might they think it's better to use the last 16 decimal-based numerals of 256 for the colors instead of just the first 16?
Nice video, thanks for postin
I think you are talking the method called "bank-switching", widely used in games are'nt you? One bank would be the current 1024 bytes showing on the screen and meanwhile another screen would be built in another bank and be switched on to when needed for smooth transitions between scenes with no loading.
Are you keeping up with the Commodore or is the Commodore keeping up with you?
Why does your voice sound THE SAME as Jason Turner's voice from the channel with C++ Weekly ?
I have a feeling that you are not writing to or addressing the VIC at all. The VIC does not appear to look at the A5 address line, so that bit cant possibly mean anything to the VIC, yet it does mean something to the system itself, so it is not insignificant...
Rather, I think that the act of writing to address D020 in this circumstance causes the "COLOR RAM" chip to be selected, because the COLOR RAM chip takes in all address lines from A9..A0 therefore A5 does mean something to it - and only data lines from D3..D0 (see below) are connected to COLOR RAM which has some significance...
Writing a value of 1 and reading back a value of 241 (0xF1) can be explained as follows...
COLOR RAM is connected only to D3..D0, corresponding to the lower nibble. D7..D4 are not connected to COLOR RAM. Therefore when you write to COLOR RAM, only the lowest nibble even matters - you can put any value you want in the higher nibble and it is simply ignored. As for reading ... TTL chips tended to have weak pull ups on their inputs, which meant that if those pins were left floating, they would be reasonably stable at a logic high. Therefore, when you read a value from COLOR RAM, and it places its value on to D3..D0 only, D7..D4 are effectively floating and therefore pulled high and thus read as high by the CPU. Hence you get all ones in the upper nibble, and the value of that memory location in the lower nibble.
I think it is important to note that it may not be as simple as the address alone that determines which chip is selected. There are a lot of other input signals to the PLA which can influence which output(s) are activated. Without knowing the product terms of the PLA it would be hard to say. What does cause me some doubt, however, is that on the schematic the COLOR RAM chip is labelled as having a memory range of D800-DBFF. But given what I can see from the schematic, I am fairly confident in what I wrote above.
Actually I just found a PDF called "The C64 PLA Dissected", I cant post links but try googling it. This seems to contain the product terms for the PLA along with a wealth of other information about it. I think it satisfies what I wrote above in terms of selecting the VIC or COLOR RAM.
The color RAM chip with its memory range of D800-DBFF is for the 1000 tiles for a text screen memory. Each tile makes each text character capable of being a different color. Wherever the screen memory is, usually 1024 to 2023 decimal, is matched up with color RAM's value. What a poke to $D020 does is set a register to cause the VIC to make the border color what you want it to be. Likewise poking to $D021 makes the background all one color. This way you do not have to change 1000 color locations, the VIC does the hard work for you. The VIC is an amazing chip that actually does RAM refresh and other tasks, and it can even put the processor on hold and use time slots for its own purposes. The VIC and the 6510 take turns accessing the data and address buses using the system clock as the task switcher. Very clever multiplexing scheme, and elegant.
I think your order is quite wrong
today's computers have multiple cores - up to 18, generally 2-6
each core have multiple execution units - AMD K6 had 6 of them, AMD Athlon had 10 of them (3 ALUs, 3FPUs, 3AGUs, Load/Store)
today CPUs are capable of executing very complex operations, which does more then one thing and sometimes it would render more then one operation per clock per execution unit.
considering just that
4GHz / 1MHz = 4000
10 execution units - 40000
say 4 cores - 160000
now we are much closer
6502 had 0 cache, 1 execution unit, 2 registers.
Just considering number of registers (not even touching register renaming) we are talking about 8 times more registers on x86_64
we may be very well close to million times faster
I LOVE C64 👍🥂🎩
You sound like Jason Turner? Are you?
Yea I can imagine. Great job though.
"4086" um no its 4096.
Nice explanation
Could someone with an average IQ like myself ever learn how to build and program a C64 from scratch?
@Chris2: Depends on how much you limit yourself in THIS particular topic by such beliefs of having an average IQ. ;) It only takes a longer concentration on details at the beginning phase of learning. Later - it's just pleasant and fun. BTW. Love and interest for something overweights obstacles.
@slaSSification: Srsly? ;) Easy peasy. :)
Chris, this video assumes knowledge in a number of subjects. While I understand it entirely, 4 years ago I would be utterly lost. You can learn this computer inside and out. I recommend getting one! They are an amazing way to teach you everything about computers, and they aren't that expensive yet.
If you do buy one on ebay, make sure it is "tested and working". Not just "turns on". Some people think the little red LED means it is working, or in fact they know it is broken and are trying to rip people off.
When learning this kind of stuff, I've found it better to apply some level of abstraction , even at this level. When you become comfortable with the larger concepts, you can then start looking at implementation details, how the circuits work etc.
About 6 months ago, i gave myself the goal of building a computer from scratch. I had only minimal knowledge of computer architecture and programming.
While i now understand the concepts shown in the video, i definitely could not say the same a half a year ago.
As long as you put your mind to it, as long as you don't give up and spend time on it, you'll eventually get there
Sorry, there is a big mistake in the first few minutes. The BASIC that was laying around ( = Dartmouth BASIC) was adapted by Microsoft for the Commodore 64, and there was very well paid for. Back in those days 25.000 US Dollars was a huge sum of money. You could buy a house or a big luxury car for that. And besides that, Microsoft adapted BASIC for other 6502 computers before, so it must have been not to much work.
Look, Shatner, you pause in the middle of statements way to often.
I'm not sure if you know that, but every time a new video clip comes your voice will either be louder or softer
that's very annoying
Being CS does not make you a teacher - that's what I've learned. Another nerd talking to himself on video, so sad.
you take way too long to show how to convert from decimal to binary or hexadecimal.
Pfft..... Playstation 2 sold 151 million units.
And the PS2 is a CONSOLE ... not a programmable computer, what's ypur point?