Image Map Image Map
Page 1 of 4 1234 LastLast
Results 1 to 10 of 34

Thread: Wolf3D hacked for 8086/8088 CPUs

  1. #1

    Default 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 15th, 2009 at 02:33 PM.
    My emulators!
    Fake86 8086/V20 PC emulator: http://sourceforge.net/p/fake86
    MoarNES Nintendo emulator: http://sourceforge.net/p/moarnes


  2. #2

    Default

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

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

  3. #3

    Default

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

  4. #4

    Default

    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
    My emulators!
    Fake86 8086/V20 PC emulator: http://sourceforge.net/p/fake86
    MoarNES Nintendo emulator: http://sourceforge.net/p/moarnes


  5. #5

    Default

    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.
    My emulators!
    Fake86 8086/V20 PC emulator: http://sourceforge.net/p/fake86
    MoarNES Nintendo emulator: http://sourceforge.net/p/moarnes


  6. #6

    Default

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

  7. #7

    Default

    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

    My emulators!
    Fake86 8086/V20 PC emulator: http://sourceforge.net/p/fake86
    MoarNES Nintendo emulator: http://sourceforge.net/p/moarnes


  8. #8

    Default

    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

  9. #9

    Default

    Quote 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.
    My emulators!
    Fake86 8086/V20 PC emulator: http://sourceforge.net/p/fake86
    MoarNES Nintendo emulator: http://sourceforge.net/p/moarnes


  10. #10

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •