Jump to content
IGNORED

Compiling a new Atari OS...


reifsnyderb

Recommended Posts

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 by reifsnyderb
Link to comment
Share on other sites

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 by flashjazzcat
  • Haha 1
Link to comment
Share on other sites

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 by reifsnyderb
Link to comment
Share on other sites

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).

  • Haha 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

 

 

 

 

Link to comment
Share on other sites

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 by _The Doctor__
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

 

  • Like 2
Link to comment
Share on other sites

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."

Link to comment
Share on other sites

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 by flashjazzcat
Link to comment
Share on other sites

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 by _The Doctor__
Link to comment
Share on other sites

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 :)

  • Like 1
Link to comment
Share on other sites

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 by reifsnyderb
  • Like 1
Link to comment
Share on other sites

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 by _The Doctor__
Link to comment
Share on other sites

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.

  • Like 1
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...