Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


5 posters

    Wolf4SDL with PC speaker sound emulation

    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Wolf4SDL with PC speaker sound emulation

    Post by ljbade Sat Apr 10, 2010 5:53 pm

    Hi,

    I have created a version of Wolf4SDL that now has PC speaker emulation based on the code in Chocolate Doom.

    Could people please test it and tell me what you think (bugs/issues/suggestions etc.)!

    If it works OK I will see if I can submit it to the Wolf4SDL author (as this feature is on his TODO list).
    Also anyone know if the Wolf4SDL guy is still around? No updates to his website since 20008...

    Otherwise I might create a fork on Google Code where people can implement any bug fixes/tweaks/features etc that they want in the codebase...

    Here is the compiled file: (built for Activision Wolf3D)
    http://www.leithalweapon.geek.nz/Wolf4SDL-1.6-PC-speaker.zip

    Leith
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Chocolate Doom?

    Post by stathmk Sun Apr 11, 2010 8:22 am

    What exactly do you mean by Chocolate Doom? I've heard of it before. Is it a source port?

    In StopAndThinkStein, Mazenstein, or in a different Wolf3D mod that I remember that I played the same day it had the same sounds from The PC Speaker.
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Welcome to the forums.

    Post by stathmk Sun Apr 11, 2010 9:09 am

    Welcome to the forums. I see that you have one post for now. Please tell us a little bit about yourself at “The Front Desk” at https://wolf3d.darkbb.com/the-front-desk-f20/ or in the “Warm Welcomes and Sad Goodbyes” sections.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Sun Apr 11, 2010 3:31 pm

    Chocolate Doom is a source port of Doom to SDL that keeps everything 'original' with no mods/bugfixes so it plays exactly like the DOS 'Vanilla' Doom. I would say it is one of the best Doom source ports available. See here http://www.chocolate-doom.org/

    My version of Wolf4SDL plays the PC speaker via your normal speakers as the real PC speaker these days is rare. Most factory built computers have dropped it to save some cash, most custom PC cases no longer feature it, not to mention laptops don't have one. Also Windows 7, Vista, and 64-bit XP prevent access to the PC speaker also.

    Please try the executable and tell me if it sounds authentic enough! To test it go into the the "Sound" menu and set the "Sound Effects" to "PC Speaker", "Digitized Sound" to "None", and "Music" to "None".

    Also it looks like Wold4SDL is not dead as the author is still making changes to the source code, last one was from middle of December 2009. He has fixed the VBL = 1 by default issue as well so VBL = 0 by default with command line override.
    Schabbs
    Schabbs
    Extreme Wolfer
    Extreme Wolfer


    Male
    Number of posts : 3036
    Location : London, England.
    Job : Retired
    Hobbie : Playing Wolf3D/ROTT, eating out, travel, music, snooker
    Registration date : 2007-03-24

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Schabbs Sun Apr 11, 2010 4:06 pm

    I tried the Wolf4SDL exe with the Activision version of the full Wolf3D and didn't find any bugs. I played it without the music and with the PC speaker sounds selected. They sounded authentic. The computer has Windows XP.



    Brian.
    Cat Productions - mapper
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty It doesn't work with the Apogee Version.

    Post by stathmk Sun Apr 11, 2010 6:22 pm

    I know you said it must be used with The Activision version. I tried it with The Apogee version today just to see what would happen and it produced a weird error message when it wouldn't work.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Sun Apr 11, 2010 11:04 pm

    Here is a version for Apogee 1.4:
    http://www.leithalweapon.geek.nz/Wolf4SDL-1.6-apogee-pc-speaker.zip
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Thanks, Leith. I'll try it.

    Post by stathmk Mon Apr 12, 2010 8:05 am

    Thanks, Leith. I'll try it.
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Apogee version

    Post by stathmk Mon Apr 12, 2010 8:25 am

    The Apogee version of it works with it, but not in DOSBox probably because it's an SDL game.
    avatar
    Guest
    Guest


    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Guest Tue Apr 13, 2010 10:35 am

    Hi Arthur!


    Last edited by Chokster37 on Sat Feb 08, 2014 11:27 am; edited 1 time in total
    avatar
    dcbasic
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 1
    Age : 36
    Registration date : 2010-08-18

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by dcbasic Wed Aug 18, 2010 3:08 pm

    Release the source! I was planning to do the same based off sdlWolf for Dreamcast since it has PC speaker implemented Razz.
    jayngo26
    jayngo26
    Spear of Destiny
    Spear of Destiny


    Male
    Number of posts : 643
    Age : 143
    Location : Random
    Job : Partime Evil Semi-Genius Plotting To Take Over Half The World. Partime Undead Charged With Keeping the Darkness Dark
    Hobbie : Staying Out Of Sunlight
    Message : Wolfenstein:Umbrella Beginnings Episode 2 released! Download now!

    Registration date : 2008-08-09

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by jayngo26 Wed Aug 18, 2010 3:35 pm

    ljbade wrote:
    Also anyone know if the Wolf4SDL guy is still around? No updates to his website since 20008...

    I think his name is Ripper. He is also responsible for ChaosEdit if I remember right. I think he showed up on DHW a while back. Would be nice if he finished ChaosEdit...



    http://jayngoware.com/
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Submit to zophar.net?

    Post by stathmk Thu Sep 23, 2010 12:45 pm

    Leith,

    Since these are emulator files, then do I have your permission to contact somebody from zophar.net to have them post your PC Speaker emulator files for The Activision and Apogee Wolfenstein 3D? Please answer me in 7 or 8 days because I think that I’m going to forget after that time. Also tell me what name you want to use to give yourself credit.

    I’m going to submit other emulations or simulations that I’ve found on the internet to zophar.net. jpb6891 told me about the LOST Swan 108 minute computer emulators for PC and Mac at http://www.webcyte.co.uk/ . If that web site is perpetually down and you want the files, then tell me and I’ll upload them to my web space. I’m also going to submit emulators that I’ve found for the Antikythera Mechanism computer. The Antikythera Mechanism is technically the first calendar computer except for the Stonehenge.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Thu Sep 23, 2010 2:36 pm

    Sure you can submit it to that website. My name is Leith Bade

    Also give credit to Chocolate Doom too

    I found the source code patch that I sent to the Wolf4SDL guy if anyone wants the source.

    (Attached)
    Attachments
    wolf4sdl - Wolf4SDL with PC speaker sound emulation Attachmentpc-speaker.zip
    Source code
    You don't have permission to download attachments.
    (3 Kb) Downloaded 19 times
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Fri Sep 24, 2010 2:34 pm

    I should also mention that you apply the patch to the latest SVN source code from here:

    svn://tron.homeunix.org:3690/wolf3d/trunk

    Still having trouble finding the Wolf4SDL guy!
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty The Activision & Apogee links are dead.

    Post by stathmk Fri Feb 10, 2017 6:54 pm

    The Activision & Apogee links are dead.  The last time that I contacted ljbade it came back as undeliverable mail.  Does anybody have these files so that they can be uploaded to http://wolfenvault.com/ ?
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Fri Feb 10, 2017 10:33 pm

    Luckily I still got an email from the forum about your reply here.

    I will PM you my updated email address.

    Let me see if I can dig up those files.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Fri Feb 10, 2017 10:39 pm

    I can't find the compiled files, but I might be able to build them again from latest Wolf4SDL source.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Fri Feb 10, 2017 10:41 pm

    Where is the latest Wolf4SDL code now kept? The old websites seem to have disappeared.
    avatar
    Guest
    Guest


    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Guest Fri Feb 10, 2017 10:59 pm

    Hi ljbade,

    This repository is popular on DHW currently: https://github.com/AlumiuN/Wolf4SDL

    You can even do a pull request and add PC Speaker emulation to it, many would agree the feature would be welcome! Smile

    The last version maintained by Ripper was r262: http://diehardwolfers.areyep.com/viewtopic.php?p=100609#100609
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty I've found the files

    Post by stathmk Sat Feb 11, 2017 9:12 am

    I did a scan of my computer & external hard drives overnight & found the files.
    Attachments
    wolf4sdl - Wolf4SDL with PC speaker sound emulation AttachmentWolf4SDL-1.6-PC-speaker.zip
    Wolf4SDL-1.6-PC-speaker.zip
    You don't have permission to download attachments.
    (384 Kb) Downloaded 3 times
    wolf4sdl - Wolf4SDL with PC speaker sound emulation AttachmentWolf4SDL-1.6-apogee-pc-speaker.zip
    Wolf4SDL-1.6-apogee-pc-speaker.zip
    You don't have permission to download attachments.
    (385 Kb) Downloaded 3 times
    wolf4sdl - Wolf4SDL with PC speaker sound emulation Attachmentpc-speaker.zip
    pc-speaker.zip
    You don't have permission to download attachments.
    (3 Kb) Downloaded 3 times
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Zophar.net

    Post by stathmk Sat Feb 11, 2017 9:30 am

    Leith, should we submit these files to http://www.zophar.net/windos.html for emulation?  I’ll give credit to Leith Bade & Chocolate Doom.
    avatar
    ljbade
    Wolf3d n00b
    Wolf3d n00b


    Number of posts : 9
    Age : 34
    Registration date : 2010-04-10

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by ljbade Sat Feb 11, 2017 10:45 am

    Yes that is fine. Next week I'll see if I can submit a PR to that GitHub repository.
    avatar
    Guest
    Guest


    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Guest Fri Feb 24, 2017 8:47 am

    Thanks stathmk for the 1.6 exe. From what I can tell, the higher pitched PC Speaker sounds in it play a rate that is too fast, which makes for an interestingly unique experience.



    https://youtu.be/oNOfRM3HZOA

    Has any updates been made on the code since? Maybe I'll try to slow them down later and see what they sound like Smile
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Thanks for the video.

    Post by stathmk Fri Feb 24, 2017 11:50 am

    Princess Peach wrote:Thanks stathmk for the 1.6 exe. From what I can tell, the higher pitched PC Speaker sounds in it play a rate that is too fast, which makes for an interestingly unique experience.



    https://youtu.be/oNOfRM3HZOA

    Has any updates been made on the code since? Maybe I'll try to slow them down later and see what they sound like Smile
    Thanks for the video.  I don't know if any updates have been made to the code since.
    avatar
    Guest
    Guest


    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Guest Fri Feb 24, 2017 4:27 pm

    Thanks. I fixed the speed issue by moving "current_remaining" outside the if statement (otherwise it skips the pauses).

    Before:
                if(pcSound)
                {
                    if(*pcSound!=pcLastSample)
                    {
                        pcLastSample=*pcSound;

                        if(pcLastSample)
                            // The PC PIC counts down at 1.193180MHz
                            // So pwm_freq = counter_freq / reload_value
                            // reload_value = pcLastSample * 60 (see SDL_DoFX)
                            current_freq = 1193180 / (pcLastSample * 60);
                        else
                            current_freq = 0;

                        // The PC speaker sample rate is 140Hz (see SDL_t0SlowAsmService)
                        current_remaining = param_samplerate / 140;

                    }

    After:
                if(pcSound)
                {
                    // The PC speaker sample rate is 140Hz (see SDL_t0SlowAsmService)
                    current_remaining = param_samplerate / 140;


                    if(*pcSound!=pcLastSample)
                    {
                        pcLastSample=*pcSound;

                        if(pcLastSample)
                            // The PC PIC counts down at 1.193180MHz
                            // So pwm_freq = counter_freq / reload_value
                            // reload_value = pcLastSample * 60 (see SDL_DoFX)
                            current_freq = 1193180 / (pcLastSample * 60);
                        else
                            current_freq = 0;
                    }

    I also got rid of the "phase smoothing" because it sounds less cheezy and more authentic without it.  Smile

    Before:
                if (current_freq != 0)
                {
                    // Adjust phase to match to the new frequency.
                    // This gives us a smooth transition between different tones,
                    // with no impulse changes.

                    phase_offset = (phase_offset * oldfreq) / current_freq;
                }

    After:
                    phase_offset = 0;



    https://www.youtube.com/watch?v=oac-tZHHzes


    edit: Barry also found out that removing the last NOTYET wasn't a good idea because Digi doors stop making sounds
             }
             else
             {
    -#ifdef NOTYET

                 if (s->priority < DigiPriority)
                     return(false);
    -#endif
     
                 int channel = SD_PlayDigitized(DigiMap[sound], lp, rp);
                 SoundPositioned = ispos;
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1778
    Age : 43
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Thanks for the videos.

    Post by stathmk Sat Feb 25, 2017 11:07 am

    Princess Peach wrote:Thanks. I fixed the speed issue by moving "current_remaining" outside the if statement (otherwise it skips the pauses).

    Before:
                if(pcSound)
                {
                    if(*pcSound!=pcLastSample)
                    {
                        pcLastSample=*pcSound;

                        if(pcLastSample)
                            // The PC PIC counts down at 1.193180MHz
                            // So pwm_freq = counter_freq / reload_value
                            // reload_value = pcLastSample * 60 (see SDL_DoFX)
                            current_freq = 1193180 / (pcLastSample * 60);
                        else
                            current_freq = 0;

                        // The PC speaker sample rate is 140Hz (see SDL_t0SlowAsmService)
                        current_remaining = param_samplerate / 140;

                    }

    After:
                if(pcSound)
                {
                    // The PC speaker sample rate is 140Hz (see SDL_t0SlowAsmService)
                    current_remaining = param_samplerate / 140;


                    if(*pcSound!=pcLastSample)
                    {
                        pcLastSample=*pcSound;

                        if(pcLastSample)
                            // The PC PIC counts down at 1.193180MHz
                            // So pwm_freq = counter_freq / reload_value
                            // reload_value = pcLastSample * 60 (see SDL_DoFX)
                            current_freq = 1193180 / (pcLastSample * 60);
                        else
                            current_freq = 0;
                    }

    I also got rid of the "phase smoothing" because it sounds less cheezy and more authentic without it.  Smile

    Before:
                if (current_freq != 0)
                {
                    // Adjust phase to match to the new frequency.
                    // This gives us a smooth transition between different tones,
                    // with no impulse changes.

                    phase_offset = (phase_offset * oldfreq) / current_freq;
                }

    After:
                    phase_offset = 0;



    https://www.youtube.com/watch?v=oac-tZHHzes


    edit: Barry also found out that removing the last NOTYET wasn't a good idea because Digi doors stop making sounds
             }
             else
             {
    -#ifdef NOTYET

                 if (s->priority < DigiPriority)
                     return(false);
    -#endif
     
                 int channel = SD_PlayDigitized(DigiMap[sound], lp, rp);
                 SoundPositioned = ispos;
    Thanks for the videos.  The sounds brought back memories from 1992 & 1993.  What did you do to show the maps on the screen in the first video?

    Sponsored content


    wolf4sdl - Wolf4SDL with PC speaker sound emulation Empty Re: Wolf4SDL with PC speaker sound emulation

    Post by Sponsored content


      Current date/time is Thu Mar 28, 2024 11:06 am