Coder Social home page Coder Social logo

theonlyzac / sly1 Goto Github PK

View Code? Open in Web Editor NEW
85.0 10.0 11.0 26.08 MB

Decompilation of Sly Cooper and the Thievius Raccoonus for the PS2

Home Page: https://theonlyzac.github.io/sly1

C++ 12.72% C 80.04% Batchfile 0.86% Makefile 1.43% Shell 1.80% Python 3.15%
ps2 playstation-2 reverse-engineering decompilation sly-cooper decomp mips emotion-engine cpp

sly1's Introduction

Hi, I'm Zac. ๐Ÿ‘‹๐Ÿป

I'm a freelance web developer and software engineer. I make websites, games, tools, and more. If you need a website, or if you have any questions about my projects, feel free to contact me! My portfolio: https://zac.boston


Banner image with the Zacbox logo and text "Zacbox; websites by Zac".

Check out my web apps at zacbox.app.


sly1's People

Contributors

felinis avatar lordbozo avatar mc-muffin avatar modeco80 avatar theclub654 avatar theonlyzac avatar yotona avatar zzamizz 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sly1's Issues

Show decomp progress % in readme/website

  • Configure calculating the total number of bytes and functions matched
  • Set up continuous integration with frogress
  • Add progress badge to readme
  • Add graph of progress vs time to website

The names Cheats and Savegame are probably inaccurate

Since these functions aren't in the proto debug symbols I made up a name for their files, but I think cheat code stuff is mostly handled by joy.c, and it's probably possible to piece together the proper home for the savedata-related functions.

Match P2/chkpnt.c

  • ResetChkmgrCheckpoints
  • SaveChkmgrCheckpoint
  • ReturnChkmgrToCheckpoint
  • RestoreChkmgrFromCheckpoint
  • IchkAllocChkmgr
  • FGetChkmgrIchk
  • SetChkmgrIchk
  • ClearChkmgrIchk
  • LoadVolFromBrx
  • FCheckVolPoint
  • InitChkpnt
  • LoadChkpntFromBrx
  • BindChkpnt
  • PostChkpntLoad
  • CloneChkpnt
  • UpdateChkpnt
  • FUN_001417f0
  • TriggerChkpnt

Add contributing.md

By the time function matching is set up we should have a file CONTRIBUTING.md to help people get involved with the project. It should include sections for:

  • Forking the repo
  • Finding functions to decompile
  • Using the function matching script
  • The style guide
  • Making a pull request

Switch compiler to ee-gcc

To eventually produce a matching decomp we need to switch the compiler to the ee-gcc (archived here). That means reformatting the code to follow to the older C++ standard.

Tasks

  • Refactor code as C++98
  • Add/update Makefiles
  • Write instructions for using the new compiler

Match P2/difficulty.c

  • FUN_001519e0
  • OnDifficultyGameLoad
  • OnDifficultyWorldPreLoad
  • OnDifficultyWorldPostLoad
  • OnDifficultyInitialTeleport
  • OnDifficultyPlayerDeath
  • OnDifficultyTriggerCheckpoint
  • OnDifficultyCollectKey
  • OnDifficultyBreak
  • ChangeSuck

Unnamed split at 0xec518

Not sure what to call the text split at 0xec518. It would fit alphabetically between P2/util and P2/vec.

Match P2/game.c

Most of the function names need work.

  • StartupGame
  • func_00160090
  • search_level_by_load_data
  • search_level_by_id
  • PchzFriendlyFromWid
  • func_00160178
  • call_search_level_by_id
  • FFindLevel
  • func_001601D0
  • get_level_completion_by_id
  • tally_world_completion
  • check_game_completion
  • UnlockIntroCutsceneFromWid
  • DefeatBossFromWid
  • UnlockEndgameCutscenesFromFgs
  • PlayEndingFromCompletionFlags
  • InitGameState
  • FUN_00160650
  • SetupGame
  • UpdateGameState
  • LsFromWid
  • GrflsFromWid
  • UnloadGame
  • RetryGame
  • StartGame
  • FUN_00160948
  • calculate_percent_completion
  • SetCcharm
  • FCharmAvailable
  • func_00160C90
  • PfLookupDialog
  • clr_8_bytes_1
  • FUN_00160ce8
  • OnGameAlarmTriggered
  • OnGameAlarmDisabled
  • grfvault_something
  • GetBlueprintInfo
  • CcharmMost
  • reload_post_death

Typo in README.md

The first mention of contributing to the project in the README.md file links to "/CONTRIBUTING.MD", which doesn't exist.
Line 38 should be modified from [CONTRIBUTING.md](/CONTRIBUTING.MD) to [CONTRIBUTING.md](/CONTRIBUTING.md) (the extension ".md" should be lowercase), like at line 139.

Pass function args by reference instead of ptr

&g_difficulty is a ptr. change function signature to void ... (Difficulty& difficulty)

An L-value reference is a ptr that the compiler has guaranteed is a valid object before it's passed into the function. therefore it's a ptr in binary but in the code it's a reference. Also, as mentioned in the discord, it's a possibility that all these functions are member functions of the difficulty structure if a reversed calling convention is assumed (i have no idea what calling convention this binary uses).

Originally posted by @detolly in #3 (comment)

Unnamed split at 0xd41d0

The text split at 0xd41d0 is probably P2/steprail. It fits alphabetically, and it wouldn't be in the May proto because it doesn't have any rails.

Simplify project structure

Regarding code structure, the additional directories seem pointless.

I would probably put everything under src/, no reason to do Cheats/cheats.cpp and Cheats/cheats.h etc if all dirs are just gonna have a same named source & header file.

Never thought I'd say this but flat is just better in this case.

Originally posted by @VelocityRa in #3 (review)

Match P2/binoc.c

First step will be identifying and naming all of the default-named FUN_ functions.

  • InitBei
  • GEvaluateBei
  • FUN_001310f0
  • FUN_00131140
  • FUN_00131198
  • DrawBinocCompass
  • DrawBinocZoom
  • DrawBinocReticle
  • DrawBinocOutline
  • FUN_00134aa0
  • FUN_00134b48
  • DrawBinocFilter
  • FUN_00135550
  • open_close_binoc
  • FUN_001357f0
  • FUN_00135858
  • FUN_001358d0
  • SetBinocBfk
  • FUN_00135f48
  • FUN_00136040
  • FUN_00136238
  • FUN_001363d0
  • SetBinocAchzDraw
  • FDoneBinocAchz
  • SetBinocLookat
  • SetBinocZoom
  • FUN_001365f0
  • FUN_00136648
  • DrawBinoc
  • GetBinocReticleFocus
  • FUN_00136ef8
  • FUN_00136fa8
  • __static_initialization_and_destruction_0
  • CTextBox::SetPos
  • CTextBox::SetSize
  • CTextBox::SetTextColor
  • CTextBox::SetHorizontalJust
  • CTextBox::SetVerticalJust

Rendering functions

Rendering functions are known to be in the following files

  • screen.c
  • render.c
  • binoc.c

Match P2/chkpnt.c

  • ResetChkmgrCheckpoints
  • SaveChkmgrCheckpoint
  • ReturnChkmgrToCheckpoint
  • RestoreChkmgrFromCheckpoint
  • IchkAllocChkmgr
  • FGetChkmgrIchk
  • SetChkmgrIchk
  • ClearChkmgrIchk
  • LoadVolFromBrx
  • FCheckVolPoint
  • InitChkpnt
  • LoadChkpntFromBrx
  • BindChkpnt
  • PostChkpntLoad
  • CloneChkpnt
  • UpdateChkpnt
  • FUN_001417f0
  • TriggerChkpnt

Match P2/joy.c

  • StartupJoy
  • AddGrfusr
  • RemoveGrfusr
  • UpdateGrfjoytFromGrfusr
  • InitJoy
  • UpdateJoy
  • SetJoyJoys
  • GetJoyXYDeflection
  • FReadJoy
  • SetJoyBtnHandled
  • rumble_related
  • StartJoySelection
  • DxSelectionJoy
  • DySelectionJoy
  • UBtnpJoy
  • AddCode
  • _ResetCodes
  • _MatchCodes
  • UpdateCodes
  • remove_all_fchts
  • AddFcht
  • Chetkido
  • StartupCodes

Match P2/clock.c

  • SetClockRate
  • MarkClockTick
  • MarkClockTickRealOnly
  • ResetClock
  • SetClockEnabled
  • StartupClock
  • TickNow

Match P2/util.c

P2/util.c contains utility functions.

  • RadNormalize
  • GLimitAbs
  • GSmooth
  • GSmoothA
  • RadSmooth
  • RadSmoothA
  • PosSmooth
  • SmoothMatrix
  • NRandInRange
  • GRandInRange
  • GRandGaussian
  • FFloatsNear
  • CSolveQuadratic
  • PrescaleClq
  • CalculateSinCos
  • GTrunc
  • GTrunc1
  • GModPositive
  • FitClq
  • FCheckLm
  • FCheckAlm
  • GLimitLm
  • SgnCompareG
  • Force
  • MinimizeRange

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.