Music integration in CcZ80++

By wimpie3

Champion (264)

Аватар пользователя wimpie3

02-09-2018, 16:29

I'm currently using CcZ80++ to develop a ROM based game I'd like to submit to the MSXdev competition. However, music support in CcZ80++ is lacking. Is anyone aware of a music driver I can use in CcZ80++? I don't have assembler knowledge. I know there are several music libraries out there, but I have no clue on how to integrate them with CcZ80++.

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By ToriHino

Champion (382)

Аватар пользователя ToriHino

02-09-2018, 17:08

The library that is part of Tabmegx contains classes to play music from CcZ80++ (next to a large number of other supporting classes) . Here an example on how to use it.

By wimpie3

Champion (264)

Аватар пользователя wimpie3

02-09-2018, 17:30

Unfortunately that library only works when creating disk images, NOT on ROMs (which is a requirement for msxdev).

By Manuel

Ascended (15804)

Аватар пользователя Manuel

02-09-2018, 19:51

You can still make a disk image and then convert it later to ROM with dsk2rom...

By N.I

Master (165)

Аватар пользователя N.I

03-09-2018, 07:10

Certainly the music class of Tabmegx can not be used on ROM.
CcZ80++ can include machine language in the code. So it is not difficult to use various music replayer codes distributed in machine language.

Example

public static void play_music(int argument1)
 asm register{
; HL = argument1 (Music data address etc.)
; Write machine language code for music replayer
RET
}

By wimpie3

Champion (264)

Аватар пользователя wimpie3

17-09-2018, 10:29

If anyone got this working, that would be fantastic.

By Grauw

Ascended (8507)

Аватар пользователя Grauw

17-09-2018, 11:39

N.I wrote:

Certainly the music class of Tabmegx can not be used on ROM.

DSK2ROM makes the ROM act as a disk drive which it boots from, so the game will still run from RAM.

By wimpie3

Champion (264)

Аватар пользователя wimpie3

17-09-2018, 12:04

If I'm not mistaken, the music driver from Tabmegx makes use of DM-System2 Basic, I'm not sure this software can be distributed freely. So if an existing music replayer could be implemented, that would be nice to have!