Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
Challenge: Improve PicodriveDS code
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Coto" data-source="post: 9192838" data-attributes="member: 255070"><p>ARM processors do hate context switch (doing some OS task, and entering an user function). As a general rule in emulators, sometimes it is better to prevent too many jumps (function re-entrancy) even if it's in TCM memory. Because code still has to be handled by the prefetch unit and caches (if enabled). If code segment is too large it won't fit caches and be retrieved from slower memory. So calling inlined (short code) C code from ITCM can really speed up timing dependant harware functionality and/or emulator pieces (which gets called too often and on exact intervals).</p><p></p><p>ARM Assembly:</p><p>If you can rewrite the emulated CPU in assembly it's going to be definitely faster. But doing that requires to know extensive CPU knowledge of both systems (The one emulated and the host).</p><p></p><p>Always use simpler (less cycle) ARM opcodes. Try to avoid LDR/STR(x) opcodes if reading inmediate values (hardcoded values) and use instead MOV,ADD,SUB and/or the barrel shifter unit for multiplications or literally anything that involves scaling numbers in steps of 2).</p><p></p><p>[code]</p><p>MOV r1, r3, LSR #7 equals r1 = r3/128</p><p>ADD r9,r8,r8,LSL #2 equals r9=r8*5</p><p>[/code]</p></blockquote><p></p>
[QUOTE="Coto, post: 9192838, member: 255070"] ARM processors do hate context switch (doing some OS task, and entering an user function). As a general rule in emulators, sometimes it is better to prevent too many jumps (function re-entrancy) even if it's in TCM memory. Because code still has to be handled by the prefetch unit and caches (if enabled). If code segment is too large it won't fit caches and be retrieved from slower memory. So calling inlined (short code) C code from ITCM can really speed up timing dependant harware functionality and/or emulator pieces (which gets called too often and on exact intervals). ARM Assembly: If you can rewrite the emulated CPU in assembly it's going to be definitely faster. But doing that requires to know extensive CPU knowledge of both systems (The one emulated and the host). Always use simpler (less cycle) ARM opcodes. Try to avoid LDR/STR(x) opcodes if reading inmediate values (hardcoded values) and use instead MOV,ADD,SUB and/or the barrel shifter unit for multiplications or literally anything that involves scaling numbers in steps of 2). [code] MOV r1, r3, LSR #7 equals r1 = r3/128 ADD r9,r8,r8,LSL #2 equals r9=r8*5 [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
Challenge: Improve PicodriveDS code
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
BakerMan
Loading…
I rather enjoy a life of taking it easy. I haven't reached that life yet though.
Psionic Roshambo
Loading…
@
Xdqwerty
:
Traps
Today at 12:38 AM
@
Xdqwerty
:
My throat is itching
Today at 1:04 AM
@
Psionic Roshambo
:
Scratch it?
Today at 1:16 AM
@
Xdqwerty
:
@Psionic Roshambo
, itches inside
+1
Today at 1:19 AM
@
Xdqwerty
:
@AncientBoi
do you like men or seamen?
Today at 1:20 AM
@
Xdqwerty
:
https://youtu.be/EmqFoojMeD8?si=hnYsl1ikCwHK0bli
Today at 1:23 AM
@
BigOnYa
:
wut
Today at 1:28 AM
@
Xdqwerty
:
@BigOnYa
, hey thats my line
+1
Today at 1:30 AM
@
NinStar
:
wait, wtf, nwc nes edition will only include 13 games, I didn't realize that
Today at 1:52 AM
@
BigOnYa
:
+2
Today at 1:58 AM
@
NinStar
:
crowdsurfing is that exciting?
+2
Today at 2:00 AM
@
K3Nv2
:
Ancientboi lost his virginity in a crowd
+2
Today at 2:00 AM
@
OGSniper
:
I would know.
Today at 2:06 AM
@
BigOnYa
:
I want this floormat!
+1
Today at 2:06 AM
@
K3Nv2
:
https://a.co/d/6LC5QuG
+1
Today at 2:08 AM
@
BigOnYa
:
+1
Today at 2:08 AM
@
Psionic Roshambo
:
I hate when there is a line at the gang bang
Today at 2:08 AM
@
BigOnYa
:
esp if there's no time limits, gosh! Cum on already!
+2
Today at 2:09 AM
@
Psionic Roshambo
:
Lol
Today at 2:10 AM
@
K3Nv2
:
@BigOnYa
, ab and his mop
https://youtu.be/l49fB60U9qE?si=8HuRy8f7_i4NGqft
+2
Today at 2:28 AM
@
Psionic Roshambo
:
https://m.youtube.com/watch?v=npn2sKQpdIY&pp=ygUOR29lcmdlIG1vcCBVSEY=
56 minutes ago
@
Psionic Roshambo
:
I see your mop and raise you George's mop lol
55 minutes ago
@
Xdqwerty
:
Good night
39 minutes ago
@
Psionic Roshambo
:
https://youtu.be/lOfZLb33uCg?si=XaZDLZQCbEURna9U
26 minutes ago
@
BakerMan
:
hot take: freddy fazbear's pizzeria simulator is peak fnaf
15 minutes ago
Submit
@
BakerMan
:
hot take: freddy fazbear's pizzeria simulator is peak fnaf
15 minutes ago
Chat
2