Looking for a simplified ASM driver for Moonblaster

Page 1/2
| 2

By AxelStone

Prophet (3189)

AxelStone's picture

05-05-2016, 08:03

Good day, I've downloaded ASM driver for Moonblaster and I've modified it to compile in M80. It compiles right, but something must be wrong that it doesn't works togheter my MSX-C program, I must be doing something wrong. I see the driver too complex, it allows chips selection, it seems to make banck switching, etc.

In orther to make it easier, I'd like to have a simplified version of the driver:

  • Only FM-PAC supported, no chip selection nor Music Module code on driver.
  • Only MBM suppport, not MBKs or any other.
  • No bank switching, if it's doing that.
  • The 4 basic functions: start, stop, play, pause. In order to start music, only music addr is needed, no more parameters.

Is there exists this simplified version of the driver? Since my ASM is too basic, it should be a great help for me. Thanks.

Login or register to post comments

By nitrofurano

Champion (301)

nitrofurano's picture

05-05-2016, 15:50

i have no idea - at first, the curiousity i might have about Yamaha YMF278 is to read .vgm files (worth studying how it works) that might uses this chip, using Boriel’s ZXBasic Compiler (not directly or only Assembly or C), and then trying to compose something for that from some tracker or alike - usually, playing sound chips (almost whatever they are) is merely sending data to registers via i/o or poking memory area

By nitrofurano

Champion (301)

nitrofurano's picture

05-05-2016, 15:53

i guess these vgm files might be fine for testing: http://vgmrips.net/packs/chip/ymf278b - try to open these vgm files (expanded, not the compressed gz ones) in a hex editor, and take a closer look on what these files stores, how and which values, and where, are sent to registers

By AxelStone

Prophet (3189)

AxelStone's picture

06-05-2016, 11:24

@nitrofurano Yes, basically use a chip is simply read/write in memory addresses or register, but with this you get the basics. A mbm file is really complex to handle, so it's better aproach use the designed driver that trying to make by yourself.

By ARTRAG

Enlighted (6923)

ARTRAG's picture

05-11-2016, 13:26

As I am integrating to C an mbm player, this topic seems related and could be resumed.

The current player (one from this same site) supports msx-music and msx-music
The problem is the moonsound cartridge.

I read that opl4 is comparable with opl3, nevertheless I cannot detect it with the current msx-music code.

What are the differences? Is there some magic initialization to get compatibility?
(Like the fmpac cartridge with msxusic) ?

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

05-11-2016, 16:04

ARTRAG wrote:

I read that opl4 is comparable with opl3, nevertheless I cannot detect it with the current msx-music code.

What are the differences? Is there some magic initialization to get compatibility?

No magic involved... there is just some mix up now:

MSX-MUSIC = OPLL (~Reduced OPL1)
MSX-AUDIO = OPL1
OPL3 = 2 x OPL1
MoonSound = OPL4 = OPL3 + that sample stuff

The difference between MSX-AUDIO and MoonSound is that they use different I/O ports for FM and the sample routines (optional in MSX-AUDIO) work in totally different way. In MoonSound PCB there is possibility to use DIP-switches to switch I/O ports so that it looks like MSX-Audio, but I don't think this trick is used by many people.

By ARTRAG

Enlighted (6923)

ARTRAG's picture

05-11-2016, 17:20

How do the msx audio porta map to opl4 moonsound?
Can I detect it with a rom string or a port reading?

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

05-11-2016, 18:25

IIRC

#C0 -> #C4 = 1st OPL1
#C1 -> #C5

#C0 -> #C6 = 2nd OPL1
#C1 -> #C7

Moonsound is I/O only device. The DIP switch works by lowering all I/O ports by 4.

By Manuel

Ascended (19273)

Manuel's picture

05-11-2016, 20:05

OPLL is actually a reduced OPL2 Smile And isn't OPL3 2x OPL2?

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

05-11-2016, 20:15

Manuel wrote:

OPLL is actually a reduced OPL2 Smile And isn't OPL3 2x OPL2?

Might be... I'm not really good at this FM stuff at all... Anyway practically OPL4 is register compatible enough to play OPL1 tunes. OPL2 & 3 I have pretty much skipped for obvious reasons Smile

By ARTRAG

Enlighted (6923)

ARTRAG's picture

05-11-2016, 23:19

Taanks! How do I detect moonsound ?
I could patch ports on fly

Page 1/2
| 2