Moonblaster WAV assembly player

By SjaaQ

Resident (47)

SjaaQ's picture

07-08-2019, 09:33

I am working on getting the moonblaster wave player (MWM files) to work. I want to modify the code:

* Does not need "call" statements from basic
* Music will be playing from the VDP interrupt
* No loading functions (all songs will be < 16KB)
* I will handle my own memory mapping

So I do not want to use the "mbload" function since I will be compressing the MWM files.

The remarks state the following about that:

; Note: The routine below is a bit complex because it supports
; songs > 16K. However, if you know that your song will always be < 16K you
; can simplify it a lot:
; - read the header and trash it!
; - read the rest of the file
; - modify the play_nextpos routine so that 3 is added to the pattern address

I cannot get that to work. I am also not sure what is meant with the last remark. If I load the file myself at #8000 and set the songdata_adres to 8006 it will play something, but it is more or less random sounds. I already disabled memory mapping functions. If I use mbload to load the file at 8000 it plays correctly.

Also, every player I saw only suppors "old" format MWM files. There is a check on the header which uses:
header_txt: db "MBMS",010h,8

But all files I create have a header like this:
header_txt: db "MBMS",010h,7

The player does just exists with an error "Not a (compatible) MB file!".

The only way to get the player working is loading the 1.16 version MWM file in the 1.04 editor and saving it in the old format. I also need to use the "mbload" routine, since it seems to load 3 bytes at offset #17d elsewhere (load_buffer).

So my question is: Does anybody have a moonblaster wave player assembly code that is "cleaned up" and compatible with the new header?

Login or register to post comments

By Meits

Scribe (5461)

Meits's picture

07-08-2019, 11:38

Please contact Marcel Delorme, either via his page or via his profile. He maintained and updated MBWAVE after Remco quit the scene.
A lot of stuff got added after Remco quit, so load/save a new MWM file in an old version of the tracker might remove unsupported new features.

By SjaaQ

Resident (47)

SjaaQ's picture

09-08-2019, 10:40

I already did. The sourcecode I got was not compatible as well. He is currently unavailable, so I tried to see here if anybody used the player recently. Maybe there is an open source project (game e.d.) that uses a better / modified player.

By Meits

Scribe (5461)

Meits's picture

09-08-2019, 14:39

I've sent you an e-mail.

By SjaaQ

Resident (47)

SjaaQ's picture

09-08-2019, 14:51

Thanks Meits. For those who are having the same problem; save your files in the "User" format, not the "Edit" format. This is an option in the Moonblaster Wave editor save dialog. The player assembly code is not compatible with the "Edit" format.