diasurgical / devilution

Diablo devolved - magic behind the 1996 computer game
Other
8.77k stars 919 forks source link

Would Like Location Of Original PDB (symbol file) Mentioned In The Readme #592

Closed KeplerIO closed 5 years ago

KeplerIO commented 5 years ago

Would be VERY interested in seeing the orignal PDB or symbol file otherwise that was mentioned in the README. Is this still available?

mewmew commented 5 years ago

The original PDB file is yet to be uncovered (i.e. C:\Diablo\Direct\WinRel\Diablo.pdb associated with the debug release of Diablo 1, version 1.0). To the best of my knowledge, this file has never been seen in the wild.

The symbol files however, have been seen in the wild. More specifically, the symbol file diabpsx.sym is present on the Japanese Playstation 1 releases of Diablo 1. The debug information recovered from some of these symbol files is listed at https://github.com/diasurgical/scalpel/tree/master/psx

For instance, the earliest know version of the PSX symbol information is part of the ID 3 release: https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/3/_dump_c_src_

Example of recovered debug information from monster.cpp:

https://github.com/diasurgical/scalpel/blob/2c32984ffe66eb34da22023d4ad2975a8abebeaa/psx/_dump_/3/_dump_c_src_/diabpsx/source/monster.cpp#L48

// address: 0x80140A40
// line start: 554
// line end:   576
void M_StartRAttack__Fiii(int i, int missile_type, int dam) {
    // register: 16
    register int md;
    // register: 2
    // size: 0x70
    register struct MonsterStruct *pmonster;
    // register: 3
    register int _mx;
    // register: 5
    register int _my;
}

And the associated type information: https://github.com/diasurgical/scalpel/blob/2c32984ffe66eb34da22023d4ad2975a8abebeaa/psx/_dump_/3/_dump_c_src_/types.h#L3313

// size: 0x70
struct MonsterStruct {
    // offset: 0000
    int mtalkmsg;
    // offset: 0004
    int _mRndSeed;
    // offset: 0008
    int _mAISeed;
    // offset: 000C
    int _mgoalvar1;
    // offset: 0010
    int _mgoalvar2;
    // offset: 0014
    int _mgoalvar3;
    // offset: 0018
    short _mVar1;
    // offset: 001A
    short _mVar2;
    // offset: 001C
    short _mVar3;
    // offset: 001E
    short _mVar4;
    // offset: 0020
    short _mVar5;
    // offset: 0022
    short _mVar6;
    // offset: 0024
    short _mVar7;
    // offset: 0026
    short _mVar8;
    // offset: 0028
    short _mmaxhp;
    // offset: 002A
    short _mhitpoints;
    // offset: 002C
    short _mxvel;
    // offset: 002E
    short _myvel;
    // offset: 0030
    unsigned short _mFlags;
    // offset: 0032
    unsigned short mExp;
    // offset: 0034
    unsigned short mMagicRes;
    // offset: 0036
    char _mMTidx;
    // offset: 0037
    char _mmode;
    // offset: 0038
    char _mx;
    // offset: 0039
    char _my;
    // offset: 003A
    char _mfutx;
    // offset: 003B
    char _mfuty;
    // offset: 003C
    char _moldx;
    // offset: 003D
    char _moldy;
    // offset: 003E
    char _mxoff;
    // offset: 003F
    char _myoff;
    // offset: 0040
    char _mdir;
    // offset: 0041
    char _menemy;
    // offset: 0042
    char _mAnimDelay;
    // offset: 0043
    char _mAnimCnt;
    // offset: 0044
    char _mAnimLen;
    // offset: 0045
    char _mAnimFrame;
    // offset: 0046
    char _mAFNum;
    // offset: 0047
    char _lastx;
    // offset: 0048
    char _lasty;
    // offset: 0049
    char _udeadval;
    // offset: 004A
    char mWhoHit;
    // offset: 004B
    char mLevel;
    // offset: 004C
    char mArmorClass;
    // offset: 004D
    unsigned char _mgoal;
    // offset: 004E
    unsigned char _pathcount;
    // offset: 004F
    unsigned char _menemyx;
    // offset: 0050
    unsigned char _menemyy;
    // offset: 0051
    unsigned char _meflag;
    // offset: 0052
    unsigned char _mAi;
    // offset: 0053
    unsigned char _mint;
    // offset: 0054
    unsigned char _msquelch;
    // offset: 0055
    unsigned char _uniqtype;
    // offset: 0056
    unsigned char _uniqtrans;
    // offset: 0057
    unsigned char mHit;
    // offset: 0058
    unsigned char mMinDamage;
    // offset: 0059
    unsigned char mMaxDamage;
    // offset: 005A
    unsigned char mHit2;
    // offset: 005B
    unsigned char mMinDamage2;
    // offset: 005C
    unsigned char mMaxDamage2;
    // offset: 005D
    unsigned char leader;
    // offset: 005E
    unsigned char leaderflag;
    // offset: 005F
    unsigned char packsize;
    // offset: 0060
    unsigned char mlid;
    // offset: 0061
    char Action;
    // offset: 0062
    char _Wandering;
    // offset: 0063
    char _mDelFlag;
    // offset: 0064
    int mName;
    // offset: 0068 (28 bytes)
    struct CMonster *MType;
    // offset: 006C (60 bytes)
    struct MonsterData *MData;
};
AJenbo commented 5 years ago

The reason we are interested in the earlier psx symbol files is that the port diverged from the pc version (probably around 1.04) and does not appear to have kept up with later updates.

KeplerIO commented 5 years ago

I see, thank you both for nice info! I love passion projects such as these.. Was thinking that since this is not the original actual code structure, we could rebuild original layout using these file. Maybe in time. I like the work you guys do on this. Can probably close this issue :)