Wednesday 1 July 2020

Built-in Sprite Editor Progress

Just a quick post to report on progress on the integrated sprite editor that we are building as a plug-in to the Freeze Menu.  The reason for doing this is that unlike BASIC 7 on the C128, the C65's BASIC 10 doesn't include a sprite editor.

We have already made this plug-in framework, where the Freeze Menu can call helper programmes for the audio mixer.  So it was really just a case of making the sprite editor itself.

And this is where one of our volunteers Hernán comes in: He has been working on the actual editor.  Together we merged that in as a plug-in to the Freeze menu, and hooked up all the plumbing, so that exiting the sprite editor returns to the freeze menu.  We also jointly implemented simultaneous joystick and mouse support, so that its is super comfortable to use.  To enter the sprite editor, you simply press S from the familiar Freeze Menu.  You then get something like this:



You can then use the keyboard cursor keys to move around, and toggle pixels. You can also see that there is provision for multi-colour sprite modes.   Now, the screenshot tool doesn't currently show sprites, which I only just realised while pasting the screen-shots in. This is annoying, because it means you can't see the sprite pointer in the following, where I have used the mouse to move the cursor and draw:



One of the nice things that has come from this, is that we have made library functions for using the mouse as part of the mega65-libc. Hernán also wrote simple console output library functions for drawing the display.  This means that we have a new set of APIs that are easy for other programmer's to use in their own programmes. When I get the chance, I'll start documenting the library functions to be included in the MEGA65 Book, and likely in a smaller separate MEGA65 Cross Developer's Reference Guide.

Anyway, the editor is now at the point where the hard parts are mostly done. Next steps will be to make it actually edit the sprites from the frozen programme's memory, rather than from in the memory of the sprite editor process.

2 comments:

  1. Whoa, big thumbs up! That (and the prospect of a growing libc) looks positively awesome :) Can't wait to get my hands on the dev kit and start porting stuff. I've already begun souping up my old C65 demos... :)

    ReplyDelete
    Replies
    1. Yes, the libc is already building up nicely. We hope to add some nice graphics primitives to it in the not too distant future. Might also make a replacement graphics routine ROM module, so that BASIC 10 can make use of the new graphics modes, with the added bonus that they can be located in higher memory, and so not take away from the 128KB of RAM for BASIC.

      Delete