Skip to content

Instantly share code, notes, and snippets.

Croc series modding notes

Notes:

  • Not all of this information may be accurate. Consider my past RE work before completely trusting this.
  • I am using the European PC release for Croc 2 and Croc DE 1.3.0 for Croc 1 as well as the EU demo of Croc 1 with debug symbols.

Fixed point format

There seem to be three kinds of fixed point numbers used in Croc games: 16x16, 20x12 and 4x12.

@knot126
knot126 / loadCroc2Symbols.py
Last active October 2, 2021 03:48
Load Croc 2 symbols into ghidra (after lite tweaking to file)
#Loads and assocaites symbols in a "Addr Name\n" format
#@author Knot126
#@category Data
#@keybinding
#@menupath
#@toolbar
# Shortcut for current programe
cp = currentProgram
SRC_DEFAULT = ghidra.program.model.symbol.SourceType.DEFAULT

VideoGameSpot's Designer Diaries: Croc

Taken from the Internet Archive

Introducing Croc, an all new character in an original 3-D, free roaming adventure game with graphics and animation that should be seen to be believed. Developed by Argonaut Software for Fox Interactive, Croc will be available this fall for the Sony PlayStation, Sega Saturn, and PC CD-ROM. To give VGS users a chance to learn about the evolution of Croc, game designer Nic Cusworth will be providing a diary on the progression of the game and its development.

For even more info on Croc, check out http://www.foxinteractive.com.

1997-07-18

@knot126
knot126 / BakeMesh_01.py
Last active April 26, 2023 08:02
New bake mesh backups
#!/usr/bin/python3
"""
Dataverktyg för konvertera Smash Hit segment till meshfil
"""
import struct
import zlib
import sys
import xml.etree.ElementTree as et
import random # temporary
@knot126
knot126 / uniformpoints.cpp
Created February 27, 2022 18:21
Tuxedolabs uniformpoints.cpp
/*
Uniform point distribution on sphere or hemisphere
Copyright (C) 2013 Dennis Gustafsson, http://www.tuxedolabs.com
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
@knot126
knot126 / teardown_shaders.glsl
Last active July 10, 2022 18:33
Teardown shaders
// Copyright (C) 2018(?) - 2022 Tuxedolabs AB
// Note: The shaders are grouped into one string so this doesn't work by itself.
// Original string starts after this line
#define SAMPLES 2
#define DIST 24.0
uniform sampler2D uNormal;
uniform vec4 uConstantColor;
uniform vec4 uAmbientColorAvg;
@knot126
knot126 / Argonaut games source code analysis.md
Last active April 26, 2023 08:01
Argonaut games source code analysis

Argonaut games source code analysis

This is some analysis of a snapshot of a source code repo for Aladdin, released by Argonaut games in 2001.

It seems to contain a lot of tools, as well as two game engines: an early version of Croc 2's source for the PC and Aladdin's source code, which is based on Croc 2's source.

To repsect the privacy of the original developers, names within the source code have been replaced with JEZSANDONTSUEME.

The codebases

@knot126
knot126 / decrypt_save.py
Created November 19, 2022 21:43
Smash hit save decrypt (encrypt does not work yet)
"""
Smash Hit save decryptor
The encryption is pretty cheap, it's essentially this:
Ciphertext[n] = Plaintext[n] + (Key[n % KeyLength] + (DataLength & 0xff))
Plaintext[n] = Ciphertext[n] - (Key[n % KeyLength] + (DataLength & 0xff))
It is essentially just a Vigenère cipher with a bit of extra stuff to make the
keystream less obvious.
@knot126
knot126 / Smash Hit Patches.md
Last active April 26, 2023 08:00
Smash Hit Patches

Smash Hit Patches

Android arm64 1.4.2

Remove anti-tamper

0x47130  20 00 00 39  ->  1f 20 03 d5
0x474b8  c0 c7 ff 35  ->  3e fe ff 17
0x47464  45 07 00 54  ->  3a 00 00 14
@knot126
knot126 / Fire 7 (2015, ford) Linux.md
Last active November 21, 2022 19:59
Fire 7 (2015, ford) Linux

Fire 7 (2015, ford) Linux

See here: https://forum.xda-developers.com/t/postmarketos-for-amazon-fire-7-hd-2017-austin.4315717/

pmbootstrap will normally try to install to the system partition, which is too small, so we need to install to user data partition using pmbootstrap flash and specifying the partition as userdata (or fastboot if you've just got raw images)

EDIT: PMOS really seems quite broken for me, I'm now using this: https://github.com/hexdump0815/imagebuilder/releases/tag/211101-01

Use the bullseye release, the touchscreen doesn't crash. You can use wifi on those too.