| yoshiman Member Level: 23 Posts: 68/95 EXP: 67008 For next: 715 Since: 12-21-07 From: London, England Since last post: 13.2 years Last activity: 12.9 years |
|
||
| Don't worry if you know nothing about the N64's ASM as I'm here to help and I'll start off simple and then use examples to show you how the game works and how it can be altered to go beyond simple level editing. The N64's processor is a RISC (Reduced Instruction Set Computing) so its instructions are quite simple and are designed logically with each instruction using 4 bytes (32-bits). Remember that Nintendo most likely used C or C++ to program SM64 so we will be actually looking at the result when converted to ASM. This means you may see coding that looks a little strange but is actually very logical. Some important registers that are used for temporary storage: r0 is register zero which always contains the value zero so it can be used as a constant and also for arithmetic operations. sp is the stack pointer which you can ignore as long as you don't change it Then there are various others such as at, a3, vo, etc. The N64's processor features offset calculations which is ideal when it comes to reading or writing to a certain variable in an object structure. You'll often see in the behaviour coding that a register will be loaded with a pointer-to-object value and then an offset will be added to get at the variable. Being 64-bit you need to know: double word=64-bit word=32-bit half world=16-bit byte=8-bit Although the processor's instructions can read or write up to 64-bits from memory, immediate data (i.e. values that are part of the instruction) can only be up to 16-bit. This is the reason that Gameshark codes on a real N64 cheat device only allow up to 16-bits for the code. That's you starter. James S. ____________________ We English do things a little differently...Anyone for a cup of tea while we hack?! |






.
.
