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: 109 40.2%
  • Yes

    Votes: 48 17.7%
  • No

    Votes: 26 9.6%
  • I don't know

    Votes: 88 32.5%

  • Total voters
    271

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
0
XP
1,042
Country
Gambia, The
This is a gba emulator for DS

This emulator is working and tested on r4i gold from www.r4ids.cn.

Install:

for wood user (v1.45 or newer) (If you use use an older Version you need to update as this won't work on an older Versions):

1. Download and unpack the latest Version (link) to the root of your SD
2. copy the gba homebrews and roms you want to play to your flashcard (the ending must be .agb, .bin or .mb (.gba dose not work at the moment (this does not work because wood disallows it. I can't fix that. Ask the creator of wood)))
3. finished you can now lunch your gba homebrew/roms like the DS homebrews/roms

r4
fixed key detection
hwspeedup: fixed BG mode 3,4,5 but not good yet
hwspeedup: little speedup
hwspeedup: speedup by dmaCopy
hwspeedup: size decrease the nds is about 80KB smaller
hwspeedup: little menü for changing the fps that are generated not good yet

r5

can load bigger gba roms in dsi mode (14.680.064) or with slot-2 ram (thanks Mbmax for testing)
can run commercial roms (beta)
ui to load gba and .sav (beta) (hope this work as it worked with nitro)
load saves (no save saving just the load funktion) (beta)

fix1

fix DSi mode (broken when there are to much files on the SD) but dec size to a little bit more than 14 MB
fix arm9
fix gba open (hope)

fix4

UI working now but not every time sometime crush alloc
Add show fps

r10 (hyperspeedup) (only very very few homebrew work I think ~5-10 %) (most gba files must be patched)(speed normally 50-200% of the original gba speed)

Features Behind-the-Scenes improvements to system performance and stability (Flush/Invalidate DC and IC)
updated rom loader some older flashcards work now (AK(i) seems to have issue with the new version but not because of this (I can't test this but someone has reported that))
BIOS_RegisterRamReset(0xFF); is called at the startup also done on the original gba (fix some games)

patcher:

added auto detect for some patches
added Anti User patch some games need that to start
some other things

r11 (hyperspeedup) (only very very few homebrew work I think ~5-10 %) (most gba files must be patched)(speed normally 50-200% of the original gba speed)

Features Behind-the-Scenes improvements to system performance (short cuts added)
better 0x4000004 - 0x4000008 emulation
dma start a Vblanc now working (at Hblanc still not working)
timer added 2*GBA frequency (no interrupt is working yet (also Vblanc and so on))
DISPCNT emulation improve (mode 3-5 still has a update frequency of 6 Hz)


r12 (hyperspeedup) (only very very few homebrew work I think ~10-15 %) (most gba files must be patched)(speed normally 50-200% of the original gba speed)

Untested but hope it work now irq added
Features Behind-the-Scenes improvements to system performance (short cuts added)
swi 6 fixed

r13
prefetch fail fixed by workaround and on the fly patch

r14

working with unpatched gba roms

some fixes by me and some by totschlag_Engelchen
new UI


r15
dma speedup
fix in the browseForFile function
fix: swi 6
add: swi 7
add: BIOS_RegisterRamReset(0xFF) at start

r16
power Off unneeded things
fixed some bugs
don't crash the arm7 any more
break function added (L+R+A+B)

r17
change: now calculate the best size for the buffer for the gba file (currently a bit more than 2,9 Mbyte currently every read above that 2,9 Mbyte return garbage)
fix: irq system (faster irq handling, gba irqs seems to work now)
fix: some "advanced" graphic functions in mode 3-5
added: some break menu functions

r18
change: impr. ex_s.s
change: fixed 16 Bit read
change: impr. hw reg read/write

r19
added: now reads (dma and normal) from rom above the ram buffer work (now reads from any part of the rom work however execution is limited to lower ~ 2,9 MByte)

r20
-inc. executable size to more than 3 Mbyte
-cleaned it up a bit
-speed up loading

r21
added: dehook some patches that break some functions
added: not realy working sound emulation
fix: timing functions now emulate the real speed that fix some games but also may break some games anyway I need it for the sound functions

r22
fix: irq (for Another World(still not working),MaxMod Audio(still not working),gng(now working) but some homebrews that worked in r21 or before are no more working)
change: Disabled sound dma get requests (sound dma get requests break many games)

r23
change: now only write non debug stuff to the touch screen
add: swi 5 (VBlankIntrWait) now do frameasyncsync (If the gba rom support that you now get true 60fps)

r24
add: if L+R+B is pressed before the Emulator crash the emulator will generate an debug dump called "gbadump.bin" on the sd
fix:sp for Multi Interrupts
add: code for fast tracking

r25
add: select SaveType
fix:re import sp
add:some debug code (disabled)
"This update provides behind-the-scenes fixes that will improve the overall system performance" (some code clean up and small things look at git if you want to see all changes)

r26
add: swi 2,3,4
fix siw 5
change: reduced power consumption if gba use swi 2,3,4,5
add: file auto detect
add: mb now used as mb
change: now save new save files as .sav

r27
recompiled with new gcc
some fixes

r28
use new PU configuration that give the gba much more power but make some games run to fast or crash but fix more crashes
code cleanup now the src should be easy to compile

r29
new irq system <-- still beta break some games fix some (Another world is working now)

r30
now 2 irq systems --> switch in https://github.com/i...chflysettings.h (gba_handel_IRQ_correct) one for new homebrew and com. roms and one for old homebrew
new setting emulate_cpu_speed (https://github.com/i...chflysettings.h)
Graphic fix for Defi_noel_2007

r31

"This update provides behind-the-scenes fixes that will improve the overall system performance" <-- lock at git if you don't blieve that (fixed DragonBallTR (PB))

r32

"This update provides behind-the-scenes fixes that will improve the overall system performance"
better fifoinit

r33
some shortcuts added
added slow Versions (that Version fix some games,break some games and some games are slowed down)

r33
some shortcuts added
added slow Versions (that Version fix some games,break some games and some games are slowed down)

r34
"This update provides behind-the-scenes fixes that will improve the overall system performance"

r35 (fix(Camp Lazlo) and break some games(unknown) if you game frees try to press X at the point where the game frees and it may work (Camp Lazlo))
added fat code
fixed uppern_read_emulation
added file map speedup

r36 (fixed Mario Advanced 2(U)/(J) fixed Anguna and many other homebrews they also save now)
added itcm protector
added greatownfilebuffer
added ichfly_readdma_rom
fixed eeprom emulation

r37 (Pokemon works now if X is pressed at some points)

some IRQcode impr
inc. buffslots from 100 to 255
some functions are now arm code

r38

fixed most crushes if X is not pressed
added H-Blank stuff

r39

added buggy reset
some small fixes/impr.
fix read/write from 0x0b000000

r40

fixed old_irqadded patching system

r41

added auto detectadded lcdSwap if second arg is set to '1'
added capture_and_pars mode
fixed syncline input

alpha 1

added new UI (also gives the emulator more free ram)
added press Y to save the save
added DMA sound
changed break menue combination to A+B+UP

fix 1
fixed bug that prevents the emulator from loading saves in some cases
fixed accociations.ini is now in the __rpg folder as it should be

alpha 2 fix 4

UI impr.
minor irq impr.
patch support
closed DS irq now halts the gba game
This update provides behind-the-scenes fixes that will improve the overall system performance (compatibility impr.)
default (Pokemon red)
sound on
scal off
Vskip 0
Vsync 159
newirq

Mario Advanced 2 - Mario World
sound off
scal off
Vskip 0
Vsync 159
newirq

Yggdra Union: We'll Never Fight Alone
sound on
scal off
Vskip 1
Vsync 159
forceHblanc

if you want to add some a tool will be released soon

==some homebrews/roms crush==
Try to hold the X button at the point they normaly crush it may work.

Load an other mode example oldirq/newirq/advirq/HblancDMA/forceHblanc.

Try to load patch.pat as patch and than load the game as usual (normally only works with advirq/HblancDMA/forceHblanc)

FAQ: http://wiki.gbatemp....i/Gbaemu4DS_FAQ (Warning everyone can edit this FAQ)

Compatibility List: http://wiki.gbatemp....patibility_List


src: https://github.com/ichfly/gbaemu4DS

Beta 1:
reset
tests
may: code jumps in 16 MB range
Beta 2:
scale and seek options so you can finally get a screen with borders
easy cheats UI
some functions form M-GBA and TEMPGBA
more NIFI/Wifi stuff

gbatemp.net/threads/gbaemu4ds-gba-emulator-for-ds-i-dsi-entry.281715/page-84#post-4506808

Based on VisualBoyAdvance and tgba
 

Recorderdude

Musician, Animator, Buffoon.
Member
Joined
Jun 19, 2010
Messages
1,392
Trophies
0
Age
26
Website
Visit site
XP
252
Country
United States
supposedly, but

.nds file or it didn't happen...

...will be the opinion of most tempers here.

You should post a few more things. What emulator is it a port of? Does it run commercial games or just special homebrew? Does it support DLDI rom loading, loading multiple ROMS, does it have a GUI? Does it have to be packed with roms like GBA emulators do?

A few more answers here would be nice.
 

Recorderdude

Musician, Animator, Buffoon.
Member
Joined
Jun 19, 2010
Messages
1,392
Trophies
0
Age
26
Website
Visit site
XP
252
Country
United States
ichichfly said:
this guy who posted befor is not the owner of the account the guy wake wake me up at 2:30 am hell it is time to sleep

and something about the emulator it can only play homebrew max size 2MB and no original rom (i mean roms whith a save possibility) yet it is runs with about 3fps it is whyever not running at last some flashcard bacause i use nitrofs (for better debuging in ds emulator) (fixed in 2 minutes) ok If you still think this is a good emulator i post it tomorro (since I have to post it with src) and no GUI it just start gba.gba.

I keep working on the emulator.

Very good, thanks. And if this is a real entry we shall see it tomorrow
smile.gif
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
0
XP
1,042
Country
Gambia, The
OK this is the gba emu it is only the src because you have to compile the gba homebrew inside the nitrofs since i don't have a flashcard any more. I will fix that soon and the Program it is yet not ready for everyone it is just to demonstrate it is running. I will try to add commercial games support soon. download: http://www.mediafire.com/file/t3hzyylbnn6552l/gbaemuds.zip

Guide:

so compile it and just start it. I have tested it on the ds emulator no$gba (of cause in DS mode only) and however not every homebrew is running yet. Normal I won't post a Program in such a state but see first post.

ADD: put the gba rom as gba.gba in the nitrofiles folder before you compile it (for a new rom you have to recompile it)

ADD2: yes I am ichfly form wii-homebrew.com

ADD3: the _.txt is only there because every folder in the zip needs at last one file inside

ADD4: don't forget max homebrew size it can run is 2MB

ADD5: it seams the program can load homebrew from the the normal flashcard and so also run on most oft the flashcard and it is not needed to recompile it by make the following changes in the main.cpp

add #include to the includes
and change nitroFSInit(); to fatInitDefault();

well i compiled it and send it to a tester and he sad it works I have not tested this myself.

ADD6: Compatibility List:

devkitpro examples:

PCXView color bug and very slow (5 fps)

template working color bug

ansi_console working (color bug)


homebrew:

Bits 2005 crush

Mister Jelly works but slow

GoldenEye Advance work but slow(~2fps) and color bug

billybox slow color bug

L'affaire FAREWELL starts color bug

Ghost'n Goblins Advance starts color bug
 
  • Like
Reactions: Margen67

spinal_cord

Knows his stuff
Member
Joined
Jul 21, 2007
Messages
3,162
Trophies
0
Age
40
Location
somewhere
Website
spinalcode.co.uk
XP
2,314
Country
Well, colour me impressed! I tried it on the iEvo and got maybe 3 or 4 fps (a guess) it didn't get to "helloworld2" running from the Sudoku exploit, shame.

It does take quite a while to compile though, so anyone else trying this, note that it probably HASN'T crashed during the make process.
 

ichichfly

Well-Known Member
OP
Member
Joined
Sep 23, 2009
Messages
619
Trophies
0
XP
1,042
Country
Gambia, The
OK by frame skip and cutting something away i got some good speed improve ( i think about 50% faster than the last one) however this was only to demonstrate that it is possible not realy for any contest. I only posted it beause of the first post lol

However the prog is still slow


http://www.mediafire.com/file/28omemexeica1w7/gbaemu2.zip

I think this is my last post I only post again if i get a speed improve of about 100 %
 

Recorderdude

Musician, Animator, Buffoon.
Member
Joined
Jun 19, 2010
Messages
1,392
Trophies
0
Age
26
Website
Visit site
XP
252
Country
United States
jamespoo said:
just used this to play pokemon on the orginal ds and it works but sometimes it dose freeze for half a sec every 20sec or so

was that a COMMERCIAL pokemon game? and what was the rom size?

The creator claimed it only played homebrew under 2mb.
 

Schlupi

Gbatemp's Official Earthbound Maniac™
Member
Joined
Aug 31, 2007
Messages
3,985
Trophies
0
Age
29
Location
Rozen Queen Co, Chicago Branch
Website
Starmen.net
XP
660
Country
United States
Wow. color me impressed! This is great! I am glad to finally see this happen after so many naysayers.

I would say keep up the work with the emulator, I have high hopes for it. I wish you luck.

EDIT: LOL! Spinal Cord said the same exact thing I did in my opening of my post. That's funny.
tongue.gif
 

SifJar

Not a pirate
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,172
Country
Is this ONLY for DSi, or will it work (obviously very slowly) on DS (Lite)?

Even if it is slow, impressive that you've done it. I'm currently compiling it to try it on my DS Lite. I'll report back my experience.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    mthrnite @ mthrnite: https://youtu.be/IEgkDuJyI0U