Tuesday, 21 October 2008

The Confusing World....

of MIPS assembly programming.




or rather, the advancement of a migraine as time progresses brought on by the use of MIPS, and extenuating circumstances that adversly affect performance..




as a beginner in using MIPS, though competent in the use of binary to a degree, and hexadecimal to a slightly greater degree, i took my lecturers advice and started learning about mips (and SPIM) at chapter 9 of the tutorials (the link for which is in my previous post). and while learning this new language, and developementenvironment was fascinating, reading a very bright screen in a gradually darkening room, while your neighbours have a party and attempt to set fire to your house, a headache can easily develope.




agonising over, lets get onto that code.




Lets begin with the tasks set for us to achieve by wednesday the 12th of October.




namely the programmes for chapter 13


let us begin shall we, at the very begining.


"Exercise 1 — Column Addition
Write a program that adds up the following
integers: 456
-229
325
-552
Leave the answer in register $8. "


my programme goes a little something like this


(my sincere apologies for having this as an image file, blogger doesn't like it when i copy directly from notepad, it refuses to keep my indentations, or let me edit them here)
as you can see this is a rather roundabout route to finding the answer, which incidentaly is 0, as it is techically possible (working with MARS at least) to use addu with a negative number, the programme automatically compensates for you not reflecting the number. this can be useful, but i am not sure that it works in every simulator, and more importantly, in real use.

Welcome...to Mars...

...and SPIM.




Mars and SPIM are MIPS simulators. MIPS being an assembly code language (one that we will be using later for programming with the Playstation Portable, or PSP). It would also be a good idea at this point to point out that Acronyms will be heavily utilised during this blog post.


First of all, what does MIPS stand for, and why are we simulating it with itself in reverse and the fourth planet in our solar system?


Assembly languages are not read like more high level languages, suh as c, or java. they do not have an inherent display when being executed, and in fact only work with specific chipsets. instead, we use simulators, such as the ones mentioned here. these simulators allow assembly code to execute within an area of virtual memory, and then outputting the results in such a way that we can see it(if not understand it at first glance).


Assembly languages are not meant to be seen, and are, generally, not directly used by games programmers, however, at times it becomes neccesary to learn assembly, for example the Atari Jaguar (that most hated of consoles). All games for this console has to be written in assembly, or written in a higher language and then translated into viable assembly, something which didnt exactly help its popularity with programmers (having a grand total of less than 100 games). While this isn't exactly a shining example of a good thig to learn assembly for, it does prove the point that it may become necesary.


now, onto the simulators.


This is Spim:


Isn't it pretty? (and yes, this freeware product runs on windows vista 64 bit, and is available directly from: http://pages.cs.wisc.edu/~larus/spim.html)


It's a rather basic programme, not particularly user friendly, but the tutorials we have been working dilligently on are based on it, so it has become the tool of choice. If you are in fact NOT a lecturer at the University of Derby, and have no idea what Tutorials i am on about, see:http://chortle.ccsu.edu/AssemblyTutorial/index.html#part1 for more information in programming MIPS assembly language code :).


next up is MARS.


Somewhat less red than i had expected, but beggars can't be choosers. Joking aside, mars is a much simpler MIPS simulator to use, and while MIPS as a language is still rather difficult to begin with, this streamlines the process a lot, and is available, once again free and working on many operating systems, right here: http://courses.missouristate.edu/KenVollmar/MARS/ .
next up, mips assembley.

Saturday, 18 October 2008

and a great big sigh was let out

so this blog has just been unspammed. sadly it is 10:00 PM.

Unfortunately the news has been delayed due to extreme wetness.
I will be continuing the blog with a description of mips simulators and then some mips assembly code, as my search for Atari Jaguar information has hit a solid brick wall with the Hulk behind it propping it up.








(the hulk is a registered trademark of Marvel comics)

Tuesday, 14 October 2008

Console Developement - The Atari Jaguar - An introduction. (and uploaded late)

Ah the atari Jaguar, im sure we all have fond memories of one of the most beloved consoles ever created, a thing of beauty, a creation so profouns, so incredibly easy to develope for, and so very popular that it changed the face of games consoles forever...

oh...wait...no, that must have been something else...

The atari Jaguar, the temperamental, difficult to develope for, expensive, and altogether failure of a console. This monstrosity could easily be the LEAST popular console of all time. in fact, this console is so unpopular, that there is only a miniscule ammount of information about it, even the process of taking it apart! (presumably many have instead simply been dropped from a great height)

However, being an intrepid games programmer, i will persevere, delving deep into the heart of the fabled realm of the "tinterwebs" in search of lost lore regarding this long dead and terrible creation.

so far my searching has proven in vain...but i must prevail...