Skip to content

Instantly share code, notes, and snippets.

View sinsinpub's full-sized avatar

sin_sin sinsinpub

  • Free
View GitHub Profile
@sinsinpub
sinsinpub / nekketsu_basketball_password.md
Last active August 3, 2022 11:05
An old memo on NES Nekketsu Street Basketball password construction.

熱血!すとりーとバスケット ~がんばれ Dunk Heroes~

Password construction:

  • Decide 1 player or 2 players;
  • Choose an item pattern (0 ~ 3);
  • For Nekketsu Team, ordered by: Away(1 ~ 7bit)->Home(10 ~ 16)->Away->Home->... Max 13 games;
@sinsinpub
sinsinpub / shiren_ds1_jpn_nds.md
Last active February 8, 2023 06:50
Some old memo on Fuurai no Shiren (風来のシレン) series. Updated for plain text -> markdown.

0767 Fuurai no Shiren DS (J) (NTR-AFUJ-JPN)

Item modifications in Work RAM

  • 1st item:
$021B6F80 byte?: item states, 8th bit = equipped flag
       +2 word : item type id, see item_plant.bin below
       +4 dword: item flags of enhancements
       +6 byte?: item count/enhancement level
@sinsinpub
sinsinpub / FBCONV.C
Last active July 18, 2021 10:12
FAMIBE (Family BASIC) battery backup save converter. DOSでファミベ遊びたいから、適当に作ったんで好きに使え。
/**
* FBconv - Family BASIC v3 battery backup save converter.
* Tested & complied under DOS with Turbo C++ 1.01 / DJGPP 2.03 GCC
* under Windows with GCC-4.8.1-MinGW32 -Wno-write-strings
* under PC-9801 with Turbo C 2.0
*
* @author sin_sin
* @version 2021-07-12
*/
#include <stdio.h>
@sinsinpub
sinsinpub / MEMVIEW.BAS
Created July 12, 2021 10:03
Memory Viewer for Family BASIC v3 (ON ERROR used as workaround of OV ERROR).
10 CLS
20 I=J
30 ON ERROR GOTO 770
40 LOCATE 0,0
50 PRINT"MEMORY VIEWER"
60 FOR I=0 TO 7
70 LOCATE 4+I*3,2
80 PRINT HEX$(I);
90 LOCATE 4+I*3,3
100 PRINT HEX$(I+8);
@sinsinpub
sinsinpub / BGTOOL.BAS
Last active July 20, 2021 08:18
自作BGTOOLです、全画面編集できるんですw
' Family BASIC v3 BGTOOL (v2 BG GRAPHIC mode)
' tested with QBasic 1.1 / QuickBASIC 4.5
' by sin_sin, on 2021-07-20
' Dump and generate BGTOOL?.BSV from your CHR rom (see NES2BSV.BAS)
DEFINT A-Z
DECLARE SUB PrintXY (s$, x, y, c)
DECLARE SUB LoadCharSet ()
DECLARE SUB InitBgPalettes ()
@sinsinpub
sinsinpub / PRNGS.PAS
Created September 26, 2021 05:52
Another retro (16-bit) Pseudo Random Number Generators written in Pascal before. Do anything with it.
unit prngs;
{ Pseudo Random Number Generators written in Pascal }
{ http://wiki.freepascal.org/Generating_Random_Numbers }
interface
type
algorithm = (rtl, lcg, pcg, xors, mt);
dist = (uniform, normal, exponential, gamma, erlang, poisson);
@sinsinpub
sinsinpub / yandere_preferences.css
Created October 22, 2021 05:24
Better yande.re CSS preferences
@-moz-document url-prefix("https://yande.re/post") {
body {
padding-right: 0px;
}
#post-list-posts > li {
width: calc((74vw - 1em) / 5) !important;
margin-right: 1px !important;
}
#post-list-posts > li > div {
width: auto !important;
@sinsinpub
sinsinpub / GGENIE.CPP
Created November 29, 2021 06:40
Yet another converter of NESticle raw patch <-> Game Genie code (source from FCEU)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* Game Genie: Code Mapping
*
* 6 Letters:
* | 1 | 2 | 3 | 4 | 5 | 6 |
* |1678|H234|#IJK|LABC|DMNO|5EFG|
@sinsinpub
sinsinpub / twitter-idb-snippet.js
Last active December 3, 2021 07:20
Try to dismiss twitter shitty notification of 'Push Notification' for 10 years. Run in devtools console for once, or load into devtools -> source -> snippets tab for future use.
var conn = indexedDB.open('localforage').onsuccess = (ev) => {
const db = ev.target.result;
const ts = db.transaction(['keyvaluepairs'], 'readwrite');
const os = ts.objectStore('keyvaluepairs');
const key = 'device:rweb.devicesbrowserPushpromptDismissed';
const req = os.get(key);
const printData = (e) => { console.info(e.target.result); };
req.onsuccess = (reqe) => {
printData(reqe);
const data = reqe.target.result;
@sinsinpub
sinsinpub / msxlist.c
Last active May 5, 2022 04:52
Print MSX-BASIC tokenized binary file to stdout in plain texts. Fixed messy indents, typos and bugs in original version. Tested with Turbo C++1/DJGPP GCC 7.3 and some BAS files of opensource Japanese homebrew games.
/****************************************************************************\
list v0.3
This programm will convert a MSX-BASIC tokenized file into an ascii file.
syntax: list [inputfile]
To save converted texts, just pipe output with '> outputfile'.
Vincent van Dam
(vandam@ronix.ptf.hro.nl)