Hacking BenzinU Release

GRAnimated

Well-Known Member
Newcomer
Joined
Jan 9, 2017
Messages
70
Trophies
0
Age
50
XP
473
Country
United States
Hey, so i am having a problem with Mario Maker's BFLYT files, some files seem to work, but any file from Mario Maker that I save back as a BFLYT from XMFLYT loses about 2-5kb of data and crashes ingame. Some other BFLYT files from this game will not convert to xmflyt and some won't convert to BFLYT. I provided a zip file containing 2 different files which both don't work.
 

Attachments

  • help.zip
    13.6 KB · Views: 174

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
Hey, so i am having a problem with Mario Maker's BFLYT files, some files seem to work, but any file from Mario Maker that I save back as a BFLYT from XMFLYT loses about 2-5kb of data and crashes ingame. Some other BFLYT files from this game will not convert to xmflyt and some won't convert to BFLYT. I provided a zip file containing 2 different files which both don't work.

thanks i will take a look at them
 

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
@GRAnimated I've fixed the problem with the Play_PlayScene_00 file
I need you to send me the original Edit_Contents_00.bflyt file it looks like its messing up creating the groups in the xml
 

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
oddly creating the xml from that bflyt did not have the same problems that your xml shows in the groups section i suggest you recreate your xml from the stock file using the 1.0.9 version i just uploaded
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
@diddy81 Currently trying to edit some .bflan files from the Switch. Apparently they are little endian which is not supported. Is little endian support planned or am I hosed?
 

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
@diddy81 Currently trying to edit some .bflan files from the Switch. Apparently they are little endian which is not supported. Is little endian support planned or am I hosed?
sorry i have no plans to update this at all also even if it did support little endian its highly unlikely it could convert a file for the switch witch at a guess uses a updated version of the bflan format just like the wii U used a updated version of the wii's files
your welcome to grab the source code and have a go editing it its written in python
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
@diddy81 I see, I'll look into getting it to work with the Switch files. Also, can you make sure I'm looking in the right place for what I want to do? On the Switch, you can edit the starting color of the box that highlights tiles on the homescreen (using Wexos to edit a .bflyt). However, the color is then animated to another target color (light blue) which is not in the .bflyt. I have found the .bflan that controls this animation and want to locate the target color within it. Looking in bflanRead.py, I see the sort of things that are read (seconds, start, end) but I'm not sure where the target color would fit into all of this.

Thanks for your patience!
 

GRAnimated

Well-Known Member
Newcomer
Joined
Jan 9, 2017
Messages
70
Trophies
0
Age
50
XP
473
Country
United States
After a long time of layout research from me (last post here about stuff from me was from 8/6/2017!), I've figured out some stuff. The tool still doesn't work with SMM's BFLYTs, but they work with the BFLANs great. With the BFLYTs, something in mat1 breaks when converting back with BenzinU.

Also, for Switch BFLYTs and BFLANs, I've concluded that they're exactly the same, except little endian. There are a few differences in ordering in mat1 and such, too. I think there's a new section that's rarely used, and usd1 has a lot of different uses for being user data.
 

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
@diddy81 I see, I'll look into getting it to work with the Switch files. Also, can you make sure I'm looking in the right place for what I want to do? On the Switch, you can edit the starting color of the box that highlights tiles on the homescreen (using Wexos to edit a .bflyt). However, the color is then animated to another target color (light blue) which is not in the .bflyt. I have found the .bflan that controls this animation and want to locate the target color within it. Looking in bflanRead.py, I see the sort of things that are read (seconds, start, end) but I'm not sure where the target color would fit into all of this.

Thanks for your patience!
the animation could be under a FLVC but will more likely be under a FLMC tag
there will be a separate set for each RGB value
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
Also, for Switch BFLYTs and BFLANs, I've concluded that they're exactly the same, except little endian. There are a few differences in ordering in mat1 and such, too. I think there's a new section that's rarely used, and usd1 has a lot of different uses for being user data.

It does seem they are quite similar except for the endianess. Another difference I've found is a "FLEU" tag type which doesn't seem to be referenced in BenzinU. Just before this type there is a 4 Byte segment (0x2C00000 in my file's case) which BenzinU is attempting to read as the next tagtype and then crashing. Deleting these 4 bytes let's the file be successfully processed, but obviously I must be losing some data.

I have not been able to diagnose why this happens. I might have thought the FLTS before the FLEU simply had 4 more bytes now, but there is an earlier FLTS which doesn't cause problems. So I'm unsure.
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
Changing the struct.unpack calls to read little endian allows all the files I've tested to be processed without modification, except for the one I mentioned in the post directly above this one.
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
@diddy81 Sorry to blow up the thread, but can I pick your brain? I've gotten the majority of .bflans to successfully process with BenzinU by:
1: Changing struct.unpack calls to expect little endian
2: Accounting for 8 bytes of extra padding at the end of the pat1header section (I'm literally just incrementing 'pos' by 8)
3: Changed the 'data_type' to expect 1 and 2 rather than 256 and 512 for triplets and tuples.

All the files that still fail, fail just before an "FLEU" section (looks like this is new).
It fails because when looking for the FLEU header, it's actually looking at the 4 bytes just before the FLEU header. These seem to always be 0x2C000000.
I can manually change the "offset" of any FLEU to 44 rather than 40 and this fixes it, but it's hacky and I want to understand what I'm doing rather than just skipping the 4 bytes that give me issues. Haha.
 

diddy81

Wii Theme Team
OP
Member
Joined
Mar 14, 2009
Messages
916
Trophies
1
XP
1,099
Country
if i had to guess i would say its the size of the FLEU section as 2C == 44
unfortunately working out what things do in a file sometimes hacky is all you have
 

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
@diddy81 I forked BenzinU, hope that's alright. There didn't seem to be a license specified. So far I've gotten 100% success on converting Switch .bflan files to XML. Conversion from XML to .bflan works on something like 80% of files. Not sure if I'm going to bother with .bflyt's. Here's the repo: https://github.com/AustinHasten/BenzinNX
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • ZeroT21 @ ZeroT21:
    Nowadays pc mice come as light as can be, liked mine with some heft
  • K3Nv2 @ K3Nv2:
    You like holding girth
  • SylverReZ @ SylverReZ:
    @RedColoredStars, I also listen to Beck, some of their songs are fine. Only found out about them through Windows Me; you know, that one operating system nobody ever likes?
  • RedColoredStars @ RedColoredStars:
    i dont know why tv manufactures put the hdmi ports in dumb locations so the cables have to stick out, and then down, putting strain on the ports. Instead of having the ports along the bottom edge of the tv facing downwards.
  • ZeroT21 @ ZeroT21:
    windows me was mostly on laptops if i remembered correctly
  • SylverReZ @ SylverReZ:
    @RedColoredStars, I hate that too where you have to use an HDMI extension for an Amazon Fire Stick.
    +1
  • RedColoredStars @ RedColoredStars:
    I had a desktop with ME on it.
  • SylverReZ @ SylverReZ:
    @ZeroT21, And also cheap-ass desktop PCs like eMachines.
  • RedColoredStars @ RedColoredStars:
    Worst MS OS in history. Period.
  • K3Nv2 @ K3Nv2:
    My entertainment centers blocking all my io gotta fix that eventually
  • ZeroT21 @ ZeroT21:
    I had used win 98 SE till XP arrived
  • SylverReZ @ SylverReZ:
    Had a ton of bugs and often crashed. It even didn't support DOS compatibility with older games. :feelsbadman:
  • SylverReZ @ SylverReZ:
    I only grew up with Windows XP because I was lucky.
  • RedColoredStars @ RedColoredStars:
    I downloaded XP on dialup when it came out. Overnights for like a week. cuz I couldn't tie up the phone line during the day. It was so awesome and worked so great going from ME to XP.
  • K3Nv2 @ K3Nv2:
    Vga pins were a dick
  • K3Nv2 @ K3Nv2:
    I kind of want down a large pizza at 10am then crash out
  • ZeroT21 @ ZeroT21:
    Having pizza all day? done it
  • K3Nv2 @ K3Nv2:
    Nah pizza hut open at 10:30
  • ZeroT21 @ ZeroT21:
    just buy a stack of pizza and keep the rest you don't need yet frozen
  • K3Nv2 @ K3Nv2:
    Or buy frozen pizza
  • ZeroT21 @ ZeroT21:
    I buy the regular kind, not the frozen stuff
  • ZeroT21 @ ZeroT21:
    supermarket pizza is ass
  • K3Nv2 @ K3Nv2:
    x65 would just yell at me
  • ZeroT21 @ ZeroT21:
    sounds ok, he didn't pull a gun out ,so...
  • K3Nv2 @ K3Nv2:
    $12 large any style pizza deal
    K3Nv2 @ K3Nv2: $12 large any style pizza deal