GithubHelp home page GithubHelp logo

zestydevy / dinosaur-planet Goto Github PK

View Code? Open in Web Editor NEW
153.0 153.0 22.0 5.4 MB

A WIP decompilation of Dinosaur Planet for the Nintendo 64

Python 10.02% C 82.16% C++ 7.68% Dockerfile 0.06% Assembly 0.09%

dinosaur-planet's People

Contributors

akira13641 avatar beholdnec avatar blackgamma7 avatar crashoveride95 avatar ethteck avatar farisawan-2000 avatar farisawan2000 avatar foxlet avatar francessco121 avatar hugopeters avatar infrid avatar mkst avatar mrquetch avatar nerostie avatar renakunisaki avatar stockimage avatar sunlitspace542 avatar wedarobi avatar zestydevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dinosaur-planet's Issues

TActor is missing 13 bytes worth of data between `linkedActor` and `positionMirror2`

With the struct defined as it is currently, my memory dumping script (which matches the C header exactly) prints output that looks like the following, for example:

"TActor_0": {
  "name": "Krystal",
  "address": "0x806ED020",
  "fields": {
    "rotation": [-25166, 0, 0],
    "unk0x6": 2,
    "scale": 0.0494999997317791,
    "position": [2108.28564453125, -41.19002151489258, 16808.6328125],
    "positionMirror": [2108.28564453125, -41.19002151489258, 16808.6328125],
    "speed": [0, 0, 0],
    "ptr0x30": "0x00000000",
    "unk0x34": 65535,
    "linkedActor": "0x800EC398",
    "unk0x3c": [68, 255, 0],
    "unk0x44": 68,
    "unk0x46": 18432,
    "ptr0x48": "0x00000100",
    "unk0x4c": 520094208,
    "ptr0x50": "0x00000000",
    "ptr0x54": "0x00803981",
    "unk0x58": 3900731102,
    "ptr0x5c": "0x7C000000",
    "ptr0x60": "0x00806286",
    "ptr0x64": "0x08806ED9",
    "ptr0x68": "0xD8806EDE",
    "ptr0x6c": "0x38802529",
    "ptr0x70": "0xD0806EDF",
    "unk0x74": 545287903,
    "positionMirror2": [-2199023255552, 0, 1.1794696944357306e-38],
    "positionMirror3": [2.3158967801400164e-36, -1.2252182749418445e-27, -4.008937194294739e-26],

however, since positionMirror2 and positionMirror3 are actually always the same as position and positionMirror when the game is running, clearly that's not correct output. Looking into it in the debugger, I realized that the actual amount of space between linkedActor and positionMirror2 in practice is 68 bytes (or 44 if using hex format values, as shown in the image I've attached) whereas the C header definition currently only adds up to 55 bytes across the following section:

u8 unk0x3c[3];
UNK_TYPE_16 unk0x44;
UNK_TYPE_16 unk0x46;
void* ptr0x48;
UNK_TYPE_32 unk0x4c;
void* ptr0x50;
void* ptr0x54;
UNK_TYPE_32 unk0x58;
void* ptr0x5c;
void* ptr0x60;
void* ptr0x64;
void* ptr0x68;
void* ptr0x6c;
void* ptr0x70;
UNK_TYPE_32 unk0x74;

After adjusting my script to reflect what I was actually seeing in memory, it then produced output that looks like this, which has the correct values for positionMirror2 and positionMirror3, as well as what look to me like more meaningful values for the surrounding fields:

"TActor_0": {
  "name": "Krystal",
  "address": "0x806ED020",
  "fields": {
    "rotation": [-25166, 0, 0],
    "unk0x6": 2,
    "scale": 0.0494999997317791,
    "position": [2108.28564453125, -41.19002151489258, 16808.6328125],
    "positionMirror": [2108.28564453125, -41.19002151489258, 16808.6328125],
    "speed": [0, 0, 0],
    "ptr0x30": "0x00000000",
    "unk0x34": 65535,
    "linkedActor": "0x800EC398",
    "unk0x3c": 17663,
    "unk0x3e": 0,
    "unk0x40": 17480,
    "unk0x42": 0,
    "unk0x44": 65567,
    "unk0x48": 131072,
    "ptr0x4c": "0x00000000",
    "ptr0x50": "0x803981E8",
    "ptr0x54": "0x806EDE7C",
    "ptr0x58": "0x00000000",
    "ptr0x5c": "0x80628608",
    "ptr0x60": "0x806ED9D8",
    "ptr0x64": "0x806EDE38",
    "ptr0x68": "0x802529D0",
    "ptr0x6c": "0x806EDF20",
    "ptr0x70": "0x806EDFD4",
    "ptr0x74": "0x00000000",
    "ptr0x78": "0x00000000",
    "ptr0x7c": "0x806ED104",
    "positionMirror2": [2108.28564453125, -41.19002151489258, 16808.6328125],
    "positionMirror3": [2108.28564453125, -41.19002151489258, 16808.6328125],

If you want, I can make a PR that updates the C header definition with the same adjustments I did for my script. Figured I'd open an issue for it first though as there was a fair amount of background info that needed explaining.

DebugView

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.