Skip to content

Instantly share code, notes, and snippets.

@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.
<?php
// extract password from PSMD rescue QR code
// uses https://github.com/khanamiryan/php-qrcode-detector-decoder
?>
<h2>Pok&eacute;mon Super Mystery Dungeon QR code parser</h2>
Check out the QR codes you can use <a href="https://ianburgwin.net/psmdqrcode/codes"><b>here</b></a> and then do ?file=filename!<br>
Example: <a href="https://ianburgwin.net/psmdqrcode/?file=1FTq4zo.jpg">https://ianburgwin.net/psmdqrcode/?file=1FTq4zo.jpg</a><br>
If you would like your image to be tested, contact ihaveamac/ihaveahax (which is probably where you found the link!)<hr>
Source and credits for this PHP script is a <a href="https://gist.github.com/ihaveamac/3dae2929f8b87ed93dcf">GitHub Gist</a><hr>
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)
@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
<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>
versions = [
["0004001000020000", 0xA],
["0004001000021000", 9],
["0004001000022000", 9],
["0004001000026000", 3],
["0004001000027000", 6],
["0004001000028000", 3],
["0004003000008202", 0x1B],
["0004003000008802", 9],
["0004003000008A02", 7],
#!/usr/bin/env python2
import sys
if len(sys.argv) != 3:
print("xor.py <file> <xorpad>")
sys.exit()
encfile = open(sys.argv[1], "rb")
xorpad = open(sys.argv[2], "rb")
outfile = open("%s.out" % sys.argv[1], "wb")
@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)