Moonsound OPL4 programming

By Juan Luis

Supporter (2)

Juan Luis's picture

10-02-2019, 04:15

Hi,
I'm trying to develop a minimalist program in assembler for playing a few notes with MoonSound and I couldn't hear any note until now. I reset Wave, FM1, FM2 LSI registers 00h and 01h, enable OPL3 and OPL4, set ASDR values, set frequency, etc, but I can't hear anything.

Do anyone know where I can find an assembler example for this?

Login or register to post comments

By Pencioner

Paladin (801)

Pencioner's picture

10-02-2019, 20:15

google for "vgmplay for MSX", it is open source

By yzi

Champion (439)

yzi's picture

10-02-2019, 23:19

If you just want the sample playing part of it, try looking at my SootSound project

https://sourceforge.net/p/sootsound/

MOD/XM style music player
https://sourceforge.net/p/sootsound/code/ci/master/tree/ltmp...

MoonSound routines
https://sourceforge.net/p/sootsound/code/ci/master/tree/moon...

By Juan Luis

Supporter (2)

Juan Luis's picture

10-02-2019, 23:24

Thank you very much Pencioner and yzi. I'm trying to compile vgmplay but COM.asm includes a file named Macros.asm that it's not present in the VGMPlay project. Anyway, I'm interested in the source code and I believe I have all the information I need.

Thanks for the links.

By Giangiacomo Zaffini 2

Expert (111)

Giangiacomo Zaffini 2's picture

10-02-2019, 23:46

BouKiCHi has a GitHub public repo for his project for Moonsound, a MML-based music driver:
GitHub/BouKiCHi/moondrv
It's assembler of choice is pasmo if I can remember well.

By Pencioner

Paladin (801)

Pencioner's picture

11-02-2019, 01:52

Juan Luis wrote:

COM.asm includes a file named Macros.asm that it's not present in the VGMPlay project

it includes two libs as subrepos, neonlib and gunzip - you might have to use mercurial submodules initiating (i actually don't remember how i did it, i use git on my work, no mercurial, and never was familiar with it - so just googled for solution)

My MSX profile