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

NoSmokingBandit

Well-Known Member
Member
Joined
Jan 17, 2009
Messages
451
Trophies
0
XP
648
Country
United States
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.
 

Poison Shroom

Member
Newcomer
Joined
Feb 16, 2015
Messages
5
Trophies
0
Age
41
XP
52
Country
United States
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.
 

Cliemacfr

Active Member
Newcomer
Joined
Oct 3, 2006
Messages
25
Trophies
0
XP
202
Country
France
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'
 

NoSmokingBandit

Well-Known Member
Member
Joined
Jan 17, 2009
Messages
451
Trophies
0
XP
648
Country
United States
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?
 

lukas_2511

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
126
Trophies
0
Age
31
XP
409
Country
Gambia, The
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.
 

Cliemacfr

Active Member
Newcomer
Joined
Oct 3, 2006
Messages
25
Trophies
0
XP
202
Country
France
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)
 

lukas_2511

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
126
Trophies
0
Age
31
XP
409
Country
Gambia, The
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?
 

Cliemacfr

Active Member
Newcomer
Joined
Oct 3, 2006
Messages
25
Trophies
0
XP
202
Country
France
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 !
 

NoSmokingBandit

Well-Known Member
Member
Joined
Jan 17, 2009
Messages
451
Trophies
0
XP
648
Country
United States
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.
 

Cliemacfr

Active Member
Newcomer
Joined
Oct 3, 2006
Messages
25
Trophies
0
XP
202
Country
France
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é.
 

benseab23

New Member
Newbie
Joined
Feb 14, 2015
Messages
4
Trophies
0
Age
40
XP
41
Country
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.
 

NoSmokingBandit

Well-Known Member
Member
Joined
Jan 17, 2009
Messages
451
Trophies
0
XP
648
Country
United States
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!
 

Cliemacfr

Active Member
Newcomer
Joined
Oct 3, 2006
Messages
25
Trophies
0
XP
202
Country
France
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...
 

NoSmokingBandit

Well-Known Member
Member
Joined
Jan 17, 2009
Messages
451
Trophies
0
XP
648
Country
United States
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.
 

lukas_2511

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
126
Trophies
0
Age
31
XP
409
Country
Gambia, The
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

General chit-chat
Help Users
  • Veho @ Veho:
    Nah, a hit gives them mad meth powers, but makes them more difficult to control.
    +1
  • Veho @ Veho:
    Before a hit they're like zombies, persistent but slow.
    +1
  • Veho @ Veho:
    It's a tradeoff.
    +1
  • The Real Jdbye @ The Real Jdbye:
    no i mean, before a hit is after the previous hit
    +1
  • The Real Jdbye @ The Real Jdbye:
    if you keep them well enough fed, it's the same thing
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    By the power of Florida Man, I have the power!!! *Lifts up meth pipe* Meth Man!!! lol
  • BakerMan @ BakerMan:
    Guys, I just learned my little brother is in the hospital because he had a seizure last night.
  • cearp @ cearp:
    Sorry to hear that BakerMan
    +2
  • BakerMan @ BakerMan:
    Just found out he's doing alright, doing a lot of complaining too, rightfully so. Who wouldn't complain after having a seizure and being hospitalized?
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Glad he is OK and complaining is cool :)
    +1
  • K3Nv2 @ K3Nv2:
    Yeah been there had that no fun
    +1
  • K3Nv2 @ K3Nv2:
    They'll give him sleep studies eegs and possibly one week hospital stay
    +1
  • BakerMan @ BakerMan:
    I hope it's not a week.
  • K3Nv2 @ K3Nv2:
    It's standard so doctors can get a idea about what's going on
  • BakerMan @ BakerMan:
    understood
  • BakerMan @ BakerMan:
    well, i'm glad he seems to be doing fine, and ig i'm going to start spewing goofy shit again
  • BakerMan @ BakerMan:
    Update: Turns out he's epileptic
  • K3Nv2 @ K3Nv2:
    Get a 2nd opinion run mris etc they told me that also
  • Psionic Roshambo @ Psionic Roshambo:
    Also a food allergy study would be a good idea
  • K3Nv2 @ K3Nv2:
    Turns out you can't sprinkle methamphetamine on McDonald's French fries
  • ZeroT21 @ ZeroT21:
    they wouldn't be called french fries at that point
  • ZeroT21 @ ZeroT21:
    Probably just meth fries
  • K3Nv2 @ K3Nv2:
    White fries hold up
    K3Nv2 @ K3Nv2: White fries hold up