It’s been a while since our last release. We’ve been working on a couple of demanding platforms, koin3 framework, and additional modules. Three weeks ago, we began working on our Cave68000 verilog implementation to release some major titles while development continues for other arcade platforms.Cave68000 was originally written by Rick Werenbroek as a final project for obtaining a Master of Science in Engineering. It was later reworked in Chisel by nullobject for the MiSTerFPGA platform. He did an excellent job expanding the project's capabilities, adding GFX support, YMZ280B sound playback, and support for additional titles.Pramod started working with the Chisel compiler’s machine-generated Verilog so we could restructure the 22,000 lines of auto-generated code. If you'd like to see what it looks like, take a peek. After a week, we had a solid template to move forward and began adding support for Mazinger Z.Currently, the core is about 40–50% rewritten. There’s a lot of nuance to this, and all previously supported titles still work with improvements. The bulk of the effort has gone into rewriting the main CPU module (68k), bringing up support for the sound CPU (Z80), and reworking the GFX pipeline.We’ve been replacing code as we go, and things will continue to evolve. Below are a few highlights from working on Mazinger Z and we'll be adding documentation to our development repo in the future.
GFX Implementation:
Palette Mask support
6bpp Layer 1 data support
Used in several unsupported titles (e.g., Sailor Moon and Air Gallet)
Mixed GFX bit depth support
Supports mixing layers with different bit depths (e.g., 6bpp and 4bpp)
Applies to any layer combination (Layer 0, Layer 1, Layer 2, and Layer 3)
Wrap-around support for sprite and tile layers
In some cases, the program ROM may request memory beyond what is available, which can result in garbled sprites or tiles.
In emulation, this is typically handled by limiting memory requests and enforcing strict memory bounds.
In FPGA, we've implemented wrap-around support and instead place limits on address width, rather than restricting the number of sprites or tiles.
Installation:
As mentioned above, there’s a lot of nuance to the structure and design of the original core. One of the major challenges is the PLL clocking and SDRAM pipeline. DDR3 is used for a full framebuffer, and one of the sprite ROMs is loaded directly from the ARM processor into DDR3. Mazinger Z features encrypted sprites, so until we move to a line-buffer approach and rework both the loader and SDRAM handling, you'll need to patch the sprite ROMs manually, as there is currently no loader support to decrypt the data.To keep things simple, I've provided two .ips patches. This alleviates OS issues or technical challenges with installing python and running scripts. You'll need to patch the following sprite ROMs:
bp943a-2.u56
bp943a-3.u55
The easiest way to run an .ips patch is by visiting Rom Patcher JS. Below is a brief tutorial on how to patch the sprite ROMs:After applying the patch, rename the generated files the following:
bp943a-2.u56.d
bp943a-3.u55.d
Add these files to a directory named "mazingerd" and zip the contents or drag and drop them into a mame merged set. Again, this is only temporary until we rework ROM loading and SDRAM in the core. Once complete, we'll be able to add decryption support in the loader. Place your chosen method of using the patched sprite ROMs in the games/mame directory on your sdcard. If you do not follow the instructions you'll see scrambled sprites.
Core Options:
Below are the current options for Cave68000. If an option is grayed out in the OSD, it is not currently supported. This will change in following releases as we swap out modules and eventually move the core to k3 framework.
Cheat options modify program memory on the fly. If they are enabled and you reset the core, post-reset memory checks will fail. Make sure to disable all cheats before resetting.The service menu is accessed through the EEPROM. To save your changes, click "Save settings". The EEPROM does not store hiscores, so we'll be adding support for that in a future release.
We'll see some major updates to the Raizing cores next week and then follow up with the next title from this implementation. I'm not sure if the next Cave 68000 title will be Metamoqester, Sailor Moon, or Air Gallet. I'd like to alternate between the types of games. I'll go into more detail on our next entry for Cave 68000. Enjoy and have a great weekend!Disclaimer: All product names, trademarks, and registered trademarks mentioned are the property of their respective owners. "MiSTerFPGA," "MiSTer", "Mazinger Z", "Banpresto", "Cave", "Eighting," "Eleven," "Toei Animation," and all derivative works are trademarks, registered trademarks, or copyrighted materials of their respective holders. Use of these names does not imply endorsement or association with this post. All rights reserved to their respective owners. This post is for educational and research purposes only.