VOGONS


First post, by Holering

User metadata

Wondering if anyone has attempted hacking Mortal Kombat 2 for dos. Noticed it's probably the best port (besides the new Mortal Kombat Arcade Kollection) but it does suffer some flaws like half frame-rate, and some sfx are misplaced and/or wrong (uppercut hits and Kintaro's sfx are obvious). Also think sprites could be larger and the backgrounds re-processed through GIMP (256 color) using arcade sources.

It'd be great if someone knew the hexvalues to some of this so stuff like frame-rate could be improved. Think this would be a fun project and great game to update-mod.

Also wondering if anyone knows a good fork of dosbox for Mortal Kombat games. Using vanilla dosbox gives screen tearing on Mortal Kombat 1, 2 and Trilogy (Trilogy has the worst tearing); this happens despite vsync being forced on; only Doom seems to vsync, which is easily noticeable at 70hz on a CRT. Tried every output mode and always get the same results (even tried Linux and Windows).

Regards

Reply 1 of 9, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Holering wrote:

(besides the new Mortal Kombat Arcade Kollection)

...Why not just use that and be done with it? It is cheap, widely available, arcade-accurate and runs perfectly on all modern systems, does it not?

Modding old DOS games can be difficult and is not often done. Custom formats and wacky programming techniques are widespread. Do you have prior experience that leads you to believe this would be "fun project" ?

Also wondering if anyone knows a good fork of dosbox for Mortal Kombat games.

I cannot really recall a specific instance in which any particular fork of DOSBox has proven better for any particular game. It seems reasonable to say that the overwhelming majority of the time, you're best off with one of the latest SVN builds, and if you're not, then there is usually a good case for including the feature of the older build in the next SVN version.

Reply 3 of 9, by Holering

User metadata

Why not just use Mortal Kombat Arcade Kollection and be done with it?

Haven't tried it and I'm almost positive it doesn't allow custom resolutions, doesn't scale properly (uses interpolation), or even use equal scanlines (scanlines probably look uneven and distorted). Don't know about the framerate but it'd be nice to know.

I only do these projects if I'm in the drive for it. I've only done minimal hacking with source code to Doom (bypassed sdl_mixer's awful timidity so user's can choose their own midi playback). BTW thanks Jorpho for that NOLFBLIM topic link. If I ever get around to it, maybe I'll look into the source code (assuming it's available) and/or make it work with Mortal Kombat dos games (still have to check if they vsync in native dos).

My interest to hack MK2 also goes towards Mortal Kombat Trilogy, since there's no Arcade quality graphics or sound mods for it (there never was an Arcade version of Trilogy actually). It'd be pretty nice to have an Arcade quality Mortal Kombat Trilogy port (Don't think anyone can make Mugen match Mortal Kombat Trilogy either). I'm more interested in MK2 however, since it seems more possible to learn some assembly that way; though things might turn out different. Also have the unreleased 3DO UMK3 source code (was uploaded on Assembler Games and other place) which may help; might be possible to make an SDL port of Mortal Kombat games with this (think it's C code) but I could go to jail for life too unless I get authoritative permission (wouldn't release game content with it if it happened anyway, and it'd be ironic in an illegal way).

Appreciate the responses

Reply 4 of 9, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Holering wrote:

Haven't tried it and I'm almost positive it doesn't allow custom resolutions, doesn't scale properly (uses interpolation), or even use equal scanlines (scanlines probably look uneven and distorted). Don't know about the framerate but it'd be nice to know.

I'm confused. Are these features so important that you think it is worth tearing down the MS-DOS source code to get at them? Shouldn't you at least have a look first? (Seriously, it goes on sale for less than three bucks with some frequency.)

My interest to hack MK2 also goes towards Mortal Kombat Trilogy, since there's no Arcade quality graphics or sound mods for it (there never was an Arcade version of Trilogy actually). It'd be pretty nice to have an Arcade quality Mortal Kombat Trilogy port (Don't think anyone can make Mugen match Mortal Kombat Trilogy either).

What exactly is missing from it that makes it fall short of "arcade quality"? These are important questions to consider before setting out on something of this magnitude.

...If you're just looking for a DOS program to disassemble for kicks, I'm sure a lot of people might be interested in Ys 2 Special (specifically a means of dumping the existing Korean script and re-inserting an English script), if I may make a suggestion.

Reply 5 of 9, by sirlemonhead

User metadata
Rank Member
Rank
Member

There's a lot of stuff missing from the UMK3 source code. I had a look at it a few years ago and got it to compile but it was never going to do anything useful as all the data that defined each character was missing. You could pull it from some disassembly if you were bothered but it's a LOT of work. I can't remember what else was missing.

It's more than likely going to be a *lot* of work to get MK2's framerate increased.. but I'm only speculating. I imagine it's not as simple as finding a "framerate" variable and just doubling it.

Reply 6 of 9, by Holering

User metadata

never going to do anything useful as all the data that defined each character was missing

Right... This looks more impossible than I imagined (might try some things still). Looks like the best option is converting graphics and sound from Mortal Kombat Arcade Kollection, for Mortal Kombat Trilogy and/or the 3DO source code. Original sounds in Arcade Kollection (not including different new sounds) are actually higher quality than the Arcade original (no compression artifacts from DCS sound system). This would actually be legal since you'd have to own Mortal Kombat Arcade Kollection and Mortal Kombat Trilogy. Perhaps a program written for Linux and later cross-compiled for Windows would work for this (I have no intention of doing this anytime soon, and I don't even own Mortal Kombat Arcade Kollection).

What exactly is missing from it that makes it fall short of "arcade quality"?

Smaller sprites, compression artifacts (colors deteriorated on character sprites; scorpion looks kinda grey instead of yellow for instance), lower sound sampling rate, loads of details, resolution and animations missing from backgrounds (glowing light in MK2 wastleland missing for instance), framerate is lower if played in Dosbox or Windows XP, music at wrong sampling rate (it's 48khz playing at 44khz so it plays slower than it should), lots of glitches (endurance boss match screw up character sounds), lower resolution (320x240 vs 400x254 Arcade original); some other stuff like character endings are debatable (think they're gone). Trilogy was basically ported from the playstation version which isn't impressive; system had 1mb of ram and wasn't capable of perfect Mortal Kombat Arcade translations.

This is one of the main reasons John Carmack is the coolest good guy in the gaming industry. I still play Doom to this day and there's so many ways to change the game and compile it for different systems; and it never gets old, irritating or exhausting. I still mess around with Doom even though it's 20 years old. Nobody releases their source codes and it's a true shame. If I ever get $1000 bucks to spend it's his.

EDIT (09-25-2013):
Thought I'd post this in case other members seek a better Mortal Kombat Trilogy experience:

You need:
Recent ATI video card with FGLRX drivers in Linux
Linux + Windows dual boot config
CRU monitor utility installed in Windows (see below for link)
VirtualBox installed in Linux (running Windows as guest)
Mortal Kombat Trilogy PC
Optional: CRT Monitor capable of over 120hz for 320x240 with natural scanlines

In Linux you can have tear free gameplay if you use a recent ATI video card with the official (closed source) fglrx drivers (best opencl performace as of right now; maybe dosbox can use it sometime?); there's an option in amdcccle (catalyst control panel) called "tear free" that forces everthing to vsync (even simple 2d rendering on the desktop, including virtualbox). Only downside is it's not always stable after quitting a game or fullscreen program and can cause lock-ups and artifacts; also, Dosbox's accurate video emulation nature still exhibits tearing when emulating Mortal Kombat Trilogy in Dos. Read further if you want to proceed, and/or if you have a computer CRT and want natural scanlines (hopefully but probably).

Use Virtual Box to run Windows XP. After installing the latest patch from this person (http://home.comcast.net/~heavyweights/games/mkt/ ) you can mount MK Trilogy disc via Daemon Tools lite and have perfect music playback with round announcements (as of patch 2.4 from cubanraul); you may have to manually enable music in the game's menu afterwards.

If you use a CRT that can do over 120hz or higher refresh rate at lower resolutions (many can with custom modelines), you can get a natural low 320x240 resolution at 120hz or more; I also got natural scanlines on my CRT at this resolution since it's not the usual vesa double-scanned mode. (My CRT is a wonderful Samsung 955DF that was popular back then (didn't even get the best reviews which is strange; being a tweak freak pays off maybe) and is extremely well built; pure blacks, better dotpitch and no distortion unlike more expensive CRT's (it actually is flat too); looks better right now than my more expensive 21" viewsonic CRT that has a Sony Trinitron Tube and does 2048X1536).

Only problem with fglrx drivers, they can't ignore edid so custom modelines in xorg.conf are ignored; also, enable tear-free option before proceeding further if your following this. Also, you have to dual boot into a native Windows install and run the CRU program located here: http://www.monitortests.com/forum/Thread-Cust … ion-Utility-CRU.

You can use the CRU tool and make a custom edid file (has to be renamed to nameofdetectedmonitor.edid and put in /etc/ati/ in Linux). Be very careful not to go over your monitor's limits as that will definitely destroy it for good (I don't take any responsibility; you have been warned)!

With custom resolutions tested in Linux and working properly, you can change your desktop Linux resolution to 320x240 (at 120hz or higher; whatever custom 320x240 resolution you made) and start virtualbox with guest mode video mode, set to auto switch (probably have to run virtualbox from terminal or alt+F2 since desktop will be too small at 320x240). Switch virtualbox to fullscreen and after virtually booting to Windows desktop, click your Mortal Kombat Trilogy cd image to automount via daemon tools lite (image file extension should already be associated with daemon tools lite assuming you already installed it properly and it autostarts on bootup), and run Mortal Kombat Trilogy (switch game to fullscreen too).

After this, you should be running the game in a native 320x240 resolution and you should get natural scanlines (only doubscanned modes disable scanlines) with no screen-tear. Basically makes the game look like it's running in pure RGB on a CRT TV, but it's in better quality coming off a computer monitor as it's razor sharp. Double horizontal resolutions (640x240 for example) also give natural scanlines (but virtualbox right now doesn't have a forced scale mode in fullscreen without filtering).

Not sure what the optimal refresh rate is but in higher resolutions (640x480 for example), I found 85hz to be more smooth which is kind of odd (this would translate to 320x240 at 127.5hz if you can't go over 160hz or even 180hz). Might be able to find out with fraps but not sure. Seems to have slowdown similar to the Saturn port too; think overall this game had bad ports since it was built for Playstation hardware (wonder if the PAL version has better resolution and graphics like arcade if it had a release; PAL systems could definitely have arcade like resolution at their standard timings).

If you read this far then you really are living in death. You can also fix audio latency in Linux if using Alsa sound system. You have to edit a ~/.asoundrc file and use the software mixer with specified buffer size settings. Tweaking this removes sound latency so everything (including virtualbox and probably wine) will have no sound latency (all sounds will be spot on). Look at the archlinux wiki, gentoo wiki, gentoo or archlinux forums for examples of this. You can also use a really high resampling algorithm and specify the output sampling rate (mix more than one channel with software mixer) so you get the best sound possible out of your soundcard.

Regards

Last edited by Holering on 2014-04-05, 12:52. Edited 4 times in total.

Reply 7 of 9, by Holering

User metadata

Noticed it's probably the best port (besides the new Mortal Kombat Arcade Kollection)

Haha I guess the DOS version still is the best port. My friend just showed me Mortal Kombat Arcade Kollection and it's actually emulated. Presentation is rather terrible for an emulator as a matter of fact (very washed out and overly dark).

We did a lot of testing using (enbdev) enbseries.ini file to test 400x254 and 399x253 and many other resolutions with stretch but we couldn't get rid of interpolation (only minimize it). It probably does some floating point based stretching or something.

It's a real shame developers (including nvidia and amd driver developers) haven't learned that downscaling is the proper way to scale image output. Upscaling should be avoided like the plague as it always makes the output into washed out garbage (even with bicubic or lanczos filtering). For example, if your LCD monitor is natively 1920x1080 and you want these games to fill the whole screen, they should scale evenly at a multiple of 5 (400x254 * 5 = 2000x1270) past the target resolution without any filter, and then downscale from that point to 1920x1080 (target resolution) with interpolation or better. The result is much better image quality that looks sharp without distortion, even if pixels don't evenly downscale (contrary to upscaling). It's surprising this isn't done after all these years of having LCD's and other fixed resolution displays.

Rom files for each game are located in Steam\steamapps\common\Mortal Kombat Arcade Kollection\BINARIES\WIN32\DATA. There's actually two copies of each Mortal Kombat Game (second copy is in their corresponding sub-folder). The original arcade machine's DCS system seems unemulated since the sounds are much clearer and some are different in the first Mortal Kombat game. The sounds are located in Steam\steamapps\common\Mortal Kombat Arcade Kollection\MKHDGame\CookedPC\Sounds as upk files.

You can buy Mortal Kombat Arcade Kollection if you don't mind emulation but it definitely is not a port. It also looks much better running through Mame (recommended! Unless you want to battle online players via Games for Windows Live of course) and applying your own custom settings (you can copy and/or rename the roms to their appropriate names (mk1image.bin to mk.bin; mk2image.bin to mk2.bin; and umk3image.bin to umk3.bin)) and the sounds will be authentic. Another option is to buy Midway Arcade Treasures 2 if you must emulate the roms (that one has Mortal Kombat 3 which IMO is better than Ultimate Mortal Kombat 3; level variation and gameplay balance is much better).

Regards

Reply 8 of 9, by Norton Commander

User metadata
Rank Member
Rank
Member

Yup, I'm a big fan of MKT, since I first played it on my PS1. Around 2003 I hunted around for a PC port and found it online for about $25. I was disappointed. The graphics for both the Windows and DOS version (both included on the install disc) seemed inferior to the PS1 version. This was on a 98SE machine with ATI Rage Fury 128. Even Epsxe seemed to have better graphics than the native windows ports (I have read that the PS1 and PC ports use exactly the same graphics) which leads me to think the PC version has a crappy renderer.

When I upgraded to XP MKT Windows version wouldn't even run and the DOS version in DOSBOX was too slow even at max cycles. About a year later I stumbled upon another MKT enthusiast's webpage with hacks and fixes to allow MKT to run on current Windows versions. Unfortunately the Epsxe version still looks better even on a Radeon HD5450.

The PS1 version is better on a PC than native port IMHO - unless your favorite fighter happens to be Shang Tsung. You may prefer the PC version since his morphs load instantly versus the lag on the PS1 version.

It would be nice to see a modern version of MKT but until then Epsxe it is.

Reply 9 of 9, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

As far as MKT is concerned, I guess the N64 version isn't even worth considering? (Or is it not emulated yet?)