PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ARM(StrongArm) assembler resources(for PocketSX(fpse(PSX Emu

ok... Anyone know any good resources on ARM assembler programming, and really, ASM in particular. Im a n00b to ASM, so i really need some good books, anyone know of any books? I saw a book on x86 ASM at Barnes and Nobles, Think its worth it? $55, would i help me out with StrongARM asm. BTW, i ordered two CD's from ARM.
#1) Tons of PDF's with Everything ARM
#2) ARM SDT 2.5 compiler.
Thanks a lot. BTW, im doing ARM ASM for PocketSX, so i prefer if you guys could help me get some resources. Thanks a lot.

School is finish on friday, so i then i can devote 100% of my time to PocketSX.
Conan · 16 Jun 2002, 07:27 UTC — ARM assembly language -v- Intel
There's not much point in buying an Intel assembly language book to help with learning assembly language for ARM. Though many concepts are the same there's too big a difference for the Intel book to be worth it's money. It's not like buying a VC6++ book to help with eVC++ 3 where so much is similar.

Here's a site I found for you. It has all the basics
http://www.heyrick.co.uk/assembler/

I'm looking at the assembly language in PocketGL as I write this ( it's my first look at ARM assembler ). Many of the instructions are the same as you would find in any online assembly article ( add mov sub bne ). Other than the ARM assembly docs which will give you info on the commands & registers you need to know about the memory locations on the hardware some of which you can get from existing ARM coders.

The really good news is that assembler is miles easier to understand than C++ as there's no complex contrived syntax to worry about. You do need to document much more. I document every single line of assembly.

(I am one of the small band of people on PocketMatrix who have been writing games for 20 years or more so I've written more assembly language than most people ever will mostly for Motorola & Intel chips)
Jadam, I sent you an ARM Assembly Quick Reference PDF file to your email account. It has all the ARM assembly commands to do anything, I think.
Jadam, message me if you need some help. I am not arm guru (far from it) but there are several asm languages which I have mastered, and can easily give you the ideas and concepts of arm in an easy to understand way (sometimes books assume that you know everything in the world except the topic in the book, which leads to obscure refrences.).
well... i do now C/C++, and i got a bunch of those from ARM moose, i ordered it on a CD, info on every processor. ASM doesnt look that hard, plus, in what im writing, im going to use Hybrid C/ASM code. using ASM to reroute the functions... such as...

if you get the

add 0 rd,rs,rt

from the game, ill just make it do the equavalent SA ASM routine
Since the ARM processor is used in the Gameboy Advanced, just about any GBA dev site will have lots of info. The two I can remember off the top of my head are http://www.gbadev.org/ and http://www.devrs.com/gba/. These both have lots of links to other sites, and you should be able to find some stuff there.

You can also set eVC to output assembly (with the source code embedded as comments) by going to project settings/C++/Listing files and setting listing type to "Assembly with Source".

As has been mentiponed before, ASM is really simple, writing anything in it is just a matter of planning and writing verbose comments.
Make sure you read about the extra stuff in the XScale processor, too.
http://developer.intel.com/design/intelxscale/ixm.htm
Get the Furber book on the ARM architecture, and make sure you get the ARM Architectural Reference Manual (the ARM ARM) PDF from somewhere.

If you want any specific help post on the forum and somebody will answer.

A book on x86 is 100% useless for learning ARM code. Different architecture (CISC vs RISC, load/store vs register, largely unconditional/fully conditional)...

(Incidentally, are you seriously going to try and write a dynamic recompiler for the ARM when you don't know ARM code? ... and on the StrongARM I'd definitely start off with an interpreter until you get the hang of it, 'cos dynamic code on the StrongARM is a little bit trickier than it might at first seem).
yeah, i know the dynamic code is hard, but... im going to do a translator first, then make it a recompiler. ... How about a book on PowerPC ASM? or ... dunno, but MIPS ASM? they are both RISC processors. but i dunno. Yeah i am going to work on this emu in ASM code refractor, but not fully. Everything doesnt have to be in ASM.
I didn't mean to imply that your entire emulator will be in ARM, I was simply saying that the Dynarec WILL produce pure ARM code, thus to get something to produce working ARM code you must know how to write working ARM code. :)

If you want to learn MIPS or PowerPC, sure, get a MIPS or PowerPC book. If you want to learn ARM, buy a book on ARM (like the Furber book). Sheesh.
Refractor, you seem to know ALOT about Pocket PC programming. Why havn't I seen any applications or games from you? With your knowledge you could make some killer 3D PPC/HPC games, and make a butt load of money! :D
I'd have to agree with Refractor's sentiments. Writing a dynamic recompiler would be a fairly ambitious project for many coders, but to do so without any knowledge of asm, let alone ARM seems just... well, brave. :)

I'm assuming that PocketSX is more an educational experience than just getting another emu out on PPC - if so, you should be considerably wiser by the project's completion :)
TechMage wrote:
Refractor, you seem to know ALOT about Pocket PC programming. Why havn't I seen any applications or games from you?


Thanks for the compliment :)

Essentially it's because I work full-time on non-PPC related programming. With that and my girlfriend, I don't get all that much free time to devote to my real interests at the moment, and I don't have the capital to quit work and make a start-up (with the insane rent here I'd last a few months .. and starting up a company here is a major *bitch*, apparently). :(

Once I get critical mass on a game of some sort then I'll put it up for sale and see how it does. If it does well I'll quit my shitty job and do PPC stuff full-time. :) The problem is that I can't afford to quit work and try it. If I failed I'd be up the creek sans paddle, so I have to do it on a very part-time basis.

(If anybody wants to hire me/contract me, give me a shout!)
once this emu is working correctly, im going to make a 3D RPG engine(with downloadable content(like Kyle's Quest)), then work on ... dunno but... a DreamCast emulator with a dynamic recompiler for the SH4, FOR MACS ONLY!!! Emulating RISC on RISC is better than RISC on CISC. both commercial of course :), this emu is a learning experience also. The hard part will be the Recompiler part of the emulator, but it seems that there are tons of emus that have dynamic recompilers.
By the way about the Dynarec - I told you guys that making a ARM DynaRec could speed up the PSX emulator.

However I've realised something since, it might not be the cpu emulation which is slowing it down, it could be the matrix coprocessor. PSX has a matrix coprocessor I think which may use floating point operations.

Now a 400 mhz Pentium processor natively has a floating point coprocessor, but the equavalent ARM processor doesn't does it? That could be the reason for the massive slowdown that was reported for 3D games (notice it's very suspicous that 2D games which don't use the Matrix calculator are faster on ARM...)

Just thought I'd better warn you - profile the code, see what it really slowing down before you assume it's definitely the cpu emulation which needs a DynaRec...
but it seems that there are tons of emus that have dynamic recompilers.


On the StrongARM?
Just to answers to dave.... i hardly work with fpse team, and i'm curently Fixing some part of emulation.

For now i've include the latest GTE engine emulation which is a lot of optimized (and none bugged), that make 3D game at least 2 time faster, the result is: Destruction Derby run between 3 and 8 fps in games. About the Fact that 3D game are slower than 2D game, it's normal due to the fact that 3D call need a lot of more line code to pass Coordinate, Object, texture , light etc..... so 3D use a lot of more Cpu than 2D....

I think to include CPU compiler core very soon.

This is the fastest core LDChen made (with two pass analisys), it's in pure C and it's faster than previous X86 asm specific.....
I really do not know how much it's faster but what i can say is that the Previous core was at least 4 time faster than Interpreter

Wait&See;
Cya.

Schtruck.
well i just recieved the ARM SDT... hehe cool case :)
and i downloaded eVC++ so... ill install everything tomorrow when i go home. looks like ill have to remove my linux partition :(
Dave :
On Playstation the GTE is not floating point. It does various vector / matrix / light calculations all in fixed point. I spent many an hour pipelining subdiv renderers on PSX... :(
Lighting calculations? Hardware lighting? Are you sure? Isn't that a sort of NVidia GeForce thingy?
I could be wrong, but I think I heard that the playstation has a seperate unit (I hesitate to say CPU) that performs matrix calculations and such. This would be exactly the sort of thing that would be used for transform/lighting (They are both dot-products interpreted in different ways).