My First Steps with the X16: Questions and goals!

Chat about anything CX16 related that doesn't fit elsewhere
User avatar
desertfish
Posts: 1092
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

My First Steps with the X16: Questions and goals!

Post by desertfish »


I agree to try some BASIC first to get a hang of the machine. You'll need some commands anyway to operate it regardless -- as Ender pointed out above.

That said, the C64 basic isn't a very good basic. Even the PET that came before it had a better basic... and I remember being extremely jealous about the basic on the BBC Acorn Electron that my friend had in school, it was way more advanced.  I think I wouldn't stick to basic beyond the basics (pun intended) and switch to something else once you mastered it a little.

Personally I made the jump to assembly code back in the days. But there are a lot more choices available today...

My own interests nowadays lie with cross-compilation that allows you to develop comfy on the PC and just run the compiled output on the target machine. This is what CC65 does and also my own Prog8 language and some others too.  ( Obviously I'm using Prog8 myself but its kinda experimental and very very new on the CommanderX16 but I think I'm making good progress ?   )

SerErris
Posts: 172
Joined: Sat Aug 08, 2020 9:18 am

My First Steps with the X16: Questions and goals!

Post by SerErris »


After reading C64 manual, read the X16 docs. Start with BASIC and the examples to understand how the computer works.

Then get into Assembler  ... read Jim Butterfields book: 

http://www.1000bit.it/support/manuali/commodore/c64/ML_for_the_C64_and_Other_Commodore_Computers.pdf

Then read the X16 docs again (esp. regarding firmware and VERA). 

Work both through the Assembler examples.

65c02 Assembler is not hard to learn (actually very few instructions) and Jim Butterworth book is legend. I would use VICE for the first steps to understand the Assembler examples and to ensure they work. After that you can start working with the X16emu and use it natively.

sebassco
Posts: 23
Joined: Wed Aug 26, 2020 4:02 am

My First Steps with the X16: Questions and goals!

Post by sebassco »



1 hour ago, desertfish said:




I agree to try some BASIC first to get a hang of the machine. You'll need some commands anyway to operate it regardless -- as Ender pointed out above.



That said, the C64 basic isn't a very good basic. Even the PET that came before it had a better basic... and I remember being extremely jealous about the basic on the BBC Acorn Electron that my friend had in school, it was way more advanced.  I think I wouldn't stick to basic beyond the basics (pun intended) and switch to something else once you mastered it a little.



Personally I made the jump to assembly code back in the days. But there are a lot more choices available today...

My own interests nowadays lie with cross-compilation that allows you to develop comfy on the PC and just run the compiled output on the target machine. This is what CC65 does and also my own Prog8 language and some others too.  ( Obviously I'm using Prog8 myself but its kinda experimental and very very new on the CommanderX16 but I think I'm making good progress ?   )



Hey @desertfish! Do you have any docs on Prog8 I can take a look at? Just to see what it does and what it can do ?

 


1 hour ago, SerErris said:




After reading C64 manual, read the X16 docs. Start with BASIC and the examples to understand how the computer works.



Then get into Assembler  ... read Jim Butterfields book: 



http://www.1000bit.it/support/manuali/commodore/c64/ML_for_the_C64_and_Other_Commodore_Computers.pdf



Then read the X16 docs again (esp. regarding firmware and VERA). 



Work both through the Assembler examples.



65c02 Assembler is not hard to learn (actually very few instructions) and Jim Butterworth book is legend. I would use VICE for the first steps to understand the Assembler examples and to ensure they work. After that you can start working with the X16emu and use it natively.



Ok, great data. I think this will be my path then. Maybe swapping C and Assembler in order (Because, yeah, I love C and want to user it anyways, lol)

User avatar
desertfish
Posts: 1092
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

My First Steps with the X16: Questions and goals!

Post by desertfish »


@sebassco sure, I announced it in the X16 General Chat subforum, there should be the links you asked for !    Here it is:


 

sebassco
Posts: 23
Joined: Wed Aug 26, 2020 4:02 am

My First Steps with the X16: Questions and goals!

Post by sebassco »


Hey!

So... Days 1 and 2 are over and I am feeling way more confident on this.

Following your advice (and more specifically the ones given to me by @SerErris and @desertfish) I kept on going with my learning of basic. So far, and so good! I am finishing chapter 4 (advanced basic) of the c64 user manual and I am blown away with how simple and understandable things are. At this rate, I am thinking I will be achieving my primary objective by next week!

 

Something that got my attention is an example given by using the GET operation. It goes like this:

1 PRINT "{CLR/HOME}"

10 GET A$: IF A$ = "" THEN 10

20 PRINT A$;

30 GOTO 10

Then something struck my mind: Is that piece of code throwing an interruption (or anything of that nature) everytime it gets to line 10? so basically the cpu will spend all its time on that loop until you press a key? Is that how it works?

Will keep on reading, this is getting interesting! ?

User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

My First Steps with the X16: Questions and goals!

Post by JimmyDansbo »



1 minute ago, sebassco said:




10 GET A$: IF A$ = "" THEN 10



This just keeps looping back on it self until A$ is something other than empty i.e.

Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
sebassco
Posts: 23
Joined: Wed Aug 26, 2020 4:02 am

My First Steps with the X16: Questions and goals!

Post by sebassco »


Ok, so is not like the computer lays "dormant" until you hit a key, but instead it  keeps busy-waiting until you do something?

User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

My First Steps with the X16: Questions and goals!

Post by JimmyDansbo »


Yes, it is a busy-loop. I just tested it and the GET function just returns an empty string if a key has not been pressed.

Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
sebassco
Posts: 23
Joined: Wed Aug 26, 2020 4:02 am

My First Steps with the X16: Questions and goals!

Post by sebassco »


Hi everyone!

So... new log enty today ?

Got through the firsts chapters of BASIC without any problems until I got to the obvious one: Graphics.

At first I said Ok, this is not in my scope, I should skip it, but the curious kid inside me started to poke (oh yes, you did see that joke) my brain asking me why not, and it was a good thing he did, specially because I would be able to play around with memory addresses and their values!!

So there was I, being a total noob reading my C64 manual when it hit me: I won't be able to use peek and poke that simply because we have the VERA chip. So I went to David's video (Part 2) and saw he did an example with VPOKE 0,0,1. That basically puts a letter in the first character space. While it is something really simple, it could be useful to understand how memory works in the X16 and the VERA.

The other thing I knew is that the monitor should let me dump the values stored in the VRAM, so I went and digged a little bit into that. Nothing too special, I knew I had to dust off my hex/binary skills a little bit in order to get something working, I just only took my chance.

Well... I think I am failing to do so. I thought the COLOR command should let me change the background color, so I ran it and tried to read the value at $9F35 to see if something change: much to my surprise, it didn't! I am still searching what am I doing wrong, but if in the meantime someone reads this and can give me a hint, I would appreciate it, I think my main issue is that I still don't understand how the tables in the documentation relates to the vpeek and vpoke parameters.

 

Here's a screenshot of what I got until now:

 image.thumb.png.27aad1e25bc9e65c99584d26581eb920.png

 

That's all for now! I will get cracking this and see if I can solve it on my own (and save my pride while doing that ? )

sebassco
Posts: 23
Joined: Wed Aug 26, 2020 4:02 am

My First Steps with the X16: Questions and goals!

Post by sebassco »


Two entries on the same day, I'm happy! lol

So I've seen this post had a couple views, and I don't want to be bothering with technical questions here while breaking some forum rules, so I created this question:


 

Also, I decided to keep just posting my advances here, but without asking things because I don't think this is the place. I will super appreciate your advice in the following steps! As for now, I will focus on learning those 3 subjects I was recommended to.

 

Cheers!

Post Reply