Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse

Chebucto Regional Softball Club

  1. Home
  2. Uncategorized
  3. tandy put their sound chip on the 1A interrupt?
A forum for discussing and organizing recreational softball and baseball games and leagues in the greater Halifax area.

tandy put their sound chip on the 1A interrupt?

Scheduled Pinned Locked Moved Uncategorized
325 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Foone🏳️‍⚧️F Foone🏳️‍⚧️

    The description of Hungary says it's bordered by Czechoslovakia, Austria, Yugoslavia, Romania, and the Soviet Union.

    Two of those are still right!

    Foone🏳️‍⚧️F This user is from outside of this forum
    Foone🏳️‍⚧️F This user is from outside of this forum
    Foone🏳️‍⚧️
    wrote on last edited by
    #280

    so I fly into Reykjavík, and immediately sleep for 8 hours. In the morning, I can go to either the airport or the hotel, but it'll take 3 hours to get to either.

    Question: where am I right now, if I'm not at the hotel or the airport?

    Foone🏳️‍⚧️F 1 Reply Last reply
    0
    • Foone🏳️‍⚧️F Foone🏳️‍⚧️

      so I fly into Reykjavík, and immediately sleep for 8 hours. In the morning, I can go to either the airport or the hotel, but it'll take 3 hours to get to either.

      Question: where am I right now, if I'm not at the hotel or the airport?

      Foone🏳️‍⚧️F This user is from outside of this forum
      Foone🏳️‍⚧️F This user is from outside of this forum
      Foone🏳️‍⚧️
      wrote last edited by
      #281

      They initialized the SoundBlaster DSP backwards.
      You're supposed to send a 0 to the reset port, wait 3 microseconds, send a 1, then wait up to 100 microseconds for an 0xAA to show up on the data port.

      They instead send a 1, then a 0, then immediately start trying to read the data port.

      Foone🏳️‍⚧️F 1 Reply Last reply
      0
      • Foone🏳️‍⚧️F Foone🏳️‍⚧️

        They initialized the SoundBlaster DSP backwards.
        You're supposed to send a 0 to the reset port, wait 3 microseconds, send a 1, then wait up to 100 microseconds for an 0xAA to show up on the data port.

        They instead send a 1, then a 0, then immediately start trying to read the data port.

        Foone🏳️‍⚧️F This user is from outside of this forum
        Foone🏳️‍⚧️F This user is from outside of this forum
        Foone🏳️‍⚧️
        wrote last edited by
        #282

        they read from the ports instead of measuring time, because that'll take a certain amount of time on x86. I'm too tired to confirm if their timing logic is sound. It's possible they're just assuming the PC is slow enough that it'll wait long enough

        Foone🏳️‍⚧️F 1 Reply Last reply
        0
        • Foone🏳️‍⚧️F Foone🏳️‍⚧️

          they read from the ports instead of measuring time, because that'll take a certain amount of time on x86. I'm too tired to confirm if their timing logic is sound. It's possible they're just assuming the PC is slow enough that it'll wait long enough

          Foone🏳️‍⚧️F This user is from outside of this forum
          Foone🏳️‍⚧️F This user is from outside of this forum
          Foone🏳️‍⚧️
          wrote last edited by
          #283

          I bet broderbund bought this sound code. It feels completely different: This was either compiled on a different compiler or was written in assembly.

          Foone🏳️‍⚧️F 1 Reply Last reply
          0
          • Foone🏳️‍⚧️F Foone🏳️‍⚧️

            I bet broderbund bought this sound code. It feels completely different: This was either compiled on a different compiler or was written in assembly.

            Foone🏳️‍⚧️F This user is from outside of this forum
            Foone🏳️‍⚧️F This user is from outside of this forum
            Foone🏳️‍⚧️
            wrote last edited by
            #284

            yeah a compiler doesn't just start using CF to return bools instead of AX. This is assembly.

            Foone🏳️‍⚧️F 1 Reply Last reply
            0
            • Foone🏳️‍⚧️F Foone🏳️‍⚧️

              yeah a compiler doesn't just start using CF to return bools instead of AX. This is assembly.

              Foone🏳️‍⚧️F This user is from outside of this forum
              Foone🏳️‍⚧️F This user is from outside of this forum
              Foone🏳️‍⚧️
              wrote last edited by
              #285

              they're passing single bytes to functions! C widens integer parameters to a word, so on a 16bit system, they're passed in 16-bit registers.

              Foone🏳️‍⚧️F 1 Reply Last reply
              0
              • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                they're passing single bytes to functions! C widens integer parameters to a word, so on a 16bit system, they're passed in 16-bit registers.

                Foone🏳️‍⚧️F This user is from outside of this forum
                Foone🏳️‍⚧️F This user is from outside of this forum
                Foone🏳️‍⚧️
                wrote last edited by
                #286

                they're sending a... internal soundblaster test command?
                (DSP 0xF0)

                I dunno why this code is like this.

                Foone🏳️‍⚧️F 1 Reply Last reply
                0
                • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                  they're sending a... internal soundblaster test command?
                  (DSP 0xF0)

                  I dunno why this code is like this.

                  Foone🏳️‍⚧️F This user is from outside of this forum
                  Foone🏳️‍⚧️F This user is from outside of this forum
                  Foone🏳️‍⚧️
                  wrote last edited by
                  #287

                  I suspect there may be an issue here: I identified a variable as containing the Soundblaster IO port, right? and I'm assuming everything that uses it is Soundblaster code.

                  But it may just be "soundcard IO port" and there's other sound device code mixed in here. So that's why some of it doesn't make sense as soundblaster, it's actually tandy 3voice or something

                  Foone🏳️‍⚧️F 1 Reply Last reply
                  0
                  • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                    I suspect there may be an issue here: I identified a variable as containing the Soundblaster IO port, right? and I'm assuming everything that uses it is Soundblaster code.

                    But it may just be "soundcard IO port" and there's other sound device code mixed in here. So that's why some of it doesn't make sense as soundblaster, it's actually tandy 3voice or something

                    Foone🏳️‍⚧️F This user is from outside of this forum
                    Foone🏳️‍⚧️F This user is from outside of this forum
                    Foone🏳️‍⚧️
                    wrote last edited by
                    #288

                    I just found a function (inside another function!) that's a fixed delay. How long is it?
                    it's a loop that runs 256 times!

                    Foone🏳️‍⚧️F 1 Reply Last reply
                    0
                    • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                      I just found a function (inside another function!) that's a fixed delay. How long is it?
                      it's a loop that runs 256 times!

                      Foone🏳️‍⚧️F This user is from outside of this forum
                      Foone🏳️‍⚧️F This user is from outside of this forum
                      Foone🏳️‍⚧️
                      wrote last edited by
                      #289

                      that's so cute that this code considers "256 instructions" to be a meaningful length of time.

                      Foone🏳️‍⚧️F 1 Reply Last reply
                      0
                      • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                        that's so cute that this code considers "256 instructions" to be a meaningful length of time.

                        Foone🏳️‍⚧️F This user is from outside of this forum
                        Foone🏳️‍⚧️F This user is from outside of this forum
                        Foone🏳️‍⚧️
                        wrote last edited by
                        #290

                        there's code in here specifically to detect if it's running on an IBM PS/1 by looking at the CMOS area?

                        WHAT THE

                        Foone🏳️‍⚧️F 1 Reply Last reply
                        0
                        • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                          there's code in here specifically to detect if it's running on an IBM PS/1 by looking at the CMOS area?

                          WHAT THE

                          Foone🏳️‍⚧️F This user is from outside of this forum
                          Foone🏳️‍⚧️F This user is from outside of this forum
                          Foone🏳️‍⚧️
                          wrote last edited by
                          #291

                          the menu system limits menus to having a maximum of 32 items.

                          which is weird because ONLY 17 WILL FIT ON SCREEN

                          Foone🏳️‍⚧️F 1 Reply Last reply
                          0
                          • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                            the menu system limits menus to having a maximum of 32 items.

                            which is weird because ONLY 17 WILL FIT ON SCREEN

                            Foone🏳️‍⚧️F This user is from outside of this forum
                            Foone🏳️‍⚧️F This user is from outside of this forum
                            Foone🏳️‍⚧️
                            wrote last edited by
                            #292

                            I did some experimenting with MSVC 5.1, and it's weird. I get the same strings in the exe as carmen.exe has, but the code itself looks completely different.

                            either I set up my compiler wrong, or this game is full of assembly even for very simple functions

                            Foone🏳️‍⚧️F 1 Reply Last reply
                            0
                            • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                              I did some experimenting with MSVC 5.1, and it's weird. I get the same strings in the exe as carmen.exe has, but the code itself looks completely different.

                              either I set up my compiler wrong, or this game is full of assembly even for very simple functions

                              Foone🏳️‍⚧️F This user is from outside of this forum
                              Foone🏳️‍⚧️F This user is from outside of this forum
                              Foone🏳️‍⚧️
                              wrote last edited by
                              #293

                              I don't know exactly what this function does (I know it sets some flags based on something in the graphics context) but I DO know one important thing about it:

                              they included it in the final binary FOUR TIMES.

                              Foone🏳️‍⚧️F 1 Reply Last reply
                              0
                              • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                I don't know exactly what this function does (I know it sets some flags based on something in the graphics context) but I DO know one important thing about it:

                                they included it in the final binary FOUR TIMES.

                                Foone🏳️‍⚧️F This user is from outside of this forum
                                Foone🏳️‍⚧️F This user is from outside of this forum
                                Foone🏳️‍⚧️
                                wrote last edited by
                                #294

                                byte-identical.

                                this is a compiler & linker from 1988, it doesn't understand how to merge identical copies of functions apparently

                                Foone🏳️‍⚧️F 1 Reply Last reply
                                0
                                • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                  byte-identical.

                                  this is a compiler & linker from 1988, it doesn't understand how to merge identical copies of functions apparently

                                  Foone🏳️‍⚧️F This user is from outside of this forum
                                  Foone🏳️‍⚧️F This user is from outside of this forum
                                  Foone🏳️‍⚧️
                                  wrote last edited by
                                  #295

                                  I found another function which has 4 copies.

                                  I'm starting to suspect this program originally had 4 C source files and the linker wasn't optimizing this

                                  Foone🏳️‍⚧️F 1 Reply Last reply
                                  0
                                  • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                    I found another function which has 4 copies.

                                    I'm starting to suspect this program originally had 4 C source files and the linker wasn't optimizing this

                                    Foone🏳️‍⚧️F This user is from outside of this forum
                                    Foone🏳️‍⚧️F This user is from outside of this forum
                                    Foone🏳️‍⚧️
                                    wrote last edited by
                                    #296

                                    wait I bet it's drivers!
                                    like, one version of this function is called by VGA_DrawFuncUnknown and nothing else.
                                    Another one? CGA/Hercules.
                                    the third? EGA
                                    The last? Tandy.

                                    They compiled the 4 video drivers separately, and then linked them into the EXE, with no deduplication across compile units

                                    Foone🏳️‍⚧️F 1 Reply Last reply
                                    0
                                    • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                      wait I bet it's drivers!
                                      like, one version of this function is called by VGA_DrawFuncUnknown and nothing else.
                                      Another one? CGA/Hercules.
                                      the third? EGA
                                      The last? Tandy.

                                      They compiled the 4 video drivers separately, and then linked them into the EXE, with no deduplication across compile units

                                      Foone🏳️‍⚧️F This user is from outside of this forum
                                      Foone🏳️‍⚧️F This user is from outside of this forum
                                      Foone🏳️‍⚧️
                                      wrote last edited by
                                      #297

                                      yeah. Found another: VGAMalloc is the same as CGAMalloc (and Hercules doesn't have it's own HerculesMalloc, because it's in the same code unit as CGA: So it just uses CGAMalloc)
                                      Tandy has TandyMalloc.

                                      But not EGAMalloc. That one is completely different.

                                      Foone🏳️‍⚧️F 1 Reply Last reply
                                      0
                                      • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                        yeah. Found another: VGAMalloc is the same as CGAMalloc (and Hercules doesn't have it's own HerculesMalloc, because it's in the same code unit as CGA: So it just uses CGAMalloc)
                                        Tandy has TandyMalloc.

                                        But not EGAMalloc. That one is completely different.

                                        Foone🏳️‍⚧️F This user is from outside of this forum
                                        Foone🏳️‍⚧️F This user is from outside of this forum
                                        Foone🏳️‍⚧️
                                        wrote last edited by
                                        #298

                                        the DrawLine API is weird.
                                        To draw the horizontal underline for the hotkeys in the menu, it calls DrawLine(0, -width).

                                        It's DrawLine(int y, int x), and yeah you pass negative numbers

                                        Foone🏳️‍⚧️F 1 Reply Last reply
                                        0
                                        • Foone🏳️‍⚧️F Foone🏳️‍⚧️

                                          the DrawLine API is weird.
                                          To draw the horizontal underline for the hotkeys in the menu, it calls DrawLine(0, -width).

                                          It's DrawLine(int y, int x), and yeah you pass negative numbers

                                          Foone🏳️‍⚧️F This user is from outside of this forum
                                          Foone🏳️‍⚧️F This user is from outside of this forum
                                          Foone🏳️‍⚧️
                                          wrote last edited by
                                          #299

                                          it's also off by one.
                                          because 0,0 is silly, you're always drawing at least one pixel. So DrawLine(0, -5) draws a six pixel wide horizontal line to the left

                                          Foone🏳️‍⚧️F 1 Reply Last reply
                                          0

                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 16
                                          • 17
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups