I totally forgot about control characters! 🤦♂️ That's a lot easier of course. I'll try and remember to bring that up in the next episode. Maybe the generated assembly as well. Thank you! :)
You should :) I think it's a great tool so far. I'm basically trying it out and learning it for myself, while also documenting the process in this video series. I've made some cooler stuff that will eventually end up on my channel as well.
Using your own emulator is SO COOL. An idea: Modifying the Kernal to emit characters on the stdout instead of printing them to the c64 screen would make the emulator work in the terminal. That could be super useful for debugging and unit testing.
That's a really cool idea. Some more headless features like being able to give it a prg or crt file on the command line and save the results as an image also came to mind. I have started making some built in dev tools as well. Like a memory viewer and watch list and stuff, but I really should give it more attention. 😆
Thanks...I love cc65 but have never used it on the C64. I have tried Vic20 and Atari 8-bit. It would be good if you showed the size of the final files...they are much bigger than the BASIC equivalents, but get better as the proram gets larger. Also, I like to complie my code to assembler first, and then assemble and link the intermediate file to the final program. It allows you to see the assembler code being generated, and also allows creation of linker map files that can be loaded into VICE when debugging. I hope you create some more tutorials.
It's definitely useful to have a look at the intermediate assembler. I've been doing that with some new projects. There's always a tradeoff when using a higher level language and program size is one of them, but it hasn't been an issue for me so far. I'm still learning CC65 and I'm sure I will make more videos. Thank you for watching and taking the time to comment. :)
16:34 You can switch to the uppercase character set by either changing your printf statement to the following: printf("\x8ehello world!"); or use the following two lines instead... cbm_k_bsout(CH_FONT_UPPER); printf("hello world!");
Hi there! Beautiful videos! Where can I find complete tutorials for c programming on commodore 64? I would like to create a simple 2d game! Thanks for the reply....
It's handled by the C/C++ extension in VS Code. Any decent similar extension for ST should be able to do the same, as long as it knows where the include file for CC65 is.
16:53 You could also do a «printf("\x8E");».
I'd like to see a disassembly of the compiled code.
I totally forgot about control characters! 🤦♂️ That's a lot easier of course. I'll try and remember to bring that up in the next episode. Maybe the generated assembly as well. Thank you! :)
The cl65 "-S" option will generate a ca65 assembly language file. -T will include the C source as comments.
Correct! I have been playing around with that a bit, pretty handy.
Cool. I am planning to investigate the CC65 some time
You should :) I think it's a great tool so far. I'm basically trying it out and learning it for myself, while also documenting the process in this video series. I've made some cooler stuff that will eventually end up on my channel as well.
These videos are VERY well done and easy to understand!
Thank you very much, I'm happy you like them.
Using your own emulator is SO COOL. An idea: Modifying the Kernal to emit characters on the stdout instead of printing them to the c64 screen would make the emulator work in the terminal. That could be super useful for debugging and unit testing.
That's a really cool idea. Some more headless features like being able to give it a prg or crt file on the command line and save the results as an image also came to mind. I have started making some built in dev tools as well. Like a memory viewer and watch list and stuff, but I really should give it more attention. 😆
Thanks...I love cc65 but have never used it on the C64. I have tried Vic20 and Atari 8-bit. It would be good if you showed the size of the final files...they are much bigger than the BASIC equivalents, but get better as the proram gets larger.
Also, I like to complie my code to assembler first, and then assemble and link the intermediate file to the final program. It allows you to see the assembler code being generated, and also allows creation of linker map files that can be loaded into VICE when debugging.
I hope you create some more tutorials.
It's definitely useful to have a look at the intermediate assembler. I've been doing that with some new projects. There's always a tradeoff when using a higher level language and program size is one of them, but it hasn't been an issue for me so far. I'm still learning CC65 and I'm sure I will make more videos. Thank you for watching and taking the time to comment. :)
16:34 You can switch to the uppercase character set by either changing your printf statement to the following:
printf("\x8ehello world!");
or use the following two lines instead...
cbm_k_bsout(CH_FONT_UPPER);
printf("hello world!");
True! :)
Thx for making this - you rock
Thank you! 😊
Hi there!
Beautiful videos!
Where can I find complete tutorials for c programming on commodore 64?
I would like to create a simple 2d game!
Thanks for the reply....
Thank you very much! :) I don't know, I'm just getting into it myself. I have some more advanced videos planned in the future though.
@@HAGSLAB sorry, but what are signed char? i can't find a clear explanation on the internet!
Thanks for the answer!
A char is an 8 bit data type. An unsigned char can hold a value from 0 to 255. A signed char can hold -128 to 127.
Hm how do you get the code completion hints for C64 features such as the different colors ? I'm using Sublime Text and don't get any :-(
It's handled by the C/C++ extension in VS Code. Any decent similar extension for ST should be able to do the same, as long as it knows where the include file for CC65 is.
Are you able to run the program more than once? For me it crashes after the first successful run.
I can't remember not being able to run the program multiple times, but I'm not sure. If I get time I'll give it a test.