Jump to content
IGNORED

Web Pokey


mrk

Recommended Posts

44 minutes ago, ivop said:

Great work! ?

 

SKCTL and STIMER is not supported by SAP-R, though :( We were thinking about creating a new SAP-R2 format (or SAP-Q if we were to stick to a single character), to capture more registers per frame. The existing STEREO and FASTPLAY tags should take care of either two pokeys per frame being captured, and the frame rate (multispeed).

For this emulator I had to design protocol for sending pokey registers to background webaudio thread - I'm simply sending triplets of (reg_index, reg_value, timestamp). This supports all pokey registers (including SKCTL / STIMER) and even more than one pokey :) (timestamps are floats with pokey clock resolution) Add sap header to it (with separate type) and you'll have very flexible format :)

Edited by mrk
typo
  • Like 3
Link to comment
Share on other sites

I have some test tunes too!

 

Pinky XMAS Edition - Overworld 1 (RMT2LZSS conversion - RMT Patch8 ver) Pinky - Xmas Edition - Overworld 1 Final.sapr

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876661

Stranded on the Surface of Io (SAPR recorded directly from Altirra playing my .xex export from my RTM Patch 16 version) Stranded on The Surface of Io.sap

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876662

Agent X II (C64) - Level 1 (SAPR recorded directly from Altirra playing my own binaries running custom RMT code with my Visualizer) Agent X II - Level 1.sap

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876663

Corridors of Time (50hz version) - (RMT2LZSS conversion - RMT Custom Tables ver) Corridors of Time Alternate Tuning Final Loop Adjusted 50hz.sapr 

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876668

 

Did not test yet, so it may or may not work...

 

 

  • Like 2
Link to comment
Share on other sites

here's another one: A Permanent Temporary Solution (RMT2LZSS conversion - RMT 128 ver) A Permanent Temporary Solution Final.sapr

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876671

 

This one seems to have broken a bit of the player! Things are quite odd, but in general, it played as expected for the most part!

Edited by VinsCool
  • Like 2
Link to comment
Share on other sites

1 hour ago, ivop said:

Great work! ?

 

SKCTL and STIMER are not supported by SAP-R, though :( We were thinking about creating a new SAP-R2 format (or SAP-Q if we were to stick to a single character), to capture more registers per frame. The existing STEREO and FASTPLAY tags should take care of either two pokeys per frame being captured, and the frame rate (multispeed).

does SKCTL need to be fully supported or is just 2 tone mode on/off ? if it's 2 tone only, it cold be stored as a single bit in one of the AUDC registers  when compressed with LZSS ?

Link to comment
Share on other sites

10 minutes ago, VinsCool said:

here's another one: A Permanent Temporary Solution (RMT2LZSS conversion - RMT 128 ver) A Permanent Temporary Solution Final.sapr

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876671

 

This one seems to have broken a bit of the player! Things are quite odd, but in general, it played as expected for the most part!

Interesting, could you provide xex as reference?

Link to comment
Share on other sites

Here's another one!

 

A test tune I made last night testing a custom RMT command: AUDCTL Envelope. Custom AUDCTL Envelope Test Tune NTSC.sap

https://mrk.sed.pl/web-pokey/examples/sap-player/#https://atariage.com/forums/applications/core/interface/file/attachment.php?id=876688

The tune was recorded from NTSC speed in Altirra from a binary I built including the custom RMT code and my WIP Visualizer, I'll include the binary.

Custom AUDCTL Envelope Test Tune.obx

 

 

Edited by VinsCool
Replaced for correct speed
Link to comment
Share on other sites

17 hours ago, rensoup said:

does SKCTL need to be fully supported or is just 2 tone mode on/off ? if it's 2 tone only, it cold be stored as a single bit in one of the AUDC registers  when compressed with LZSS ?

As far as I know, it's the two-tone bit only. Perhaps you can (ab)use the volume-only bit in AUDCx to toggle two-tone? Vinscool has already mentioned he plans to perhaps toggle it within a single song :)

  • Like 2
Link to comment
Share on other sites

1 hour ago, ivop said:

As far as I know, it's the two-tone bit only. Perhaps you can (ab)use the volume-only bit in AUDCx to toggle two-tone? Vinscool has already mentioned he plans to perhaps toggle it within a single song :)

I don't like the idea of using AUDC volume bits as a toggle, because it would under normal circumstances be intended to set volume or volume only output.

I already have had a proof of concept toggle, but ultimately, it was writing to SKCTL to work at all.

Link to comment
Share on other sites

40 minutes ago, VinsCool said:

I don't like the idea of using AUDC volume bits as a toggle, because it would under normal circumstances be intended to set volume or volume only output.

I already have had a proof of concept toggle, but ultimately, it was writing to SKCTL to work at all.

OK, listen to the users. I have never used volume-only at 50-200Hz speed, but if it has a purpose, it should not be overloaded. On the other hand, there are eight ranges of volume only. One of them might be used to signal other things to RMT2LZSS, instead of adding another channel to the nine per pokey we already have, just for a single bit in SKCTL and/or a write to STIMER.

 

Edited by ivop
  • Like 1
Link to comment
Share on other sites

9 minutes ago, ivop said:

OK, listen to the users. I have never used volume-only at 50-200Hz speed, but if it has a purpose, it should not be overloaded. On the other hand, there are eight ranges of volume only. One of them might be used to signal other things to RMT2LZSS, instead of adding another channel to the nine per pokey we already have, just for a single bit in SKCTL and/or a write to STIMER.

 

Good point!

I've just thought about it as I've learned how to use the chip, and could visualise the compatibility issues with this idea.

 

Assuming this is a theoretical WebPOKEY exclusive feature, that could totally work, and in fact, that could easily be done even with the RMT player code itself... By repurposing the Volume Only toggle :)

 

On a little tangent here:

 

I was actually thinking about this earlier and had the idea of using a variant of my Command 7 hack to allow the output of Volume Only, Two-Tone and AUDCTL, all baked into a single command.

The XY parameters would take care of what becomes what, in this setup.

 

My idea was to reserve $FF to the usual Volume Only mode toggle, $FE for Enabling Two-Tone, and then $FD for disabling it, keeping any other values for the AUDCTL itself.

My reasoning for this idea was that it would be incredibly unlikely to have all AUDCTL bits enabled at once in a single instrument, and so, that would leave a lot more creativity with virtually no penality to the user :D

 

Anyway off that tangent now lol

 

Another viable compromise would be to use either ones of Distortion 6 or E, since they are duplicates of other distortions, being Distortion 2 and A, and also useless, by application.

But then, the problem about them would be that, only 1 distortion could be set, since it would toggle Two-Tone for sure, but with what exactly? :D

 

So yeah, I can now see the possibility of using the AUDC Volume Only bit to be the most realistic approach that would most likely cause no harm at all, in this case. :)

 

  • Like 1
Link to comment
Share on other sites

13 minutes ago, VinsCool said:

My idea was to reserve $FF to the usual Volume Only mode toggle, $FE for Enabling Two-Tone, and then $FD for disabling it, keeping any other values for the AUDCTL itself.

My reasoning for this idea was that it would be incredibly unlikely to have all AUDCTL bits enabled at once in a single instrument, and so, that would leave a lot more creativity with virtually no penality to the user

Emphasize is mine. You underestimate yourself ;)

13 minutes ago, VinsCool said:

So yeah, I can now see the possibility of using the AUDC Volume Only bit to be the most realistic approach that would most likely cause no harm at all, in this case. :)

I think so. We have $10-$1f, $30-$3f ... $f0-$ff for volume only. One range could be (ab)used to signal SKCTL and STIMER changes. I don't think there are many (if at all) .rmt files that use volume-only in their instruments. Are there? Perhaps we could make this part of the new SAP-R2 or SAP-Q specification. Or an optional addition to the current SAP-R spec, as volume only is unlikely anyway?

Edited by ivop
  • Like 1
Link to comment
Share on other sites

3 minutes ago, ivop said:

Or an optional addition to the current SAP-R spec, as volume only is unlikely anyway?

Please do not do that :) sap-r with small FASTPLAY header value should play quite well volume-only samples, I'm going to create few such sap files.

  • Like 1
Link to comment
Share on other sites

We've totally hijacked mrk's thread, will post in the other ones...

 

9 minutes ago, mrk said:

Please do not do that :) sap-r with small FASTPLAY header value should play quite well volume-only samples, I'm going to create few such sap files.

 

Agreed, it could be needed. Btw RMT2LZSS has the ability to convert 800hz tunes and play some low frequency samples... we tried a few tests in the dedicated thread and it didn't sound too good

  • Like 1
Link to comment
Share on other sites

19 minutes ago, ivop said:

Emphasize is mine. You underestimate yourself ;)

Haha no I'm really serious about that, if we speak about the full AUDCTL register, for sure, it WILL be used abusively, but since the code was made specifically to hijack the Command 7 to set bits PER instrument, and then, have each channel's own values combined together before writing the byte to the AUDCTL register, I believe this is going to be an unlikely situation ?

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, mrk said:

Please do not do that :) sap-r with small FASTPLAY header value should play quite well volume-only samples, I'm going to create few such sap files.

Keep in mind that there are eight(!) ranges that sound exactly the same as volume-only. You don't need them all eight. You need only one.

 

In the end it's going to be a trade off between adding a tenth channel to SAP-R and rename its type to SAP-Q (one channel could capture both SKCTL and STIMER), or abuse bits in AUDC or AUDCTL as a side band.

 

Edit: if one wanted to toggle two-tone mode several times per instrument envelope, this would be severely limiting, because there is no generator active during the switch (volume only). We really need a tenth channel to capture the SKCTL and STIMER nuances and not muddy the existing channels.

 

Sorry mrk for semi-hijacking your thread, but it's like Rubber Duck debugging ;)

Edited by ivop
  • Like 1
Link to comment
Share on other sites

18 minutes ago, ivop said:

Keep in mind that there are eight(!) ranges that sound exactly the same as volume-only. You don't need them all eight. You need only one.

But SAP type R specification clearly says:  The data part is a raw dump of the POKEY registers (D200-D208) in FASTPLAY intervals - nothing more. If you are going to interpret some bit combinations in AUDC different way you are simply creating different file format and still naming it `SAP type R` will be very confusing 
 

Edited by mrk
  • Like 1
Link to comment
Share on other sites

6 minutes ago, mrk said:

But SAP type R specification clearly says:  The data part is a raw dump of the POKEY registers (D200-D208) in FASTPLAY intervals - nothing more. If you are going to interpret some bit combinations in AUDC different way you are simply creating different file format and still naming it `SAP type R` will be very confusing 
 

I totally agree. That's why I added this later:

25 minutes ago, ivop said:

We really need a tenth channel to capture the SKCTL and STIMER nuances and not muddy the existing channels.

Just a raw dump of D200-D208 and a tenth channel for SKCTL and STIMER writes :)

Link to comment
Share on other sites

1 hour ago, VinsCool said:

Haha no I'm really serious about that, if we speak about the full AUDCTL register, for sure, it WILL be used abusively, but since the code was made specifically to hijack the Command 7 to set bits PER instrument, and then, have each channel's own values combined together before writing the byte to the AUDCTL register, I believe this is going to be an unlikely situation ?

SAP-R has no notion of RMT command 7. It's just a write to AUDCTL. If RMT2LZSS were to intercept such combination, and does something else, that is not part of the SAP-R standard. Even though I was proposing such non-standard extensions earlier, after the feedback, I changed my mind back to needing a new type (either R2 or Q) if we want SKCTL/STIMER support. Luckily STEREO and FASTPLAY are already part of type R.

Edited by ivop
  • Like 1
Link to comment
Share on other sites

11 minutes ago, ivop said:

Luckily STEREO and FASTPLAY are already part of type R.

Didn't know about STEREO header in type R - is Altirra able to produce it?

EDIT: Just checked it on Flob game - no, mono sap is produced.

Edited by mrk
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...