Skip to content

Instantly share code, notes, and snippets.

View himanshugoel2797's full-sized avatar
🙃
Focusing

Himanshu Goel himanshugoel2797

🙃
Focusing
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
typedef struct {
void(*error)();
void(*openTag)(char*, int);
void(*closeTag)(char*, int);
void(*contentHit)(char*, int);
void(*attributeHit)(char*, int, char*, int);
} _eventHandlers;
@himanshugoel2797
himanshugoel2797 / psvNID_NoDup.xml
Last active August 29, 2015 14:23
PSV-NIDS No Duplicates
<?xml version="1.0" encoding="utf-8"?>
<Libraries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Library Name="SceUlt">
<Modules>
<Module Name="SceUlt">
<Import Count="16">
<NID Type="Function">2010250</NID>
<NID Type="Function">751891836</NID>
<NID Type="Function">1318745180</NID>
<NID Type="Function">1396838098</NID>
@himanshugoel2797
himanshugoel2797 / psvNID_Dup.xml
Created June 22, 2015 05:11
PSV-NIDS Duplicates
<?xml version="1.0" encoding="utf-8"?>
<Modules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Module Name="SceUlt">
<ImportCount>16</ImportCount>
<Imports>
<NID Type="Function">2010250</NID>
<NID Type="Function">751891836</NID>
<NID Type="Function">1318745180</NID>
<NID Type="Function">1396838098</NID>
<NID Type="Function">1412810118</NID>
@himanshugoel2797
himanshugoel2797 / Notes.txt
Created October 19, 2015 03:32
The minimum work to compile GCC 4.7.0 to target ApertureOS
Compile libtool and autotools from scratch, don't rely on the package provided by the OS
Configure cmd: ../gcc-4.7.0/configure CFLAGS='-std=c89 -g -O2' --target=i686-elf-apertureos --prefix="/opt/apertureos" --disable-nls --enable-language=c --with-sysroot=$(pwd)/../sysroot --with-native-system-header-dir=/include MAKEINFO=missing --with-newlib --disable-multilib CC=clang CXX=clang++
make all-gcc
make all-host
make DESTDIR=$(pwd)/../sysroot install-host
autoconf version 2.64
automake 1.12
typedef volatile struct strtss {
uint32_t rsv0;
uint64_t rsp0;
uint64_t rsp1;
uint64_t rsp2;
uint64_t rsv1;
uint64_t ist1;
uint64_t ist2;
uint64_t ist3;
@himanshugoel2797
himanshugoel2797 / notes.txt
Last active September 20, 2016 18:23
Notes on Cardinal
Terminal I/O streams are also just files, however, stdout needs to be line buffered, this is done automatically by musl,
however musl detects terminals using an ioctl, Cardinal doesn't have ioctls and uses normal files for them, so the ioctl
needs to be emulated. The ioctl related information will be channeled through a character device, but how would this device
be found? For something to be associated to a terminal, after a fork, the terminal would have to setup some properties, thus
one option would be to have the terminal itself open a file descriptor to the terminal interface.
@himanshugoel2797
himanshugoel2797 / nep_nep.c
Last active November 15, 2016 02:17
Nepupu!
/*
E20: Vita: 02, PC: 01
E24: Vita: 0B, PC: 0E
E28: Vita: 61, PC: EF
E29: Vita: 03, PC: 00
E2C: Vita: 1C, PC: 00
E2D: Vita: 02, PC: 00
1434: Vita: F1, PC: 11
1435: Vita: 8A, PC: BB
//Fork, setup shared buffer, signals to notify of buffer activity. When everything is finished, main process outputs table, child exits.
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/ipc.h>
hgoel> to continue, my previous thought: still pretty doubtful, there isn't really any incentive to merge the two
4:40 PM design wise, it's IMO far more convenient to keep them separate
4:40 PM B<bcos_> Based on recent experiments; I'm "relatively convinced" I can do extremely high quality software rendering on modern 8-core CPUs
4:41 PM ..which means, if CPU performance doubled we'd have enough CPU to not bother with GPU at all
4:42 PM H<hgoel> would that include stuff like in modern games?
4:42 PM B<bcos_> Depends what stuff
4:42 PM H<hgoel> mostly lighting equations
4:42 PM plus, if CPU math speeds double, then most likely said doubling can be applied to GPUs and we're back at the same spot
4:43 PM B<bcos_> I was doing full lighting/shadow, focal blur and "infinite supersampling"
4:43 PM ..but no reflections
#!/usr/bin/env python3
import os.path
import struct
from idautils import *
from idc import *
INFO_SIZE = 0x5c
NAME_OFF = 4