Code Monkey home page Code Monkey logo

rust-megadrive-cart-info's Introduction

megadrive-cart-info

A commandline tool to inspect a Sega Mega Drive/Genesis rom image

Example

$> megadrive-cart-info Virtua Racing (Europe).md

system name: SEGA MEGA DRIVE
copyright notice: (C)SEGA 1993.DEC
game name domestic: バーチャレーシング
game name overseas: Virtua Racing
product identifier: GM MK-1229 -00
checksum: 0x345D
device_support: J6
rom_start: 0x00000000
rom_end: 0x001FFFFF
ram_start: 0x00FF0000
ram_end: 0x00FFFFFF
extra_memory: false
extra_memory_type: 0x20
extra_memory_start: 0x20202020
extra_memory_end: 0x20202020
modem support:
memo: SV
region: E

Features

  • Partial implementation of shiftjis to UTF-8 (So far ASCII and most Katakana - as demonstrated above)
  • No crate dependencies
  • Pretty good test coverage

Binaries for tests

The two 3rd party binaries in tests/bin used for unit testing. They are not distrubuted in the RPM release

License

MIT

About

  • Written in Rust (author's first Rust project)

rust-megadrive-cart-info's People

Contributors

billyrayvalentine avatar ceriumdotorg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rust-megadrive-cart-info's Issues

Fix display values for extra_memory when extra_memory is false

Printing values for Roms that don't use extra memory is nonsensical. e.g.

extra_memory: false
extra_memory_type: 0x20
extra_memory_start: 0x20202020
extra_memory_end: 0x20202020

Which currently prints the 0x20 values (which is an ASCII SPACE) which is the correct way to set values when they should be left blank in the header

Need to:

  • Decide what to display as the values (e.g. None or "N/A") or hide them completely
  • Implement solution

Handle invalid files from commandline

Passing an invalid filename, path that is a directory etc, throws exceptions which are uncaught and results in a panic. Fix this so that an error is caught and presented more gracefully e.g. "invalid filename $filename" etc.

Populate RPM spec from Cargo.toml values

Values are duplicated in both the RPM spec and the Cargo.toml.
Cargo.toml should be the single source of truth for values such as Version, Description, License etc

Need to:
Create a build.rs so that values from the Cargo.toml are set in the RPM spec - thus avoiding duplication.

As the version should always be set in the Cargo.toml, consider removing the set version service in OBS which sets the Version from the last tag it finds from git.

Capture raw byte values

To help identify gaps in the shift-jis coverage and to aid development of other missing features, it would be useful to capture the raw bytes (pre UTF8, numeric) conversion and have them be able to be printed as a debug feature:

e.g. ./megadrive-cart-info --some-flag

........
game name domestic: バーチャレーシング
game_name_domestic_raw: 0x83, 0x6f, 0x81, 0x5b, 0x83, 0x60, 0x83, 0x83, 0x83, 0x8c, 0x81, 0x5b, 0x83, 0x56,
0x83, 0x93, 0x83, 0x4f

Need: Explore this solution more and implement

Handle missing second byte in double byte shift-jis bytes

Bytes with values of 0x81 - 0x9F are the first of a double byte value. If the second byte is missing, the program will panic with an index error.

Need to:

  • Decide how to handle a missing second byte - either silently drop it or convert the first byte to a unicode replacement char (u+FFFD)
  • Implement unit test
  • Implement solution

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.