Using BNE2 for ROM analysis

(Followed up from back-story post.)

BNE2 can be a helpful reference utility for hacking on video game ROM files. It is, apparently, used somewhat frequently by the JRPG hacking community in Japan.

Unfortunately there isn’t much documentation in English for this utility that I could find. Hopefully this quick user-oriented howto will be helpful to some. This short guide will assume someone else has already dissected your ROM file and provided BNE2 files to work with…

To start off with, the BNE2 utility is kinda old and therefore not UTF8-enabled, so you’ll want to set your system locale to Japanese for Shift-JIS support. This can be done in the Control Panel regional settings. Alternatively,  you may use Microsoft’s AppLocale utility.

BNE2 will require the installation of the XTRM Runtime package, otherwise it won’t do anything when you try to run it.

Once that’s installed, download the BNE2 archive (link updated on 4/9/2020 due to Geocities Japan shutdown) and unpack it all to a location of your choice…

For my example, I’m using the Final Fantasy VI T-Edition ROM hack. The developer of the hack has kindly provided BNE2 files with his patch file…

Inside the “FF6 T-Edition” directory, there’s a huge bunch of .IDN and .INI files, which will be what BNE2 uses to give you a nice, friendly spreadsheet-like interface to the ROM space.

To get BNE2 to use that information, you’ll have to copy that entire directory to BNE2’s Settings directory…

Now, BNE2 will have all kinds of information about the ROM’s layout. To make sure it uses that information, let’s open BNE2…

BNE2 Main Window

To verify that it has loaded the settings, select “その他(O)” (Other) in the menu bar, then select “設定” (Settings) in the submenu that pops up…

BNE2 Settings Property Sheet

Bingo! So, all that’s left is to load our ROM using Ctrl+O or “ファイル(F)” (File) in the menu bar, then “開く (O)” (Open) in the pop up submenu.

If you choose the correct ROM file, you should see something like this…

BNE2 program in action

Hopefully this very short guide will be useful to others who may need BNE2 as a reference.

This post is based on a great, simple Japanese language guide.

Upcoming post: Using BNE2 for ROM analysis

I have been playing a super-extensive ROM hack of Final Fantasy VI, the T-Edition, by a gentleman named tsushiy, which is available here (Japanese only).

Things have been going smoothly for a while and I’m about 30 hours into the game. I’m now in the World of Ruin and now looking to take advantage of the item upgrades offered by the Dragon’s Neck Coliseum.

Normally you can easily find guides to the Coliseum on GameFAQs or Final Fantasy VI-specific fan sites. My quandary comes as a result of the many changes made by tsushiy. Aside from adding tons of items, tsushiy has also modified the stakes of the Coliseum. He has changed which monsters you face, the victor’s spoils, and even the behavior of the battles. So all those Coliseum guides are fairly useless for the T-Edition.

Luckily I got some sagely advice from Mato of starmen.net fame, a thoroughly accomplished ROM hacker himself. Mato suggested using BNE files, included by tsushiy in the T-Edition package. These BNE files, when used by the BNE2 program, offer an analysis of the ROM data. That includes, among other things, the Coliseum information I needed.

Unfortunately, documentation on how to use BNE2 in English is hard to come by. So after tinkering and finally figuring it out, hopefully I can provide some help. I’ll be following up this post with a dedicated post about using BNE2, so that people who just need the information won’t have to sit through a rambling description of why I got into it.

UPDATE: The short howto has been posted.

XDAndroid postmortem: xland mirror down, donations closed, etc

This post is long overdue; my apologies for that.

Obviously, the XDAndroid Project has been inactive for quite some time. Despite that inactivity and the age of the hardware, some people still like to tinker around with it. One of the things I like about the XDA community is that there will be people playing with hardware for years and years… very few of the forums are permanently dead.

On that note, I received an email from a user pointing out that the non-US download mirror for our file repository is dead. I have disabled geographical load balancing since we don’t really need it anymore. All files are now served by the main server in New Jersey, USA. I will continue to maintain that server indefinitely.

Since the project is inactive, I have closed donations and removed all links to the paypal donations page. Disbursing the remainder of the donations account will be done eventually. I currently use funds only for renewing the domain name — the server hosting XDAndroid content is also my personal server, so I don’t feel right using project funds for that expense.

Lastly, the IRC logs were down for a while. I have restored those to a working state in case anybody needs to search for information from when the project was active. IRC was our main collaborative environment.

In closing, the skyrocketing of Android’s market share has obsoleted the XDAndroid Project, of course. In addition, projects whose goal were to introduce a stock flavor of Android on phones with manufacturer customizations, have been obsoleted by the introduction of low-cost, unlocked, stock Android devices (the Nexus line) by Google. While the death of projects is unfortunate, users now have more freedom than ever in mobile devices.

A market that was once dominated by Windows Mobile and Blackberry has become a competitive war ground featuring several combatants. Apple and Google have helped level the playing field on the device side. As a result, we have seen significant advancements in user experience and hardware. It’s a great time to be a smartphone user.

Thanks to all the developers who have helped XDAndroid extend the life of great phones that came with crap software. Thanks to Pierre for running the show throughout its most successful time. And thanks to all the users who helped the developers, tested, commented, donated, and helped each other — this project would have been nothing without you.

(By the way, a few of us are still on IRC! Drop by and say hi!)

Of the Atrix, XDAndroid, and Kernel.org

Howdy folks. Been a while since the last post, so I thought I’d fire off a quick update about what I’ve been doing personally…

First off, XDAndroid. We’re still doing some work on the gingerbread branch. Michael (emwe) has fixed the GPS library and is currently working on some smaller items, including the proximity and light sensors. He’s currently the one getting most of the work done. We’re still working on the critical crasher for TI devices (non-RHOD) when activating bluetooth. Once that’s done, we can finish/clean up the merges from froyo and make a release.

On a related note, kernel.org is still down. This means, for our project, that we cannot merge any changes from the upstream Android project. Google’s public Android source code was hosted exclusively on kernel.org, so until those services are restored (or Google relocates its git repositories), we cannot pull any of their changes into our forked repositories. Additionally, users are currently unable to download or update our source tree, since the majority of source tree is unmodified Android code.

In the headline, I mention the Motorola Atrix 4G. This is a Tegra-based phone which, of course, runs Android natively. On XDA, there has been an ongoing effort to port CyanogenMod 7 to the Atrix. Since nobody had stepped up to port vanilla Android to the Atrix, I snuck into their development channel on IRC, stole their code, and got (most of) the job done. I plan to release the source tree to the public as soon as kernel.org is restored, or perhaps earlier if I can gather clones of the Android source tree. To be clear, this is going to be targeted at ROM developers (or the “chefs” term I so dislike to use). It’s working extremely well as an everyday phone for me, thanks to the wonderful work of the Atrix Dev Team, but I’m not confident in my solo efforts to bring vanilla Android to their awesome stability. Therefore, I cannot offer proper support for end-users. I’ll be making another post about Atrix stuff after I go public with a released build.

New Froyo Release: FRX07

Here’s a new release for you, folks. This is a major release with a ton of changes, new features, and fixes. Our friend hyc/highlandsun did most of the heavy lifting for this release. Highlights include a rewritten RIL with support for world phones and greatly improved CDMA support; fixes for the media codecs; fixes for MMS on Sprint; increased security with the Superuser app.

A list of changes is included below. The FRX07 system image is available for download now, and will require the use of a new rootfs image, also available now. Additionally, we have a new bundle containing everything needed to enjoy a full FRX07 system.

Note: Due to the incredibly long list of changes, this is a somewhat condensed, terse changelog describing only the overall scope of the changes.FRX07:

  • frameworks/base:
    • Major frameworks changes for CDMA/GSM dual-mode worldphone support. (hyc)
    • Fixes for data connection handling to improve startup time. (hyc)
    • Fixes for wifi handling to avoid issues on hanged drivers. (hyc)
    • Stagefreight (media codecs) fixes. (hyc/viruscrazy)
    • Fixes for Sprint’s wonky MMS markup structure. (hyc)
    • Fix MediaScanner not finding audio files (including ringtones) in system.ext2
  • hardware/libhardware_legacy:
    • Minor GPS driver fixes. (Alex[sp3dev])
    • Rename wifi interfaces to wlan0 on all devices (hyc)
  • hardware/xdandroid-ril: Major RIL refactoring for improved performance on all devices, and added CDMA/GSM dual-mode worldphone support. (hyc)
  • packages/apps/Gallery3D: Switched back to Gallery3D as the gallery app (closes bug #111)
  • packages/apps/Mms: Fixes for Sprint’s wonky MMS markup structure. (hyc)
  • packages/apps/Phone: Fixes for CDMA/GSM dual-mode worldphone support. (hyc)
  • packages/apps/Superuser: Added the Superuser package for authorizing su privileges. This, along with our signed builds, provides greatly increased security for the end user (mostly against malicious apps from the Market).
  • system/extras/su: Added as a dependency for the Superuser package
  • vendor/qcom/android-open: Include missing stagefright codec symbols. (hyc/viruscrazy)

To coincide with the FRX07 system image, the following rootfs changes have been made:

  • init.froyo.rc modifications…
    • Adjust wpa_supplicant service for the new abstraction provided by libhardware_legacy, as well as interface rename
    • Abstract the hciattach service to provide bluetooth support on both chipsets
  • Rename wifi interface to wlan0 on all devices
  • apns-conf.xml updated
  • keymaps completely reorganized, and RHOD end-call key has been remapped to be the Home key in Android.
  • default.prop: set ro.secure=1 to lock down the adb shell – su can be used with the Superuser app to authorize root access in adb if needed.

What About FRX07?

It’s been a long time since the last release — and for that matter, my last post here. A lot has been going on, both in the XDAndroid Project and in the real lives of developers, which has made posting updates a bit of a low priority.

Users love to know what’s going on, though. Since most of our users frequent the XDA forums, but not our mailing list or IRC channel, it seems to them that there isn’t a whole lot happening with the project. In reality, there’s been a huge amount of progress made by a few contributors, in terms of both fixing bugs and adding features.

Because of that progress, the next iteration in the Froyo series, FRX07, is going to be a major release. One of the main contributors to this release is hyc, who has largely rewritten our RIL, proposed rootfs reforms, improved wifi driver handling, and proposed various other changes so far. hyc has kept the team very busy with testing and implementing merge requests.

Additionally, some work has been done by virus_crazy (on the forums) for bluetooth, including implementation for Rhodium and improvements for other devices. Alex (on #htc-linux) has been doing some work on improving the GPS driver and has a kernel update project using the 2.6.35 codebase.

For technical users, information about all pending changes can be found in the merge requests section on my personal Gitorious page. Go there, look for the third box down in the right-side column, and click on “merge requests” to see the long list of changes submitted by the aforementioned folks.

Thanks to these brave code warriors, the next release of XDAndroid will be huge. And don’t forget, any donations you make will go to our contributors. Thanks!

Dual XDAndroid Releases – FRX06 and new Gingerbread

It’s that time again! And this time we’ve got a release for both froyo and gingerbread.

First of all, our official froyo branch release, FRX06… We’ve got a couple minor changes, backported from Gingerbread:

  • Switched to touch-friendly dialer, along with the VGA layout improvements as seen in Gingerbread
  • Added HSPA icon (for GSM models)

FRX06 is available for download now as a system.ext2 update.

And for Gingerbread, we’ve also got just a couple minor updates:

  • Further tuned keyboard sizing to be useful on VGA (also made the key labels bigger)
  • World-phone settings support (very important for future RIL enhancements especially on CDMA)
  • Enabled HSPA icon (someone on GSM please let me know if it actually works)

The new Gingerbread testing image is also available for download now as a system.ext2 update.

New Gingerbread Testing Image Available

Evening folks. Got another release for you tonight!

Decent list of changes…

  • Further keyboard size fixes, should be perfect now (and goes fullscreen in landscape)
  • Updated Google apps package (Books phone version is now included)
  • Switched to GLES1.1 library with patches from bzo (you probably won’t see much difference here)
  • Phone app switched to touch-friendly in-call user interface (and fixed its layout on Raph)

Regressions from the last system image that were fixed:

  • Added the missing camera bits
  • Re-added a graphical speed-up that was accidentally lost in merge

A few of these changes are important.

The software keyboard should be considered functional (but with some small bugs) at this point. If you see any issues, please report them on the bug tracker after searching for them to make sure it’s not a dupe.

The Phone app change is important for a couple reasons. On Rhodium, this allows us to set the end-call key to Home without crippling the user in a call, since there’s now a nice big button on the screen for hanging up. This will be further improved by implementing the proximity sensor. Our support for VGA devices precluded using this UI due to the buttons blocking some of the dialpad keys in the in-call screen. This has been fine-tuned to be useful on both resolutions.

Google Apps speaks for itself. Updated stuff, woo.

Anyway, without further ado, you may download the updated system image.

XDAndroid 2.2.2 (Froyo) Build FRX05

Another release!

This time it’s the Froyo branch. We’ve got build FRX05 available for download now. This is a minor release with a major new feature. 🙂

The short list of changes from FRX04 to FRX05…

  • Camera support – both photo and video capture (without sound currently) are working. This depends on kernel support, so only Rhodium and Topaz are supported currently. Huge thanks to Jerome Bruneaux (viruscrazy on XDA) for basically doing all the work.
  • Switch build variants from engineering to user-debug for slight speedup.

There’s no OTA update.zip this time. I accidentally got rid of the FRX04 target files, needed to generate the incremental patches.

Thanks for using XDAndroid!

Another Gingerbread Testing Image

Evening everybody. Got another testing image for you.
Changes:
  • Google apps should all be fixed now (tested with gmail particularly) — we’ve switched javascript engines and are now using V8
  • The accelerometer driver I’ve blogged about is now included in this build
  • Android codebase sync’ed to latest 2.3.3
  • Not included in this build is some preliminary work on GPS. It crashes Android (and freezes my RHOD400) so it’s been removed from the system image.
  • Proper hardware 3D driver provided in this system. Neocore still doesn’t work.
  • Gallery3D added to the build to test a possible fix for rotation issues. I’m mainly interested in results on RAPH.
Thanks again for everybody testing and providing feedback on these releases. This is signed so old data.img from our previous Gingerbread tester release may work. Again, if you have any problems, we suggest clearing out data.img before reporting them.