another year with another experiment.

This time it's different to the last one in many respects. The Galaga 88 and PacMania ports from the X68000 required to have the original code being disassembled correctly; now you can use the original code so it's a true emulation of the NEO GEO and so it is easy to get more games running.
The first demonstration for a proof of concept is available. This demo is also available as a video showing Metal Slug running on my unaccelerated(!) Falcon on YouTube.
Edit: second demo upload.
Here is a big archive with the most recent version of the Neo Geo emulator including 50 games. The archive itself is about 230 MiB in size and expands to about 730 MiB on the harddisk.
Requirements: Atari Falcon 030 with a MC68030 CPU and 14 MB RAM. Avoid loading too many accessories or other memory residing applications before starting the emulator (e.g. hold CONTROL while booting). The emulator works on RGB/TV and VGA monitors.
Start NEOGEO.TTP and enter the folder name of the game (like MAME and being shown in the videos).
Beware: not all the games will work.
Edit: details added.
Well, the main and most important feature used by this emulator is the MMU and the "Bus Fault Recovery" capability (please refer to the "MC68030 User's Manual", Section 8.2) so you need at least a MC68030 or better. Actually this emulator will currently run only on a MC68030 because the MMU handling is different on the other CPUs.
The MMU table is used to reproduce the NEO GEO memory map so that the game code runs in the original place (of course). The NEO GEO specific hardware registers are also mapped appropriately but they are marked as "invalid" MMU descriptors. Accessing those addresses will cause a bus error. So all you wish for is a smart bus error handler which emulates the behaviour of the register functions. To do so it requires the following features:
- know the accessed address.
- know the data size (byte, word, long).
- know the "to be written" data value.
- know if it was a read or write access.
- chance for a recovery from the exception (return the required "to be read" data to the original program and continue the execution).
In fact, all those features are available on a MC68030 just because they are necessary to implement a virtual memory system. So in conclusion the the real system emulator is the bus error handler.
However, there are still some other things to consider like the different interrupt handling, the fact having a Z80 CPU as a coprocessor and hoping that no dirty tricks have been used on the MC68000. Luckily the NEO GEO system is a rather simple and very clean designed machine so this was not a problem. For example it uses almost only one interrupt: the VBL and the Z80 is only used in a "fire and forget" manner. The sprite system is also a simple implementation and the sprite data is totally separated from the main system.
To be continued...
I hope this gives a first good overview on how it works. Feel free to comment and ask about details.
Edit: demo upload.
The Metal Slug demo archive is now available for download (as shown in the video). Please note that you need a real Falcon with 14 MB. You also have to start it with lots of free RAM and have it connected to a TV set or RGB monitor. Beware: only one in-game action is shown properly in the attract mode due to the RAM limitations.
Edit: game test results added.
Status colour codes as follows:
- Game is potentially playable (game starts and the player is controllable).
- Game crashes when started/while running the attract mode.
- Game crashes (even attract mode doesn't run).
- Blazing Star (*)
- The King of Fighters '94
- Last Resort (video)
- Metal Slug (video)
- Metal Slug 2 (*)
- Neo Bomberman
- Nightmare in the Dark (bootleg)
- Puzzle Bobble
- Pulstar (*)
- Sengoku
- Sengoku 2
- Aero Fighters 2 / Sonic Wings 2 (video)
- Aero Fighters 3 / Sonic Wings 3 (video)
- Top Hunter (video)
- Viewpoint (stack frame modifications)
- Burning Fight
- Ghost Pilots
- Kabuki Klash
- Kizuna Encounter: Super Tag Battle
- King of the Monsters
- Samurai Shodown 2
Cheers
Sascha