Skip to content

Instantly share code, notes, and snippets.

@CuriousTommy
CuriousTommy / darling_objc_research.mm
Created March 14, 2024 06:08
Darling Dyld ObjC Initalization Research (arm64)
#include <objc/objc-private.h>
#include <objc/objc-file.h>
#include <objc/objc.h>
extern void __simple_printf(const char* format, ...) __attribute__((format(printf, 1, 2)));
extern bool bad_magic(const headerType *mhdr);
const char* checkForObjC2() {
#if __OBJC2__
| "OS Build Version" = "21G217"
+-o J316sAP <class IOPlatformExpertDevice, id 0x10000024d, registered, matched, active, busy 0 (114534 ms), retain 37>
| | | | "perf-states-sram" = <0000000016030000009e2c171603000080c5f71c1603000000b29f2616030000003c592e16030000008bef391603000000643f4d870300000000000016030000009e2c171603000080c5f71c1603000000b29f2616030000003c592e16030000008bef391603000000643f4d7a030000>
| | | | "perf-states-sram1" = <0000000016030000009e2c171603000080c5f71c1603000000b29f2616030000003c592e16030000008bef391603000000643f4d7a030000>
| | | | "perf-states1" = <0000000090010000009e2c176a02000080c5f71c7d02000000b29f2696020000003c592ec8020000008bef390703000000643f4d7a030000>
| | | | "perf-states" = <0000000090010000009e2c177702000080c5f71c8302000000b29f2696020000003c592ec8020000008bef390d03000000643f4d870300000000000090010000009e2c176a02000080c5f71c7d02000000b29f2696020000003c592ec8020000008bef390703000000643f4d7a030000>
| | | | "gfx-shared-region-base" =
Computer Information:
Manufacturer: ASRock
Model: B550 Phantom Gaming-ITX/ax
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 9 3900X 12-Core Processor
CPU Family: 0x17
// http://www.newty.de/fpt/fpt.html#defi
#include <iostream>
using namespace std;
class testClass
{
private: // Variables
int a;
int b;
@CuriousTommy
CuriousTommy / Movie.cpp
Created February 17, 2017 16:53
program_6 issue
#include <string>
#include "Movie.h"
using namespace std;
Movie::Movie()
{
title = "N/A";
rating = 0.0;
profit = 0.0;
@CuriousTommy
CuriousTommy / 3ds_main_sillyprogram.cpp
Last active December 18, 2016 01:26
I am trying to use the sleep_for function from the example here (http://stackoverflow.com/a/9747668), but when I try to use it, I always keep getting errors
#include <3ds.h>
#include <stdio.h>
#include <chrono>
#include <thread>
#include <iostream>
using namespace std;
using namespace std::this_thread; // sleep_for, sleep_until
using namespace std::chrono_literals; // ns, us, ms, s, h, etc.
using std::chrono::system_clock;