Code Monkey home page Code Monkey logo

bcsar-view's Introduction

BCSAR View

BCSAR View is a WIP tool for editing 3DS Sound Archives (*.bcsar).

At the moment, it supports dumping and inserting new wave sounds, sound sets, and archives. You can also dump sequences, banks, and groups.

Since BCSAR View is a WIP tool, you should take precautions before making any edits. Always back up your BCSAR before attempting to import or insert new sounds.

Installation

BCSAR View targets Java 8. To use it, you will need the Java 8 Runtime Environment.

Once you have the Java runtime installed, you can simply download the BCSAR View JAR and run it.

Usage

Assuming you have an extracted 3DS romfs to work with, begin by running BCSAR View. Next, click the "Open" button from the main window and select the BCSAR you want to edit.

From there, you are free to make edits to the file. When you are done, click "Save" to overwrite or "Save As" to save to a new location. For details on specific operations like dumping, adding new sounds, etc. see the following pages:

Building

First, install JDK8. OpenJDK users should also install OpenJFX8.

BCSAR View uses Gradle as its build system. Provided that you have JDK8, JavaFX, and Gradle installed, you can clone this repository and build the project using gradle build. Alternatively, you can use an IDE like IntelliJ.

License

Unless explicitly stated in a file, this project is licensed under the GNU General Public License 3.0.

bcsar-view's People

Contributors

thane98 avatar

Stargazers

 avatar Kat21 avatar  avatar eros71 avatar Isaac avatar  avatar  avatar leo avatar ーーー avatar  avatar salmoonlight avatar helloyanis avatar  avatar NintenHero avatar DracoMan671 avatar  avatar  avatar I pwned U! avatar  avatar  avatar

Watchers

 avatar Gamebrew avatar

bcsar-view's Issues

Tooltips

It's difficult to tell what a lot of fields (particularly configs) are used for from the name alone. Tooltips should be added to explain functionality to users.

Unexpected item type in sound group

java.lang.IllegalArgumentException: Unexpected item type in sound group.
	at com.thane98.bcsarview.core.structs.entries.SoundGroup.buildItemsList(SoundGroup.kt:37)
	at com.thane98.bcsarview.core.structs.entries.SoundGroup.<init>(SoundGroup.kt:27)
	at com.thane98.bcsarview.core.structs.Info.readGroupTable(Info.kt:148)
	at com.thane98.bcsarview.core.structs.Info.<init>(Info.kt:62)
	at com.thane98.bcsarview.core.structs.Csar.<init>(Csar.kt:51)
	at com.thane98.bcsarview.ui.MainWindowController$openFile$1.invoke(MainWindowController.kt:166)
	at com.thane98.bcsarview.ui.MainWindowController$openFile$1.invoke(MainWindowController.kt:165)
	at com.thane98.bcsarview.ui.forms.AbstractFormController$performWithWaitingScreen$1.invoke(AbstractFormController.kt:20)
	at com.thane98.bcsarview.ui.forms.AbstractFormController$performWithWaitingScreen$1.invoke(AbstractFormController.kt:18)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Game: Daigasso! Band Brothers P

Bad file sizes

Imported files (most notably CWSDs) have incorrect file sizes. Usually the size they report is larger than the actual file size.

To reproduce, import a sound set and dump it. If you open the file in a hex editor, you will pieces of another file entry at the bottom.

Instructions

The requirements and process for using BCSAR View isn't immediately clear. To help people use the program, the wiki should include tutorials over common operations like making a new voice set, adding external sounds, dumping / extracting, etc.

Index of sound in sound set is not set consistently

When adding entries to a sound set, sometimes the config will not be updated to the correct position of the sound in the sound set. BCSAR View should ALWAYS update this value so that you don't end up with multiple configs pointing to the same sound.

Refactoring

Editing CSAR files such as CWSD and CWAR is still very clunky. Additionally, too much behavior is tied directly to the CSAR class, causing it to become more and more bloated.

Before adding any additional features, we should try to make the back end easier to extend. Proposed changes:

  • Encapsulate more functionality behind CSAR entries. Create services that the CSAR class can call to handle steps like adding sounds to a set.
  • Create file retrievers that directly return CWAR and CWSD. Have these lazy load into a POJO when needed.
  • Get as much logic out of the controllers as possible. Handle any kind of CSAR-related processing in the back end. SoundSetEditorController is the main culprit here.

Actual extended config editing

The hex editors for extended sound configs do not commit changes to the backing field. Hex editors should write back immediately after a user makes a change.

Running BCSAR View on Linux fails to load "Glass Factory class"

Hi! I'm trying to run this but I've had no luck thus far. I've tried the OpenJDK 19 runtime for 0.4 alpha and the OpenJDK 8 runtime for 0.3 alpha. They both fail with the following error:

Jan 14, 2024 8:09:45 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @12ef5ccc'
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:42)
	at com.sun.glass.ui.Application.run(Application.java:144)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:280)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:288)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:829)
Failed to load Glass factory class
Exception in thread "main" java.lang.NullPointerException
	at com.sun.glass.ui.Application.run(Application.java:144)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:280)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:288)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:829)

Edit sounds in a sound set

Once the back end for it is in place, BCSAR View should provide a way for users to edit the contents of a sound set. The user should be able to:

  • Add and remove sounds from the set.
  • Replace sounds. Show a file selection dialog that allows them to select a WAV file.
  • Select a "template" for new sounds. The template will be used to build the BCSAR and CWSD entries for the new sound.

Unable to import a BCSAR file

its from Mario Kart 7. citric composer can also not open it.

The Exception:

java.lang.IllegalArgumentException: Unknown entry type in file table!
	at com.thane98.bcsarview.core.structs.Info.readFileEntry(Info.kt:182)
	at com.thane98.bcsarview.core.structs.Info.readFileTable(Info.kt:172)
	at com.thane98.bcsarview.core.structs.Info.<init>(Info.kt:54)
	at com.thane98.bcsarview.core.structs.Csar.<init>(Csar.kt:51)
	at com.thane98.bcsarview.ui.MainWindowController$openFile$1.invoke(MainWindowController.kt:166)
	at com.thane98.bcsarview.ui.MainWindowController$openFile$1.invoke(MainWindowController.kt:26)
	at com.thane98.bcsarview.ui.forms.AbstractFormController$performWithWaitingScreen$1.invoke(AbstractFormController.kt:20)
	at com.thane98.bcsarview.ui.forms.AbstractFormController$performWithWaitingScreen$1.invoke(AbstractFormController.kt:11)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Removing sounds from a sound set does not work properly

Removing sound files from a sound set does not appear to work properly in any circumstance. This bug seems to be present from version 0.1 right up to 0.4.

Steps to reproduce:

  1. Load a .bcsar and click 'Sound sets'
  2. Right-click any sound set and click 'Edit contents'
  3. Click any sound file and then the '-' icon
  4. Click 'Commit'
  5. Right-click the same sound set and click 'Edit contents'
    The contents of the sound set will not have changed. This will also be true if you save and reload the .bcsar.

Broken external sound insertion (possibly insertion in general)

Bugs encountered while testing archive and set creation:

  • External sounds are not inserted correctly. When done from scratch, nothing plays. When imported, the sounds fades out shortly after it starts playing.
  • When inserting sounds through the set editor, some sounds fail to play. Haven't found a pattern to this yet.

These bugs were also encountered when starting from a vanilla BCSAR, so they might not be related to archive and set creation.

Edit external file paths

Currently, there is no way to edit an external sound's path. BCSAR View should provide a text field to edit external sound paths.

Allow dumping to CWAV or WAV

Right now, if a command for converting from CWAV to WAV has been specified, BCSAR View will always convert to WAV, meaning there's no way to get a CWAV without clearing the setting. Users should be able to dump to either format.

Logging

BCSAR View currently has no logging.

Status Bar

The main view should have a status bar with a label that indicates the status of the last operation.

Name Validation

BCSAR View should not allow users to create sounds with names that already exist in the BCSAR. Methods that create new sounds should verify that all new names are not in use before inserting. An exception should be thrown if the name is already in use.

Waiting indicator on all windows

Several operations should show a waiting indicator while they run to prevent the user from doing anything. Right now, only the main window supports this.

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.