Skip to content

Instantly share code, notes, and snippets.

View DNA64's full-sized avatar
💭
Working on various classic projects

viral_dna DNA64

💭
Working on various classic projects
View GitHub Profile
@anpage
anpage / snescheaders.md
Last active October 8, 2017 10:32
Description of the headers used in the SNES Classic ROM files (.sfrom)

Header

Start Size Description Notes
0x00 0x4 0x00000100
0x04 0x4 File size Includes the header and footer
0x08 0x4 Location of ROM Always 0x00000030 in official files
0x0C 0x4 Location of PCM samples Comes after end of ROM in official files
0x10 0x4 Location of PCM footer Equals file size if PCM data missing
0x14 0x4 Location of footer (below) Same as New 3DS's SNES VC header starting from 0x30
0x18 0x4 Lo
@anpage
anpage / sfc2sfrom.py
Last active April 27, 2023 06:58
Scripts to convert SNES ROMs to SNES Classic (.sfrom) format and to read .sfrom headers
#!/usr/bin/env python
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
@anpage
anpage / audigysb16.md
Last active October 4, 2017 09:14
Audigy 2 SB16 Emulation in Windows 9x

When using the WDM drivers, Windows itself will emulate a Sound Blaster Pro. Nothing needs to be done and nothing special will show up in Device Manager.

SB16 emulation requires the .vxd driver set. Additionally, a change to the registry is needed and the driver needs to be installed twice.

The Creative inf files do not install SB16.inf and can’t correctly install it by any method until you add an entry to the registry.

REGEDIT4

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CreativeTech\Emu10kx\Emulation]
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstdint>
#include <memory>
#include <map>
#include <list>
#include <vector>
#include <set>
#include <algorithm>
#include "crypto.h"
/*
Scramble/descramble raw NAND dumps from the NES Classic.
plutoo 2016
Cheers to brizzo, derrek.
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>