nesdev.com
http://forums.nesdev.com/

Communication protocol with S-SMP over $2140
http://forums.nesdev.com/viewtopic.php?f=12&t=11900
Page 2 of 2

Author:  rainwarrior [ Wed Jul 26, 2017 9:59 am ]
Post subject:  Re: Communication protocol with S-SMP over $2140

SNSF does sound like it's heading in that direction.

I was thinking also of how using the Winamp plugin API works by filling out a table of function pointers. You might look at it for reference as to what a music player might need:
https://github.com/bbbradsmith/nsfplay/blob/master/xgm/player/plugin/winamp2/sdk/IN2.H

The thought was just that specifying an interface layer directly as S-SMP communication is too deep; you've got a lot more constraints down there than at the CPU level, where you have a ton of flexibility.

You could write the CPU side player protocol on top of any existing engine (this is what I was comparing the NSF INIT stub to), and that player interface code doesn't have to be directly part of the engine or its code, so it's not an encumbrance to it.

As far as IPL recovery, it seems to me that any engine that can upload arbitrary data should be able to get back to that, shouldn't it? (How do SPC players on the SD2NES/PowerPak manage to switch tracks without a reset?)

Author:  lidnariq [ Wed Jul 26, 2017 10:58 am ]
Post subject:  Re: Communication protocol with S-SMP over $2140

rainwarrior wrote:
How do SPC players on the SD2NES/PowerPak manage to switch tracks without a reset?
Super PowerPak has the ability to drive /RESET.

Author:  Revenant [ Wed Jul 26, 2017 11:41 am ]
Post subject:  Re: Communication protocol with S-SMP over $2140

That's what the sd2snes does, as well.

Author:  tepples [ Wed Jul 26, 2017 11:59 am ]
Post subject:  Re: Communication protocol with S-SMP over $2140

But a production Game Pak does not.

I was referring to something at roughly this level:

Command: No operation
(Must be performed between operations with the same ID number)
write NO_OPERATION to $2140
wait for $2140 to equal NO_OPERATION

Command: Start track
write track number to $2141
write START_TRACK to $2140
wait for $2140 to equal START_TRACK

Command: Play sound effect
write sound effect ID to $2141
write volume to $2142
write pan to $2143
write PLAY_SOUND_EFFECT to $2140
wait for $2140 to equal PLAY_SOUND_EFFECT
read the voice number from $2141 for later use, such as to stop a looping effect

Command: Exit to IPL
write EXIT_TO_IPL ($AA) to $2140
wait for $2140=$AA

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/