Skip to content

Instantly share code, notes, and snippets.

@ihaveamac
ihaveamac / 3ds-to-cia-quick.sh
Last active June 15, 2016 10:45
convert .3ds to .cia with just an exheader xorpad (old crappy method)
# Manual and DLPChild for some reason don't work.
# it must be a make_cia issue since I tried using makerom and hex editing and it worked fine
if [ ! -f "$1" ]; then
echo "no"
exit 1
fi
rm 0.cxi ncch.header exheader.bin exefs.bin romfs.bin logo.bcma.lz plain.bin converted.cia
EXHXOR=$(python2 get-exh-xorpad.py "$1")
3dstool -xvt012f cci orig.cxi manual.cfa dlpchild.cfa "$1"
3dstool -xvtf cxi orig.cxi --header ncch.header --exh exheader.bin --exh-xor $EXHXOR --exefs exefs.bin --romfs romfs.bin --logo logo.bcma.lz --plain plain.bin
#!/usr/bin/env python2
import sys, binascii
if len(sys.argv) < 2:
print "usage: parse_seeddb_list.py seeddb_list.txt [--includeseed]"
print "- a seeddb.bin file will be generated in the current working directory"
print "- --includeseed will include the game's seed in the table"
print "- seeddb list could be obtained from http://pastebin.com/zNM8zYwa"
sys.exit()
#!/usr/bin/env python2
import sys, binascii, math
if len(sys.argv) != 2:
print("only need one CIA file")
sys.exit()
f = open(sys.argv[1], "rb")
# Archive Header Size
f.seek(0x0)
#!/usr/bin/env python2
#####
#ncchinfo.bin format
#
#4 bytes = 0xFFFFFFFF Meant to prevent previous versions of padgen from using these new files
#4 bytes ncchinfo.bin version or'd with 0xF0000000, to prevent previous versions of padgen from using these new files
#4 bytes Number of entries
#4 bytes Reserved
#
Screen.waitVblankStart()
Screen.refresh()
Screen.debugPrint(5, 5, "Hello world!", Color.new(255, 255, 255), TOP_SCREEN)
Screen.debugPrint(5, 5, "Here's a random number: "..math.random(1, 100), Color.new(255, 0, 0), BOTTOM_SCREEN)
Screen.flip()
while true do
if Controls.check(Controls.read(), KEY_B) then
@ihaveamac
ihaveamac / scroll.lua
Last active December 16, 2015 03:06
it scrolls an image thing - using lpp-3ds - https://www.youtube.com/watch?v=d1AI4syhu1U
Screen.enable3D()
Graphics.init()
-- this should always be below 1
friction = 0.9
-- these are set while the page is moving
y_position = 0
y_velocity = 0
dragging = false
Screen.waitVblankStart()
Screen.refresh()
img = Screen.loadImage(System.currentDirectory().."/sample.png")
for x = 0, Screen.getImageWidth(img) - 1 do
for y = 0, Screen.getImageHeight(img) - 1 do
local clr = Screen.getPixel(x, y, img)
Screen.drawPixel(x, y, clr, TOP_SCREEN)
end
end
Screen.debugPrint(5, 5, "Done!", Color.new(255, 255, 255), BOTTOM_SCREEN)
<div>
<canvas id="canvasPreview" width="400px" height="222px">No canvas? That's sad...</canvas>
<p>Please, right click on the preview to download it.</p>
</div>
<div>
<div>
<select id="templateType" name="templateType">
<option value selected disabled>Select a cover!</option>
<optgroup label="Nintendo 3DS Games">
<option value="template-basic-banner-fullscreen.png">Generic</option>
@ihaveamac
ihaveamac / lpp-3ds.xml
Last active June 15, 2016 10:57
this might actually fix notifications
<!-- taken from RetroArch 3DS MAME nightlies -->
<targets selectable="false">
<!-- YouTube (USA)-->
<title mediatype="1">00040000000B0F00</title>
<!-- YouTube (Europe)-->
<title mediatype="1">00040000000CCD00</title>
<!-- YouTube (Japan)-->
<title mediatype="1">00040000000D3000</title>
<!-- Monster Hunter 4 Ultimate Special Demo (USA)-->
<title mediatype="1">000400000015FA00</title>
@ihaveamac
ihaveamac / mgl-changelog.md
Last active November 27, 2015 16:55
grid launcher changelog up to 127

Beta 127

  • Adds banners for themes. Same image format as the other banner images. Place them in the theme folder and call the file theme-banner.png or theme-banner-fullscreen.png

Beta 126

  • All menus (including the title menu) now refresh their icon layout when the number of rows is changed
  • Includes updater v2.04 by @ihaveamac

Beta 125

  • Fixes issues with title-based apps (SVDT, HANS, Braindump) not getting the correct title ID.