MENU

BLOG

Good news everyone! The latest SuperGNES update includes support for shaders! We provide a CRT and grayscale shader by default, with support for your own. We are using OpenGL ES for the backend, so bear that in mind.

Our shaders are based on the XmlShaderFormat. We support the <vertex> and <fragment> tags, and we pass rubyTextureSize, rubyOutputSize, and rubyInputSize. We additionally pass in the time as a uniform float to the fragment shader, which represents the current millisecond. This is used to achieve the vertical animation effect in the “Scanline” version of our CRT shader. The <name>, <notes>, and <version> tags are all required.

Below is our default shader, which passes the image through unaltered. Place your custom shaders (ending in .xml) in the following path: /sdcard/supergnes/shaders/ You will need to create the supergnes/shaders/ folders yourself.

<?xml version="1.0" encoding="UTF-8"?>
<shader>
<name>SuperGNES Default Shader</name>
<notes>Extraordinarily ordinary!</notes>
<version>1</version>
<fragment><![CDATA[
precision mediump float;
uniform sampler2D u_Texture;
varying vec2 v_TexCoordinate;
void main() {
	gl_FragColor = texture2D(u_Texture, v_TexCoordinate);
}
]]></fragment>
<vertex><![CDATA[
attribute vec4 a_Position;
attribute vec2 a_TexCoordinate;
varying vec2 v_TexCoordinate;
void main() {
	v_TexCoordinate = a_TexCoordinate;
	gl_Position = a_Position;
}
]]></vertex>
</shader>

Please download our preset shaders from within SuperGNES under the Video FX setting. To learn more about GL Shaders check out https://www.google.com/search?q=glsl+es+shader+tutorial

Date posted: February 20, 2013 | Author: | Comments Off

Categories: General

We recently received a number of requests to add support for the iCADE 8-Bitty and iCADE Arcade Cabinet controllers to SuperGNES. After playing with the devices and looking at the documentation we thought it would be a relatively easy to integrate. However, there are a few caveats to these devices and there are no Android-specific support libraries available.

The first thing to note is that unlike most Bluetooth game controllers, the iCade products function as virtual Bluetooth keyboards. The second thing noted is the odd key event model. Pressing a button down produces two Android KeyEvents and releasing produces yet another two. For example, pressing down the “Start” key fires the key events U down, U up and releasing the button fires events F down and F up. This is unfortunate because it means the events need to be interpreted instead taken at face value.

The solution we came up with was to detect the presence of a paired iCade device and translate the incoming key events into game controller key events. To accomplish this we override the dispatchKeyEvent method in Activity. Once in place the iCade “Start” button now registers as the Android KeyEvent.KEYCODE_BUTTON_START key instead of the keys U and F. Check out the code example below to see how you can integrate iCade support into your Android apps. You can download the iCade support code here.

Activity Example Code:

public class BaseActivity extends Activity
{
	private boolean iCadeEnabled = false;

	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		detectiCade();
	}

	private boolean detectiCade()
	{
		Set pairedDevices = BluetoothAdapter.getDefaultAdapter().getBondedDevices();

		Iterator iter = pairedDevices.iterator();
		while (iter.hasNext())
		{
			BluetoothDevice bd = iter.next();
			if( iCade.isBluetoothNameiCade( bd.getName() ) )
				iCadeEnabled = true;
		}
	}

	public boolean dispatchKeyEvent(KeyEvent event)
	{
		if ( iCadeEnabled )
		{
			event = iCade.dispatchKeyEvent(event);
			if (event == null ) return true;
		}

		return super.dispatchKeyEvent(event);
	}
}
Date posted: November 30, 2012 | Author: | Comments Off

Categories: Development

This is a quick tutorial for SuperGNES so you can quickly find answers to the most common questions.

Date posted: October 4, 2012 | Author: | Comments Off

Categories: General

We are proud announce the release of Classic Kong, a faithful recreation of a classic title for the SNES. Yes, an actual new SNES rom. It’s free of copy-protection and free of charge, and we’ve even released the source code for you hobbyist types. Special thanks to Shiru for his hard work as lead developer.

Update: Second release! Because of the great response and requests for more content we’ve now added the pie factory level plus some more extras.

Check out the code, or just download the rom! Contact us with feedback or questions. Game on!

Date posted: August 7, 2012 | Author: | 4 Comments »

Categories: General

As of SuperGNES version 1.2.21 support for theme-able controllers skins has been implemented. Coming soon is the feature to add user created controller skins. So you can make any theme you can think of! I wanted to make this blog post available first so users can prepare for creating their own controller skins. So lets take a look at one of the SuperGNES controller skins.

This is the default transparent controller skin that comes with SuperGNES. Controllers skins are simply PNG images with extra information embedded in them describing different regions of the controls.  You can see from the image elements like the D-Pad and Button Pad. There are action elements that depict the buttons pressed down. Embedding the information in the image makes it easy to share and distribute.

Now lets take a look at the meta information embedded in the image. Inside is the comment text (or PNG tEXtComment ) which contains a structured JSON string. This string holds the controllers name, background color and a list of graphics regions called elements. Each element defines it’s own region, id and button type. Formatted below is the actual JSON string for reference.

Here is a hexadecimal dump of the image header.
89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR|
00 00 02 39 00 00 00 ae  08 06 00 00 00 d4 17 1c  |...9............|
bf 00 00 00 01 73 52 47  42 00 ae ce 1c e9 00 00  |.....sRGB.......|
04 6d 74 45 58 74 43 6f  6d 6d 65 6e 74 00 7b 22  |.mtEXtComment.{"|
6e 61 6d 65 22 3a 22 54  72 61 6e 73 70 61 72 65  |name":"Transpare|
...
...
{
// Controller name displayed
"name": "Transparent Default",  

// Background Color see http://developer.android.com/reference/android/graphics/Color.html
"backgroundColor": "#00000000", 

    // Element regions
    "elements": [
         // First element object
        {
            // Unique Element id
            "id": "dpad",

            // Element Type (supported values: dpad, buttonpad, ltrig, rtrig, start, select, menu, abutton, bbutton, xbutton, ybutton)
            "type": "dpad",

            // Rectangular region of graphic
            "staticBounds": {
                "bottom": 141,
                "left": 0,
                "right": 141,
                "top": 0
            },

            // Rectangular region of graphic when pressed
            "activeBounds": {
                "bottom": 141,
                "left": 143,
                "right": 284,
                "top": 0
            }
        },

        // More elements ...
        {
            "activeBounds": {
                "bottom": 141,
                "left": 428,
                "right": 569,
                "top": 0
            },
            "type": "buttonpad",
            "id": "buttonpad",
            "staticBounds": {
                "bottom": 141,
                "left": 286,
                "right": 427,
                "top": 0
            }
        },
        {
            "activeBounds": {
                "bottom": 173,
                "left": 47,
                "right": 93,
                "top": 142
            },
            "type": "ltrig",
            "id": "ltrig",
            "staticBounds": {
                "bottom": 173,
                "left": 0,
                "right": 46,
                "top": 142
            }
        },
        {
            "activeBounds": {
                "bottom": 173,
                "left": 141,
                "right": 187,
                "top": 142
            },
            "type": "rtrig",
            "id": "rtrig",
            "staticBounds": {
                "bottom": 173,
                "left": 94,
                "right": 140,
                "top": 142
            }
        },
        {
            "activeBounds": {
                "bottom": 173,
                "left": 188,
                "right": 250,
                "top": 142
            },
            "type": "menu",
            "id": "menu",
            "staticBounds": {
                "bottom": 173,
                "left": 188,
                "right": 250,
                "top": 142
            }
        },
        {
            "activeBounds": {
                "bottom": 173,
                "left": 251,
                "right": 324,
                "top": 142
            },
            "type": "start",
            "id": "start",
            "staticBounds": {
                "bottom": 173,
                "left": 251,
                "right": 324,
                "top": 142
            }
        },
        {
            "activeBounds": {
                "bottom": 173,
                "left": 325,
                "right": 404,
                "top": 142
            },
            "type": "select",
            "id": "select",
            "staticBounds": {
                "bottom": 173,
                "left": 325,
                "right": 404,
                "top": 142
            }
        }
    ]
}

You can simply download the image above and replace it with your own graphics if you stay within the same regions and use an image editor that preserve image comments. Beyond that you need to understand how the JSON format and element regions work.

Each element has a staticBounds property. This consist of four other properties left, right, top and bottom that define the boundary of the control element. To visualize how these relate take a look at the box model below. In addition there is the activeBounds property defining the image pressed or activated state. This allows for an animated interaction. The activeBounds and staticBounds bounds must have the same width and height to be considered valid. If you don’t want to create the active graphics simply set the activeBounds to the same coordinates as the staticBounds. Each element must be set a type such as dpad, buttonpad, ltrig, rtrig, start, select, menu, abutton, bbutton, xbutton or ybutton. The dpad and buttonpad types are unique as they require the bounds to be perfectly square for calculating touch regions. It’s recommended to use the buttonpad instead of using each abutton, bbutton, xbutton or ybutton. Finally give each element it’s own unique identifier.

Included below is the Java classes matching with the JSON string for use inside SuperGNES. This is mainly provided for easy reference.

package com.bubblezapgames.supergnes.touchcontrol;

import android.graphics.Rect;

public class ControllerGraphic
{
	// Controller name displayed
	public String name;

	// Background Color see http://developer.android.com/reference/android/graphics/Color.html
	public String backgroundColor;

	// Element regions
	public ControllerGraphicElement elements[];
}

public class ControllerGraphicElement
{
	// Unique Element id
 	public String id;

	// Element Type (supported values: dpad, buttonpad, ltrig, rtrig, start, select, menu, abutton, bbutton, xbutton, ybutton)
 	public String type;

	// Rectangular region of graphic
  	public Rect staticBounds;

	// Rectangular region of graphic when pressed
 	public Rect activeBounds;
}

// No copyright reserved. Public Domain

So now you have an idea of the format of a SuperGNES controller use a photo editing program to create the graphics for your controls. For help inserting comments into images, Gimp has a handy option for doing so. Go to Menu, Image, Image Properties and click on the Comment tab. Also make sure you save your controllers in PNG format and check the “Save comment” option.

Gimp

Thanks for checking out this blog entry. Look for future releases of SuperGNES with full support and a new controller gallery area here on supergnes.com.

Update: With SuperGNES release 1.4.2  user provided controller skins are now fully supported. Simply create the directory “supergnes/controllers” in the root of your device’s external storage and copy your PNG  controller image into that directory. Your custom controller skin should appear in the controller layout editor. Check the logcat messages on your device for debugging help.

 

Date posted: January 17, 2012 | Author: | Comments Off

Categories: General


After a month of development the brand new high speed SuperFX assembler core is complete and ready for you to play some StarFox and Yoshi’s Island! Once again SuperGNES has done a first by developing the fastest and most stable emulation core available. Please download the latest release to play!

Date posted: September 9, 2010 | Author: | Comments Off

Categories: General

SuperGNES Lite has been released to Android Market! It’s time (if you haven’t already) to give this SNES emulator a spin! The only differences between the full version and lite is save state support and multiple cheat codes. All the other features are available free of charge! Please give it a try and give us your feedback. Thanks!

SuperGNES Lite

Date posted: May 20, 2010 | Author: | Comments Off

Categories: General

Today SuperGNES has become the first in emulation history to support the SA-1 chip using a full ARM assembler core. Games that were previously unsupported like Super Mario RPG and Kirby can be played using the SuperGNES emulator. We hope to keep demonstrating our commitment to excellence by bringing the most technically advanced features to you the gamers! Now that SA-1 is complete SuperFX development for StarFox can begin!

Here is the full list of titles that are now playable with SA-1 support.

  • Super Mario RPG: Legend of the Seven Stars
  • Kirby Super Star
  • Kirby’s Dream Land 3
  • Super Bomberman Panic Bomber World
  • SD Gundam G NEXT
  • Dragon Ball Z: Hyper Dimension
  • Daisenryaku Expert WWII: War in Europe
  • Derby Jockey 2
  • SD F-1 Grand Prix
  • Itoi Shigesato no Bass Tsuri No. 1
  • J. League ’96 Dream Stadium
  • Jikkyou Oshaberi Parodius
  • Jumpin’ Derby
  • Kakinoki Shogi
  • Marvelous: Mouhitotsu no Takarajima
  • Masters New: Haruka Naru Augusta 3
  • PGA Tour ’96
  • Super Robot Taisen Gaiden: Masō Kishin – The Lord Of Elemental
  • Mini 4WD Shining Scorpion Let’s & Go!!
  • Pebble Beach no Hotou: New Tournament Edition
  • PGA European Tour
  • Power Rangers Zeo: Battle Racers
  • Shin Shogi Club
  • Shogi Saikyou
  • Shogi Saikyou 2
Date posted: April 29, 2010 | Author: | Comments Off

Categories: General

Finally after a year and a half of development, a number of false starts, endless coding and game debugging sessions; SuperGNES has shipped and is now available on the Android Marketplace! It’s been a harrowing journey but very rewarding to at last bring our vision of Super Nintendo for mobile devices to everyone. A big thanks to my developers and Beta testers. You guys rock! The future of SuperGNES is going to be very exciting!

Dedicated to the gamers,
Nate SuperGNES Dev

Date posted: March 20, 2010 | Author: | 3 Comments »

Categories: General

SuperGNES Multi-touch
Finally full multi-touch support is here for SuperGNES. Using the on screen controller you can simultaneously direct and button press at the same time. To help the Android phones that do not have build in keyboard there is one now built into the screen. Works for any Android Phone with multi-touch API support.

Date posted: March 12, 2010 | Author: | 2 Comments »

Categories: General