Share

VisualBoyAdvance

Tracker: Patches

5 CPU emulation optimization patch - ID: 1292942
Last Update: Attachment added ( achurch )

This patch, intended to be applied on top of my
previous ones (1287942 and 1290370), optimizes the
ARM/Thumb emulation, corrects a few minor bugs in the
emulation, and cleans up the code some more. The patch
gives a noticeable speed improvement, on the order of
10-15% depending on the code being run. I'm fairly
confident I haven't broken anything, but testing would
be appreciated.

Note that the patch takes advantage of a couple of GCC
features (function parameters in registers and branch
prediction hints). I've ifdef'd them for GCC, and also
modified the MS-style assembly to match the new C
wrappers, so the code should compile and run fine; but
additional work can probably be done (by someone who
has Visual Studio--I don't) to optimize further for
Windows.


Andrew Church ( achurch ) - 2005-09-16 14:32

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 10 )

Date: 2006-12-04 15:20
Sender: achurch


Updated patch for 2006/12/4 CVS, including all changes made to the
original code (only lightly tested, but it seems to work). Note that if
you try to apply this on top of my more recent ++ operator patch (1608454),
the patch against src/arm-new.h will fail, but since the file is no longer
used with this patch that is not a concern.


Date: 2006-11-20 22:15
Sender: richq


The patch no longer applies to current CVS :(


Date: 2006-10-12 10:48
Sender: achurch

Logged In: YES
user_id=527960

Scroll to the bottom of this page and click on the
"Download" link next to "armthumb-files-2a.zip", then unpack
the ZIP file in the same directory as the VBA source code
and compile it as usual. Note that you will need to use the
CVS source code, not the 1.7.2 distribution (and I haven't
updated the patch for recent CVS changes, so I don't know if
it will still work; it would be nice if the new code was
merged into CVS).


Date: 2006-10-12 06:53
Sender: anzemthe3rd

Logged In: YES
user_id=1618189

how do i download this ?


Date: 2006-05-15 10:39
Sender: achurch

Logged In: YES
user_id=527960

Thanks, fixed.


Date: 2006-05-11 04:51
Sender: ribrdbAccepting Donations

Logged In: YES
user_id=518853

You have thumbUI instead of thumbBP for the thumb breakpoint
instruction


Date: 2005-11-18 13:53
Sender: achurch

Logged In: YES
user_id=527960

Attaching revised patch (fixing Win32 compilation and
several cycle timing issues) against current (2005/11/18)
CVS. Also eliminating the partial patch, since the full
patch now works.


Date: 2005-09-27 10:31
Sender: achurch

Logged In: YES
user_id=527960

I've attached a zip of all the changed files (note that
src/arm-new.h and src/thumb.h are zero bytes--the contents
of those files have been moved to GBA-arm.cpp and
GBA-thumb.cpp, so the empty files can be deleted).

Incidentally, diff files can be applied using the "patch"
program--if you're on Linux or another Unix system, it
should be preinstalled, and here's one that looks like it
works on Windows:
http://sourceforge.net/project/shownotes.php?release_id=83227
Decompress the patch file, start a command prompt, cd into
the VBA top directory, and run "patch -p0 <armthumb.diff"
(including the pathname to wherever you put the diff file).


Date: 2005-09-27 09:54
Sender: pokemonhackerProject Admin

Logged In: YES
user_id=785003

Hi !
I was wondering if you could post somewhere (or email me at
my sourceforge address) all the files you changed/created so
I can get a closer look at them (I'm asking that because I
have no clue on how to apply a .diff file :/).
And cheers for all your hard work ;)


Date: 2005-09-16 23:50
Sender: achurch

Logged In: YES
user_id=527960

Revised version of the patch, with comment/whitespace fixes
(no code changes). Also attaching a diff containing all
three CPU emulation patches, against 2005/9/11 CVS.


Attached Files ( 2 )

Filename Description Download
armthumb-20061204.diff.gz Merged patch (1287942+1290370+1292942) against 2006/12/4 CVS Download
armthumb-files-20061204.zip Archive of all changed files Download

Changes ( 18 )

Field Old Value Date By
File Added 205698: armthumb-files-20061204.zip 2006-12-04 15:21 achurch
File Deleted 177970: 2006-12-04 15:21 achurch
File Added 205697: armthumb-20061204.diff.gz 2006-12-04 15:20 achurch
File Deleted 177968: 2006-12-04 15:20 achurch
File Deleted 156755: 2006-05-15 10:40 achurch
File Added 177970: armthumb-files-2a.zip 2006-05-15 10:40 achurch
File Added 177968: armthumb-all-2a.diff.gz 2006-05-15 10:39 achurch
File Deleted 156754: 2006-05-15 10:39 achurch
File Deleted 150528: 2005-11-18 13:55 achurch
File Added 156755: armthumb-files-2.zip 2005-11-18 13:55 achurch
File Deleted 149401: 2005-11-18 13:53 achurch
File Deleted 149402: 2005-11-18 13:53 achurch
File Added 156754: armthumb-all-2.diff.gz 2005-11-18 13:53 achurch
File Added 150528: armthumb-files.zip 2005-09-27 10:31 achurch
File Added 149402: armthumb-all.diff.gz 2005-09-16 23:52 achurch
File Deleted 149335: 2005-09-16 23:50 achurch
File Added 149401: armthumb-opt-2.diff.gz 2005-09-16 23:50 achurch
File Added 149335: armthumb-opt.diff.gz 2005-09-16 14:32 achurch