Search found 7 matches

by nulcow
Fri Jul 12, 2024 6:21 pm
Forum: Programming
Topic: How do I "tick" my simulation every 17 milliseconds without a realtime clock?
Replies: 3
Views: 1134

How do I "tick" my simulation every 17 milliseconds without a realtime clock?

My program's simulation runs at a fixed rate of 60 times per second (16.67 milliseconds per tick, later changed to 17 milliseconds due to a lack of floating point number support). On a system with a real-time clock, this worked perfectly fine, using the following code: while (game->isRunning) { if (...
by nulcow
Tue Oct 24, 2023 2:41 pm
Forum: Guides and Tutorials
Topic: How to load a game?
Replies: 7
Views: 20728

Re: How to load a game?

AndyMt wrote: Wed Oct 12, 2022 8:30 am type


LOAD"game.prg",8,1


RUN
What is the '1' at the end of LOAD"game.prg",8,1?
by nulcow
Tue Oct 24, 2023 2:39 pm
Forum: X16 Software Support
Topic: What is this screen?
Replies: 2
Views: 3897

What is this screen?

I have this function: void (*jumpPtr)(void) = (void (*)())0x8001; And before you ask how this works, I don't know either. All I know is that it's supposed to jump to $8001 in memory. When I make a program that calls this function and run it in the emulator, it gives me this screen: Screenshot 2023-1...
by nulcow
Tue Oct 24, 2023 2:28 pm
Forum: Programming
Topic: Some Silly Eye Candy: FIREWORKS
Replies: 5
Views: 1858

Re: Some Silly Eye Candy: FIREWORKS

Is it meant to run faster? When I run it in the emulator it's too slow to be a convincing firework effect.
by nulcow
Tue Oct 24, 2023 2:02 pm
Forum: Programming
Topic: Bootstrapping programs (programception)
Replies: 3
Views: 1274

Bootstrapping programs (programception)

I have a program which consists of multiple other programs. I want to be able to run one of the programs, and then that program can run other programs. Here is a stripped-down example of what I'm trying to do: // The loader executable void jumpToExecutable() { // TODO: jump to other executable in me...
by nulcow
Tue Oct 24, 2023 12:04 am
Forum: Programming
Topic: Creating a disk image which can be written to an SD card and loaded on the X16
Replies: 4
Views: 1204

Creating a disk image which can be written to an SD card and loaded on the X16

I'm making a very large program for the Commander X16 that runs off of an SD card and stores user data on it. I'm testing it in the emulator, using the -sdcard input. How do I make a disk image (.img file format) that can be written to an SD card or loaded through the emulator using command-line too...