Motorola/Freescale DSP 56300 family emulator
  • C++ 58.6%
  • C 19.3%
  • Objective-C 7.7%
  • Makefile 5.6%
  • Shell 2.3%
  • Other 6%
Find a file
dsp56300 d81d785751 JIT: report a P memory write that ends a DO loop
The block scan checked for the loop end before it checked for a P write, so a block whose last
instruction writes P memory and ends a loop was classified as a loop end only. Its run function never
checked the write, and a block that holds the whole loop body runs all iterations inside itself, which
keeps only one written address anyway. Code patched by such a loop kept running the blocks compiled
before the patch.

Such a block still ends as a loop end, but is flagged as writing P memory: the write is checked after
every iteration, and the loop no longer iterates inside the block. Unit test doLoopWritesCode.
2026-09-23 22:50:31 +02:00
.github/workflows Fix broken github test run due to missing argument 2023-01-08 00:55:31 +01:00
doc SA: bitfield instructions from measured hardware behaviour 2026-09-04 21:19:11 +02:00
scripts SA: bitfield instructions from measured hardware behaviour 2026-09-04 21:19:11 +02:00
source JIT: report a P memory write that ends a DO loop 2026-09-23 22:50:31 +02:00
.gitattributes declare LF line endings for our own sources 2026-09-05 21:17:09 +02:00
.gitignore Add CMake presets and ignore user presets 2026-03-14 13:28:05 +01:00
.gitmodules Switch asmjit submodule to dsp56300 fork 2026-03-25 08:58:46 +01:00
CMakeLists.txt Update OSS version 2023-01-07 23:40:25 +01:00
CMakePresets.json Add CMake presets and ignore user presets 2026-03-14 13:28:05 +01:00
LICENSE.md move license to root 2021-07-13 11:15:23 +02:00
README.md typo 2024-04-28 16:49:56 +02:00

Motorola DSP 56300 family emulator

CMake GPLv3

Emulation of the Motorola/Freescale/NXP 56300 family DSP

This DSP has been used in plenty of virtual analogue synthesizers and other musical gear that was released after around the mid 90s, such as Access Virus A, B, C, TI / Clavia Nord Lead 3 / Waldorf Q, Microwave II / Novation Supernova, Nova and many others.

The emulator should compile just fine on any platform that supports C++17, no configure is needed as the code uses C++17 standard data types. For performance reasons, it makes excessive use of C++17 features, for example to parse opcode definitions at compile time and to create jump tables of template permutations, so C++17 is a strong requirement.

The build system used is cmake.

Development

Please note that this project is a generic DSP emulator and outputs nothing but a static library after building. To use it, you need to create a project on your own, which can be a command line app, a VST plugin or whatever and instantiate the DSP class and feed data into it.

Minimal example:

#include "../dsp56300/source/dsp56kEmu/dsp.h"

int main(int argc, char* argv[])
{
	// Create DSP memory
	constexpr TWord g_memorySize = 0x040000;

	const DefaultMemoryValidator memoryMap;
	Memory memory(memoryMap, g_memorySize);

	// External SRAM starts at 0x20000
	memory.setExternalMemory(0x020000, true);

	// TODO: Load useful data into memory like this
	// Example: write a nop to P memory at address $100
	// memory.set(MemArea_P, 0x100, 0x000000);

	// Use 56362 peripherals: ESAI, HDI08
	Peripherals56362 periph;

	// Instantiate DSP
	DSP dsp(memory, &periph, &periph);

	// set starting address
	dsp.setPC(0x100); 

	while(true)
	{
		// run forever
		dsp.exec();
	}
}