Fermer2
freemLe 02/11/2014 à 00:22
Hello Yaronet members,

I've been working on this since May (and yet I don't really have too much to show for it, but various people have told me it's a good idea to post about this anyways, so)...

The freemlib for Neo-Geo is a set of assembly language routines for writing Neo-Geo programs/games. It's not to the level of the NeoBitz devkit or DATlib yet, sadly. It's also not provided as a library you could call from C programs at the moment, but that will probably come when the library is in a much better position.

It's open source, though I have not figured out what license I would like to use yet (preferably something allowing commercial use but not requiring developers to release the source code of their games on release. Ideally, I would like other devs to be able to contribute back to the library.) under the ISC License. You can follow along here: https://github.com/freem/freemlib-neogeo

Part of the reason it took a bit for me to talk about this publicly is Neo-Geo CD support; I didn't think about it until recently and didn't realize some of the 68K vectors needed to be different. Also, creating the various TITLE_*.SYS files for CDZ, but that hasn't stopped me yet. grin

The toolset this kit uses:
* GNU make (because I am a weirdo who has it available on his Windows system, as well as Linux)
* vasm (68K with Motorola syntax)
* vasm (Z80 with oldstyle syntax)
* furrtek's pad.c, though you could probably edit the makefiles to use my port of ROMWak.
* some byteswapping program I found on the internet (source code), but you might be able to use my port of ROMWak again...
* YY-CHR.NET with NeoFixFormat plugin (from my dev site) and those old encode16/decode16 tools because I haven't finished the Sprite plugins yet.
* mkisofs for creating ISO images (NGCD)
* chdman for creating CHD images (for use with the NGCD/Z emulation in MESS)

I've provided some vasm 32-bit Windows binaries on my dev site; there's also a byteswap.exe there too, but I can't recall where it is at the moment. (Out of town, away from most logins, don't have the info on the laptop, etc.)

There are a few example projects included with the library:

Example 01: Hello World on the Fix Layer
z7k3K7o.png
A simple test of writing text on the fix layer (via raw LSPC/GPU writes and various MESS_OUT commands).

Example 02: Hello World on the Sprite Layer
eJ8sTvr.png
This includes a movable sprite to show you how the fix layer and sprites interact. You can also cycle the color of the sprite with the A button.

Example 03: Palette Basics
ugLwuvo.png
A simple test of a single 15-color palette. I forget if I was supposed to do more with it or not... :s

The next example would be an input tester program, and then after that, I can't recall the order of the remaining examples. (There's a list of directories back home up to example 09, though.)

Ideally, I'm looking to make this a full-fledged library, including full sound support (FM+SSG+ADPCM-A+[ADPCM-B or CD-DA, depending on system]). Right now, there's still a lot of work to be done, and I'm still trying to hash out various details of data formats and how to handle certain things (e.g. background layering systems, sprite animations, collisions, the music and sound playback engines)... Most of my thoughts on these types of things are currently available in the doc directory of the repo; I'd like to get some discussion going on this.

The worst part of this is that I don't have any hardware to test on yet, so I'm going to have to rely on others to make sure my stuff works... (related/unrelated: I'm going to need to find my link to my "compile VIP2demo with vasm using devpac option" setup so I can have people test it, as emulators give results that I'm not sure are hardware accurate or not. that will end up in this thread too because I am lazy and don't feel like making too many threads here.)

[edited on 2014/11/14 to note the use of ISC License.]