----------------------------------------------------------------------------
                     =!=  C R A Z Y  N A T I O N  =!= 
----------------------------------------------------------------------------

 23 Sept 1997, we were releasing the first N64 trainer ever,
 One year and three days after, still we are alone in the n64 training   
 bizz, and the only one able to attach intros to roms.                   

 This source is old, I developped those techniques in order to attach
 trainers to a few games. It is not universal, it is dirty, it's shit to
 implement etc. Anyway, at least 10 trainers were released using approx. the
 same intro-trainer/loader/traing-method. Not to mention that the code
 is pure shit as it was one of my first mips project;)  BUT someone may
 find something usefull in this source, it's why I decided to release it!

 The source you have here are the originals, i.e. I didn't change anything
 in the code or in the comments except 2 things :
 - I use a version of the loader that doesn't need to decrypt the trainer
   (who cares about XOR-crypting anyway? ;)
 - I added some (10 or so) constants such as nintendo lib functions position
   in rom, as $80123800 won't mean anything for you I think...
 So it isn't really readable I suppose.  I am just too lazy and busy (army)
 to comment it, but maybe someone will find something usefull in it :)
 Btw, now every crack/trainer we release is using a new attach-method
 I developped that has nothing to do with that trainer, and that is 100%
 autonomus (no shitty calls to rom's functions to read joypad).

 What else?
 How did it work !! uerk !!! Well, the question !!!! ;)

 I redirected the "osViSwapBuffer" function that is contained in mario's
 rom, that functions swap the screen buffer. Just after it swap the screen
 buffer, I directly jump to the trainer! Have a look at what the IPS file
 changes in the rom with NIEW too see where is the jump to the loader!

 Then I have the Screen Buffer adress in the stack (at sp+$78), so I can
 display shit on screen.
 The problem is for joypad, "in that time" I wasn't able to access joypad
 directly so I'm calling the functions that mario calls to read the joypad.
 those are the functions starting with os* (n-devkit denomination).
 As it works as an interuption, I just have to save the old vector before
 trashing it, and I must restore it at the end of the intro (else joypad
 won't work during the game!)

 Unclear isn't it?  ;)

 I hope you'll understand something when reading the source.

 How to use the source?

 You'll need PSYQ asmn64.
 1. apply the trainer IPS to the rom (that will patch the osViSwapBuffer
    routine jump to loader)
 2. type MAKE (the mario64 rom should be in Doc64 format, in a file called
    "rom")
 3. if it works you win a "Tube de dentifrice ELMEX"
 4. enjoy your fresh ripped-trainer with custom-scroll ;))

 It maybe won't compile, but it should at least! Maybe you'll have to make
 some modifs (but hope it'll work).

 Special respect to my friends WILDFIRE and SISPEO who are keeping CZN to the
 TOP while i'm  having fun (hmmmm..;) at the army, to LOOM for being cool
 and having a digital camera, and to every N64 coder out there !

 What was used to make this trainer ?
 - An AMD 486 DX4/100 with 16megs of RAM
 - LOOM'S doctor64 and n64
 - Liters of Coke
 - Hours of ideling on IRC!
 - Hours of music: Mylne Farmer, Mike oldfield, Enigma,...

 Finally, Special thanks to YOU ALL, CRAZY NATION SUPPORTERS!
 We wouldn't be what we are now without you! 

 Ok that's it for now! Enjoy;)

 Don't hesitate to send me feedback, I'll try to answer serious questions!

                                                        -- Titanik/CZN!

 Btw today is my birthday! I'm a big boy now ;)
                
----------------------------------------------------------------------------
                     =!=  C R A Z Y  N A T I O N  =!= 
----------------------------------------------------------------------------


.jointhefun.
