SND_startPlay_TFM doesn't sound like it should

SGDK only sub forum

Moderator: Stef

Post Reply
Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm
Contact:

SND_startPlay_TFM doesn't sound like it should

Post by Moon-Watcher » Tue Jun 25, 2013 12:54 pm

Playing multiple TFD's files via SND_startPlay_TFM function I notice a weird behavior. Can't describe what's exactly wrong and also can't say why it happens, but music certainly doesn't sound like it should. Can someone point about what's going on?

-------------------------------------------------------------------------------------

Based on sound.c I wrote a function to stop music. I'll put all my money it will not work :P

Code: Select all

void music_stop ()
{
	vu8 *pb;

	Z80_loadDriver ( Z80_DRIVER_TFM, 0 );
	Z80_requestBus ( 1 );

	pb = (u8 *) 0xA02000;
	*pb = 0x00;

	Z80_releaseBus();
}

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Tue Jun 25, 2013 1:39 pm

The Z80 TFM driver does not support stop music command. The only way to actually interrupt TFM playing is to unload the TFM driver (by loading another driver for instance). But i think i have to made some fixes in the TFM driver play command, i probably have to reset Z80 memory at somepoint ;)

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm
Contact:

Post by Moon-Watcher » Tue Jun 25, 2013 1:51 pm

Stef wrote:The only way to actually interrupt TFM playing is to unload the TFM driver (by loading another driver for instance).
Good point. I think I'll go that way.

Post Reply