-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to play music while systemUse ? #160
Comments
Ideally, ACE should fully work with system enabled, but I really haven't got time to work on it. This needs writing os-friendly interrupt handlers/servers which would work when OS is enabled, switching back to raw interrupt handling functions when it's disabled. It's a bit tricky to do in a "portable" way - VBCC and Bebbo's compilers allow declaring functions which expect their parameters in specific CPU registers, Bartman's suite not so much. Needs a bit of inline assembly trickery to properly handle input params and return value to handle those interrupts the way OS expects it to. I remember doing one attempt but I can't see any branch with it. Perhaps I got stuck somewhere and haven't commited anything which would work in at least partial way. If you're willing to tackle it I can give you some hints and elaborate aforementioned stuff a bit more. |
Yes I would be glad to take a look!
Rem.
… On Oct 11, 2022, at 12:25 PM, KaiN ***@***.***> wrote:
Ideally, ACE should fully work with system enabled, but I really haven't got time to work on it. This needs writing os-friendly interrupt handlers/servers which would work when OS is enabled, switching back to raw interrupt handling functions when it's disabled.
It's a bit tricky to do in a "portable" way - VBCC and Bebbo's compilers allow declaring functions which expect their parameters in specific CPU registers, Bartman's suite not so much. Needs a bit of inline assembly trickery to properly handle input params and return value to handle those interrupts the way OS expects it to.
I remember doing one attempt but I can't see any branch with it. Perhaps I got stuck somewhere and haven't commited anything which would work in at least partial way. If you're willing to tackle it I can give you some hints and elaborate aforementioned stuff a bit more.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Okay, so basically it goes like this:
I hope that this wall of text won't spook you out of this. ;) The problem is quite elaborate and it won't be an easy one-hour fix, but it's almost certainly doable with a bit of persistence. |
Thank you for your explanation: I was able to hack by using AddIntServer(INTB_VERTB, &rvInt3Server); and hacking the ptPlayer to only use vblank (instead of using both vblank + CIA_B_timer_B. Unsure about the exact purpose of this timer B, since the music appears to play fine. In the vblank interrupt I simply do the three steps: |
Hi, I've once asked Frank Wille, the author original asm version of ptplayer, about that:
The response was:
I guess I should include some of that knowledge inside the code so that this design choice is better documented. So I guess the code works for you because your MOD's instruments have quite high sample rate and the natural time spent on code execution does its work. To make this work properly we'd need to have that CIA interrupt, sadly. |
Hi KaiN, According to https://aminet.net/package/mus/play/ptplayer, you are using 576 ticks in your code so it would appear you are using ptplayer at least from version 6.0. Thank you very much! |
it's based around 5.1 with the only 6.0 change being the 576 tick thingy of which I got tip about from the original author before 6.0 released. ;) There's an ACE branch which has changes up to version 6.2, but it's not tested yet and most probably is bugged and definitely breaks vblank thingy at the moment. When I get back from my leave I'll continue working on it. |
Hi KaiN,
I think I've fixed at least 3 bugs so far, I will present them to you in
pull requests, since I am not 100% sure because I don't have access to
ptplayer.asm from 5.1. I only found 6.0 on aminet.
(Oops: I just found your repo here https://github.com/tehKaiN/ptplayer
while typing this message .. This might come in very handy!)
So far it is making my test module sound much better. There is most
definitely at least another issue because I'm hearing odd low frequency
noise, I'll look into it deeper a bit later.
It is really a big undertaking you've accomplished by "uncompiling" ASM
back into C! Props for that :)
…On Sun, Oct 16, 2022 at 3:36 AM KaiN ***@***.***> wrote:
it's based around 5.1 with the only 6.0 change being the 576 tick thingy
of which I got tip about from the original author before 6.0 released. ;)
There's an ACE branch which has changes up to version 6.2, but it's not
tested yet and most probably is bugged and definitely breaks vblank thingy
at the moment. When I get back from my leave I'll continue working on it.
—
Reply to this email directly, view it on GitHub
<#160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTB7KPWEQHKX6BSXCRUQE3WDOV53ANCNFSM6AAAAAARCOQMCU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
it's great to hear that! Unfortunately my asm skills aren't that good and it was quite painful for me to do in the first place. The reason for the translation is that I wanted to have more control over the source code by having it easier to read, but it kinda backfired - now it's riddled with bugs due to inaccurate asm-C translation, but I guess we'll eventually get to the point of it being stable. It's quite probable that my access to network connection will be limited next week, but I'll try to watch out for your pull requests and accept them as they go. |
Currently in ACE, enabling system (for example when reading files) will "stop" the music from ptPlayer:
If the music was already playing, it will start to "stutter" by looping the last buffer, up until SystemUnUse() is called.
Could it be possible to leave some interrupts running even when the System is in use?
(I my case, I am trying to PTPLAYER_USE_VBL instead of CIAB-TimerA, but the same problem applies to both cases).
The text was updated successfully, but these errors were encountered: