Releases: vladikcomper/MegaPCM
Mega PCM 2.0
Mega PCM 2.0 is a complete rewrite that adds a lot of new features and focuses on one ground-breaking achievement: ultra-clean playback at high sample rates. Watch this demo for in-game PCM playback at 32 kHz on real hardware.
Feature highlights
- Ultra-clean PCM playback on real hardware! No more scratchy playback that 99% of games suffer from. Mega PCM 2 implements DMA protection / buffering system to bypass hardware limitations.
- Pitch and volume control, DAC fade in/out support.
- Native .WAV file support. Forget about manually specifying pitches: Mega PCM 2 now reads .WAV files natively and plays them at the correct sample rate.
- Basic SFX support: you can have special "SFX samples" which won't be interrupted by BGM drums (note that Mega PCM 2 is still a one-channel driver and cannot play samples simultanesouly);
- Several supported sample formats: WAV, 8-bit raw PCM, compressed 4-bit DPCM;
- Unlimited sample size: your samples can be as large as your ROM can fit, forget about banks and other Z80 limitations;
- Playback control: pause, stop, loop, priority;
- High playback rates:
- Turbo mode! 8-bit PCM playback at 32 kHz (without pitch and volume effects);
- 8-bit PCM playback up to 25.1 kHz with pitch and volume effects;
- 4-bit DPCM playback up to 20.5 kHz with pitch and volume effects.
Installation, migration from Mega PCM 1.x and help
Mega PCM v.1.1
Originally released on 2012-08-05
-
Added a small code-fix to prevent noise and memory access errors on playing empty/broken samples
Now if the game attempts to play empty or not existing DAC sample slot, you won't hear anything. For example, if you imported an SMPS song and few DACs are missing in your driver. The previous Mega PCM version along with most of the drivers would give out random noise here due to playback errors.
This also helps if a slot of random broken bytes somehow gets playing. Random offsets now won't cause errors on accessing prohibited memory areas, because they are fixed as well.
-
Fixed synchronization code issue in PCM and DPCM playback loops.
While I've been counting every cycles in my code, I slightly miscalculated in calculating synchronization code cycle worth, which caused playback loop to work 4 cycles faster when the last bank reached. Therefore, sample's last bank played slightly faster then the rest. Despite 4 cycles (NOP opcode worth) being extremely small time period for Z80, playback speed up was noticeable on high sample rates (22 kHz and higher).
-
Mega PCM now supports up to 8 MB ROMs!
The previous version was limited to 4 MB, but that wasn't the maximum of Mega PCM addressing capabilities though. I decided to push the limit to what the driver's bank switching system was really capable of, 8 MB. This means you can fit twice as much music and samples!
I must warn though, very few emulators support big ROMs yet. But if you're still interested in this possibility, I'll try to clue you in:
So, many people think that SMD is strictly limited to 4 MB in ROM storage. Actually, the console is capable of more. But the fact is, all the official game cartridges were designed with this limit in mind, their boards just weren't meant to address more than 4 MB of ROM-space, while the console allowed to do so. It was cartridges' limit, not the console's.
For instance, some SMD flash-cartridges (like Mega Everdrive) support ROMs above 4 MB already, showing what the console is really capable of. However, emulators have very poor support for this.
The matter is, that limit was tied by the official Genesis manual, where the memory map for 68K had only 4 MB of memory marked for ROM and the rest memory space up to 8 MB was marked as 'reserved'. It's interesting that in the earliest versions of this manual (1988-1989 years) the ROM limit was 1 MB. Many emulators' creators decided to strictly follow the manual and intentionally limited ROM-space to 4 MB. In principle, this makes sense and none of the official games suffered, but it would be rather good if more emulators got rid of this nasty limit, this will surely open up new horizons for SMD developing, bringing console a new life.
Mega PCM v.1.0
Originally released on 2012-06-11
Initial release.