Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Latest Threads
Configure save state on 3...
Last Post: goomba000
11-20-2024, 01:41 PM
Any idea?
Last Post: Namint
11-19-2024, 07:38 AM
RTC on PS Vita
Last Post: maka
10-30-2024, 11:10 AM
Help with mGBA and tradin...
Last Post: verarrewfashra
10-23-2024, 04:11 AM
Need help with destinatio...
Last Post: Guy71
10-13-2024, 06:15 PM
Master Pause Feature
Last Post: Amichi
10-12-2024, 04:14 AM
mGBA Xbox 1 controller is...
Last Post: Pokemonredfan
10-02-2024, 12:16 PM
Some help is needed
Last Post: endrift
09-30-2024, 11:54 PM
Hello, just joined this c...
Last Post: Hazstar98
09-28-2024, 05:41 PM
Pokémon GSC internal clo...
Last Post: endrift
09-12-2024, 11:39 PM

Forum Statistics
» Members: 1,624,   » Latest member: hanagroupasia,   » Forum threads: 628,   » Forum posts: 2,361,  
Full Statistics

  [SOLVED] Big Mutha Truckers crash
Posted by: TasGema - 05-28-2016, 02:43 PM - Forum: General - Replies (2)

I switched to mGBA after hearing that it's a more accurate emulator than VBA, however one of the game's i'm playing (Big Mutha Truckers ) crashes. This happens in both in the latest standalone version and the RetroArch mGBA core. Is that a known issue?

It works fine with VBA.

Print this item

  Changing the save/save state directory
Posted by: fox_whisper85 - 05-27-2016, 07:05 PM - Forum: General - Replies (16)

I apologize if this has been asked before (and for the life of me, I can't locate or recall where the post was made), but is it possible to specify a save directory for the save and save states since mGBA doesn't support file type filtering? It would make loading games a lot easier to navigate through, thank you for your hard work Big Grin

Print this item

  [Android] GameList: Grid vs List
Posted by: ds84182 - 05-26-2016, 10:14 PM - Forum: Development - Replies (3)

First, here are images of grids and lists from the Material Design Guidelines

List:
[Image: components_lists_keylines6.png]

Grid:
[Image: components_grids_specs12.png]

Grids are primarily for consuming audio visual content (eg. Videos Games, Movies, Music), while a list would work for textual content (eg. Settings, Messaging). Grid items focus on images while list items focus on text. Grids also allow more items on the screen, since in portrait you can have 2 items side by side, and in landscape you could have 3 or more items side by side (In landscape, on my phone, I can see 6 games at a time vs 2 games at a time (with a lot of wasted whitespace)).

So, to conclude, here's a list of pros and cons (and potential mitigations):

Grid:

Pros:

  • Save images are treated as a first class citizen so users can see what they were doing last and also identify the game without reading the title
  • A lot more games can fit on the screen at the same time

Cons:
  • Game titles get truncated (Mitigation: Long press a game to view its title in a Toast (This is also implemented by Netflix))

List:

Pros:
  • Users can see the title and any extra information that may be available (possibly publisher or last play date...)

Cons:
  • Uses up a lot of room on the screen, shows a lot of whitespace.
  • Save images are swept off to the side. Users can still get context but it isn't the main focus.
  • Only 3-5 games can be shown on a screen in portrait at a time vs 6-15 with a grid.

Print this item

  [Android] rxJava vs Agera
Posted by: ds84182 - 05-17-2016, 09:58 PM - Forum: Development - Replies (3)

So a long long looooooong time ago, some person thought "What if we could respond to things changing directly after they change instead of constantly polling?" Thus, Reactive programming was formed.

rxJava

Now, even though rxJava stands for "reactive extensions for Java," rxJava is more functional programming than reactive.

rxJava focuses on event driven data flow using dynamically built observables. rxJava observables can send a total of 3 events: Data, Error, and Done. rxJava has flow control operators too, like filter, reduce, map, etc. Flow control operators basically act like a subscription that sends data to another subscription in a chain. This can be extremely inefficient because of all the object allocation that goes on. It also has a rather confusing threading model, since rxJava was made to use in desktop Java applications.

Agera

While Agera is rather new, it gives reactive programming crafted explicitly for Android. At the core of Agera, you have these interfaces: Observable, Updatable, Receiver, Result, and Supplier. Unlike rxJava, reacting comes first and data flow second. And inside of Agera's implementations it uses Android primitives, like Loopers and Handlers, to communicate and automatically debounce duplicate updates to updatables (this also ensures that the thread you used to subscribe on is the one responsible for handling the updates).

Agera also has results. Results represent the actual data, and they have 3 different states: Present, Failed, and Absent. This allows the program to optionally synchronously handle data if it has already been loaded.

An example

Lets say we're loading a list of games from multiple directories on the filesystem. For each game we must ensure that it's valid and create a new Game object from the file.

rxJava:

Loader implementation:

Code:
Observable.from(directories) // Each of these steps cause some sort of allocation!!
   // Missed implementation detail: ReplaySubject madness that would allow for caching.
   .subscribeOn(Schedulers.io()) // Or maybe it's observeOn... I don't know. rxJava is kinda ambiguous here...
   .map(File::listFiles)
   .flatMap(Observable::from)
   .map((file) -> {
       if (Game.isValidGame(file)) {
           return Game.from(file);
       }
       return null;
   })
   .filter((game) -> game != null)
   .toList();

Using the loader:
Code:
loadGameLater() // Not seen: The method and the class that returns the above observable
   .observeOn(AndroidSchedulers.mainThread()) // Same comment from above...
   .subscribe(list -> {
       // Do something with the list here...
   });

Agera:

Loader implementation:
Code:
public class GameList extends BaseObservable implements Supplier<Result<List<Game>>> {
   private Result<List<Game>> result = Result.absent(); // Returns a reference to a static and immutable object
   // Also, as a consequence, we get caching!

   @NonNull
   @Override
   public Result<List<Game>> get() {
       return result;
   }

   @Override
   protected void observableActivated() {
       // Called when the GameList goes from 0 subscribers to 1 or more
       loadDataIfAbsent();
   }

   private void loadDataIfAbsent() {
       if (result.isAbsent() || result.failed()) {
           executor.execute(() -> { // Not seen: Java thread executor that runs this on another thread
               try {
                   List<Game> games = new ArrayList<>();
                   // Essentially the raw logic from rxJava
                   for (File directory : directories) {
                       for (File file : directory.listFiles()) {
                           if (Game.isValidGame(file)) {
                               games.add(Game.from(file));
                           }
                   }
                   result = Result.present(ImmutableList.copyOf(games));
               } catch (Exception ex) {
                   result = Result.failure(ex);
               }

               dispatchUpdate();
           });
       }
   }
}

Using the loader:
Code:
// Not seen: The class that has these methods and fields
private GameList gameList = new GameList(); // This would be a singleton somewhere and injected by Dagger
private boolean observing = false;
private void startObserving() {
   if (!observing) {
       gameList.addUpdatable(onGameListChanged);
       // Advantage: If a piece of code clears the cache (say a new library directory) we get notified!
       onGameListChanged.update(); // We have to call this after registering so previously cached data can be loaded
       observing = true;
   }
}

private Updatable onGameListChanged = () -> {
   Result<List<Game>> result = gameList.get();
   if (result.isPresent()) {
       List<Game> list = result.get();
       // Do something with the list...
   }
};

private void stopObserving() {
   if (observing) {
       gameList.removeUpdatable(onGameListChanged);
       observing = false;
   }
}

As you can see the rxJava implementation is shorter than the Agera implementation... However, the Agera implementation has caching and proper reactivity. In rxJava caching means taking extra care to make sure that multiple threads don't request something at the same time, which causes the data to load multiple times (!!!) before caching. Furthermore, Agera deals with all the threading madness and DOESN'T create multiple objects just to do something simple.

Who is using rxJava?

There are 8,156 projects that use rxAndroid and rxJava on Github.

Who is using Agera?

There are 42 projects that use Agera on Github (due to the age of the library). Google uses Agera inside of their Google Play Movies app (which is where the code was extracted from).

Because Google made Agera, they may soon make it a recommended library. It's also made for Android instead of generic Java applications.

Print this item

  [Android] Retrolambda: What it is, how it works, and why should we use it
Posted by: ds84182 - 05-17-2016, 08:55 PM - Forum: Development - Replies (3)

What is it? How does it work?

In Java 8, Oracle introduced lambdas. These lambdas are implemented as nameless anonymous classes, a feature that has been in Java for ages. Retrolambda is a compile time library that utilizes JDK 8 to convert classes that use lambdas to use normal anonymous classes.

Why should we use it?

Consider this example copied from port/android-agera:

With Retrolambda:

Code:
Collections.sort(games, (a, b) -> a.name.compareTo(b.name));

Without Retrolambda:
Code:
Collections.sort(games, new Comparator<Game>() {
   @Override
   public int compare(Game a, Game b) {
       return a.name.compareTo(b.name);
   }
});

Java 8 lambdas also allow you to bind methods into lambdas (as long as the method signature matches the interface):

Code:
handler.postDelayed(this::hideToolbar, 1000);

vs.

Code:
handler.postDelayed(new Runnable() {
   @Override
   public void run() {
       hideToolbar();
   }
}, 1000);

Compile time costs:
None, the process of converting Java 8 to Java 7 is extremely fast.

Who uses it?

According to GitHub, Retrolambda is used in 4,160 projects (judging from the number of Gradle files that include it). It could be used in even more places, since this is a compile time dependency.

Print this item

  Forums rearranged and simplified
Posted by: endrift - 05-17-2016, 08:34 PM - Forum: News - No Replies

In the interest of simplifying the forums, several changes have been made:

  • General and Support have been merged together. The difference between the two boards was always a bit poorly defined, so there's only one board for them now.
  • The two gaming boards were merged and put into off topic. They didn't see any traffic, anyway.
  • A new development section was added, by request. This is primarily for developers talking about potential changes, or discussing changes that are made, not for the average user.
Hopefully this will make browsing the forums less confusing now!

Print this item

  I still can't figure out how to use cheat codes!
Posted by: mooschu - 05-02-2016, 03:37 AM - Forum: General - No Replies

I'm gonna need a step by step guide on how to enter cheat codes. I've read the other threads, but I just can't seem to figure it out. Maybe I'm missing something here. I'm using the released version 0.4.0 for Windows. I'm trying to use action replay codes.

Thank you

Print this item

  Fast Forward button settings
Posted by: LimitCrown - 04-29-2016, 09:53 PM - Forum: General - Replies (2)

Is there a way to disable the ability to fast-forward temporarily? When I'm using my Logitech gamepad, I accidentally hit the right trigger button or the left trigger button sometimes, which causes games to fast-forward or pause, respectively.

Print this item

  I need a guide on how to use cheat
Posted by: longxa762 - 04-14-2016, 10:59 AM - Forum: General - Replies (5)

How do you exactly use the cheat system I'm so confused. I got some GameShark that I'm sure 100% working on other Emulator, but I can't figure out how do you suppose to enter it in mGBA.

So I click Add New Set, put my code in the blank space, then click Add Gameshark, it do nothing and if I don't click on the available set, it will automatic create a new emty set. Tried all the Add option and the only way to add it was to click on the Add button, but adding the code using that option doesn't do anything ingame.

edit: is it possible to change the keybind for fast forward/speed up? everytime i save in crucial point sometime the game just stuck in speed mode and i have to press space to change it back
edit2: ok I figure it out, it seem mgba doesn't support the gameshark code(the code is too short?) so i found some codebreaker and it worked

Print this item

  mGBA for Wii
Posted by: Malphas - 04-11-2016, 11:36 PM - Forum: General - Replies (2)

Is there a way to activate speed? I've googled it a bunch and I saw the pc version has a turbo button holding TAB so I'm wondering if the one for the Wii also has one. If yes, how do I use it, if not, will you ever add it? Some games with grinding like Pokemon and Breath of Fire get really boring if you have no turbo/speed button. Also whether it has it or will eventually be added. It would be great if it were a toggle as opposed to holding of a button.

Print this item


Online Users
There are currently 268 online users. » 0 Member(s) | 268 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.