My First Steps with the X16: Questions and goals!
My First Steps with the X16: Questions and goals!
quick answer :
You cannot read the VRAM with a monitor, nor with PEEK. The reason is, that the CPU cannot acces the VRAM at all. Instead you need to use the VERA registers to read from or write to the VRAM (VPOKE or VPEEK are implementing that).
My First Steps with the X16: Questions and goals!
On 9/10/2020 at 11:15 AM, SerErris said:
quick answer :
You cannot read the VRAM with a monitor, nor with PEEK. The reason is, that the CPU cannot acces the VRAM at all. Instead you need to use the VERA registers to read from or write to the VRAM (VPOKE or VPEEK are implementing that).
Dude, if you ever come to Argentina, remind me that I owe you a beer ?
Your answer in the question I made (Well, yours and @Greg King's) really helped me understand a little bit more about memory management.
In case anyone's interested, I am writing a tutorial made by a newbie for newbies, hahaha. I am going to cover every aspect of my process learning how to use the x16 and the skills it needs to do so. I will be posting the link as soon as I deem it is not too embarassing ?
My First Steps with the X16: Questions and goals!
2 hours ago, sebassco said:
Dude, if you ever come to Argentina, remind me that I owe you a beer ?
Your answer in the question I made (Well, yours and @Greg King's) really helped me understand a little bit more about memory management.
In case anyone's interested, I am writing a tutorial made by a newbie for newbies, hahaha. I am going to cover every aspect of my process learning how to use the x16 and the skills it needs to do so. I will be posting the link as soon as I deem it is not too embarassing ?
That is great stuff. Esp if you write about the things you stumbled across during your learning experience. The X16 project really requires (right now) a bit of understanding how the C64 worked and does not touch on anything that is connected to it. On the other hand, some things work differently and things are difficult to find for a newbie. E.g. even if you know the C64 quite a bit and are used to PEEK and POKE, you will have a hard time to find the memory locations you have been used to in the past. Esp. the Memory Map is on of the things that require documentation. However as things still can massively change, it is not a good investment in time to document the memory map now, as that also might change completely.
So your writeup together with other resources will get a better and better picture to enter the platform.
BTW: here is another book of great value for the commodore platform ... and a lot of things still hold true on a X16 (also a lot of things are different).
https://archive.org/details/Complete_Commodore_Inner_Space_Anthology_The_1985-03_Transactor_Publishing
My First Steps with the X16: Questions and goals!
Yes! I just saw it. I will put that into my backlog ?
My First Steps with the X16: Questions and goals!
Hey guys!
So, I am starting to upload my code here: https://github.com/sebassco-dp/x16tutorial
I have not started with the wiki section, but I hope to do so after I finish the BASIC guide. Since I ran into some trouble at work, my throughput has been a little affected, but hopefully I can make up for that this week.
You will see most of the source files have the same examples than the ones on the C64 guide, but I have made some twists to some of them. After finishing to understand memory management, I will upload some stuff of my own there ?
Hope you like it!
My First Steps with the X16: Questions and goals!
Sounds good! I hope you're going to explore the C (CC65) route -- for some reason, that's the route that seems best to me. When I dive into this, that's probably the route I'll go. I need some good tutorials though to get started.
My First Steps with the X16: Questions and goals!
Hi @maktos!
Yes, I will! In fact, if everything goes as expected, October will be the month I start looking into C. And yes, that seems the best route for me too, but I wanted to explore the world of BASIC first, and understand a little bit on how to operate this machine in particular.
At the moment, I am taking a final look at some graphics tutorials on https://www.8bitcoding.com (Thanks @SerErris for the tip!) and will start writing the BASIC 'noob' tutorial. After finishing that, cc65 is what comes next!
You can take a look at my latest code additions here ?
My First Steps with the X16: Questions and goals!
Be aware that C is not a good language for the C64/X16/6502 in general. It is very heavy on all the calls and context switches, where the 6502 is not very good at. The stack is also only 8 bit and only 256 bytes in total and cannot get extended. So you need to create a software stack (which is exactly what cc65 is doing) and that is really slow to use.
Yes you can program in high languages - and it will be faster than interpreted basic. However I assume (not tested) that compiled basic would be faster than any C code.
- desertfish
- Posts: 1097
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
My First Steps with the X16: Questions and goals!
Yeah I learned this while creating my Prog8 language too. I think it has the potential (1) to be faster than compiled C on the 6502, because it includes some high level concepts that it can translate to quite optimized assembly (such as iterating over the elements of an array or string, a repeat statement, and several builtin functions tweaked for the 6502). But the thing that is slowing it down the most is the support for evaluating arbitrary expressions. I've made several optimizations recently but the majority of non-trivial expressions have to be evaluated via a software stack and that is indeed very slow compared to directly calculating things in-place.
edit actually, my current development version of Prog8 has actually become slightly faster than cc65 at a couple of silly benchmarks . While that's nice and all, it's still quite a bit slower at others.
1): I'm a noob at writing compilers so my code generator is probably nowhere near as advanced as the one from a proper C compiler. But I'm purely looking at the language itself and how it is structured