mrk Posted September 21, 2021 Author Share Posted September 21, 2021 (edited) 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 September 21, 2021 by mrk typo 3 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909689 Share on other sites More sharing options...
VinsCool Posted September 21, 2021 Share Posted September 21, 2021 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... 2 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909701 Share on other sites More sharing options...
VinsCool Posted September 21, 2021 Share Posted September 21, 2021 (edited) 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 September 21, 2021 by VinsCool 2 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909716 Share on other sites More sharing options...
rensoup Posted September 21, 2021 Share Posted September 21, 2021 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 ? Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909719 Share on other sites More sharing options...
mrk Posted September 21, 2021 Author Share Posted September 21, 2021 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? Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909722 Share on other sites More sharing options...
VinsCool Posted September 21, 2021 Share Posted September 21, 2021 19 minutes ago, mrk said: Interesting, could you provide xex as reference? Sure, I also have the recording from real hardware A Permanent Temporary Solution Final.xex 2 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909739 Share on other sites More sharing options...
VinsCool Posted September 21, 2021 Share Posted September 21, 2021 (edited) 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 September 22, 2021 by VinsCool Replaced for correct speed Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909756 Share on other sites More sharing options...
+DjayBee Posted September 22, 2021 Share Posted September 22, 2021 (edited) 9 hours ago, mrk said: playable url: warlocke.sapr - POKEY stress test by @emkay For reference and comparing with Altirra xex would be helpful He never does that You have to cope with his YouTube videos. Edited September 22, 2021 by DjayBee Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909927 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 (edited) 2 hours ago, DjayBee said: He never does that You have to cope with his YouTube videos. O rly? I see a lot of executables published by him. Also, for this comparison yt video is enough. Edited September 22, 2021 by mrk 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4909943 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 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 2 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910092 Share on other sites More sharing options...
VinsCool Posted September 22, 2021 Share Posted September 22, 2021 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. Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910163 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 (edited) 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 September 22, 2021 by ivop 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910193 Share on other sites More sharing options...
VinsCool Posted September 22, 2021 Share Posted September 22, 2021 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 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? 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. 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910226 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 (edited) 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 September 22, 2021 by ivop 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910244 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 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. 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910252 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 On 9/18/2021 at 11:54 PM, rensoup said: Is it possible to play a local file ? Done - I've added drag & drop support for urls and local files (I'm going also to add standard file selector button) 2 2 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910256 Share on other sites More sharing options...
rensoup Posted September 22, 2021 Share Posted September 22, 2021 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 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910257 Share on other sites More sharing options...
VinsCool Posted September 22, 2021 Share Posted September 22, 2021 6 minutes ago, mrk said: Done - I've added drag & drop support for urls and local files (I'm going also to add standard file selector button) Thanks a lot! This will make testing much easier to do Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910259 Share on other sites More sharing options...
VinsCool Posted September 22, 2021 Share Posted September 22, 2021 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 ? 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910262 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 6 minutes ago, VinsCool said: Thanks a lot! This will make testing much easier to do File selector added, you only need to locate it I definitely need UI designer help 2 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910264 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 (edited) 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 September 22, 2021 by ivop 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910288 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 (edited) 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 September 22, 2021 by mrk 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910300 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 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 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910306 Share on other sites More sharing options...
ivop Posted September 22, 2021 Share Posted September 22, 2021 (edited) 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 September 22, 2021 by ivop 1 Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910311 Share on other sites More sharing options...
mrk Posted September 22, 2021 Author Share Posted September 22, 2021 (edited) 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 September 22, 2021 by mrk Quote Link to comment https://forums.atariage.com/topic/325056-web-pokey/page/3/#findComment-4910314 Share on other sites More sharing options...
Recommended Posts
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.