jkotlinski / lsdpack

Standalone LSDj recorder+player
GNU General Public License v2.0
116 stars 18 forks source link

feature request: raw register dump #16

Closed cyberic99 closed 3 years ago

cyberic99 commented 3 years ago

It could be interesting to get a raw register dump of a song in text form, a bit like what vgm2txt does:

<cycle> <address> <value>
or
<address> <value>
<wait x cycles>
...

This could be useful, in order to analyze some songs

An option to choose if we want the 'optimized' (without redundant reg writes) or the raw dump could be useful too.

cyberic99 commented 3 years ago

thanks @jkotlinski

I edited the issue text, some of it was previously hidden

would it be possible to get some timing or clock information when writing the register, in raw mode?

jkotlinski commented 3 years ago

Ah! The player is not cycle exact, so I cannot give cycles.

What you can get already is to look for FLAG_END_TICK or CMD_END_TICK. Either of those will end a tick. Ticks are fired six times/screen update.

cyberic99 commented 3 years ago

Ah! The player is not cycle exact, so I cannot give cycles.

allright, but libgambatte is!

I had a patch against an old version of lsdpack that did convey the cycles information and printed it. But lsdpack has changed a lot (for the better) since ;-)

jkotlinski commented 3 years ago

Oh, that’s interesting. Well, if you like to contribute something like that, it’s welcome. Would the -r flag to disable optimizations still be useful on its own or could it just as well be removed?

On Mon, 15 Feb 2021 at 11:42, cyberic99 notifications@github.com wrote:

Ah! The player is not cycle exact, so I cannot give cycles.

allright, but libgambatte is!

I had a patch against an old version of lsdpack that did convey the cycles information and printed it. But lsdpack has changed a lot (for the better) since ;-)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jkotlinski/lsdpack/issues/16#issuecomment-779132605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY34O2OJGTHJF4CONNQUODS7D3AZANCNFSM4XSJQMVQ .

cyberic99 commented 3 years ago

Ok then, I'll try to rebase my patch.

Would the -r flag to disable optimizations still be useful on its own

I think so, now that you have it and it doesn't increase the code complexity too much, let's keep it

cyberic99 commented 3 years ago

Hello Johan, here is the pull request: https://github.com/jkotlinski/lsdpack/pull/17

At least 2 problems are remaining:

And also, optimizations are disabled. we could run an optimization pass, but it would require a change to the music_stream vector, and would be a pretty big change.

What do you think @jkotlinski ?