Jump to content

KERNAL: Video and Sound ABI Layer


Recommended Posts

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.



$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)

Edited by rje
Link to comment
Share on other sites

  • rje changed the title to KERNAL: Video and Sound ABI Layer

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Please review our Terms of Use