flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 Why do this? What if the software turns off IO sounds and wishes to leave tones playing on the other channels during SIO? This will break it. 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) 4 hours ago, flashjazzcat said: Why do this? What if the software turns off IO sounds and wishes to leave tones playing on the other channels during SIO? This will break it. I need to do more testing, but when I install the high speed SIO patch, the last sound played stays on until the next sound is played. Without the patch, it works fine. I've confirmed this happens on OS R 2, as well. Please read back through the last several posts in this thread. Edit to add: To reproduce the problem, use the high speed SIO patch on, for example, OS R 2. Then test with MULE. Edited May 24, 2023 by reifsnyderb Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 (edited) 26 minutes ago, reifsnyderb said: Please read back through the last several posts in this thread. I have, yes, and it appears the reason for the differing behaviour has not yet been absolutely established (other than a bug in MULE). If you're confident that the stock OS SIO handler silences all four channels before performing any IO (and failure to do so is a bug in the HSIO patch), then by all means have at it. Edited May 24, 2023 by flashjazzcat 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) 19 minutes ago, flashjazzcat said: I have, yes, and it appears the reason for the differing behaviour has not yet been absolutely established (other than a bug in MULE). If you're confident that the stock OS SIO handler silences all four channels before performing any IO (and failure to do so is a bug in the HSIO patch), then by all means have at it. Presently, I am just investigating using the HSIO patch. I can confirm that MULE doesn't have a problem with the stock OS SIO handler. You are correct that that the reason for the differing behavior has not been absolutely established. I also find it strange if I am the first one to find this. Confirming it happens on OS R 2 shows it's nothing I messed up, anyhow. There is a downside in that it replaces the international character set. Edited May 24, 2023 by reifsnyderb Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 If slavish compliance with legacy OS behaviour isn't a concern and the international character set is needed, Altirra OS might be worth a look. It's rather more concisely coded than Atari's OS, and may have enough unused space to accomodate the HSIO patch. It formed the basis for the custom OS used by the UNO cart (which required additional code to drive the SD card). 1 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 On 4/7/2023 at 2:02 PM, invisible kid said: Not sure, but I think Cat misunderstood and thought this was a stand-alone program to run, and simply tried running it. Could be wrong though... No idea what this refers to, but yes: you were wrong. 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 6 minutes ago, flashjazzcat said: If slavish compliance with legacy OS behaviour isn't a concern and the international character set is needed, Altirra OS might be worth a look. It's rather more concisely coded than Atari's OS, and may have enough unused space to accomodate the HSIO patch. It formed the basis for the custom OS used by the UNO cart (which required additional code to drive the SD card). I haven't tried to compile the Altirra OS. However, looking into this path has been something on my mind. With the Atari OS, if the Relocating Loader and the never used parts of the Peripheral Handler Loading Facility were to be removed, a lot of space would be made available. My thought was that if those elements were never used in 40 years, they wouldn't be used now. There's a whole discussion about them near the beginning of this thread. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 I doubt you'd have to jettison anything at all with Avery's OS. The international character set is present, and there are large amounts of unused space between $c66x-$cc00 and $f2bx-$f400. 1 Quote Link to comment Share on other sites More sharing options...
HiassofT Posted May 24, 2023 Share Posted May 24, 2023 I'm a bit undecided at the moment. Yes, the original Atari OSes and also Altirra OS mute all Pokey channels in the SIO code, but this is a thing a lot of people disliked as it made it impossible to play music during SIO. The first two Pokey channels aren't used during disk IO so it is perfectly fine to use them for sound while eg loading from disk - and with very short player code eg in a DLI in areas without ANTIC access (eg blank lines at the top of the screen) this should even work at very high SIO rates. So although this is not 100% compliant with the original OSes I'm a bit inclined to keep it as is as it implements a feature lots of people wanted for a long time. so long, Hias 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 17 minutes ago, HiassofT said: I'm a bit undecided at the moment. Yes, the original Atari OSes and also Altirra OS mute all Pokey channels in the SIO code, but this is a thing a lot of people disliked as it made it impossible to play music during SIO. The first two Pokey channels aren't used during disk IO so it is perfectly fine to use them for sound while eg loading from disk - and with very short player code eg in a DLI in areas without ANTIC access (eg blank lines at the top of the screen) this should even work at very high SIO rates. So although this is not 100% compliant with the original OSes I'm a bit inclined to keep it as is as it implements a feature lots of people wanted for a long time. so long, Hias It sounds like my solution is in compliance with the original OS's. I'll go with that route. I certainly understand leaving things as-is so as to keep this feature on unmodified OS's. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted May 24, 2023 Share Posted May 24, 2023 (edited) maybe it should only invoke silencing on some deterministic method to be implemented after serious consideration as to what might be used as a trigger... Edited May 24, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 24, 2023 Share Posted May 24, 2023 Perhaps the silencing could be skipped, when the I/O sounds are off (via iosnden set to nonzero, IIRC). 3 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 8 minutes ago, drac030 said: Perhaps the silencing could be skipped, when the I/O sounds are off (via iosnden set to nonzero, IIRC). What's iosnden? Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 24, 2023 Share Posted May 24, 2023 1 minute ago, reifsnyderb said: What's iosnden? Address $41. And I remembered incorrectly, it is set to $00 to shut off the SIO comfort noise. Normally $03. 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 36 minutes ago, drac030 said: Address $41. And I remembered incorrectly, it is set to $00 to shut off the SIO comfort noise. Normally $03. That's only to silence the SIO beeping noise, as per Mapping the Atari.... Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted May 24, 2023 Share Posted May 24, 2023 (edited) but can be used as a clue to silence HSIO 2 channel sound or not. Music that intentionally plays during loading normally silences beep. Convenient. SIO beep Off let music play, SIO beep On turn off the 2 channels... etc etc Edited May 24, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 39 minutes ago, _The Doctor__ said: but can be used as a clue to silence HSIO 2 channel sound or not. Music that intentionally plays during loading normally silences beep. Convenient. SIO beep Off let music play, SIO beep On turn off the 2 channels... etc etc That sounds logical. However, what about just turning the SIO beep off to have silence? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 What Konrad is suggesting is using the fact that $41 has been used to silence the SIO as an indicator that the application might wish to continue producing sounds using the other two channels (those not used for SIO) during IO. In those circumstances, you would NOT silence all four channels prior to IO. When SIO sound has not been turned off by the application, silence all four channels, on the assumption that no software would deliberately attempt to play audio while leaving SIO sound active. 2 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 22 minutes ago, flashjazzcat said: What Konrad is suggesting is using the fact that $41 has been used to silence the SIO as an indicator that the application might wish to continue producing sounds using the other two channels (those not used for SIO) during IO. In those circumstances, you would NOT silence all four channels prior to IO. When SIO sound has not been turned off by the application, silence all four channels, on the assumption that no software would deliberately attempt to play audio while leaving SIO sound active. I understand the concept here. The logic is that SIO sounds would only be turned off if music is playing. What if SIO sounds are turned off for silence as Mapping the Atari suggests? Mapping the Atari states as follows: "Noisy I/O flag used by SIO to signal the beeping heard during disk and cassette I/O. POKE here with zero for blessed silence during these operations. Other numbers return the beep. In- itialized to three. The hardware solution to this problem is to turn your speaker volume down. This can also be used to silence the digital track when playing synchronized voice/data tapes. See location 54018." Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 24, 2023 Share Posted May 24, 2023 (edited) I'm not sure you understand the concept at all. If the application turns off SIO sounds for silence, your SIO handler need not do a thing. MULE makes no attempt to disable SIO sounds, so all four voices would then be silenced prior to IO and the tone that bothers you would be silenced. Conversely, software which silenced SIO sound via location $41 would still be able to play audio during IO using the other two channels I don't know how to spell Konrad's idea out any more unambiguously. It seems like a lot of fuss over one game which forgets to silence a POKEY channel, however. Edited May 24, 2023 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted May 24, 2023 Share Posted May 24, 2023 (edited) Right, so when SIO beep is turned off, the music can play, but when SIO beep is on, the music will stop. WIN WIN When a program simply shuts the BEEP off but plays no music, desired effect is achieved. again win win the logic takes care of itself due to use case and no harm comes of it, you end up being the most compatible OS choice with HSIO, pretty nifty. We like nifty Edited May 24, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 24, 2023 Share Posted May 24, 2023 20 minutes ago, reifsnyderb said: I understand the concept here. The logic is that SIO sounds would only be turned off if music is playing. No and no. The SIO sounds would be turned off when iosnden=$00 (music playing or not, regardless). The assumption is that a program which wishes to play music during OS I/O would always set iosnden to $00. Therefore the SIO code in the OS should silence AUDCx channels *unless* iosnden=$00. And do that, by the way, not before, but after the I/O, just as the original OS does 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) 1 hour ago, flashjazzcat said: I'm not sure you understand the concept at all. If the application turns off SIO sounds for silence, your SIO handler need not do a thing. MULE makes no attempt to disable SIO sounds, so all four voices would then be silenced prior to IO and the tone that bothers you would be silenced. Conversely, software which silenced SIO sound via location $41 would still be able to play audio during IO using the other two channels I don't know how to spell Konrad's idea out any more unambiguously. It seems like a lot of fuss over one game which forgets to silence a POKEY channel, however. It's an important game. 🥺 1 hour ago, _The Doctor__ said: Right, so when SIO beep is turned off, the music can play, but when SIO beep is on, the music will stop. WIN WIN When a program simply shuts the BEEP off but plays no music, desired effect is achieved. again win win the logic takes care of itself due to use case and no harm comes of it, you end up being the most compatible OS choice with HSIO, pretty nifty. We like nifty 1 hour ago, drac030 said: No and no. The SIO sounds would be turned off when iosnden=$00 (music playing or not, regardless). The assumption is that a program which wishes to play music during OS I/O would always set iosnden to $00. Therefore the SIO code in the OS should silence AUDCx channels *unless* iosnden=$00. And do that, by the way, not before, but after the I/O, just as the original OS does I think we are all on the same "page" but not realizing it. The concept is: Only turn the sound off when SOUNDR is a non-zero value. So, if SOUNDR is 0, don't shut off the sound. This is assuming that if SOUNDR is 0 that somebody wants the sound to play. My question is: What if somebody set SOUNDR to 0 because they want silence? My question may be confusing because it's quite probably that if they want silence they wouldn't be playing music in the first place. I checked the OS and if SOUNDR is 0 then SIO sounds will be quiet. We are assuming that the High Speed SIO patch operates the same way. Edit to add: I changed the code to silence the sounds, and SIO entry point, as follows: ; SPACE 4,10 ;** SIOSAS - SIO Silence All Sounds ;* ;* ENTRY JSR SIOSAS ;* SIOSAS = * ;entry LDA SOUNDR ; 1-byte noisy I/O flag (0 = quiet) BEQ SIOSA2 ; If zero, leave sounds alone LDA #$00 ;volume 0 LDX #$06 ; voice offset SIOSA1 STA AUDC1,X ;silence voice DEX DEX BPL SIOSA1 SIOSA2 RTS ;return ; SPACE 4,10 ;** SIO - Serial Input/Output ;* ;* ENTRY JSR SIO ;* ;* NOTE ;* $E971 is entry point for High Speed SIO Patch. ;* ;* MODS ;* Original Author Unknown ;* 1. Bring closer to Coding Standard (object unchanged). ;* R. K. Nordin 11/01/83 ;* 2. Set SIO to $E96E so as to silence all POKEY music prior to SIO call. Actual beginning of ;* SIO is still at $E971 so as to ensure compatibility with High Speed SIO Patch. ;* Brian E. Reifsnyder 5/24/2023 FIX $E96E SIO = * ;entry JSR SIOSAS ; Silence POKEY. FIX $E971 ; Initialize. TSX STX STACKP ;save stack pointer LDA #1 ;critical section indicator STA CRITIC ;indicate critical section Edited May 25, 2023 by reifsnyderb 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted May 25, 2023 Share Posted May 25, 2023 (edited) someone turning SIO beep off would not expect all sound to be turned off, most software will allow you to make music on or off choice in menu or sound effects on off etc. as a choice, those that don't expect the old volume control on the display to cover it. In any event, will wait to test your next update, hopefully it will do or does as the three of us explained or laid out etc. Edited May 25, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted May 25, 2023 Author Share Posted May 25, 2023 7 minutes ago, _The Doctor__ said: someone turning SIO beep off would not expect all sound to be turned off, most software will allow you to make music on or off choice in menu or sound effects on off etc. as a choice, those that don't expect the old volume control on the display to cover it. In any event, will wait to test your next update, hopefully it will do or does as the three of us explained or laid out etc. Setting SIO beep to off will leave the sound alone. Leaving SIO beep on will turn off the sounds...except for the SIO beep. 1 Quote Link to comment 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.