Developing software to new MSX eletronic devices with openMSX is possible. My OpenMSX patch do this task more easily

By rogermm

Master (130)

rogermm's picture

23-11-2014, 21:23

Currently I'm developing the software from my MSX hardware device @msxarm by simulating the MSXARM hardware on OpenMSX and a ARM Cortex M4 simulator(http://www.keil.com/uvision/db_sim_agsi.asp).

To accomplish that more easily I developed an abstraction layer on OpenMSX that load cartridges as Windows DLL. I called this a plugin. Plugins allow you to add cartridges on OpenMSX as a 'dynamic link library' (.dll) file. The plugin has a simple interface and don't have dependencies of internal data structures on OpenMSX so MSX software and/or hardware developers can more easily test and develop a real MSX eletronic device by using the power of emulation.

I think it could be useful so I shared the source code on: https://bitbucket.org/msxarm/openmsx/branch/cartridge_plugin

Running a sample plugin: MSXARM cartridge DLL

Login or register to post comments

By rogermm

Master (130)

rogermm's picture

27-12-2014, 17:30

The OpenMSX cartridge plugin in action: https://www.youtube.com/watch?v=bEIdZhM_kcA

By rogermm

Master (130)

rogermm's picture

08-11-2015, 21:53

Cartridge plugin to openMSX 0.12.0—Mulligan
https://bitbucket.org/msxarm/openmsx/commits/branch/cartridg...

By rogermm

Master (130)

rogermm's picture

30-07-2016, 00:50

DLL cartridge plugin to the unreleased openMSX 0.13 (pre release candidate 1, based on commit dc27d25) : (now runs on Windows/Linux)

Source code:
https://github.com/rogeriomm/openmsx/commits/cartridge_plugi...
https://bitbucket.org/msxarm/openmsx/commits/branch/cartridg...

Binaries:
https://bitbucket.org/msxarm/openmsx/downloads

By Manuel

Ascended (12811)

Manuel's picture

29-07-2016, 23:24

Note that 0.13 has not been released yet.

By rogermm

Master (130)

rogermm's picture

30-07-2016, 00:06

Manuel wrote:

Note that 0.13 has not been released yet.

OK. I fixed the message.

By Manuel

Ascended (12811)

Manuel's picture

30-07-2016, 15:41

You said "now runs on Windows/Linux". Can you tell more about the Linux support?

By rogermm

Master (130)

rogermm's picture

02-08-2016, 19:15

Manuel wrote:

You said "now runs on Windows/Linux". Can you tell more about the Linux support?

I created the openMSX plugin patch that works only on Windows to build the MSX-ARM hardware simulator. Now I updated the patche to support Linux because I planning to build a plugin that connects the MSX emulator running on PC with the MSX-ARM real hardware prototype using the ECP mode parallel interface . I could test several MSX models running on real MSX-ARM hardware using this setup!

Image and video hosting by TinyPic

To demostrate the plugin functionality I coded a sample plugin that implements a 16MB 16-bits mapper. There are binaries to Windows/Linux on https://github.com/rogeriomm/openmsx/releases

An openMSX plugin is a Linux/Windows dynamic library that is loaded at runtime when the emulation starts to run. There is a XML MSX device descriptor that defines the DLL file name (see XML tag "dll"). The DLL has only one exported function:

extern "C" int32_t DLLEXPORT OpenMsxPluginEntry(
           CartridgePluginInterface *cpi_, long major, long minor)

The openMSX call the "OpenMsxPluginEntry" function passing 3 parameters: the cartridge plugin Interface, the plugin interface major/minor version number. The plugin major version number changes when there is a interface update.

The plugin must register the events (power up/down,reset,read memory,...) that openMSX will generate:

extern "C" int32_t DLLEXPORT OpenMsxPluginEntry(
           CartridgePluginInterface *cpi_, long major, long minor)
{
  if(major == plugin::MAJOR)
   {
      cpi = cpi_;

      // Create event handler
      evt = new OpenMsxPluginEvent();

      // Register plugin events
      cpi->RegisterEvents(evt);
   }

   return (major == plugin::MAJOR) ? 0 : -1;
}

By karloch

Paragon (1930)

karloch's picture

02-08-2016, 21:25

Wow, this looks impressive Roger!

My MSX profile