libNG is a NEO•GEO library/toolkit designed to ease development on the system in C. It is built as a library for SGDK, as it widely used and documented.
You need to be familiar with the C language, and specifics of coding for low speed / low ressource systems. ASM warriors are welcome too!
libNG tools are done with C#, so make sure to have a .NET runtime.
Being familiar with SGDK is a plus, as we will use it as a baseline.
- Stef's SGDK. It's for the silly Megadrive but we will use the included 68K GCC toolchain and more from this excellent kit
https://github.com/Stephane-D/SGDK - Everything NEO•GEO (and more) on the NEO•GEO dev wiki
https://wiki.neogeodev.org/ - Official documentation and guidelines from SNK
http://www.neogeodev.org/NG.pdf - Universe bios 4.0 from Razoola, recommended for region switching, proper 68K exception messages and for being awesome as a whole.
http://unibios.free.fr - MAME, your go-to emulator, excellent debugger
https://github.com/mamedev/mame
Firstly, install and configure SGDK. You likely already have tried this kit if you are dropping by here.
Copy files from this repo into your SGDK base folder. We are only adding new files, your setup will remain unchanged.
Build the library. From your SGDK folder use:
make -f makelib.neo
Note
libNG comes barebones from any SGDK components, if you are used to and want to use some system abstract features (memory, pools, etc...) copy the related files into src/libNG folder and rebuild the library.
You may have to fix a couple dependencies depending on the files.
You can now build projects targetting the NEO•GEO, simply use the makefile.neo
script from your project folder instead of the usual makefile.gen
one. If you are using an IDE integration, simply change the make script.
Note
Having a bios and being an arcade system, NEO•GEO program flow is a bit different from other systems. It is recommended to use provided template project as a starting block.
- Does it work on real hardware?
No explosions so far. - Where's my main() function?
Your program have to supply 4 entry point functions: USER, PLAYER_START, DEMO_END and COIN_SOUND.
Check SNK documentation and/or supplied template project. - How do I use Memory card / NEO•GEO feature xxx ?
Many system features are handled by the system bios and/or bios calls, check SNK documentation. - Generated data is huge, how comes?
NEO•GEO sprites require more data than other classic systems. Also libNG is speed-optimized, meaning it sacrifices rom space for faster execution. With today memory sizes and costs, this shouldn't be an issue. - What about sound?
Sound is not currently in the scope of this library, but you can use tools like Blastar's NGFX Soundbuilder https://blastar.citavia.de/