The Raizing cores by Pramod have received substantial updates and are ready for release! Today's release is available through the update_all script and should go live within 30 minutes of this post.While a few tasks remain and additional features are planned, the current state is stable and feature-complete enough to share. I’ve been solely focused on Raizing and Toaplan over the past six weeks, while lending a hand on Cave 68000 when needed.There will be updates on Toaplan hardware and new Toaplan 2 titles in the near future. Below is a brief summary of changes, followed by more in-depth technical details for those interested!
What's New?
Refactored and rewritten code; done per PCB configuration
Ported to the K3 framework, including full K3 options support
MRU cache implemented; GP9001 no longer runs 5 frames behind
Hi-score saving for each game and revision
Cheats available for each game and revision
Per-game options with post/ROM checks skipped by default
Updated audio mixing; compatible with DV1 and 24-bit I/O boards
What's Coming?
Swap jt51 to IKAOPM, a die-shot based YM2151 implementation
New OKI MSM6295 implementation
New YMZ280B implementation for Battle Bakraid and Cave68000 hardware
Easy68K module with improved DTACK generation
xsd64 SDRAM controller with faster CAS2 timing
SDRAM speed increased up to 128 MHz
In-game rank support, modified options, and accessible secrets for Shinobu Yagawa's "Bat" trilogy. These will include widgets and gadgets similar to what you see in MAME or M2 ports.
Some features will also function on real hardware; similar to the zakk ROMs available for Battle Garegga.
Okay, now for some technical information for those of you who enjoy the deeper details... In a previous post, I mentioned that the GP9001 was running about 5 frames behind real hardware due to SDRAM limitations and bandwidth constraints, even though it used a line buffer approach in FPGA. This wasn’t referring to input or display lag, but rather to internal timing delays caused by memory access stalls.The MAME implementation takes a full framebuffer approach to reproduce GP9001 behavior. While this ensures broad compatibility across supported games, it introduces more latency compared to a line-buffered FPGA design. It's a trade-off that favors correctness and system flexibility over low-latency performance.How was the GP9001 lag resolved? Pramod introduced a MRU (Most Recently Used) ROM cache in the xsd64 SDRAM controller and suggested I use the cache module. I integrated this cache module into both the 68000 and Z80 CPU buses to reduce contention and latency during instruction fetches and it resolved the issue.How does the ROM cache work? The ROM cache sits between the CPU(s) and SDRAM, maintaining a set of recently accessed ROM entries using address tags and associated data. On a fetch, the cache performs a tag match: a hit returns data immediately, while a miss triggers a read from SDRAM and a cache line update.This dramatically improves performance by reducing repeated SDRAM accesses, especially in high-frequency code paths, and ensures smooth execution without forcing the CPU to stall on memory latency.Below is a review of the available options from MiSTer sys and the Koin3 framework. Mahou Daisakusen (Sorcer Striker) is used as an example. I've decided to cover them in-depth so people understand how they work on a technical level and aren't confused by the terms like "lag".In the future, only new features introduced to the K3 framework will be covered. I've implemented cheat, hi-score modules, and a few new features not yet released while working on Raizing.
Video Settings:
1. Rotate ScreenEnabling screen rotation uses a full framebuffer, activated via the MISTER_FB macro in mister_sys. The core writes each frame to DDR3 memory, which the scaler reads out in a rotated order for HDMI output. This adds approximately one frame of lag (~16.7ms at 60Hz) due to full-frame buffering.For the Raizing cores, the lag is slightly higher at ~16.84ms due to their 59.4Hz refresh rate. It's important to understand that any core using framebuffer rotation will incur this additional frame(s) of latency when using the scaler.2. Aspect RatioCustom aspect ratio settings use arc1x/y and arc2x/y registers to define a cropped region within the framebuffer. The scaler (ascal) uses this region to scale the image to the output resolution, without altering the original framebuffer content in DDR3.These values are set by the MiSTer framework based on INI entries like custom_aspect_ratio_1 and custom_aspect_ratio_2, which specify the desired visible area. This option works with both rotated output and native digital video modes.3. Vertical ScaleThe vertical scale option allows output height to be adjusted for integer scaling or custom aspect ratios. Handled by the video_freak module, this logic uses inputs like HDMI_HEIGHT and produces aspect ratio parameters (VIDEO_ARX, VIDEO_ARY) based on user settings from the INI or OSD.In integer mode, vertical resolution is locked to clean multiples (e.g., 2x, 3x), maintaining sharp pixels without interpolation. This option works with both rotated output and native digital video modes.4. Vertical CropVertical cropping is controlled by the video_freak module and enabled only when HDMI is set to 1920×1080, with no additional scaling, scan doubler, or direct video active.When conditions are met, CROP_SIZE trims 216 lines (5x) from the frame, and CROP_OFF shifts the visible region up or down based on a user setting. This allows clean cropping of overscan or black borders and works alongside integer scaling and rotation.
While useful for certain cores, it should not be used in these cores, as it removes pertinent visual information.
5. Refresh RateThe refresh rate toggle switches the output timing between “Native” (original refresh rate) and “NTSC” (standardized timing). It’s controlled by the video_timing module in K3 framework based on the NTSC algorithm.This option improves compatibility with consumer CRT displays by adjusting the output refresh. Use this option only when necessary, as it modifies the original timing.6. Force ScandoublerForce Scandoubler enables line doubling of the core’s video output, converting 15kHz signals to 31kHz for compatibility with VGA / 480P capable displays.It overrides the core’s native output mode, ensuring a VGA-compatible signal even if the core would normally output low-resolution video. This is useful for CRT monitors that don’t support 15kHz input.7. Scandoubler FX (Scanlines)Scandoubler FX simulates CRT scanlines by darkening every other line of the video when line doubling is active.The effect strength is selectable via the OSD with five levels, ranging from light dimming to full black lines. This is applied through the scanlines.v module and enables the force scandoubler.8. H/V Positioning AdjustmentsThis option shifts the active image horizontally or vertically within the visible output area by adjusting the position of the sync signals.It’s useful for centering the image on CRTs or adjusting alignment on VGA monitors.9. H/V Sync Pulse AdjustmentsThis setting fine-tunes the horizontal and vertical sync pulse width and timing, which can help resolve issues with CRTs that are sensitive to sync.It’s useful when displays have flagging, lose sync, have rolling sync, or show instability at certain resolutions or refresh rates.
Audio Settings
The audio options toggle FM and BGM (PCM) audio on or off and allow individual volume control for each. FM Volume ranges from 75% to 112.5%, while BGM Volume ranges from 225% to 337.5%, maintaining a target mix ratio of approximately 1:3 between FM and PCM.
For game-specific settings, below is a review for each core. For hi-score saving, we'll use Mahou Daisakusen as an example. To save your preferred configuration, click save settings in the OSD menu. This is also how you save high scores...
Game Settings
1. Mahou Daisakusen (Sorcer Striker)
For more information about region variants, game play overview, rank and strategies visit the following site: https://shmups.wiki/library/Mahou_Daisakusen
ROM Check: Skips ROM checks or enable them; you can edit the ROM freely when skipping the ROM checks.
Cheats: Taken from the mame.xml; invincibility cannot be turned on until you take control of the ship and have the ability to fire. Ensure that cheats are off when booting up or else you will receive a WORK RAM ERROR.
Dipswitch Settings: Self explanatory; do not modify the Region dipswitch for Mahou Daisakusen as there is no difference. Do not set Sorcer Striker or it's Korean variant to the JPN region as everything is displayed in English.
Hi-Score Saving: Saves to an .nvram file; loads .nvram file after 899 frames.
2. Shippu Mahou Daisakusen (Kingdom Grandprix)
For more information about region variants, game play overview, rank and strategies visit the following site: https://shmups.wiki/library/Shippu_Mahou_Daisakusen
ROM Check: Skips ROM checks or enable them; you can edit the ROM freely when skipping the ROM checks.
Cheats: Taken from the mame.xml; enable main weapon cheat prior to starting the game. Ensure that cheats are off when booting up or else you will receive a WORK RAM ERROR.
Dipswitch Settings: Self explanatory; do not modify the Region dipswitch for Shippu Mahou Daisakusen; there will be graphical corruption. Do not set Kingdom Grandprix to the JPN region; there will be graphical corruption. This occurs on real hardware.
Hi-Score Saving: Saves to an .nvram file; loads .nvram file after 539 frames.
3. Battle Garegga
For more information about region variants, game play overview, rank and strategies visit the following site: https://shmups.wiki/library/Battle_Garegga
Post-Check: Skips post checks for ROM and RAM, you can enable them but this will cut down boot time. You can edit the ROM freely when skipping the post checks, if set to normal you will need to disable guest characters.
Version: Special version enabled by default; this skips post checks on it's own. If using zakk ROMs, set this to normal. Post checks can remain skipped, zakk ROMs also bypass post checks in assemble with a custom routine and not on initialization.
Cheats: Taken from the mame.xml. Ensure that cheats are off when booting up or else you will receive a WORK RAM ERROR.
Dipswitch Settings: Self explanatory; the hidden dipswitches can be accessed from the options menu. Due to OSD limitations on displaying dipswitches, I've set them to enable freeplay when enabling from the options section. Ensure you turn on music and sound effects if changing the lever style.
Hi-Score Saving: Saves to an .nvram file; loads .nvram file using a high-score hook. All variants now have hi-score saving.
4. Armed Police Batrider
For more information about region variants, game play overview, rank and strategies visit the following site: https://shmups.wiki/library/Armed_Police_Batrider
Post-Check: Skips post checks for ROM and RAM, you can enable them but this will cut down boot time. You can edit the ROM freely when skipping the post checks, if set to normal you will need to disable start rank as this modifies the ROM.
Version: Special version enabled by default; this skips post checks on it's own.
Start Rank: For competitive players you can set the start rank to minimum.
Rank Level: For beginners you can set the start rank to always be easy.
Cheats: Taken from the mame.xml. Ensure that cheats are off when booting up or else you will receive a WORK RAM ERROR.
Dipswitch Settings: Self explanatory; the hidden dipswitches can be accessed from the options menu. Due to OSD limitations on displaying dipswitches, I've set them to enable freeplay when enabling from the options section. Ensure you turn on music and sound effects if changing the lever style.
Hi-Score Saving: Saves to an .nvram file; loads .nvram file using a high-score hook.
5. Battle Bakraid
For more information about region variants, game play overview, rank and strategies visit the following site: https://shmups.wiki/library/Battle_Bakraid
Post-Check: Skips post checks for ROM and RAM, you can enable them but this will cut down boot time. You can edit the ROM freely when skipping the post checks, if set to normal you will need to disable start rank as this modifies the ROM.
Version: Special version enabled by default; this skips post checks on it's own.
Level: Unlockable secret via input combination; created a menu option
Course: Unlockable secret via input combination; created a menu option
Cheats: Taken from the mame.xml. Ensure that cheats are off when booting up or else you will receive a WORK RAM ERROR.
Dipswitch Settings: Self explanatory; the hidden dipswitches can be accessed from the options menu. Due to OSD limitations on displaying dipswitches, I've set them to enable freeplay when enabling from the options section. Ensure you turn on music and sound effects if changing the lever style.
Hi-Score Saving: Saves to an .nvram file; loads .nvram file back to the EEPROM on boot.
All of the Raizing games are set with the majority of special and hidden features enabled. In the future, the remaining options will be available. I've been learning 68k asm and wrote a few routines while going thru each of the "Bat" trilogy titles to customize them further.I'll be focusing on Cave 68000 this week while Pramod works on a few other cores that are in development. If everything goes as planned, we'll see Sailor Moon this weekend! Have a great week.Disclaimer: All product names, trademarks, and registered trademarks mentioned are the property of their respective owners. "MAME", "M2", "MiSTer," "MiSTerFPGA," Cave", "Toaplan," "Raizing," 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.