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

Wolf3D hacked for 8086/8088 CPUs

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

    Wolf3D hacked for 8086/8088 CPUs

    this is something i wanted to attempt for a while, and last night i did it. i took the original (now public domain) source code for Wolfenstein 3D and went through it all (ASM and C) modifying it to play on an 8086 or 8088 system.

    if you try it on that kind of CPU, the game will say sorry you need a 286 or better. what i did was bypass the CPU check, and change a lot of SHR/SHL instructions that had a value greater than 1 to multiple SHR/SHL _,1 instructions. also had to totally remove XMS detection code, as that caused a lock up on my 8088. a few other modifications had to be made as well.

    i also had to disable all sound (edit: it works with sound now) to get it to work for some reason, i'll be trying to get that working as well but i do have a working 8086 compatible wolf3d exe that anybody who wants to get can have:

    http://www.rubbermallet.org/wolf8086.exe

    just put it in the same folder on your machine as the wolf3d.exe of course. it SHOULD work with both registered and shareware data files, but i've only tested registered.

    all you need is a VGA card and it'll go. believe it or not, it's actually quite playable at 4.77 MHz especially if you make the view window smaller. i was expecting much worse performance. makes me wonder why they made it require a 286 in the first place.

    have fun!

    EDIT: UPDATE!! i fixed the sound issue. i re-uploaded the new EXE to the same URL. if you got the version with disabled sound, redownload the WOLF8086.EXE file. everything works 100% perfectly now. it didn't make the game any slower that i can notice. it's really cool hearing that classic "AH! STOP!" and "MEIN LEBEN!" from the guards on an 8088.

    and a second update.. that same EXE at that URL now has a cheat menu right in the main menu that i added in addition to the 8086 hack. all cheats tested and working perfectly:



    plus i changed multiple lines of SHL/SHR _,1 of SHL/SHR _,CL but i haven't noticed a performance increase at all on my 4.77 MHz boxes.
    Last edited by Mike Chambers; September 15, 2009, 02:33 PM.
    sigpic

    #2
    I wish I had your smarts for this kind of thing...

    I will be trying your modified version
    GEEKS WITH A GRUDGE!

    Comment


      #3
      so you got it done enough huh? if only I had an 8088 PC to play this on!

      Comment


        #4
        it was actually simpler than it sounds. i've never actually written a program other than hello world in either C or ASM, but i still managed to get this working.

        this gave me some courage to play around more with C though, i really need to abandon quickbasic lol. it really isn't THAT different from BASIC. mostly just syntax.

        also thanks to mike brutman who mailed me a spare borland turbo C++ 3.0 for DOS copy he had about a year-and-a-half-ish ago. thats what i used to edit and compile this. :P
        sigpic

        Comment


          #5
          also, for kicks i think i'm gonna haxx0r up a cheat menu for the game.

          oh, and as far as performance of wolf3d on an 8088 YMMV becuase i have a diamond speedstar w/ tseng ET4000 chipset in the 8088 i'm playing it on, which is like ridiculously fast compared to just about any other 8-bit compatible VGA card out there. i would think most cards would not be quite as fast playing this game. i'd love to hear results.
          sigpic

          Comment


            #6
            That's fantastic. Keep it up and see if you can get the sound to work (though that might put additional load on it, so it's hard to say whether or not it's even worth the endeavor.) Guess I might have to get myself a VGA powered XT now... I was kind of thinking of getting one of those luggables again anyway. Heheh...
            Anyone got an Intel Inboard 386/PC memory module? Still looking for that Kingston 486/Now too.

            Comment


              #7
              hey, big update! the sound problem much easier than i thought to take care of. it was because the ASM routines that handled sound management for the game has pusha/popa instructions. i simply changed them to indivisual push/pop instructions in the right order, and it worked great on my 8088. i can hear everything through my SB Pro v2.0.

              re-download it from the same URL i gave earlier and overwrite the old one if you had downloaded that.

              http://www.rubbermallet.org/wolf8088.exe

              sigpic

              Comment


                #8
                I'm glad there's an 808x verion available now. "JoJo Reloaded" released a V20 version of Wolf3D a few years back. I have it on my 10MHz V30 system. I don't know if I'd describe it as enjoyable, but it is somewhat playable. I'll have to try your recommendation on the ET4000 card. I'm running a VGA wonder at the moment. I never considered it to be slow, but if et4000 is that much faster then I need to try it.
                "Will the Highways on the internets become more few?"

                V'Ger XT

                Comment


                  #9
                  Originally posted by Anonymous Coward View Post
                  I'm glad there's an 808x verion available now. "JoJo Reloaded" released a V20 version of Wolf3D a few years back. I have it on my 10MHz V30 system. I don't know if I'd describe it as enjoyable, but it is somewhat playable. I'll have to try your recommendation on the ET4000 card. I'm running a VGA wonder at the moment. I never considered it to be slow, but if et4000 is that much faster then I need to try it.
                  i didn't know that was out. wouldn't V20 code work on an 8088, or does it have instructions an 8088 doesn't? on my 4.77 MHz, if i shink the view window to about half of full size it's more or less playable. it can get hard to aim well sometimes though. i might try looking at the code a little more in depth and maybe make some modifications to speed up. i'd like to try it with the horizontal resolution cut in half, and just duplicate each slice of the picture and see how it is.
                  sigpic

                  Comment


                    #10
                    I wonder what optimizations could be applied? The interesting but painful part of post-assembly editing is different commands that have the same result but 1 or two less ticks to them (for extreme resource editing).

                    Also it might be interesting to see what limitations there could be in general, as in some code may just take the time it takes no matter the resources (how's it run in dosbox or a ((2/3)86)?

                    Either way, pretty sweet project Mike.
                    Looking to acquire: IBM 5100, Altair 8800

                    Comment


                      #11
                      Originally posted by barythrin View Post
                      I wonder what optimizations could be applied? The interesting but painful part of post-assembly editing is different commands that have the same result but 1 or two less ticks to them (for extreme resource editing).

                      Also it might be interesting to see what limitations there could be in general, as in some code may just take the time it takes no matter the resources (how's it run in dosbox or a ((2/3)86)?

                      Either way, pretty sweet project Mike.
                      yeah good thinking. there probably are a few bits of code that could be changed to take a few less clock cycles that didn't really matter when using a 286+.

                      i'm no expert on that part though. i would need a larger brain like the one Trixter has. he's obviously great with ASM optimization. maybe he'll want to take a look at my modified source files if he sees this thread.
                      sigpic

                      Comment


                        #12
                        So on a bit crazier level, how easy was the tweaking? Find/Replace easy or a bit more logic to it? .. think it could be automated?

                        8088patch game.exe and get Ultima and other goodies to be compatible? heh.. probably WAY less than possible but hey if you're bored and got time, it may be an interesting project to see if you could write a patcher with knowledge you and others know on compatible opcodes.

                        Even a compiled binary you've got all the ML right there. I can see lots of things that might get in the way (memory allocation, need to replace opcodes with same size commands or modify jmps accordingly).
                        Looking to acquire: IBM 5100, Altair 8800

                        Comment


                          #13
                          Originally posted by barythrin View Post
                          So on a bit crazier level, how easy was the tweaking? Find/Replace easy or a bit more logic to it? .. think it could be automated?

                          8088patch game.exe and get Ultima and other goodies to be compatible? heh.. probably WAY less than possible but hey if you're bored and got time, it may be an interesting project to see if you could write a patcher with knowledge you and others know on compatible opcodes.

                          Even a compiled binary you've got all the ML right there. I can see lots of things that might get in the way (memory allocation, need to replace opcodes with same size commands or modify jmps accordingly).
                          i'm not an ASM expert, but that would probably be impossible to make a universal patcher if i had to guess. it would be cool though.

                          as far as what i had to modify, it was a bit more complicated than find/replace. i had to completely cut out XMS detection routines like i said, because it locked my 8088s up. i commented out the ASM code that tests for less than a 286, and made it always JMP to the "@@Has286" subroutine.

                          i also had to remove the code for fast palette changes. it changed the whole 768 bytes of palette data for the video at once with an OUTSB instruction, which an 8088 can't understand. i made it always change it one palette value at a time, looped 768 times.

                          it also had the occasional pusha/popa that i had to remove and replace with lists of single push/pop instructions. there were also a bunch of SHL/SHR instructions that specified more than 1 place shift at a time. i had to split them all into multiple SHL/SHR _,1 instructions. i might be forgetting something.
                          sigpic

                          Comment


                            #14
                            Originally posted by Mike Chambers View Post
                            i didn't know that was out. wouldn't V20 code work on an 8088, or does it have instructions an 8088 doesn't? on my 4.77 MHz, if i shink the view window to about half of full size it's more or less playable. it can get hard to aim well sometimes though. i might try looking at the code a little more in depth and maybe make some modifications to speed up. i'd like to try it with the horizontal resolution cut in half, and just duplicate each slice of the picture and see how it is.
                            The V20 has the 286's real mode instructions: PUSHA, POPA, shift and rotate instructions with values greater than 1, INS, OUTS, INSB, OUTSB, INSW, OUTSW, ENTER, BOUND, and LEAVE.

                            Comment


                              #15
                              Originally posted by Mike Chambers View Post
                              all you need is a VGA card and it'll go...
                              What about CGA or EGA support? I'm waiting for a Video-7 VEGA I bought off EBang but its maximum is 752x410 enhanced EGA.

                              Comment

                              Working...
                              X