Today I Learned
What did you learn today? Share it with us!
We learn something new every day. This is a community dedicated to informing each other and helping to spread knowledge.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must begin with TIL. Linking to a source of info is optional, but highly recommended as it helps to spark discussion.
** Posts must be about an actual fact that you have learned, but it doesn't matter if you learned it today. See Rule 6 for all exceptions.**
Rule 2- Your post subject cannot be illegal or NSFW material.
Your post subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Posts and comments which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding non-TIL posts.
Provided it is about the community itself, you may post non-TIL posts using the [META] tag on your post title.
Rule 7- You can't harass or disturb other members.
If you vocally harass or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
For further explanation, clarification and feedback about this rule, you may follow this link.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here.
Unless included in our Whitelist for Bots, your bot will not be allowed to participate in this community. To have your bot whitelisted, please contact the moderators for a short review.
Partnered Communities
You can view our partnered communities list by following this link. To partner with our community and be included, you are free to message the moderators or comment on a pinned post.
Community Moderation
For inquiry on becoming a moderator of this community, you may comment on the pinned post of the time, or simply shoot a message to the current moderators.
view the rest of the comments
I see c64, I upvote.
I dug out my childhood c64 a few years ago and have been exploring computing again on it since then. As an adult with a much more informed knowledge of electronics and computing than my childhood version, I really appreciate the c64 even more.
A few months ago I started programming on it and found it quite fun! Instead of having to work through intermediaries or APIs you have direct access to the hardware. You access the actual contents of video memory by HEX address. Sound generation (on the SID chip) is another HEX address. Load some values directly into the CPU registers, shift them in memory, and you're deriving output directly.
There's something very vicerally fun about knowing your commands aren't being abstracted (well except HEX to actual binary), but instead talking directly to the ICs inside the computer. I'm realizing its a computer one person can truly understand EVERYTHING about from end-to-end. From power switch to any piece of software, its a knowable quantity of information for a single human. How many decades ago could we say the same thing for PCs or Macs?
PEEK POKE!
I typed those in when I was a kid from a magazine copying the computer code into the c64 to play a game but never understood what they were then. I do now! PEEK is the BASIC command for reading a register or piece of memory. POKE is writing a value to that register or piece of memory. I also remember being confused about what a "high byte" and "low byte" were. Now I know that the memory address space is 16 bits, but the data bus is 8 bits. So you need two 8 bits ( 2 bytes) to equal 16 bits. The "high byte" is the the most significant 8 bit digits, and the "low byte" is the least significant 8 bit digits for a total of 16 bits! If you look at the 6510 CPU (the brain of the c64) you can actually see all 16 memory address lines (in red) and all 8 data bus lines (in green).
So from typing letters and number on the screen of a c64 to that command going to the CPU, to the result going to memory, you can actually understand every bit of it in one small paragraph and a picture.
Yeah!
I remember calculating the numbers for making sprites, 24x21 pixels IIRC, that you then POKEd into the correct places in memory and then POKEd some more to show and move them around.
And you could copy over the ROM ASCII characters to RAM memory and modify them into blocks and stuff for a game, or a classic was to copy them twice but the second copy you merged them bit-shifted once to get fatter characters.
And don't get me started on the, for me at that time totally magic, interrupt to change sprites, background colors and more that you normally couldn't do even with your hand cranked mashine code...
What a time.
Another epiphany I've had with my recent c64 work is the speed of the computer. Since before this my only interface for writing anything was BASIC, I always thought the c64 was fairly slow or inefficient with its 1Mhz CPU. Now I know that the slowness is BASIC. Doing the exact same operations in assembler are SOOOO FAAASST!! As a test, one function was 141 times faster on the exact same hardware in assembler than it was in BASIC. Its still hard to wrap my head around that.