Thursday 15 October 2009

Console Development Week2 - Assembly Code

Carrying on from last week we went through the past gaming systems and compared them with each other. It was actually really interesting to see how the systems compare and how the ps2 was far more successful than the xbox even though it has far inferior hardware. Picture of the inside of the xbox I took apart is shown below:















From there we looked at some assembly code, which leads onto the task I had to complete for week 3. I had to find some example assembly code of my console (xbox) and disassemble it and have a look at all the code. Good times.

However while looking on the Internet I could found very little assembly code for any xbox games (I have lost faith in google), altough it could be my searching techniques, I'm going to go with the latter. Nevetheless I did manage to find some xbox assembly code from a program that fills the screen with green and then returns to the dashboard.

I have found a good disassembler to disassemble the code; the XBE tool will check any xbox assembly code and disassemble it for you to look at, yay! Of course the code confused the hell out of me....here's some snippets of the code:

mov eax,0x0000FF00

mov ebx,VIDEO_MEMORY


mov ecx,VIDEO_LIMIT


.fill:


mov DWORD[ebx],eax


add ebx,4


cmp ebx,ecx


jl .fill





The comments on the program dictate that this piece of code actually fills the screen with the colour green. How? I have no idea...hopefully i'll be able understand this code as I progress on the module.