libnaomi is a system library providing a low-level interface to all Naomi hardware and a POSIX compatibility layer for C/C++ code. It includes build scripts for a full toolchain that compiles code for the Naomi's SH-4 main processor and ARM7 audio coprocessor. It also includes a host of Python 3 utility programs for packaging ROM files to be loaded on a Naomi through net boot, communicating with software running on a Naomi through a net dimm and remote debugging software through a GDB connection. Furthermore, it also includes a 3rdparty repository where various software ports of useful libraries live so that you do not have to do the hard work of configuring and compiling libraries. The toolchain scripts are based off the excellent KallistiOS toolchain scripts with some modifications. The POSIX compatibility layer and some of the standard library is provided in tandem by newlib and libnaomi. The toolchain itself is GCC and provides support for C and C++ compiling as well as the C and C++ standard libraries. Drivers for various hardware found in the Naomi as well as a microkernel that includes a threading library and filesystem bridge code is provided by libnaomi itself. Finally, all of this is tied together by a robust set of makefiles that can be included in your project to link against system libraries, create ROM files and track dependencies automatically.

libnaomi is implemented entirely from scratch as an open-source alternative to the official development libraries for the Sega Naomi platform. Originally, this was out of necessity as no tools had leaked at the time of libnaomi's creation. However, recently an SDK disk surfaced on YAJ and was subsequently bought and dumped by a generous person. libnaomi does not make use of any of these official libraries and does not intend to in the future. This means that it is substantially different in its layout and approaches as compared to official games on the platform. However, care has been taken to understand the various pieces of hardware and provide a robust set of drivers that allow you to take full advantage of the platform. This includes the audio subsystem, full 2D and 3D accelerated rendering, control and EEPROM input and output, full read/write support of the attached cartridge, full control over the communication registers used by a net dimm to talk to the Naomi, full support for timers, the RTC and a host of miscellaneous hardware functionality.

Please note that the whole project is released under public domain over at You can remix, recompile, fork, build games on top of and contribute back to libnaomi at your leisure. Contributions, bug reports, feature requests and discussions are quite welcome! However, please note that this is not my day job and that I can only get to issues when I have the time and energy to do so. Please also note that the libraries are not perfect. There are plenty of places where the code is probably buggy and slower than it needs to be. Documentation is not as good as I wish that it was. Some features have been fleshed out only as far as I had the attention span to work on. However, libnaomi is quite usable as-is and I've spent a lot of time and effort building what I think is a presentable and easy to use system. I hope that you find it easy to work with and go on to make some really cool homebrew games for the platform. Sega Naomi really is a neat piece of hardware and it is super fun to program for.