Giter Club home page Giter Club logo

cartboy's Introduction

CartBoy is no longer under active development. I'd recommend using FlashGBX.

Thanks for all the support.


# Features
  • Native macOS 🎉
  • Quick transfer speeds 🚀
  • Copy ROMs from your physical cartridges 📦
  • Write ROMs to your own flash carts ⚡️
  • Backup / Restore / Erase game save files 👾

CartBoy

CartKit

CartKit is a companion framework, used by CartBoy, that defines general device support and functionality.

SerialDevice<GBxCart>

The SerialDevice<GBxCart> is the cart reader device from insidgeGadgetsController that is capable of the following:

  • Reading the cartridge header; and,
  • copying the cartridge ROM; and,
  • backing up save data (if supported); and,
  • restoring save data (if supported); and,
  • deleting save data (if supported); and,
  • flashing new ROMs to compatible cartridges; and,
  • erasing existing ROMs from compatrible cartridges.

A SerialDevice<GBxCart> cannot be instantiated directly; instead use open on GBxCart and you'll receive an isntance.

Read cartridge header

Simply open a SerialDeviceSession, then read the header (checking the Result):

GBxCart.open { serialDevice in
  switch serialDevice.header(forPlatform: GameboyClassic.self) {
  case .success(let header) :print(header)
  case .failure(let error)  :print(error)
  } 
}
Copy a cartridge's ROM

Some functions let you get updates on the progress of an operation (such as when copying a cartridge to your Mac). In these cases you must call the operation from queue other than the main one.

If you omit providing a progress callback, the operation blocks the main thread; this maybe useful for a number of scenarios (such as unit tests).

GBxCart.open { serialDevice in
  try {
    let cartridge = serialDevice
       .readClassicCartridge (progress: { print($0.fractionCompleted) })
       .write                (toDirectoryPath: "/Users/kevin/Desktop")
       .check                (MD5: "b259feb41811c7e4e1dc20167985c84") /* Super Mario Land? */
       .get()
     print(cartridge)
  } catch {
     print("\(error)")
  }
}

Acknowledgements

Special thanks to:

  • armadsen
  • insideGadgets

License

Copyright (c) 2019 Kevin J. Vitale

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cartboy's People

Contributors

kevinvitale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

cartboy's Issues

Install problem

Hey im very sory to ask but how do I install the app on my mac ?

Support reading & copying GBA cartridges

All these tasks related to the insideGadgetsController only (which is obvious, since that's the only controller currently supported).

  • Read header
  • Determine ROM size
  • Determine RAM size
  • Copy ROM
  • Copy RAM

Add support for GBxCart RW v1.3

Hi Kevin,

It appears that GBxCart RW v1.3 isn't working correctly, it doesn't change to 5V (I can't recall if it ever worked?). The voltage selection is software controlled.

You just need to request the PCB version (#define READ_PCB_VERSION 'h') and if it matches v1.3 (#define PCB_1_3 4), it should send (#define VOLTAGE_5V '5') and wait a few hundred milliseconds just to be safe.

Thanks!

Gibby.HeaderError

I can do everything but write to a repo cart that I have SD007_TSOP-48BALL.
Unfortunately don't have another cart to try but I get this error anyway.

There is currently NOT a valid rom on the cart.
Screen Shot 2021-04-15 at 8 55 09 PM

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.