WonderWitch applications compiled using the official Qute SDK require a copy of FreyaOS (and FreyaBIOS) to run. Unfortunately, nowadays a loose WonderWitch cartridge required to run such programs can go for as much as $100 on the second-hand market, with the full SDK fetching prices above $200 - much more than the console itself. This makes not just creating, but even running WonderWitch applications inaccessible to most hobbyists.
(If you're an employee of Qute Corporation reading this, I would be very happy to volunteer and help resolving this situation.)
However, there already exists a large base of tutorials and software, including open source software, written for the API provided by Freya. One way to facilitate interoperability between the Wonderful toolchain (and, by extension, alternate execution environments) and such WonderSwan software would be to reimplement the required parts of the Freya API. In the past, projects like WSSim and WWWLib have been created to achieve this, as well as dedicated emulators like MiracleMage.
The Wonderful toolchain provides the libwwcl
(WWitch Compatibility Layer) library for this purpose - a clean room reimplementation of selected Freya APIs.
To create a libwwcl project template, use the -t wwcl
argument when creating a new project:
$ wf-wswantool project new -t wwcl new_project_name
WWCL_INIT_MODE
macros and the wwcl_init()
function for this.<wwcl.h>
, which is a new header that can be used instead of <sys/bios.h>
.wwcl_init_custom()
in this situation.__far
modifier for all constant arrays to be stored in ROM. See Addressing RAM and ROM for more information.-fexec-charset=shift-jis
to the compiler.The implementation is incomplete; you can help by expanding it.
bank.h
) is not implemented.libwwc.h
) is mostly implemented.comm.h
) is mostly implemented (comm_xmodem
missing).disp.h
) is fully implemented.key.h
) is partially implemented (key repeat support missing).sound.h
) is mostly implemented.system.h
) is partially implemented (a lot of its functionality is only useful inside a FreyaOS environment, however).text.h
) is partially implemented (cursor support missing).timer.h
) is partially implemented (real time clock support missing).