Skip to content

Instantly share code, notes, and snippets.

View Dillonb's full-sized avatar
👺
0x07

Dillon Beliveau Dillonb

👺
0x07
  • Seattle
  • 22:18 (UTC -07:00)
View GitHub Profile
set(LIBDRAGON "/opt/libdragon")
set(LIBDRAGON_LIBS "-ldragon -lc -lm -ldragonsys") # order matters
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_PROCESSOR mips)
SET(CMAKE_C_COMPILER ${LIBDRAGON}/bin/mips64-elf-gcc)
SET(CMAKE_CXX_COMPILER ${LIBDRAGON}/bin/mips64-elf-g++)
set(CMAKE_LINKER ${LIBDRAGON}/bin/mips64-elf-ld)
set(CMAKE_AR ${LIBDRAGON}/bin/mips64-elf-ar)
/*parse_log - 0.0.1: auto generate C/C++ array from nestest.log data*/
#ifndef NESTEST_LOG_H
#define NESTEST_LOG_H
static const unsigned char ARR_OPCODE[] = {
0x4C,0xA2,0x86,0x86,0x86,0x20,0xEA,0x38,0xB0,0xEA,0x18,0xB0,0x4C,0xEA,0x38,0x90,
0x4C,0xEA,0x18,0x90,0xEA,0xA9,0xF0,0xEA,0xA9,0xF0,0x4C,0xEA,0xA9,0xD0,0xEA,0xA9,
0xD0,0x4C,0xEA,0xA9,0x85,0x24,0x70,0xEA,0x24,0x50,0x4C,0xEA,0xA9,0x85,0x24,0x50,
0xEA,0x24,0x70,0x4C,0xEA,0xA9,0x10,0xEA,0xA9,0x10,0x4C,0xEA,0x60,0x20,0xEA,0xA9,
@baiwfg2
baiwfg2 / CMakeLists.txt
Created September 29, 2018 12:42
How to use add_custom_target and add_custom_command correctly in cmake
# References:
# https://cmake.org/cmake/help/latest/command/add_custom_target.html
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
# https://gist.github.com/socantre/7ee63133a0a3a08f3990
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777
cmake_minimum_required(VERSION 3.10)
@zchee
zchee / actionlist.vim
Last active August 31, 2026 13:44
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@parasyte
parasyte / n64_tlb.txt
Created September 13, 2013 05:25
N64 TLB
FORMATS
EntryLo0 & EntryLo1:
00 pppppppppppppppppppppppp ccc d v g
(32-bit: 2.24.3.1.1.1)
p = Page frame number; the upper bits of the physical address.
c = Specifies the TLB page coherency attribute. (See below)
d = Dirty. If this bit is set, the page is marked as dirty and, therefore, writable
This bit is actually a write-protect bit that software can use to prevent alteration