Homebrew gbaemu4ds: GBA emulator for DS(i) (DSi Entry)

Is the graphic better if you use the sc Version and the upper screen on a 3DS

  • I can't do that (have no 3DS) (have not tested that)

    Votes: 110 40.3%
  • Yes

    Votes: 48 17.6%
  • No

    Votes: 26 9.5%
  • I don't know

    Votes: 89 32.6%

  • Total voters
    273

tiggerlator

Well-Known Member
Member
Joined
Mar 15, 2009
Messages
204
Trophies
0
XP
73
Country
I'm using avast and just got r13 fine no problem and no sqawl from avast.

I'm just not sure how to test it. it does run on my dsi but i dont know how to patch a rom, or exactly which files to put were :S
 

Fishaman P

Speedrunner
Member
Joined
Jan 2, 2010
Messages
3,322
Trophies
1
Location
Wisconsin
Website
twitch.tv
XP
2,189
Country
United States
tiggerlator said:
I'm using avast and just got r13 fine no problem and no sqawl from avast.

I'm just not sure how to test it. it does run on my dsi but i dont know how to patch a rom, or exactly which files to put were :S
Which is good.

According to PCWorld, Avast! is the ONLY antivirus to return 0 false positives.
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The
here is the src you can compile it yourself if there is a Virus inside
CODEnamespace WindowsFormsApplication1
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;

///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
this.button1 = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.button2 = new System.Windows.Forms.Button();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.button3 = new System.Windows.Forms.Button();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// checkedListBox1
//
this.checkedListBox1.CheckOnClick = true;
this.checkedListBox1.FormattingEnabled = true;
this.checkedListBox1.Location = new System.Drawing.Point(12, 12);
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.Size = new System.Drawing.Size(400, 469);
this.checkedListBox1.TabIndex = 0;
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 513);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(209, 31);
this.button1.TabIndex = 1;
this.button1.Text = "Load";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "gba.gba";
//
// saveFileDialog1
//
this.saveFileDialog1.FileName = "gba.gba";
//
// button2
//
this.button2.Location = new System.Drawing.Point(227, 513);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(185, 31);
this.button2.TabIndex = 2;
this.button2.Text = "Save";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(12, 490);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(107, 17);
this.checkBox1.TabIndex = 3;
this.checkBox1.Text = "Bootloader patch";
this.checkBox1.UseVisualStyleBackColor = true;
//
// button3
//
this.button3.Location = new System.Drawing.Point(227, 487);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(185, 20);
this.button3.TabIndex = 4;
this.button3.Text = "Load and auto detect";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(125, 490);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(69, 17);
this.checkBox2.TabIndex = 5;
this.checkBox2.Text = "Anti User";
this.checkBox2.UseVisualStyleBackColor = true;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(424, 557);
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.button3);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.checkedListBox1);
this.Name = "Form1";
this.Text = "patch to BKPT";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.CheckedListBox checkedListBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.CheckBox checkBox2;
}
}



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
checkBox1.Checked = false;
checkBox2.Checked = false;

checkedListBox1.Items.Clear();

openFileDialog1.ShowDialog();
Stream insram = openFileDialog1.OpenFile();
Byte[] Feld = new Byte[insram.Length];
insram.Read(Feld, 0, (int)insram.Length);
//search for swi or other stuff
for (int i = 0; i < insram.Length - 1; i += 1)
{
if (Feld[i + 1] == 0xDF && Feld < 0x2A)
{
checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (thumb)");
}
if (Feld[i + 1] == 0xEF && Feld < 0x2A)
{
checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (arm)");
}
}
insram.Close();
}

private void button2_Click(object sender, EventArgs e)
{

Stream insram = openFileDialog1.OpenFile();
Byte[] Feld = new Byte[insram.Length];
insram.Read(Feld, 0, (int)insram.Length);

saveFileDialog1.ShowDialog();
Stream outram = saveFileDialog1.OpenFile();

if (checkBox2.Checked)
{
/* ichfly this is not perfect but some homebrew use that in the bootloade
* mov r0, #Cpu_Mode_USR:OR:0x80:OR:0x40 ;
* msr CPSR_c, r0 ; Switch to USR mode
*
* to
*
* mov r0, 0x1F ; System (privileged 'User' mode)
* msr CPSR_c, r0 ; Switch to USR mode
*
*/
for (int i = 1; i < insram.Length - 6; i += 1)
{
if ((Feld[i - 1] == 0xD0 && Feld == 0x00 && Feld[i + 1] == 0xA0 && Feld[i + 2] == 0xE3) &&
(Feld[i + 3] == 0x00 && Feld[i + 4] == 0xF0 && Feld[i + 5] == 0x21 && Feld[i + 6] == 0xE1))
{
MessageBox.Show("User patched at " + Convert.ToString(i - 1, 16).ToUpper());
Feld[i - 1] = 0x1F; //mov r0, 0x1F ; System (privileged 'User' mode)
break;
}
}


}

if (checkBox1.Checked)
/* mov rx, pc @x zwischen 0 und 7
lsl rx, #5 @ Are we running from ROM (0x8000000 or higher) ?
jmp//bcc SkipEWRAMClear @ No, so no need to do a copy.
*/
{
for (int i = 1; i < insram.Length - 5; i += 1)
{
if ((Feld[i - 1] & 0xF8) == 0x78 && Feld == 0x46 && (Feld[i + 1] & 0xC0) == 0x40 && Feld[i + 2] == 0x01 && (Feld[i + 4] & 0xF0) == 0xD0)
{
MessageBox.Show("bootloader patched at " + Convert.ToString(i - 1, 16).ToUpper());
Feld[i + 1] = (Byte)(Feld[i + 1] | 0xC0); //lsl rx, #5 to lsl rx, #7
break;
}
}
}

for (int i = 0; i < checkedListBox1.CheckedItems.Count; i++)
{
string strings = checkedListBox1.CheckedItems.ToString();
string[] splitted = strings.Split(" ".ToCharArray());
UInt32 addr = Convert.ToUInt32(splitted[3],16);
if (splitted[4] == "(arm)")
{
Feld[addr - 1] = Feld[addr];
Feld[addr + 1] = 0xE1;
Feld[addr] = 0x20;
Feld[addr - 2] = 0x70;
}
else if (splitted[4] == "(thumb)")
{
Feld[addr + 1] = 0xBE;
}
}
outram.Write(Feld, 0, Feld.Length);
outram.Close();
insram.Close();
}

private void button3_Click(object sender, EventArgs e)
{
checkBox1.Checked = false;
checkBox2.Checked = false;
checkedListBox1.Items.Clear();
openFileDialog1.ShowDialog();
Stream insram = openFileDialog1.OpenFile();
Byte[] Feld = new Byte[insram.Length];
insram.Read(Feld, 0, (int)insram.Length);
//search for swi or other stuff

for (int i = 1; i < insram.Length - 6; i += 1)
{
if ((Feld[i - 1] == 0xD0 && Feld == 0x00 && Feld[i + 1] == 0xA0 && Feld[i + 2] == 0xE3) &&
(Feld[i + 3] == 0x00 && Feld[i + 4] == 0xF0 && Feld[i + 5] == 0x21 && Feld[i + 6] == 0xE1))
{
if (i < 0x180) checkBox2.Checked = true;
break;
}
}

for (int i = 1; i < insram.Length - 5; i += 1)
{
if ((Feld[i - 1] & 0xF8) == 0x78 && Feld == 0x46 && (Feld[i + 1] & 0xC0) == 0x40 && Feld[i + 2] == 0x01 && (Feld[i + 4] & 0xF0) == 0xD0)
{
//MessageBox.Show("bootloader patched at " + Convert.ToString(i - 1, 16).ToUpper());
//Feld[i + 1] = (Byte)(Feld[i + 1] | 0xC0); //lsl rx, #5 to lsl rx, #7
if (i < 0x180) checkBox1.Checked = true;
break;
}
}


for (int i = 0; i < insram.Length - 1; i += 1)
{
if (Feld[i + 1] == 0xDF && Feld < 0x2A)
{
if ((Feld < 0x2A && Feld > 0x24) || (Feld < 0x20 && Feld > 0x01)) checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (thumb)", true);
else {checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (thumb)",false);}
}
if (Feld[i + 1] == 0xEF && Feld < 0x2A)
{
if (((Feld < 0x2A && Feld > 0x24) || (Feld < 0x20 && Feld > 0x01)) && Feld[i - 1] == 0x00 && Feld[i - 2] == 0x00) checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (arm)", true);
else { checkedListBox1.Items.Add("swi " + Convert.ToString(Feld, 16).ToUpper() + " at " + Convert.ToString(i, 16).ToUpper() + " (arm)", false); }
}
}
insram.Close();
}
}
}
 

psyonity

Member
Newcomer
Joined
Aug 14, 2011
Messages
6
Trophies
0
Age
27
Website
kasoft.nl
XP
73
Country
Netherlands
i've trying to open the PONG gba game patched for the hyperspeed version but i get a white top screen and the bottom screen shows only the standard debug info... i've got the pong game from the normal version with was included and have patched it. can someone look for me what the problem is? i've a ndslite with a r4i-sdhc fake one (lend from a friend)
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The
psyonity said:
i've trying to open the PONG gba game patched for the hyperspeed version but i get a white top screen and the bottom screen shows only the standard debug info... i've got the pong game from the normal version with was included and have patched it. can someone look for me what the problem is? i've a ndslite with a r4i-sdhc fake one (lend from a friend)

most games are not compatible with the hyperspeed Version only about 10%

A new Version is on the way
 

Mbmax

Homebrew addicted
Member
Joined
Nov 7, 2006
Messages
2,275
Trophies
1
Website
Visit site
XP
413
Country
Good to know you are still on it ichfly.
happy.gif
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The
Someone asked me to make a Video of the new (unreleased) Version her is it

[youtube]http://www.youtube.com/watch?v=V_asMrO4AQ0[/youtube]
 

TOTAL_NOOB

Member
Newcomer
Joined
Aug 5, 2011
Messages
7
Trophies
0
XP
22
Country
United States
Dear ichichfly come here asking for your advice, I can not I run any homebrew
.gba in my R4SDHC (original firmware) as I do?

he already has support for games. GBA Normal?
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The
The GBA didn't have an SD slot, if the GBA system was rewritten the games would have to be re-written to, individually, and at that point you might as well just make a homebrew version of the game.
Has anyone done that?
Made a DS homebrew of GBA games?

no there is no such thing out there for now as fare as I know.


fuck were do you get this from?

Any way this is the new Version of the gbaeum4ds hwspeedup. Any way I can't release it myself because I have to release the src as well because of the GPL.
 

Mbmax

Homebrew addicted
Member
Joined
Nov 7, 2006
Messages
2,275
Trophies
1
Website
Visit site
XP
413
Country

fuck were do you get this from?

Any way this is the new Version of the gbaeum4ds hwspeedup. Any way I can't release it myself because I have to release the src as well because of the GPL.
What's the problem with that ichfly ?

Just update the github then.

edit : maybe i understand why now that i tested this build ... :(
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The

fuck were do you get this from?

Any way this is the new Version of the gbaeum4ds hwspeedup. Any way I can't release it myself because I have to release the src as well because of the GPL.
What's the problem with that ichfly ?

Just update the github then.

edit : maybe i understand why now that i tested this build ... :(

The problem is that there is code inside I can't release. I look what I can do.

ADD: It is some days old but it is my original and it work on my DS and on some other.

ADD2: Use this on your own risk some thing inside may cause damage because it is still highly untested.

ADD3:it only works on r4i gold

ADD4: since this acc seems to be a shared acc. the post may be replaced by an other file by someone

ADD5: The post is illegal without the src code.

ADD6: it has support for 256Mbit roms.
 

Mbmax

Homebrew addicted
Member
Joined
Nov 7, 2006
Messages
2,275
Trophies
1
Website
Visit site
XP
413
Country
ADD3:it only works on r4i gold

ADD4: since this acc seems to be a shared acc. the post may be replaced by an other file by someone

ADD5: The post is illegal without the src code.

ADD6: it has support for 256Mbit roms.
Ask a moderator to modify the post by reporting it if you think it violate the rules. ;)

I don't own any r4i gold. :(
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
1
XP
1,075
Country
Gambia, The
Update hwspeedup beta 1 http://ichfly.github.com/gbaemu4DS/

256 MBit roms work now (The faster r4i gold only Version it is somewere on gbatemp don't ask me were) (read this topic than you understand why)
some fixes by me and some by totschlag_Engelchen
Avatar:
bokusatsu1.jpg
is from Bludgeoning Angel Dokuro-Chan
new UI
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=pCYyXcb_pJk Lol spiderman dong