SDCC and Moonblaster player

By ARTRAG

Enlighted (6862)

ARTRAG's picture

26-03-2022, 22:17

Is there a MBM player to be used in SDCC ? I was trying to include the MBM player in this project
https://github.com/artrag/SDCC-msx2-side-scrolling-platform-...
but it seems that none has ported it to the sdasz80 dialect

Login or register to post comments

By ToriHino

Paladin (788)

ToriHino's picture

26-03-2022, 23:28

There is one as part of RoboPlay, which you can find here, although probably not optimal to be included in this project.

By aoineko

Hero (519)

aoineko's picture

27-03-2022, 01:21

@ARTRAG if you have an assembler player code I can convert it to sdasz80/SDCC (I did it for WYZ and Arkos).

By jepmsx

Master (170)

jepmsx's picture

27-03-2022, 08:17

I've been working in a MBM player for MSX-Music and Fusion-c. It's almost finished, it needs some testing and the implementation of the PSG sound for drums. I've seen that it uses only one channel but I need to check if I can mix it with the PSG players included in Fusion-C.

The files can be found in my gitlab

The player files are FM_MBM.h and FM_MBM.c . The file exm_FM_MBM.c is an example where I call the function to be played. You only need to point the variable songFile to the start of the MBM file in memory, initialize the driver calling ompleCapcaleraPatrons() and InicialitzemCanalsReproductor(); and call playPatro() in the interrupt handler.

Some of the comments are in Catalan and the parts that I've used from Torihino player are in English. But feel free to ask any question, I'll be very pleased to answer it.

I've been working on it for almost have a year and it isn't finished (I'm a slow learner), but I've read this post and I've thought that it was a good moment to share it with the community. Because it is the first time that I've published I would like to thank all the people who have helped me answering my posts and specially to Torihinio, Manuel and BiFi for their patience with my questions related to Moonblaster file format and player. And also to Eric for solving my doubts of Fusion-C.

By ARTRAG

Enlighted (6862)

ARTRAG's picture

27-03-2022, 10:30

Thanks, have you ported the mbplay with latest patches by BiFi ?
Going to give a try!

By jepmsx

Master (170)

jepmsx's picture

27-03-2022, 13:10

No. My first approach was to use Bifi's player. But I didn't succeed. So I did an implementation in C (inspired by roboplay)