Skip to content

Instantly share code, notes, and snippets.

View Subv's full-sized avatar

Sebastian Valle Subv

  • Barranquilla, Colombia
View GitHub Profile
@Subv
Subv / .diff
Created September 23, 2017 14:28
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index a7b6614..25e50a6 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -158,8 +158,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
if (result.Failed()) {
LOG_ERROR(
Kernel,
- "cannot map id=%u, target_address=0x%08X name=%s, error mapping to virtual memory",
- GetObjectId(), target_address, name.c_str());
from z3 import *
def OldMultiply(x, y):
firstNotNan = And(x == 0.0, Not(fpIsNaN(y)))
secondNotNan = And(y == 0.0, Not(fpIsNaN(x)))
shouldZero = Or(firstNotNan, secondNotNan)
return simplify(If(shouldZero, +0.0, fpMul(RNE(), x, y)))
def NewMultiply(x, y):
result = fpMul(RNE(), x, y)
@Subv
Subv / 0-before.asm
Last active September 17, 2017 15:55
00007FF6111545FC movsd xmm6,mmword ptr [__xmm@7fffffffffffffff7fffffffffffffff (07FF611282150h)]
00007FF611154604 movss xmm7,dword ptr [__real@3f800000 (07FF61125FEC8h)]
00007FF61115460C mov r15,qword ptr [rsp+70h]
00007FF611154611 mov r13,qword ptr [rsp+78h]
00007FF611154616 nop word ptr [rax+rax]
LOOP:
00007FF611154620 movsxd rbx,r14d
00007FF611154623 movaps xmm1,xmm7
00007FF611154626 movss xmm0,dword ptr [rbp+rbx*4+20h]
00007FF61115462C cvtps2pd xmm0,xmm0
setup:
addi $t0, $zero, 1
addi $t1, $zero, 2
addi $t3, $zero, 3
addi $t4, $zero, 4
addi $t5, $zero, 5
addi $t6, $zero, 61
addi $t7, $zero, -10
loop1:
add $t0, $t0, $t5
@Subv
Subv / 00_left_cheek.txt
Created September 6, 2017 14:24
Pokemon black cheeks command buffer citra 2017 September 6
GPUREG_VTX_FUNC 231 1111 00000001
GPUREG_PRIMITIVE_CONFIG 25e 1000 00000306
GPUREG_PRIMITIVE_CONFIG 25e 1000 00000306
000 0000 00000000
GPUREG_CMDBUF_JUMP1 23d 1111 00000001
000 0000 00000000
GPUREG_CMDBUF_SIZE0 238 1111 0000000e
GPUREG_CMDBUF_SIZE1 239 1111 00000018
GPUREG_CMDBUF_ADDR0 23a 1111 0410fb80
GPUREG_CMDBUF_ADDR1 23b 1111 0449c3a6
Quest const* quest = sObjectMgr->GetQuestTemplate(packet.QuestID)
if (!quest)
return;
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, packet.QuestGiverGUID, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object)
return;
if ((quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE) && !object->GetTypeId() != TYPEID_PLAYER) && !object->hasInvolvedQuest(packet.QuestID))
@Subv
Subv / Makefile
Created June 29, 2017 03:33
3DS portlibs makefile Lua 5.2.4
BZIP2 := bzip2
BZIP2_VERSION := $(BZIP2)-1.0.6
BZIP2_SRC := $(BZIP2_VERSION).tar.gz
BZIP2_DOWNLOAD := "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
FREETYPE := freetype
FREETYPE_VERSION := $(FREETYPE)-2.6.2
FREETYPE_SRC := $(FREETYPE_VERSION).tar.bz2
FREETYPE_DOWNLOAD := http://download.savannah.gnu.org/releases/freetype/freetype-2.6.2.tar.bz2
/*
* 802.11 to Ethernet pcap translator
*
* Copyright (C) 2006-2017 Thomas d'Otreppe <[email protected]>
* Copyright (C) 2004, 2005 Christophe Devine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
#include <3ds.h>
#include <stdio.h>
#include <string.h>
#define STACKSIZE (4 * 1024)
#define HELLO_COMMAND_ID 0x1
#define SHUTDOWN_COMMAND_ID 0x2
Handle server_port;
Thread handler_thread;
float LookupLightingLut(size_t lut_index, u8 index, float delta) {
ASSERT_MSG(lut_index < g_state.lighting.luts.size(), "Out of range lut");
ASSERT_MSG(index < g_state.lighting.luts[0].size(), "Out of range index");
float lut_value = g_state.lighting.luts[lut_index][index].ToFloat();
float lut_diff = g_state.lighting.luts[lut_index][index].DiffToFloat();
float lut_value_2 = g_state.lighting.luts[lut_index][index+1].ToFloat();
float lut_diff2 = lut_value_2 - lut_value;