Announcement

Collapse

Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

DIGPAK drivers released under MIT License. Help wanted to port them from TASM.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DIGPAK drivers released under MIT License. Help wanted to port them from TASM.

    John W. Ratcliff has open-sourced most of the DIGPAK drivers under the MIT License.

    These were formerly commercial drivers that ended up being used in quite a few DOS games back in the day, because they offered a practical hardware abstraction API in a time when the market was being flooded with many different sound cards and standards.

    The sources can be found here: https://github.com/jratcliff63367/oldsource

    I'm looking for people who could (and would like to) help me with "porting" these assembly sources from TASM Ideal mode dialect to something that allows them to be built with an open source assembler, such as WASM, JWASM, FASM or NASM. My ultimate goal is to offer these drivers for inclusion in the FreeDOS distribution, and possibly to use them as a basis for developing DOS drivers for more modern audio devices.

    I've been occasionally dabbling with DOS assembly programming in my free time, but I could use some help with this from some more experienced retro coders, and I'm willing to learn.

    Any one here interested? Your help would be greatly appreciated.

    #2
    Sorry, I do MASM almost exclusively when working with this stuff.
    Reach me: vcfblackhole _at_ protonmail dot com.

    Comment


      #3
      Originally posted by Chuck(G) View Post
      Sorry, I do MASM almost exclusively when working with this stuff.
      With "doing MASM almost exclusively", do you mean that you have only experience with MASM, or that you simply prefer it over the others? Do you by any chance have experience with porting assembly code from other dialects to MASM?

      Even porting the code from TASM Ideal mode to "regular" MASM dialect would be a step towards my stated goal, since there are multiple open source assemblers that can build MASM sources, notably WASM and JWASM.

      And to be clear: I'm looking for people who are willing to help me with this. It's not my intention to just throw this on someone else's plate.

      Comment


        #4
        I prefer MASM over the other dialects and haven't programmed in any of the others in many years. On x86, I started with the Intel ISIS II-hosted cross-assembler, used the DRI a bit, endured MASM/ASM 1.0 and pretty much stayed with Microsoft for 16- and 32-bit code. Still guilty of using MASM 6.13 from time to time.
        Reach me: vcfblackhole _at_ protonmail dot com.

        Comment


          #5
          Originally posted by digger View Post
          And to be clear: I'm looking for people who are willing to help me with this. It's not my intention to just throw this on someone else's plate.
          Well, have you started yet?

          This could be fun but to be honest I won't have the time. I would port it to NASM though if I were to try it.
          Looking for a cache card for the "ICL ErgoPRO C4/66d V"

          Comment


            #6
            Originally posted by Krille View Post

            Well, have you started yet?

            This could be fun but to be honest I won't have the time. I would port it to NASM though if I were to try it.
            I made an attempt, yes. A while back, I tried to get the code to assemble using the Open Watcom v2 assembler (WASM). That assembler has a compatibility flag for TASM Ideal mode, but it's far from complete. I made some changes to the code here and there, and solved a few errors, until I ran into the specific issue that WASM doesn't support the `UNION` keyword. That's not even a TASM Ideal thing. Both MASM and TASM support that keyword.

            I just realized that I might be able to get away with just replacing each `UNION` declaration with the largest of its possible data types. The smaller ones will then fit in it as well, and it's not like most assemblers do any extensive type checking, right?

            I might also try building the sources with JWASM, since that fork of WASM supposedly has more complete MASM compatibility.

            I agree with you that NASM dialect would be preferable, but that seems like even more effort than getting the code to assemble with an open source assembler that has some level of MASM compatibility. But maybe it's not so bad? In my efforts to port the VSB (Virtual Sound Blaster) assembly sources to both NASM and WASM, the latter seemed easier. At least I got the code to eventually assemble with the latter, even though the resulting executable was still not functional.

            Comment


              #7
              One of the reasons that I stuck with MASM is that I spent time writing Windows NT/2K/XP kernel-mode device drivers. Given that the standard DDK for those platforms is all MASM- and MSC-based, using anything else simply wouldn't make sense.
              Reach me: vcfblackhole _at_ protonmail dot com.

              Comment


                #8
                Originally posted by digger View Post
                John W. Ratcliff has open-sourced most of the DIGPAK drivers under the MIT License.

                These were formerly commercial drivers that ended up being used in quite a few DOS games back in the day, because they offered a practical hardware abstraction API in a time when the market was being flooded with many different sound cards and standards.
                I've been reading some of the code and to put it mildly, there's certainly room for improvement. I do wonder though, which games used these drivers?
                Looking for a cache card for the "ICL ErgoPRO C4/66d V"

                Comment


                  #9
                  Originally posted by Krille View Post

                  I've been reading some of the code and to put it mildly, there's certainly room for improvement. I do wonder though, which games used these drivers?
                  Quite a few, actually.

                  Vogons user Bristlehog made a list of games that supported MIDPAK, which is the MIDI/music counterpart to DIGPAK. Games that used MIDPAK for music typically also used DIGPAK for digital audio playback.

                  Also, the DIGPAK drivers are compatible with the Audio Interface Library v2 (AIL2) drivers from John Miles, and DIGPAK drivers can even be used as drop-in replacements in games that use AIL2 drivers. (By the way, the list of games that support AIL2 drivers is also quite long, perhaps even longer!)

                  The first time I heard about that possibility, I was skeptical, but I tried this in Dune II and it actually worked. Which is quite cool, since DIGPAK supports some audio devices that AIL2 does not, notably the Covox Speech Thing (LPT DAC).

                  So if you add up all the games that support either of these driver models, you end up with a very long list.

                  And once the DIGPAK drivers are liberated, and the code is used as a basis for newer drivers for more modern sound devices, I expect it to be possible to patch most if not all of these games to support these newer devices.

                  So yeah, your help (and anybody else's help) would be greatly appreciated!

                  Comment


                    #10
                    Originally posted by Krille View Post
                    This could be fun but to be honest I won't have the time.
                    Completely understandable, and I also have limited time to work on this. Just a few hours in some of my weekends. But there's no deadline. I'm doing this for fun and to learn.

                    So here's a suggestion: how about I continue my efforts with porting (with my limited skills so far), and whenever I run into a specific issue that I can't solve myself, I post the error and the problematic code snippet in this thread, and then perhaps you and/or others here can help me with each specific specific roadblock as I encounter them?

                    It would also be more educational for me, I think.

                    Would that work for you? And yeah, I'll target NASM, then.

                    Comment


                      #11
                      Sure, I'll do my best to help in any way I can. I do have to warn you though, I've never actually ported any MASM/TASM code to NASM so it will be a learning experience for me as well.

                      I'm surprised so many games used this. As I alluded to in my previous post, the code is not very efficient, in part because it's made to interface with C. It might also be based on C compiler output. So there's plenty of opportunities to reduce the memory footprint. I also found a bug in one of the TranslateSound routines in SHELL.ASM.

                      Oh well, let's see where this goes.
                      Looking for a cache card for the "ICL ErgoPRO C4/66d V"

                      Comment


                        #12
                        Great! Thanks for your help. Yeah, we'll see where this goes.

                        The C interface might be for AIL2 compatibility. The Audio Interface Library v2 was another popular driver model for Real Mode DOS games. John Miles released the AIL2 drivers and SDK as open source years ago. In addition to offering an INT 66h API, the DIGPAK drivers can also be used as drop-in replacements for those AIL2 drivers (recognizable by the file extension .ADV). That is actually useful functionality, since DIGPAK supports some sound devices that the AIL2 drivers did not. This way, games that relied on AIL2 drivers could be patched with DIGPAK drivers, which allowed them to support those additional sound devices.

                        What kind of bug did you find in the TranslateSound routines?

                        Comment


                          #13
                          Originally posted by digger View Post
                          What kind of bug did you find in the TranslateSound routines?
                          It's the routine at lines 3141 to 3169 in SHELL.ASM. It looks like this;
                          Code:
                          IF DIG_ECHOII
                          Proc TranslateSound near
                          ;; CX ->number of bytes in sound sample.
                          ;; ES:BX -> far address of sound sample to be played.
                          ;; Registers DX,CX,ES,BX,DS must be saved.
                          push bx
                          push cx
                          push dx
                          push di
                          
                          mov di,bx ; becomes dest.
                          cld
                          @@DOT: mov al,[es:di] ; Get full 8 bit unsigned sample.
                          add al,128
                          or al,01
                          cmp al,80h
                          jne @@OK  ; <------ BUG (Will always jump)
                          inc al
                          @@OK: stosb ; Store result
                          loop @@DOT ; Complete the translation process.
                          
                          pop di
                          pop dx
                          pop cx
                          pop bx
                          ret
                          endp
                          
                          ENDIF
                          I have no idea what it's supposed to do so don't know how to fix it.
                          Looking for a cache card for the "ICL ErgoPRO C4/66d V"

                          Comment


                            #14
                            I've ported the digpak stuff, found on github, to masm 6.1x this week. The ported source code produces 100% identical binaries, except for align padding. Where do you want it posted ?

                            Comment


                              #15
                              Can it be assembled with an open source assembler?
                              Looking for a cache card for the "ICL ErgoPRO C4/66d V"

                              Comment

                              Working...
                              X