Yaron Nir Posted March 23, 2020 Share Posted March 23, 2020 Hey guys, corona days, staying at home , thought it would be nice to do an online course for CC65 developing for the Atari 8Bit. it is in my native language so I don’t expect you understand what I am saying but you can see the course on going and understand the basics . the first lesson was an introduction to CC65, env. , compiler and linker , building first app hello world , debugging altirra and more. any questions , comments . Would be most welcome enjoy 11 1 Quote Link to comment Share on other sites More sharing options...
abbotkinneydude Posted March 23, 2020 Share Posted March 23, 2020 Toda Raba @Yaron Nir! I'll check this out later today. 1 Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted March 24, 2020 Author Share Posted March 24, 2020 Bevakasha Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2020 Share Posted March 24, 2020 Hi, many thanks for your tutorial, I've looked at CC65 in the past, but couldn't get it going. Now I've installed it in Windows and compiled a version on a Raspberry Pi. I have one question, I only speak english, so may be missing some information, what is the IDE you are using ? I can't find any executable relating to what you show thanks Tim Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted March 24, 2020 Author Share Posted March 24, 2020 2 hours ago, TGB1718 said: Hi, many thanks for your tutorial, I've looked at CC65 in the past, but couldn't get it going. Now I've installed it in Windows and compiled a version on a Raspberry Pi. I have one question, I only speak english, so may be missing some information, what is the IDE you are using ? I can't find any executable relating to what you show thanks Tim Hi Tim, the editor i am using is sublime text editor https://www.sublimetext.com/3 and in the early hour of the course i am explaning how to use CTRL+B command line and build the CC65 code within sublime text. let me know if you need anything other help next lesson would be on display list and graphics modes.... i will post it when ready Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2020 Share Posted March 24, 2020 (edited) Many thanks, I look forward to your next video. I'm fine with C, used it for many years on UNIX and the ST and today on Raspberry Pi I currently use MAC65 and wanted to try CC65 to see if it's a better environment to develop with. Edited March 24, 2020 by TGB1718 Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted March 30, 2020 Author Share Posted March 30, 2020 (edited) Lesson number 2 is published, main focus graphics screens and display list enjoy Edited March 30, 2020 by Yaron Nir 1 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted March 30, 2020 Share Posted March 30, 2020 1 hour ago, Yaron Nir said: Lesson number 2 is published, main focus graphics screens and display list Two small comments: - you may use joystick.h - display list definition is one of the things I'd propose to make in dedicated segment in linker configuration file to avoid copying Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted March 30, 2020 Author Share Posted March 30, 2020 2 minutes ago, ilmenit said: Two small comments: - you may use joystick.h - display list definition is one of the things I'd propose to make in dedicated segment in linker configuration file to avoid copying Hi @ilmenit, your comments are correct i was focusing the lesson (as it is just the second lesson) in display list and graphic modes, linker (as part of the config) is later lesson. joystick.h will be used next lesson as we will do so more graphics tricks using DLIs Quote Link to comment Share on other sites More sharing options...
650Drew Posted March 30, 2020 Share Posted March 30, 2020 This is great! I was just starting to play with CC65 the other day and although I only speak english the slides and the code in github was very helpful, really looking forward to seeing more! Thank you for your efforts. 1 Quote Link to comment Share on other sites More sharing options...
ivop Posted March 31, 2020 Share Posted March 31, 2020 Perhaps Yaron Nir can add subtitles for those less fluent in Hebrew? 2 Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted April 1, 2020 Author Share Posted April 1, 2020 16 hours ago, ivop said: Perhaps Yaron Nir can add subtitles for those less fluent in Hebrew? I might in the future lessons , but it is a hard work I can tell you that 2 Quote Link to comment Share on other sites More sharing options...
Irgendwer Posted April 2, 2020 Share Posted April 2, 2020 On 3/30/2020 at 3:29 PM, Yaron Nir said: Lesson number 2 is published, Hints: * Current cc65 version supports binary literals: Quote Binary literals, a C++14 feature and a GCC C extension, are accepted. They can be disabled with the --standard option. unsigned char foo = 0b101; // sets it to 5 This way, e.g. charset and PMG data is better visible and easy to edit in the source code: ... 0b00011000, 0b00011000, 0b00001000, 0b10011000, 0b00111100, 0b00011010, 0b00110100, 0b01100110 ... * cc65 addition of void-arrays help a lot with the DL definition, containing char instruction and (LMS) words in a mixture: Quote cc65 allows the initialization of void variables. This may be used to create arbitrary structures that are more compatible with interfaces written for assembler languages. Here is an example: void GCmd = { (char)3, (unsigned)0x2000, (unsigned)0x3000 }; That will be translated as follows: _GCmd: .byte 3 .word $2000 .word $3000 Nevertheless, I'm quite happy that I lot of what I added to cc65 is actually used! (Currently working on better sound support.) 4 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted April 2, 2020 Share Posted April 2, 2020 10 minutes ago, Irgendwer said: Nevertheless, I'm quite happy that I lot of what I added to cc65 is actually used! (Currently working on better sound support.) these are your contributions? Nice! I'm planning to look at first optimizer, then the general code generation code, because cc65 in some cases generates quite terrible code by itself and you need to use additional code to better produce code (especially with accesses to arrays that fit in one page). Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted April 2, 2020 Author Share Posted April 2, 2020 18 minutes ago, Irgendwer said: Nevertheless, I'm quite happy that I lot of what I added to cc65 is actually used! (Currently working on better sound support.) your contribution to the CC65 is well noticed! well done! 19 minutes ago, Irgendwer said: (Currently working on better sound support.) is that rmt? one of my next lessons would be on RMT support...... Quote Link to comment Share on other sites More sharing options...
Irgendwer Posted April 2, 2020 Share Posted April 2, 2020 8 minutes ago, ilmenit said: these are your contributions? Not the enhancements I mentioned in my post - but e.g. the definition of the Antic-"Instruction Set" as well as the OS-structure. Yes, the optimizer could be better and also has some issues - if you browse through the list of code generation bugs. I also thought about a better separate, external optimizer, as writing one in C isn't IMHO that much fun. This tool could also parse library function and create a "DB" of e.g. register usages, taking this information into account when optimizing surrounding calling code. An additional improvement (which would a little bit easier to provide and also speed-up code and save memory) would be a change of the library format/linker to support "sub-code-blocks". There are many cases where library code is separated in several files, to prevent inclusion of big code chunks, while only parts of them are needed. (Linking is on file level.) But this leads to missing optimization opportunities, where e.g. one function just can run into another to complete a task - currently solved by jumping to the separate, imported function. Quote Link to comment Share on other sites More sharing options...
Irgendwer Posted April 2, 2020 Share Posted April 2, 2020 18 minutes ago, Yaron Nir said: is that rmt? one of my next lessons would be on RMT support...... No, no RMT (yet). A more basic and resource friendly approach (there isn't even a SOUND function now.). Quote Link to comment Share on other sites More sharing options...
dmsc Posted April 3, 2020 Share Posted April 3, 2020 Hi! 15 hours ago, Yaron Nir said: your contribution to the CC65 is well noticed! well done! is that rmt? one of my next lessons would be on RMT support...... I have working samples of including the RMT player with relocatable tunes, this means that you don't need to store the tune at a fixed location, as the tune is converted by a little C program that I wrote into a standard assembly file, for use with CA65. See the attached, there are examples for C and FastBasic, this is a minimal C program with game sounds: int main(void) { // Init RMT player rmt_init( rmt_song_data, 2); // STar playing rmt_start(); // Play SFX over channel 3, note 10, max volume rmt_sfx_channel = 3; rmt_sfx_note = 10; rmt_sfx_volume = 0xF0; cputs("Press 1 to 8 for SFX, any key to end\r\n"); while(1) { unsigned char c = cgetc() - '0'; if( c < 9 ) rmt_sfx_play(c); else break; } // Stop playing and end rmt_stop(); return 0; } Have Fun! rmt-cc65-20200403.zip 2 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted April 3, 2020 Share Posted April 3, 2020 Would love to try CC65, but can't seem to get anything to work, don't get the environment shown in the video's, there doesn't seem to be a way to create a project to get started and it appears without that there is no way to confugure a build environment. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted April 3, 2020 Share Posted April 3, 2020 CC65 is an excellent development environment. One of its best features is also one of its worst, however - it is very flexible and powerful, especially because of its fantastic config file system to control code generation and linking. The config file is fairly complex and abstract in order to provide this flexibility, though, so you really have to dig into it and there's a learning curve there. If all you want to do is just make small C programs like utilities and things, you can just use the provided config file. When you want to work with large game development, though, you will have to modify the config file to match. Still, it is well worth it. Quote Link to comment Share on other sites More sharing options...
ilmenit Posted April 3, 2020 Share Posted April 3, 2020 31 minutes ago, TGB1718 said: Would love to try CC65, but can't seem to get anything to work, don't get the environment shown in the video's, there doesn't seem to be a way to create a project to get started and it appears without that there is no way to confugure a build environment. let us know what errors you get and we will help ? Quote Link to comment Share on other sites More sharing options...
zzip Posted April 3, 2020 Share Posted April 3, 2020 I considered trying some 8-bit development with CC65, but I was disturbed by the size of the binaries for my simple programs. Is it efficient enough to use for real 8-bit development? Quote Link to comment Share on other sites More sharing options...
danwinslow Posted April 3, 2020 Share Posted April 3, 2020 (edited) It is. Most of the extra size comes from the included libraries. Refraining from using stdio.h and similar c-lib stuff will help quite a bit. When I was using it, simply including printf added about 8k. There are smaller libraries provided, such as conio.h as a replacement for stdio.h. Plus, for really speed critical you can drop into assembler quite easily, either in-line or using teh CA65 assembler in teh same project. Of course, no matter what you do, it will be larger that a hand-curated assembly program. It is very usable though. There's been some high powered games written in it, and I even wrote a mouse driver in it for the ST mouse on a 130xe. The ease of coding and higher level constructs make wrangling a large program somewhat easier. Edited April 3, 2020 by danwinslow Quote Link to comment Share on other sites More sharing options...
zzip Posted April 3, 2020 Share Posted April 3, 2020 4 minutes ago, danwinslow said: It is. Most of the extra size comes from the included libraries. Refraining from using stdio.h and similar c-lib stuff will help quite a bit. When I was using it, simply including printf added about 8k. There are smaller libraries provided, such as conio.h as a replacement for stdio.h. Plus, for really speed critical you can drop into assembler quite easily, either in-line or using teh CA65 assembler in teh same project. Of course, no matter what you do, it will be larger that a hand-curated assembly program. It is very usable though. There's been some high powered games written in it, and I even wrote a mouse driver in it for the ST mouse on a 130xe. The ease of coding and higher level constructs make wrangling a large program somewhat easier. Good to know, yeah I include stdio.h and use printf's out of habit. haha Quote Link to comment Share on other sites More sharing options...
ivop Posted April 3, 2020 Share Posted April 3, 2020 47 minutes ago, zzip said: Good to know, yeah I include stdio.h and use printf's out of habit. haha If you don't need any formatting, I always use puts(). Still pulls in some of stdio, but not several kilobytes for printf. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.