What's new

Partial UMK3 3DO/PSX Source Code Released

Konqrr

MK11 Kabal = MK9 Kitana
They call Kabal "Tusk" haha

This is good shit. I can't find damage info anywhere, but I see where the damage protection is called ^_^
 

Konqrr

MK11 Kabal = MK9 Kitana
Yeah. His "spin" is referenced as "blur" ... I kind of like that better as Kabal doesn't really spin, he dashes.
 
So what makes people think this is only the partial source code? I haven't tried to compile it or anything (which would obviously fail due to the lack of SDK libraries), but glancing through the code I've seen tons of routines for the select screen, special moves, fatalities, backgrounds, Kombat Kodes, AI, etc. If theres anything missing, I don't think its much.

Also looked at the art disc and it wasn't too exciting, was just a bunch of hi-res MK3/UMK3 promo art for putting together a game cover. Was thinking that maybe it was the original sprite sheets used for the game :-[

edit: someone mentioned on assemblergames that there was never a PSX version of UMK3, heres what I saw in the source...

MKSEL.c is the MK3 select screen. However, MKSELNEW.c is the UMK3 select screen.
MUGS mug_shot_table[]=
{
{(OIMGTBL *)HDKITANA,MUG1_X+(X_SPACE*0),MUG1_Y+(Y_SPACE*0),FT_KITANA,0x2521},

{(OIMGTBL *)HDREPTILE,MUG1_X+(X_SPACE*1),MUG1_Y+(Y_SPACE*0),FT_REPTILE,0x2521},
{(OIMGTBL *)HDSONYA,MUG1_X+(X_SPACE*2),MUG1_Y+(Y_SPACE*0),FT_SONYA,0x2521},
{(OIMGTBL *)HDJAX,MUG1_X+(X_SPACE*3),MUG1_Y+(Y_SPACE*0),FT_JAX,0x2521},
{(OIMGTBL *)HDINDIAN,MUG1_X+(X_SPACE*4),MUG1_Y+(Y_SPACE*0),FT_INDIAN,0x2521},
{(OIMGTBL *)HDJADE,MUG1_X+(X_SPACE*5),MUG1_Y+(Y_SPACE*0),FT_JADE,0x2521},
{(OIMGTBL *)HDSCORPION,MUG1_X+(X_SPACE*6),MUG1_Y+(Y_SPACE*0),FT_SCORPION,0x2521},

{(OIMGTBL *)HDKANO,MUG1_X+(X_SPACE*1),MUG1_Y+(Y_SPACE*1),FT_KANO,0x2521},
{(OIMGTBL *)1,MUG1_X+(X_SPACE*2),MUG1_Y+(Y_SPACE*1),FT_MILEENA,0x2521},
{(OIMGTBL *)2,MUG1_X+(X_SPACE*3),MUG1_Y+(Y_SPACE*1),FT_ERMAC,0x2521},
{(OIMGTBL *)3,MUG1_X+(X_SPACE*4),MUG1_Y+(Y_SPACE*1),FT_OLDSZ,0x2521},
{(OIMGTBL *)HDSUBZERO,MUG1_X+(X_SPACE*5),MUG1_Y+(Y_SPACE*1),FT_SUBZERO,0x2521},

{(OIMGTBL *)HDKETCHUP,MUG1_X+(X_SPACE*1),MUG1_Y+(Y_SPACE*2),FT_ROBO1,0x2521},
{(OIMGTBL *)HDBRIDE,MUG1_X+(X_SPACE*2),MUG1_Y+(Y_SPACE*2),FT_LIA,0x2521},
{(OIMGTBL *)HDSWAT,MUG1_X+(X_SPACE*3),MUG1_Y+(Y_SPACE*2),FT_SWAT,0x2521},
{(OIMGTBL *)HDMUSTARD,MUG1_X+(X_SPACE*4),MUG1_Y+(Y_SPACE*2),FT_ROBO2,0x2521},
{(OIMGTBL *)HDLAO,MUG1_X+(X_SPACE*5),MUG1_Y+(Y_SPACE*2),FT_LAO,0x2521},

{(OIMGTBL *)HDTUSKAN,MUG1_X+(X_SPACE*1),MUG1_Y+(Y_SPACE*3),FT_TUSK,0x2521},
{(OIMGTBL *)HDSHEGORO,MUG1_X+(X_SPACE*2),MUG1_Y+(Y_SPACE*3),FT_SG,0x2521},
{(OIMGTBL *)HDSHANG,MUG1_X+(X_SPACE*3),MUG1_Y+(Y_SPACE*3),FT_ST,0x2521},
{(OIMGTBL *)HDLIUKANG,MUG1_X+(X_SPACE*4),MUG1_Y+(Y_SPACE*3),FT_LK,0x2521},
{(OIMGTBL *)BOX_09,MUG1_X+(X_SPACE*5),MUG1_Y+(Y_SPACE*3),FT_SMOKE,0x2521},

{NULL},
};
As you can see, this is the layout for the UMK3 select screen


And the UMK3 stuff is sprinkled all over the code. The only glaring thing I see is in the declarations for characters in MKLadder.c, the UMK3 characters aren't defined as global variables, but I still see them defined in the endurance tables. The Bank's class file is empty in this version whilst the UMK3 backgrounds are all here (much like UMK3 arcade).

Theres also very little chance that this is NOT PSX code. I don't see a single reference to "sega", "saturn", "3do", or "3d0" in here but there are 601 references to "psx" and 737 references to "sony" in here. I've never seen PSX code before, but unless the devs are incredibly lazy and didn't rename any variables or modify comments, this possibly is an unreleased version of UMK3 for PSX and perhaps even code that is the precursor to Mortal Kombat Trilogy (although, the file structure used here is completely different than Trilogy). Perhaps someone with any experience with PSX or 3DO libraries could confirm this.

File structure seems to match the Saturn version, so this code is could be related to the Saturn version
 
Another thing which I didn't realize before is that there was no Saturn version of MK3 (as far as I know). So this code started off as MK3 code on PSX, got ported to Saturn at some point during the upgrade to UMK3, and then either there was a complete PSX version of UMK3 which was used for MK Trilogy or the Saturn version was ported back to PSX for Trilogy. And then Trilogy on PSX was ported back to the Saturn.

David Schwartz (whose name is all over this source code) is also thanked in the MK Trilogy credits, so that could mean that they did use this code base to make Trilogy. I'm also seeing some function calls in the UMK3 source code which are referenced in MK Trilogy's executable which also could mean a shared code base. Although, I guess its possible that the original Arcade source used these function names as well (I'm not sure as to how the arcade versions were programmed... my assumption was Boon just did it straight up in machine language, which would be pretty hardcore if that was the case).
 
The only thing I can contribute here is that I remember Ed saying the original MK was programmed in 34010 assembly, which was then carried over (or maybe "ported") to MK2 and 3 respectively. I've been trying to find documentation on 34010 for quite a while now with little success.

Not that I have the slightest clue how to begin reading or writing even a simple hello world program in assembly, or anything. ...yet.

Edit- I just realized that SheGoro, Mustard and Ketchup were all WIP names for Sheeva Sketor and Cyrax - and I didn't notice until now, but I find it funny how those indev names managed to make it into the console ports source code...
 
TerryMasters said:
Edit- I just realized that SheGoro, Mustard and Ketchup were all WIP names for Sheeva Sketor and Cyrax - and I didn't notice until now, but I find it funny how those indev names managed to make it into the console ports source code...
They've got Sindel referenced as Bride and Lia in places (I've seen a screenshot of a beta of the Genesis version with Sindel named "Lia") as well.

I'm guessing the assembly language source for the arcade version used these variables and/or work on the ports was started well before the MK team decided the names for all of the characters. In the making of MK3 video they made it sound like they give the source code to the port developers a year after the arcade release but in reality its probably something that started as the arcade version was still being finalized.
 
Actually I'm glad we started talking about this again because there was something I discovered that I don't think many people realize about the Juggernaut hack, only I couldn't say anything about it at the time because I thought it might ruin the April Fools thing:

In the arcade version of UMK3, Human Smoke was playable, and Noob Saibot was not. In the Juggernaut hack both Saibot and Human Smoke are playable straight from the character selection screen. But in vanilla UMK3, after changing into Human Smoke during a single player fight ladder, his character portrait becomes a question mark - because they hadn't developed a portrait for either character yet. However, in the Juggernaut hack, both of them have their MKT portraits and it's necessary to swap out graphics roms in order to make them visible. I don't know how else to put it, but whoever's responsible for juggs managed to successfully import graphics data into Wolf Unit roms.

That, and he managed to add two additional characters to the selection screen while also giving them both ending stories. I remember finding the hack on a spanish forum with the original poster who created the thread detailing everything he did, but I believe the threads since been deleted.

Edit- Bingo, got it: http://www.chilecomparte.cl/index.php?showtopic=1131971&st=0
 

McCarron

Noob
TerryMasters said:
Actually I'm glad we started talking about this again because there was something I discovered that I don't think many people realize about the Juggernaut hack, only I couldn't say anything about it at the time because I thought it might ruin the April Fools thing:

In the arcade version of UMK3, Human Smoke was playable, and Noob Saibot was not. In the Juggernaut hack both Saibot and Human Smoke are playable straight from the character selection screen. But in vanilla UMK3, after changing into Human Smoke during a single player fight ladder, his character portrait becomes a question mark - because they hadn't developed a portrait for either character yet. However, in the Juggernaut hack, both of them have their MKT portraits and it's necessary to swap out graphics roms in order to make them visible. I don't know how else to put it, but whoever's responsible for juggs managed to successfully import graphics data into Wolf Unit roms.

That, and he managed to add two additional characters to the selection screen while also giving them both ending stories. I remember finding the hack on a spanish forum with the original poster who created the thread detailing everything he did, but I believe the threads since been deleted.

Edit- Bingo, got it: http://www.chilecomparte.cl/index.php?showtopic=1131971&st=0
I translated that article and it was just someone talking about what was changed, but didn't say he did it. I'd love to find the person who did that as doing this project would be easier to get up off the ground with the ability to add/remove assets from those ROMs.

As far as the game code, the games are stored as ASSEMBLER code already so MAME itself shows the game instructions clear as day in their debug tools. So you'd just have to write a way to patch code in the ROM or build all new ROMs from new source files or find another way to disassemble the binary code back to assembler. It's hard but if you know what tools you need (I sadly don't) it becomes a bit easier.

A few years ago I messed with the MAME MK1 code via the MAME debugger and Ed's provided Assembler code snip of Sonya's Square Wave Punch and got this by changing the memory address values on the animation.

Hacking Mortal Kombat 1 on The Fly
 
McCarron said:
As far as the game code, the games are stored as ASSEMBLER code already so MAME itself shows the game instructions clear as day in their debug tools. So you'd just have to write a way to patch code in the ROM or build all new ROMs from new source files or find another way to disassemble the binary code back to assembler. It's hard but if you know what tools you need (I sadly don't) it becomes a bit easier.

A few years ago I messed with the MAME MK1 code via the MAME debugger and Ed's provided Assembler code snip of Sonya's Square Wave Punch and got this by changing the memory address values on the animation.

Hacking Mortal Kombat 1 on The Fly
Is the ROM binary stored as assembler code or machine language? It's been a while since I did my machine language programming course for comp sci but from what I remember machine language is the actual op codes and memory addresses whereas assembler uses variables and routines and is slightly more readable.

As far as programming in C vs ROM hacking I think developing is way easier. With hacking it's a lot harder to figure out how things work and while changing variables is easy, inserting chunks of new functionality is harder. Especially since you need to figure out how to insert new graphics and fit everything in within the limitations of the compiled code. It's been a while so I may be wrong but from what I gather it's ver unruly to deal with large amounts of machine code.

With actual code it's a lot easier since things are all neatly defined with variables that make sense and you have variables and routines grouped together and componentized. I just think the news of the source code leaking didn t travel far. I find it hard to believe that I'm the only programmer licking their chops when seeing this.

But I'm a java developer and the thought of putting together a makefile makes me groan. But I know exactly what would need to be done to get his up and running. And Ive seen it done before. The source code for Star Control 2 for 3do was released by the devs to he public domain and with an open source project it was converted to sdl for pretty much every platform available.