MoonDriver 070528

por boukichi en 27-05-2007, 23:33
Tema: Music
Idiomas:

Today, Japanese MSX user Boukichi has released MoonDriver version 070528. MoonDriver is an MML (Music Macro Language) environment for the Moonsound cartridge. The concept of MML is of course well known to us, just like writing notes on a sheet of paper, you can write a song in MML using a texteditor, save the file, compile it and listen.

The driver has the following features:

  • max 24+18 channels at a time (not exclusive)
  • 4-operator mode for FM
  • user defined PCM samples (a tool is included)
  • software volume/pitch/note envelope
  • software detune

Relevant link: MoonDriver page (MoonDriver and demosongs)

Comentarios (26)

Por Yukio

Paragon (1540)

Imagen del Yukio

28-05-2007, 03:07

Cool!

Por msd

Paragon (1462)

Imagen del msd

28-05-2007, 11:01

Cool stuff indead. The patches are included in de mml itself. Very good. No big patch table needed in the driver this way.

Por msd

Paragon (1462)

Imagen del msd

28-05-2007, 11:29

Too bad I can't get it running on my msx. Maybe it doesn't run with dos2

Por Manuel

Ascended (18239)

Imagen del Manuel

28-05-2007, 12:38

AFAIK it only runs on turboR...

Por boukichi

Resident (33)

Imagen del boukichi

28-05-2007, 19:47

I think MSX-DOS2 requires "SET EXPERT ON" to run the program.

if a tune uses many channels, e.g. "encounter the unknown environment" in demo songs
then it might not be played correctly without turboR .

Por msd

Paragon (1462)

Imagen del msd

28-05-2007, 19:55

I've that on by default. It doesn't make a difference. It loads the data. Prints playing and then it crashes.

Por Manuel

Ascended (18239)

Imagen del Manuel

28-05-2007, 21:17

Great stuff, BouKiCHi! Smile And a good MoonSound emulation benchmark...
Maybe mdrv should be a bit more user-error proof and check if the file in the argument is a valid mdr file Smile

Anyway, on my real turboR, I also tried to play it, but the program hung after saying PLAYING... This was in DOS1, both on R800 and Z80 mode.

Por msd

Paragon (1462)

Imagen del msd

29-05-2007, 22:30

Could it be something memory releated?

Por snout

Ascended (15184)

Imagen del snout

30-05-2007, 01:31

Great!!!! Too bad I'm really really really low on spare time these days, but MML+OPL4 could very well be a very good combo. Might give it a go and release some songs in the future! Smile

Por boukichi

Resident (33)

Imagen del boukichi

31-05-2007, 09:57

www.emucamp.com/boukichi/mdrv/mdrv0531.zip

(please copy and paste this url to browser,the link doesn't work)
please try this one,I fixed some bugs related BUSY flag.

Por msd

Paragon (1462)

Imagen del msd

31-05-2007, 18:30

It doesn't crash anymore!. However I only hear FM sound, but it's a start Wink Btw on my msx2+ on 7.16Mhz the speed is okay. I looked at the source code and saw that you have a call moon_wait. On z80 3.54Mhz this wait is not needed. On 7.16Mhz one NOP is enough. This could speed up things al lot for z80. I would replace the call moon_wait with 3 nops during runtime if the cpu is a z80

Por Manuel

Ascended (18239)

Imagen del Manuel

31-05-2007, 19:59

Same here, only FM.

Por boukichi

Resident (33)

Imagen del boukichi

01-06-2007, 12:36

http://www.emucamp.com/boukichi/mdrv/mdrv0601.zip

output channel selection is ignored in emulation?

changed the bit to mix fm and wave.

I hope it will work.

Por msd

Paragon (1462)

Imagen del msd

01-06-2007, 16:40

Yes it works now! Great stuff dude and no problems speed wise on my msx2+. 3.54Mhz and 7.16Mhz both good.

Por Manuel

Ascended (18239)

Imagen del Manuel

01-06-2007, 18:58

Can someone explain to me how that output channel mode selection works? (I.e.: give a spec so I can fix the emulation...)
EDIT: never mind. They are not used yet in our emulation code, indeed Smile See YMF278.cc line 698:

		case 0xF8:
			// TODO use these
			fm_l = data & 0x7;
			fm_r = (data >> 3) & 0x7;
			break;

		case 0xF9:
			pcm_l = data & 0x7;
			pcm_r = (data >> 3) & 0x7;
			break;

That's the mix control registers...

It works fine now on my real tR indeed! GREAT! Smile

Por msd

Paragon (1462)

Imagen del msd

02-06-2007, 00:12

The opl4 has 3 outputs (on the chip itself). Only one is connected. These outputs are.. FM, PCM and MIX. Only the mix is connected on the moonsound. The other could be used for example for an effect processor

Por Manuel

Ascended (18239)

Imagen del Manuel

02-06-2007, 00:14

Yeah, but you can set up mixing with the F8 and F9 register... It's in the same doc Smile

Por boukichi

Resident (33)

Imagen del boukichi

02-06-2007, 02:19

I'm happy it's working on the actual MoonSound Smile

I checked the OPL4 info from the result.

in FM part, bit7 and bit6 in Reg$C0 are used for DO0.

in wave part , bit4 in Reg$68 is used to select DO2 or DO1.

the mix control ( Reg$F8-$F9 in wave part ) is used for DO2.

Note that DO0 is separeted FM output,
DO1 is separeted PCM output, and DO2 is mixed output.

The previous version sets bit4 to 1 in Reg$68 of wave part.
I guess it's no effect in an emulation.

Por msd

Paragon (1462)

Imagen del msd

02-06-2007, 09:32

boukichi: Do you have to complete rom patch table info? I have it for you if you need it

Por Manuel

Ascended (18239)

Imagen del Manuel

02-06-2007, 12:41

Thanks to Wouter, latest openMSX Moonsound emulation implements CH bit in register 0x68, showing the "only-FM" problem in the mdrv0531.zip. Mixing itself is being looked at (but it's more difficult).

Por boukichi

Resident (33)

Imagen del boukichi

03-06-2007, 03:05

msd : is it not enough table info created by tone.exe?

manuel : great Smile

Por msd

Paragon (1462)

Imagen del msd

03-06-2007, 11:48

Ah I see. Well yeah that must be enough. Did you get that patch table info from a linux opl4 driver?

Por boukichi

Resident (33)

Imagen del boukichi

06-06-2007, 16:06

msd : I think it is same as Linux's source.
I get the source from http://msx.gabiot.com/index_en.html

Por msd

Paragon (1462)

Imagen del msd

06-06-2007, 21:13

Yes it's the same as the linux source. I used the linux source too. I have made a calculation for f-num and octave without any loops.. I use an extra very small table. Do you want it?

Por Retrofan

Paragon (1264)

Imagen del Retrofan

19-05-2010, 13:03

Latest version 070701 can be found here:

http://clogging.web.fc2.com/mdrv/

Por Retrofan

Paragon (1264)

Imagen del Retrofan

22-05-2020, 18:42

Hmmm, link is broken. Can someone upload it? Thanks.