C64 Joystick-Controlled Sprites in Assembly and BASIC

C64 Joystick-Controlled Sprites in Assembly and BASIC

8-Bit Show And Tell

5 лет назад

46,599 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@almurray2000
@almurray2000 - 26.07.2021 00:06

TLDR; Thankyou, Robin.

I've been a fan and subscriber for a couple of years now I believe and always look forward to your videos.

Recently I decided to go on eBay and buy a C64 as this was the first computer I ever had in the mid-80's and I wanted the true retro experience. When it arrived I wanted to see my 6 year old son's reaction to it. I remember my own stunned amazement at his age when I first encountered it, but here was a child of the modern age, used to modern laptops, tablets and games consoles.

I used the BASIC code in this video and... He thought it was the greatest thing ever!

We even made some modifications so that we could change the background/paper colour and the sprite colour - he loved typing in the code and then seeing the results.

We've even started to make a very simple game by assigning a key that makes the border, paper and sprite the same colour and then try to move the sprite into a specific location before changing the paper colour to reveal the location and see how close you got to it.

This has brought us a lot of joy today. To think after such a long time I'm now teaching (with your help) my boy to code the same computer I started on at his age and that he loves it too. Wow. Thankyou, Robin.

Ответить
@chromosundrift
@chromosundrift - 17.09.2021 10:50

Just curious, given basic, would it speed up if you precalculated the powers of 2 and stuck them in an array, then ANDed the indexed value to mask in the bit? My gut says basic would be very slow at doing powers. Also if I recall correctly there was some way to signal use of integer types in BASIC?

Ответить
@chromosundrift
@chromosundrift - 17.09.2021 10:58

Can any of you imagine if we had Robin's videos (somehow) way back in the day. Like on a VHS tape that was sent from the future in a ball of smoke and pink plasma. This would be a fast track to wizard mode. I remember as a kid, not being able to understand how the computer was responsive in the screen editor when it wasn't "running a program". Part of the fun of retro computing and the joy of discovery nowadays is to imagine the conversation between me now and my younger self who didn't have a clue.

Ответить
@tenminutetokyo2643
@tenminutetokyo2643 - 21.09.2021 06:39

DOOD!

Ответить
@InTheRedCornerBFC
@InTheRedCornerBFC - 08.10.2021 01:59

I'm a new subscriber and find your videos so interesting. Keep up the good work pal.

Ответить
@harag9
@harag9 - 13.11.2021 04:07

WOW that game brings back memories (gunship). Thanks for this - QR codes before they were even QR codes. What is this sorcery! :)

Ответить
@grymmjack
@grymmjack - 28.12.2021 20:39

LOL lamer <— but c’mon if this is the new lame, using assembly on a 8 bit machine in 2021, proud to be lame.

Ответить
@AccCam
@AccCam - 02.01.2022 13:01

yeah GUNSHIP! best C64 game. Played it for 100's hours on my C64C :D

Ответить
@AccCam
@AccCam - 02.01.2022 13:23

Ahh thats how the games got that multicoloured border. I was terrible programmer but i did find it annoying trying to get the sprite to the very right of the screen. Had to change something somewhere... :/

Ответить
@Monotoba
@Monotoba - 20.01.2022 05:55

I realize I'm late to the party but: Daniel is right in that we all have to learn for ourselves. But we cant learn if we have no access to the information. Daniel didn't learn for himself without someone somewhere writing books, doing lectures, demonstrating, or presenting the information to him in some form! You are no different than a lecturer at a university except, you are far easier to listen to :-) I hope you continue to provide these videos for old timers like me who cut our teeth on 8-bit machines. I learn a great deal from your videos and I am looking forward to relearning 6502/10 assembly and 8-bit game programming. Thank you for all you do for the community!

Ответить
@josephlalock8378
@josephlalock8378 - 17.02.2022 05:05

brings back memories of early the 80s on my atari 800xl. missing the black sabbath,judas priest and iron maiden in the background but whatever.

Ответить
@henrikorpela2818
@henrikorpela2818 - 31.03.2022 08:11

Thank you, very helpful! I am cross-assembling and was having trouble with running the thing. It turned out I was missing SYS call. Unrelated to this video, just wanted to point that out.

Finally got something moving, I am happy now. 😀

Ответить
@briancannard7335
@briancannard7335 - 14.04.2022 04:18

This is actually how I started programming on a Chinese Famiclone called Subor in the 1990s.

Ответить
@larswadefalk6423
@larswadefalk6423 - 03.07.2022 14:54

With all respect to the history of it all, I lived through those days and the only way to learn was the hard way. Endless nights of trial and error, but it was a good way to learn.
But that basic is so terribly crippled and slow. I think we could today write a complete basic replacement for the c64, even with a different language that actually compiles it all into ml. The screen editor could be replaced with a more real editor and some command interface to access drives and features. Some kernel rom bits and pieces to be replaced to accommodate for it. Either that or a interpreted thing that is compiled into some custom byte format. Such a language could have special commands for graphics and sound. It would be possible to do i think, but a hell of a lot of work.

I think your videos does make sense to the generations of kids today. They have a different way of learning and really do need things explained the way you do. Times and generations change no matter if we like it or not. Very good work and thanks for giving everyone your lessons.

Ответить
@nubyoz
@nubyoz - 23.08.2022 10:16

Brilliant. Really easy. Brings back memories. Please put some "I'm a lamer" T-shirts in your store, with some appropriate assembler ... could be a hit with us.

Ответить
@TheRealNumberSix
@TheRealNumberSix - 02.09.2022 16:35

I just watched this and became a very happy lamer.

Ответить
@kodiak64
@kodiak64 - 19.09.2022 20:44

There are few things lamer than calling people lamers. But it highlights the coding snobbery out there, especially among a certain arrogant clique within the scene.

Ответить
@JeffTiberend
@JeffTiberend - 06.10.2022 06:22

In the 80's I wrote a program to use a joystick as an etch-a-sketch on my Commodore 64.

Ответить
@sanjyuu2298
@sanjyuu2298 - 09.10.2022 07:02

That Daniel guy is an idiot sincerily speaking, the world is going forward because we are learning what others learned so we can add something more and make the knowledge richer every time we pass it to next generation. With his stance, he should be ashamed that he went to school, he should be ashamed, cause he learned how to write, read, speak and many others not by his own, he is a hypocrite.

Ответить
@zero-zs8sm
@zero-zs8sm - 04.11.2022 02:24

regarding the ancient cracking group comment. please explain to me how in god's name someone is supposed to learn how to program in assembly language by themselves. by the way this was very helpful to me as an aspiring c64 game programmer

Ответить
@charleshultgren7804
@charleshultgren7804 - 05.11.2022 18:59

I have been trying to use the x and y variable to move the sprite but it doesnt seem to work. I am using a custom sprite that i made my self with DATA. Could that be an issue? The sprite moves when i poke and peek their address in the vic II.

Ответить
@AJB2K3
@AJB2K3 - 08.11.2022 00:00

That is surprisingly interesting

Ответить
@robertlock5501
@robertlock5501 - 09.11.2022 13:17

Very nicely presented and organized video
---a C64 N00b LaMeR

Ответить
@Okurkaarrgghh
@Okurkaarrgghh - 21.11.2022 19:23

Stop creating Lamerz.

Ответить
@oldstylegaming
@oldstylegaming - 30.11.2022 00:31

I always wanted to learn basic and assembly but the more I watch videos the more I realise how difficult coding was back then, I am no proficient in C#, Python, Ruby and Javascript but this is way out of my remit

Ответить
@CB3ROB-CyberBunker
@CB3ROB-CyberBunker - 28.12.2022 18:37

instead of that whole lda'ing the register all over again just txa the thing back. which also prevents for example up and down to register in the same iteration (unless they hooked something else than a joystick to the port that can pull both lines at the same time ;) LDA $1234 = 3 bytes, times 4 is 12 bytes (also 12 cpu cycles), LDX $1234 plus TXA 4 times is 7 bytes (11 cpu cycles)

Ответить
@gabor222
@gabor222 - 06.02.2023 17:46

I wish I could learn this when I was a kid and all I had were some BASIC books but nothing about assembly. Assembly was like magic for me :D Later in school the usual language was Turbo Pascal (it was already outdated at that time), only a few teachers realized that it is better to teach C+. In the technical school our class was unlucky so we had a teacher who was teaching assembly (PLC programming) without really understanding it.

Ответить
@metalheadmalta
@metalheadmalta - 05.03.2023 21:17

Superb lesson.... very well explained!

Ответить
@joakimbrewitz2393
@joakimbrewitz2393 - 11.03.2023 20:54

Thank you for showing this. I use your videos hours after hours. It's a perfect way to exercise the brain. Keep up the good work!!!

Ответить
@crookedmouth1971
@crookedmouth1971 - 19.04.2023 03:00

Fantastic video. Your very good at getting these fairly complex ideas across in a way that is understandable!

Ответить
@TheUtuber999
@TheUtuber999 - 24.04.2023 02:02

I'm so jealous at your cheap C-64C find! I was a late bloomer and only got my first computer- a bread bin C-64 in 85. Then upgraded to the C-128 "flat" the next year. Switched to an XT clone in 89, but then got into a major retro phase around 2007-2008 and bought many different Commodore computers on eBay - some I owned previously, but many others I didn't, like the A-500 and A-1200. Installed a Compact Flash drive in the A-1200, which really made it scream! These days I'm more of a minimalist, so I'm happy to run Vice on my NUC. Cheers!

Ответить
@mrBlagstock
@mrBlagstock - 04.06.2023 10:04

Thank you so much for sharing your knowledge. Takes me right back to 1984; such an exciting time.

Ответить
@mikegarland4500
@mikegarland4500 - 07.06.2023 06:25

Lamer, also, here, that acknowledges he can only learn so much "on his own". Thank goodness there are people like Robin who donate their time to helping others.

I have what I hope is an easy question: I'm using the VICE emulator because my C64 and C128 died many years ago, so is there a way to participate in these joystick code demos with this setup? Can I get a joystick that will work seamlessly with these examples? Will something like a simple yet modern joystick like a Logitech Extreme 3D Pro (I have one of those) work instead? If those aren't feasible, how hard is it to substitute in say, keyboard keypresses instead, to simulate using a joystick?

Ответить
@davidgari3240
@davidgari3240 - 12.06.2023 04:48

Not a fan of Motorola 6502 (grew up in the '80s (Intel 8080/Zilog Z80)). Came here for the sprites, because jealous of vid game chips that were more fun than word processors, spreadsheets and databases.
Never used a Commodore, but it looks similar to my Apple IIe.

Assembly language is the first one you should teach yourself, but today is almost incomprehensible. Hell, I'm working on an RCA COSMAC 1802 (circa 1976) just for fun!

Microcontrollers are where the code touches the metal these days, so teach your children well.

Ответить
@der.Schtefan
@der.Schtefan - 16.06.2023 12:22

This is the one I had! ❤ (European) People who think education is for lamers probably don't have much going on in their lives 😂

Ответить
@keithparker1346
@keithparker1346 - 21.10.2023 13:37

Proud to be a lamer

Ответить
@pkpkpk20323
@pkpkpk20323 - 24.10.2023 10:38

After 4 years from the creation your video it is still usefull and interesting - thank you

Ответить
@S1eeperServ1ce
@S1eeperServ1ce - 26.11.2023 11:57

There is a merchandise opportunity for you ;)

Ответить
@EsaKarjalainen
@EsaKarjalainen - 10.12.2023 02:07

I always wondered, couldn't you have implemented more inputs by mapping up+down and left+right to additional buttons? Now, you can't do those combined with a direction, though, so maybe that's it. The paddle controls, though.....

Ответить
@CappuccinoExtraPlus
@CappuccinoExtraPlus - 22.01.2024 00:03

Thankful for this video. 👍🏼

Ответить
@johnsobota6234
@johnsobota6234 - 27.02.2024 14:12

Your teaching style is fantastically clear. Great video.

Ответить
@OrangeDied
@OrangeDied - 13.05.2024 02:37

so the tiers are
skid < lamer < daniel

Ответить
@ciesinsk
@ciesinsk - 24.07.2024 16:36

The lamer comment is typical for that era, but actually back then it was already childish. If no one would pass her or his knowledge on to others we would all still play with pebbles in front of our caves. Of course it is totally ok to share knowledge.

Ответить
@timotheegoulet1511
@timotheegoulet1511 - 05.02.2025 05:00

LOL Using the word Lamer makes me feel all warm and snugly inside. Haven’t heard that used in some computer geek’s lexicon in about three decades!

Ответить
@pookiewookie7679
@pookiewookie7679 - 09.02.2025 00:59

Thank you! That was helpful 👍🏼👍🏼

Ответить