[Off+Req] Diablo 1 source code for PSX Beta builds

Hello!

Today I'd like to share something a friend of mine has been working on for quite some time:
https://github.com/galaxyhaxz/devilution

Galaxy managed to reverse engineer Diablo back into a usable source code. This was done with the help of a Symbolic file left on the Japanese Playstation port and the beta "Easy as Pie" (DIABPSX.SYM). Normally these files are only left on development builds, but one ended up on the Japanese build. The "Easy as Pie" is the only beta build that was released online.

It seems after Climax Studios liquidated, their Diablo assets were sold into two different lots. One of them appeared here: https://assemblergames.com/threads/diablo-ps1-pal-development-alpha-beta-disc-set.61962/

The other was posted more recently on reddit: https://www.reddit.com/r/Diablo/comments/4jklr0/found_betadevelopment_discs_for_diablo_any/
Screenshots: https://imgur.com/gallery/Vgfly

Unfortunately, neither of these people have access to the discs anymore. Anyone having any information and would like to send it our way would be greatly appreciated! Having as many revisions of the beta as possible will help with reversing, especially if the build is older than "easy as pie". There are also a few hidden source files on that build, so there is likely other goodies on other builds too. Let's also not forget beta elements ;) Thanks.
@Diablodin
interesting I completely forgot about the psx builds, did any of those ever get released publically?

re-edit: does this compile properly under Visual Studio atm? I see mention in the installation instructions on copying Devilution.exe but the provided dsw file doesn't seem to build one, just builds regular ol Diablo.exe, is that expected / not the exe to use to run the game?
AFAIK only the "Easy as Pie" build made it's way out.
https://assemblergames.com/threads/diablo-psone-beta-12-08-97.30171/page-2
Your MU mirror has been long since dead of course ;) But Galaxy and I have a backup.
The Visual Studio project files aim to create a near-clone of the vanilla Diablo.exe, therefore use the same optimizations and compiler. Name doesn't matter, you can just rename it after building and drop it into your Diablo folder.

If anyone wants to try it out and doesn't have a toolchain setup, check out the latest binary:
https://github.com/galaxyhaxz/devilution/releases/tag/0.2
yeah idk if it's the state of the code or the compiler I'm using (VS 2010), but my compiled release binaries do not work, exe launches, screen changes resolution, then I just get dumped back to desktop, guess I can try an older compiler
Seeing as it exits immediately without faulting, I'm guessing the diabdat.mpq file is not present on the hard drive? You can define whether or not the CD is used with "#define COPYPROT" in types.h. I'll download VS 2010 express later and give it a go to be sure.

Edit: the latest commit could possibly address your issue. It seems that if the compiler uses minimal size/optimization then it would have done exactly what you described. Fixed now though.
Recompiled with latest and still no dice, tried dropping diabdat.mpq in place as well same thing as before, exe runs and resizes desktop, then exits out. The compiled binary on github worked fine though at least (albeit the cheat command flag did not), might just track down a different version of VS to use that's in line with the expected version to build with

Here's the error from it's error log on Diablo's side, not sure if it will help

------------------------------------------------------
PROGRAM VERSION: 1.0.9.2
COMPUTER NAME: <redacted>
TIME: 06/17/18 19:03:13
INFO:

Exception code: C0000005 ACCESS_VIOLATION
Fault address: 02A60AAC 00:00000000 *unknown*

Registers:
EAX:02A60FAD
EBX:02A60AAC
ECX:00000000
EDX:000001E0
ESI:00000000
EDI:0AEE6858
CS:EIP:0023:02A60AAC
SS:ESP:002B:0093F7B4 EBP:0093F874
DS:002B ES:002B FS:0053 GS:002B
Flags:00210216
Call stack:
Address Frame Logical addr Module
02A60AAC 0093F874 0000:00000000 *unknown*

Stack bytes:

Code bytes:
0x0093f1c4: 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 93f1c4 ................
That fault address is outside the main program loop, so the issue is *most likely* related to directx or storm.

Edit: just installed VS 2010 express. Had to make new project files but I'm experiencing the same issue. It's hanging on storm.dll. I'll try to do a little debugging and see if it can't be fixed.

Also, the cheat commands don't work because that is a release build and not a debug build. We'll see about releasing debug builds from now on (toying around with god + fly mode FTW!)
Oh gotcha didn't realize the cheats were debug build only, glad to see it's not just me having that vs2010 issue
Well, I own a lot of Diablo PS1 builds, but I don't know if I can help with this type of project.
Can anyone run it by me one more time? - Are you trying to create a full playable version of the game with all dev features intact?
We've already achieved that :) What's left now is cleaning up the garbled output and documenting the remaining code which was removed from the PSX port. Pretty much everything was based on the DIABPSX.SYM salvaged from the development build. When all is said and done, we'll be able to port Diablo to OSX/Linux and update it with modern features.

Oh, and I have a thing for piecing together beta elements. For example, did you know there are header files hidden in LUMP.BIN which contain stuff removed from the final game? Alas Azurewrath is confirmed part of Diablo 1!
Aha. Some of my builds have visual differences and features, but I wouldn't say anything as concrete as left out items, monsters or music f.ex.
I own a fair amount of both NTSC-J, NTSC and PAL builds (I'M GOING MAD LOOKING FOR THE REMAINING NTSC DISC LOT), including a bunch revisions of the mentioned "Pie" build, which are NTSC. I also have one PAL revision, and I imagine that's when they branched out from the current Pie build to start developing the PAL build. I don't know.
I don't know where, but I think I've heard that Azurewrath was meant to be in D1. :)
You and I both. The other lot was discovered by a guy who worked under contract to clean out Climax Studio's office. I reached out to him a few months ago and he doesn't know where the discs went. It's a real shame, because he wanted to sell them so they could be preserved. Think disc rot after all these years. :(
What's cool is there is a header file that contains thousands of definitions for text. In this text, you can see items, monsters, and dialog not used in the final game and not present on the PC release either. This file is called "MAINTXT.H" and is stored inside "LUMP.BIN".

I've uploaded a list of all the build names in the spoiler below. The names were pulled from an array based on build date. The names are in order from newest to oldest. I've marked builds known to the public in red (FANNY BATTER and EASY AS PIE). The names they chose are hilarious, Climax definitely had a sense of humor :p
Spoiler
  1. GAME OVER
  2. HAPPY LARRY
  3. MANGO CHUNTNEY
  4. TRIANGLE
  5. CHORLTON
  6. DENNIS THE MENACE
  7. PLAPTRONICS
  8. DEMI SEMI HEMI QUAVER
  9. GAHN-DJA
  10. FLECKSPOT
  11. HELLYWELL
  12. KHLARTY KAT
  13. MONKEY SPUNK
  14. SPUNKY MONK
  15. NEARLY THERE
  16. SID JAMES
  17. HATTIE JAQUES
  18. ERIC IDLE
  19. SYD LITTLE
  20. EDDIE LARGE
  21. CHUCKLEVISION
  22. CHUCKLEC*NTS
  23. ARSEPIPE
  24. FANNY BATTER
  25. HOT BOT SLOT
  26. SAGGY FLAPS
  27. CHEDDARY CHAP
  28. JAPS EYE
  29. CHOCOLATE STARFISH
  30. RUSTY BULLETHOLE
  31. GRANDFATHER CLOCK
  32. FRENCH POLISH
  33. OOOH THE FMV DOESN'T WORK
  34. DICK EMERY
  35. YOU'LL CATCH YOUR DEATH
  36. YOU WON'T FEEL THE BENEFIT
  37. MANY A MICKLE (MACKS A MUCKLE)
  38. YOU'LL HAVE YOUR EYE OUT WITH THAT
  39. PROPER CHARLIE
  40. A RIGHT TWO AND EIGHT
  41. DING DONG MERRILY
  42. DAVE 4 GRAHAM
  43. GAPING GAP
  44. LARD IS LORD
  45. BIONIC ARSE
  46. JESUS WAS A BLACK MAN
  47. JESUS WAS BATMAN
  48. THAT WAS BRUCE WAYNE
  49. RANDOM LIGHT
  50. DOVE FROM ABOVE
  51. GEORGE DOORS
  52. CROW FROM BELOW
  53. GREGG MITCHEL
  54. PHIL MITCHEL
  55. GRANT MITCHEL
  56. BARBARA WINDSOR
  57. WINDSOR DAVIS
  58. IT AINT HALF HOT MUM
  59. MY WIFES GONNA KILL ME
  60. MARY JANE
  61. LARGE CHEST FOR SALE
  62. EASY AS PIE
  63. NICE AS PIE
  64. PIE EYED
  65. PIECE OF PISS
  66. YOU WOULDN'T LET IT LIE
  67. I WOULD'VE LET IT LIE
  68. IT'S A BIT RUNNY
  69. IN OUT SHAKE IT ALL ABOUT
  70. COUNT OF MONTE ARSEHOLE
  71. ORSON SMELLS
  72. MAGNIFICANT AMBERSONS
  73. TOUCH OF EVIL
  74. CITIZEN KANE
  75. GAWD BLIMEY MARY POPPINS
  76. ISN'T THIS FUN
  77. ARE WE HAVING FUN YET
  78. YOUR BREATH STINKS
  79. I'LL BE A MONKEY'S UNCLE
  80. GET A HAIRCUT
  81. DON'T RUB IT
  82. YOU'LL WEAR IT OUT
  83. ARSE TRUMPET
  84. HIGH RES?
It appears from the photos here: https://imgur.com/gallery/Vgfly - that the NTSC lot contained about 2x as many discs. The oldest build is COUNT OF MONTE ARSEHOLE (12-05-1997) where as some unnamed builds go back as far as November '97. There's also PAL and NTSC-J builds from early 1998.
I take it you aren't open to dumping said builds?

edit: wow that's an interesting list, and on the monster list, thanks for the heads up
If you ever come across the set, I'll be damned. You get the meat, and leave me the bones(discs) ok? ;)
As far as I know, the remaining NTSC set contains ~60 discs. I have the rest, excluding drips and drops that leaked. I think I'm aware of three EA branded discs and two or three discs directly from the dev process.
Whoever bought them is probably just like me, who doesn't boast too often and like to keep his collection to himself. But yeah, a fair percent of the discs had a hard time running, didn't run or were physically damaged, cracks etc. So I've since day one been careful and effective when using them.

Yep, that list is solid. I recognize many of the revisions, and many I don't have. Sorry if anyone from Climax sees this and feel bullied, but these guys were almost definitely a gang of pot smoking nerds with a bizarre sense of humor... :D
I love to see that tho! They were entrusted with a hit title and they were just themselves fucking around at work haha!

When I went through the discs I was only focusing on seeing which discs were working, organizing them by region and date as well as I could, plus digging for immidiate bugs.

I assume you're asking me. And to be completely honest - No, I'd rather not. I know it sounds stupid to many, but I don't want them floating out there. I will be backing them up and document and store them well.

Original thread: https://assemblergames.com/threads/off-req-diablo-1-source-code-for-psx-beta-builds.69424/