ROM Hack sky3ds diskwriter python clone (for linux & osx)

  • Thread starter Thread starter lukas_2511
  • Start date Start date
  • Views Views 48,220
  • Replies Replies 180
  • Likes Likes 8
I've said several times I don't know what I'm doing, and this is by a large margin the biggest project I've worked on (before this I was at ~250 lines of code for my biggest), so don't judge it too harshly. You obviously know your stuff really well, so I'm open to any criticism you would have.

If you like what I've done maybe put a screenshot and the link in the first post?

I'm actually going to bed for the night too. At least over here its still a reasonable time. I feel like an old man going to bed at 10:30, but I'm lucky enough to have a good full-time job so I can't complain too much.
 
I fired it up on OS X. I can actually use sudo to launch this but I can't do anything else with sudo (still confuses the crap out of me.) It sees my micro SD card but I can't open it.
I know you said you didn't think it would work on OS X yet but I figured I'd report my findings.
 
Hi everyone,

Works like a charm on OS X Yosemite.
Well done lukas_2511 and NoSmokingBandit. That's HUGE enhancement for OS X users (and linux user I imagine).

Thank You !

What I've done :
I've put both gui files in the latest sky3ds release folder.
Put the latest template.txt in the library.
I installed appdirs and then used :
sudo python guy.py

The big difference from the CLI version is that I used python 2 and not 3.
The gui_python3.py doesn't want to launch.

Traceback (most recent call last):
File "gui_python3.py", line 831, in <module>
view = View(root)
File "gui_python3.py", line 46, in __init__
self.create_widgets()
File "gui_python3.py", line 63, in create_widgets
self.update_disk_optionmenu()
File "gui_python3.py", line 140, in update_disk_optionmenu
disk_list = controller.get_disk_list()
File "gui_python3.py", line 219, in get_disk_list
list_plist = plistlib.readPlistFromString(output)
AttributeError: 'module' object has no attribute 'readPlistFromString'


Clié.

PS : Is it me or the writing process is slower ?

EDIT : I was able to succesfully save a gamesave but when I wanted to write the .sav file onto another card I had this :
Something Broke : unsupported operand type(s) for ^: 'int' and 'str'
 
I think plistlib requires a slightly different process for python3 and 2to3 didn't catch that. I'll take a look at it later today.

I'll take a look at the save thing. I don't have a sky3ds card so I don't have any actual saves to read/write and I don't know if that makes a difference. Does the save write work with without the gui?
 
EDIT : I was able to succesfully save a gamesave but when I wanted to write the .sav file onto another card I had this :
Something Broke : unsupported operand type(s) for ^: 'int' and 'str'

Was able to reproduce the problem, is fixed in newest version.

Edit: And yes, writing could be slower. I changed the chunksize to a higher value now, it may be faster, but progressbar is now likely to behave a bit... well... not that "fluent" anymore... especially with slower sdcards. But i guess it's okay. May rewrite that code in the future.
 
Hi,

so : I don't have any error anymore while writing back the .sav file but, the sky3ds do not find any gamesave, it always start like a new game.
(using the gui on OSX with the latest release of sky3ds.py)
 
Hi,

so : I don't have any error anymore while writing back the .sav file but, the sky3ds do not find any gamesave, it always start like a new game.
(using the gui on OSX with the latest release of sky3ds.py)


Mh... What savegame are you trying to restore?
 
a save from zelda majora but it didn't work on yoshi island either...
And it appears that the save process has deleted the save in the first place. I have to further investigate that...

EDIT : I retried with Yoshi and it worked. I was able to transfert a save from a sdcard to another.
I have to see what append with Zelda.

EDIT 2 :What I understand with the Zelda problem : Backing up the save -> no problems.
writing the save and run the game -> the game writes something new in the memory and make the save unusable (the game start as new).
using the old card with the old save -> start as a new game because of the writing that append just before

So be careful...

But the save and write process did work with no errors with yoshi !
 
I can't seem to find anywhere if Majora's Mask is a Card2 game. I haven't bothered to read much of of the save backup/restore code (because I didn't really need to), and I'm wondering if maybe Card2 games have trouble.

For those with python 3 I made a few changes to my script. Re-download from the dropbox link and let me know what happens. I'm not installing python3 to test anything.
 
MM is card1.
by the way, I tried a Card2 game (Animal crossing which is compatible with sky3ds) and I was unable to launch it. the sky3ds doesn't seem to found the game at all.

EDIT : test on python3 GUI -> not working
Traceback (most recent call last):
File "gui_python3.py", line 831, in <module>
view = View(root)
File "gui_python3.py", line 46, in __init__
self.create_widgets()
File "gui_python3.py", line 63, in create_widgets
self.update_disk_optionmenu()
File "gui_python3.py", line 140, in update_disk_optionmenu
disk_list = controller.get_disk_list()
File "gui_python3.py", line 219, in get_disk_list
list_plist = plistlib.loads(bytearray(output, 'utf-8'))
TypeError: encoding or errors without a string argument
Clié.
 
Hey guys,

Looks like this is progressing well,

Excuse the huge newbie request here, but on behalf of newbies everywhere could someone possibly post a 'how to' guide for how to, at the most basic level, install our Roms onto a Sky3DS card on a Mac?

It would be greatly appreciated.
 
Clie, try my latest update. It seems to be working for me.

As a personal challenge I've started re-writing the gui in wxpython. Im torn about it. It looks a billion times better on linux, but osx doesn't come with wx installed (neither does ubuntu, so whatever). I love that it looks like a native app. Its funny that tk looks native on a mac, but not on linux.


Benseab, it pretty much is done. Lukas got all of the functional parts done a while ago, I've just been playing around making it pretty (and testing a few mac things for him). Its super simple to use, but if you've never heard of python I can understand that it would be confusing. I'll make a mini-guide some day soon.

I'd like to convert it to a native mac app with py2app or pyinstaller, but since it requires sudo privileges to write directly to /dev it just isn't going to work. Unless I use pyobjc to hook it up with xcode. But I really don't want to do that. Like, at all.

In other news I've finally ordered myself a Sky3ds card. Should be here in a few days!
 
Hi NoSmokingBandit,

I tested the python3 GUI. it launches now but I have " Something broke : Couldn't get disksize, will not continue " when i try to open the disk.
But the card is recognized in the disk list with the appropriate size..

I can help you with Xcode if you want. I'm not a pro but i use it...
 
Yeah, thats an error in the backend side of things. Plistlib changed a bunch in the last few versions.

In disk.py change the following line:

96: diskutil_plist = plistlib.loads(bytearray(diskutil_output, 'utf-8'))
to:
diskutil_plist = plistlib.loads(diskutil_output)

I think I've made some changes to my parts as well, you might want to re-download them. I'm always tweaking things. Everything works in python 3.4 for me. I'm actually writing a rom while I type this.

Lukas:
It seems like writing is a little quicker with some of the latest updates on your side. I haven't officially measured anything, and it might be the difference between python 2.7 and 3.4, but it does seem a little quicker. The progressbar is a little less smooth, but I don't anyone really minds. I know I don't.
 
96: diskutil_plist = plistlib.loads(bytearray(diskutil_output, 'utf-8'))
to:
diskutil_plist = plistlib.loads(diskutil_output)

Python 3 needs it as bytearray, Python 2 as string.

Lukas:
It seems like writing is a little quicker with some of the latest updates on your side. I haven't officially measured anything, and it might be the difference between python 2.7 and 3.4, but it does seem a little quicker. The progressbar is a little less smooth, but I don't anyone really minds. I know I don't.


I changed the number of bytes that is read and written at once, that speeds it up on some computers, but i don't like the feel of the progress bar, it just feels wrong if it doesn't refresh fast enough. Don't know if i'm ever going to rewrite that code... i mean... it works, and people won't constantly copy over games... so a few more seconds or maybe a minute slower shouldn't really be a problem...

Didn't have time to really look at your gui code yet, but I used it once to write a game to disk, it worked (python2 version).
 

Site & Scene News

Popular threads in this forum