Skip to content

Instantly share code, notes, and snippets.

View knight-ryu12's full-sized avatar
🔧
making questionable quality softwares.

Chromaryu knight-ryu12

🔧
making questionable quality softwares.
  • Japan
View GitHub Profile
# CARR $3F -> $2B
# MULT CARR $00
# MULT MODL $00
# KSLV CARR $00
# KSLV MODL $94
# ATDE CARR $F0
# ATDE MODL $F0
# SURE CARR $03
# SURE MODL $03
# WVFM CARR $02

OPL3 Register Map

This register map covers OPL3 specifically, and several OPL2 and OPL3 reference, and VGM.

VGM Reference

VGM version should be above 1.51.

OPL3 IC is YMF262. clocked at 14318180Hz. Command is 0x5Eaadd

OPL2 IC is YM3812. clocked at 3579545Hz. Command is 0x5Aaadd

;英語メッセージ定義
;I 通常のメッセージ
;E エラーメッセージ
;English Message Definition Table
;I Info
;E Error
;NOTE: PLEASE SOMEBODY PROOFREAD THIS. CAN YOU?
;English Translation By Chromaryu(knight-ryu12)
Result FSHelp_FormatExtdata(uint64_t id, FS_MediaType media, uint32_t directories, uint32_t files, uint64_t sizeLimit, uint32_t smdhSize, uint8_t* smdh) {
FS_ExtSaveDataInfo esdi;
memset(&esdi, 0, sizeof(esdi));
esdi.saveId = id;
esdi.mediaType = media;
if ((!smdhSize || !smdh) && !GetSMDH()) {
// special case just for citra with a 3dsx
Result res = FSUSER_CreateExtSaveData(esdi, directories, files, sizeLimit, 0, NULL);
if (R_SUCCEEDED(res))
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <iconv.h>
#define _3DSX_MAGIC 0x58534433 // '3DSX'
#define _SMDH_MAGIC 0x48444d53 // 'SMDH'
#define _IVFC_MAGIC 0x43465649 // 'IVFC'
else if (!strncmp(opt,"-use-the-force-luke",19))
{ char *s=strchr (opt,'='),*o;
if (s == NULL) /* backward compatibility */
no_tty_check = 1;
else
{ s++;
if (strstr(s,"tty")) no_tty_check = 1;
if (strstr(s,"dummy")) test_write = 1;
if (strstr(s,"notray")) no_reload = 1;
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define _3DSX_MAGIC 0x58534433 // '3DSX'
#define _SMDH_MAGIC 0x48444d53 // 'SMDH'
#define _IVFC_MAGIC 0x43465649 // 'IVFC'
typedef struct
{
@knight-ryu12
knight-ryu12 / PKGBUILD
Last active June 30, 2019 23:55
for 3ds-libxmp
# Maintainer: Chromaryu <knight.ryu12@gmail.com>
pkgname=3ds-libxmp-git
pkgver=libxmp.4.4.1
pkgrel=1
pkgdesc="Library that supports over 90 module formats (Amiga, Atari, ..)"
arch=('any')
url="http://xmp.sourceforge.net/"
license=('GPL')
#depends=('glibc')
options=(!strip libtool staticlibs)
@knight-ryu12
knight-ryu12 / Main.java
Created March 5, 2018 22:26
Java BouncyCastle ECDSA sect233r1 signing
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.*;
import java.security.spec.ECPrivateKeySpec;
import java.security.spec.InvalidKeySpecException;
import org.bouncycastle.jce.ECNamedCurveTable;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
{
"id":"0000000-0000-0000-0000-0000000",
"compressMethod":"LZ4",
"uid":"0000000-0000-0000-0000-0000000",
"filename":"test.json",
"origfilesize":100,
"filesize":80,
"checksum":{
"method":"SHA-256",
"hash":"00000000000000000000000000000000",