/* Munching squares, generalized to TrueColor. */
#include <yeso.h>
int main()
{
ywin w = yw_open("munching squares", yp_p(1024, 1024), "");
for (int t = 0;; t++) {
ypic fb = yw_frame(w);
for (int y = 0; y < fb.size.y; y++) {
ypix *p = yp_line(fb, y);
for (int x = 0; x < fb.size.x; x++) p[x] = (t & 1023) - ((x ^ y) & 1023);
}
yw_flip(w);
}
}
I think that, in terms of accessibility, these 14 lines of C compare favorably to the 15 instructions (and one assembler directive) in the 31-byte mode-X demo Klappquadrat, for example. Yeso also has Lua and Python bindings, which are somewhat incomplete. I haven't written Pascal bindings for it yet, but feel free.
On the other hand, that won't give you the same kind of satori experience as the bare-metal C64 experience, because Yeso is running on top of some arbitrary stack of software you don't understand, and the C64 VIC (or VGA mode 13h, at least if you're using a real VGA) is really just circuits. Using Yeso won't stop you from feeling that what's behind the library calls is magic.
C64 was my first computer (got it as a first communion gift in 1992) and I remember typing in programs from a German manual which nobody understood watching what they will do.
I also remember that I couldn't make graphic programs do anything, I only played with SID and commodore-ascii graphic. Somehow all the programs from the manual with sprites didn't do anything when I typed them in. I had no internet back then and it was a big deal for me. So big I remember it to this day :)
I remember I thought they misprinted the pokev adress so I did a for loop that put the things they wanted me to poke into any adress in a for loop, but that didn't worked either. I still have that C64 and I WILL at some point find out what was the problem :)
You might enjoy https://github.com/kragen/bubbleos/blob/master/yeso.
I think that, in terms of accessibility, these 14 lines of C compare favorably to the 15 instructions (and one assembler directive) in the 31-byte mode-X demo Klappquadrat, for example. Yeso also has Lua and Python bindings, which are somewhat incomplete. I haven't written Pascal bindings for it yet, but feel free.On the other hand, that won't give you the same kind of satori experience as the bare-metal C64 experience, because Yeso is running on top of some arbitrary stack of software you don't understand, and the C64 VIC (or VGA mode 13h, at least if you're using a real VGA) is really just circuits. Using Yeso won't stop you from feeling that what's behind the library calls is magic.