KERNAL: Video and Sound ABI Layer

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

KERNAL: Video and Sound ABI Layer

Post by rje »


Micheal Steil has extended the KERNAL with lots of neat stuff -- more support for BASIC stuff, the DOS wedge, subdirectories, those 16 bit pseudo-registers in zero page, and so on.

We also know that the KERNAL has calls for sprite management.

 

It seems to me that KERNAL calls for PSG sound setup and copying memory to video would be generally useful.

 

https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#sprites

$FEF0: sprite_set_image - set the image of a sprite

bool sprite_set_image(byte number: .a, width: .x, height: .y, apply_mask: .c, word pixels: r0, word mask: r1, byte bpp: r2L); Error returns: .C = 1 in case of error

Fairly generic, in that this data is generally sufficient to describe a wide range of sprites, including C64 sprites, and including sprites that might exceed VERA's capability.

 

 

So then, how about something like this:

$FEE7 (memory_copy):  extend this to allow copying memory to the video card.

 

And:

$FEF0: psg_set_sound: define and play a sound on a given voice

bool psg_set_sount(byte voice: .a,  word frequency: r0, byte channel: .x, byte volume: .y, word waveform: r1, word pulse_width: r2)

 

Scott Robison
Posts: 952
Joined: Fri Mar 19, 2021 9:06 pm

KERNAL: Video and Sound ABI Layer

Post by Scott Robison »


While that would be nice, I doubt they'd go in at this late date. But based on what we know of X8, writing kernal extensions will be even easier than in the past since the ability to patch it will exist (it'll be copied from ROM to RAM at startup time).

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

KERNAL: Video and Sound ABI Layer

Post by rje »


KERNAL extensions are indeed "easy"... especially compared to hardware.  Totally.  And don't need to be done before release.  Deferrable until needed.

 

Post Reply