Git Product home page Git Product logo

powersaves_ntrboot's Introduction

ak2itool

An expanded version of the example originally packaged with powerslaves. This rewritten version was created with the express purpose of supporting clones as well as the acecard 2i.

It should be noted that this code is brand new, compared to the old example and therefore needs testing which it has not recieved yet.

Usage

ak2itool dump <file> [length [address] ]

Reads the card's flash and dumps it to . If length is provided, then the output wil be truncated to length bytes. If address is provided, then it starts reading from that address.

Aliases: ak2itool read <file> [length [address] ]

ak2itool flash <file> [length [address] ]

Flashes the contents of to the card's flash. If length is provided, then only length bytes will be flashed. If address is provided, then it starts flashing to that address in flash.

Aliases: ak2itool write <file> [length [address] ]

In general, only the first character of a command is checked at the moment, so a command like ak2itool f flash.bin would work. This is subject to change, as soon as I find a good cross-platform argument parser. A length of 0 produces the default length.

Supported Cards

  • Acekard 2i revision 44
  • Acekard 2i revision 81
  • R4i Ultra -- This appears to be identical to the ak2i, meaning it'll be caught by the same code.
  • R4i Gold 3DS -- Untested, I heard from someone that the powersaves doesn't like communicating with it?

If you have a cart that you think could be supported, open an issue! Please provide a way of obtaining the software used to write the firmware, if you do so.

Hacking

The architecture is a little bit weird. Instantiated instances of the Flashcart class are automatically added to a vector which is iterated over to find the card that is currently inserted. It's designed so that you can make as few changes as possible to get a new card up and running.

You need to provide the following methods:

  • bool setup()
  • void cleanup()
  • void formatReadCommand(uint8_t *cmdbuf, uint32_t address)
  • void formatEraseCommand(uint8_t *cmdbuf, uint32_t address)
  • void formatWriteCommand(uint8_t *cmdbuf, uint32_t address, uint8_t value)

setup preforms basic initialization, such as unlocking the flash, and returns true if the card present is what it handles. This is the only function in your class that will be called if it returns false.

cleanup cleans up. Does stuff like locking the flash afterwards.

The format*Command family of fumctions expect you to take a pointer to a buffer, as well as some arguments, and write the equivilant command into the buffer.

Alternatively, you should be able to override the *Flash functions if the card really does act that different from the default. This is untested though, and it's quite possible I did something wrong to make that difficult. I don't normally write C++.

powersaves_ntrboot's People

Contributors

d3m3vilurr avatar kitlith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

powersaves_ntrboot's Issues

Compiled build?

I have been unable to compile this. Likely related to libusb stuff? I haven't been able to get it to find the lib. Getting "error: '_hypot' was not declared in this scope" message. (my OS is Windows 10 Pro by the way)

Would like to see how this tool compares to the 3DS/DSi versions of flashcart-core. I have an odd issue that appears to impact all versions of flashcart core involving my Acekard2i (it's hw id 88). In most cases it fails to properly update the rom sections I have been trying to update on occasion. Got a custom SRL setup for the second rom section it uses to mount on 3DS/DSi. It has been a real pain updating it anytime I make a change.

Just about everytime it ends up reverting the rom section to a prior version that used to be on my SD card. I have no idea how it's doing this when I overwrote the bin file with the updated one. it's either not flashing it or it is somehow pulling a previous version off the SD card despite it having been replaced in the filesystem of my SD card. I suspect it's a combination of both? Or could even be an undocumented hardware issue with the cart...but I doubt that. It's very strange.

One example was I had previously put the original backup I made back to the cart. The one that had DSi section using the Danny Phantom exploited rom. I then at some point replaced that rom with a custom one. Then after that I tried to update it again with another change...which results in the danny phantom rom coming back despite it being OVERWRITTEN on my SD card. Basically any previous version of the flash backup that existed prior could end up being written to the card instead of the intended one.

I don't even know how it's doing this. The Danny Phantom rom is living up to it's name and being a phantom rom that just won't die... it is maybe some odd file system issue. I've only been able to get the intended data to show up if I do a full format of the SD/MicroSD card I had the backup bin file on....and that is very time consuming so this is a very annoying issue. It has put me off with doing any more updates to the bootstrap SRL I built for my cart. :(

This problem persists on both 3DS and DSi builds of ntrboothax installer so I suspect it's a problem with the flashcart core API.

I have been wanting to test this tool with my powersaves dongle to see if I could get around that problem with this tool. ... Haven't had any luck getting any of this stuff to compile though. :(

DS-Xtreme support...

This might fall outside the scope of this tool maybe but I happen to own a DS-Xtreme. This tool or something like it could support writing custom firmware to it.

This card card was initially documented here:

https://wiki.gbatemp.net/wiki/DS-Xtreme

However it seems whom ever was looking at the flasher for this device stopped for unknown reasons. A while back while I was making launchers for various flashcarts to use with 3DS I found the firmware files and the updaters for them. The ones I have are slightly modified so as to not require getting the firmware files off a URL and instead get them off locally:

http://www.battlefieldsingleplayer.com/apachethunder/3ds/TWL/DSX/DSX_Updaters.rar

Since this card has it's own USB port and drivers perhaps this could be supported? But since it was meant to be flashed from it's own USB port, it may not fall in the scope of this tool. Still though it would be nice to see something done with this card. I happen to own one and can test anything you might manage to make for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.