USF lecture series by hcs at 10:43 AM EDT on July 23, 2005
Coming to a browser near you... now!

I've reripped Killer Instinct Gold properly (1b and 20 now work, and probably some others I don't recall, not to mention it's now a little smaller (though it doesn't compress as well)) and I wrote a walkthrough of the procedure.

USF Walkthrough 1

Hopefully it'll be of use to someone.
by Anonymous at 11:44 AM EDT on July 23, 2005
YES! Thank you. I'll have to give that a look over when I have time, but that's EXACTLY what I wanted to see.
by hcs at 1:21 PM EDT on July 23, 2005
I read over it and fixed some typos and unclear statements.

If anything is too confusing, poorly worded, or doesn't make sense PLEASE let me know so I can make it easier, as that it the whole point.
by Will at 7:33 PM EDT on July 23, 2005
I read all of it. I hardly understood any of it, but I read it all. I am going to attempt to rip something some time in the near future. I think.
Typo nazi reporting... by Prokopis at 7:46 PM EDT on July 23, 2005
Read through it myself. Pretty interesting stuff; some I expected, some I wondered about, some I was curious about how you dealt with 'em. All in all, quite educating. Also thought I'd keep notes of anything catching my eye as wrong (in any context) and all I came up with, were the following typos:

- Typo: "it's" instead of "its", occurs twice:
("[...]IDA will then run it's analysis[...]")
("[...]can't tell what it does just from it's name[...]")
("[...]it's exception handler[...]")
("[...]it's only job is to create other threads[...]")
("[...]where it will create it's initial save[...]")
("[...]Distributed processing at it's best.[...]")
- Typo: "alSeqpSetSet", occurs twice
- Typo: "desination"
- Typo: "recieve", "recieved", several occasions
- Typo: "abstration"
- Typo: "adress"
- Typo: "recal"
- Typo: "it give you"
- Typo: "sparese"
- Typo: "genereated"
- Typo: "[...]which must also contains the programs[...]"


Like I said, good reading. Remind me to ask you some day about why some usflibs end up... well, let's say a bit less sparse than others when it'd seem (to my untrained brain) that all useful info - music function call, tracks table and audio thread - should be cluttered close enough together (F-0 X 9.55MB lib says "hi").

K, dat's all. Be good now.
by hcs at 8:50 PM EDT on July 23, 2005
Whew... that's quite a bit. Should be fixed for 0.2 when I get to it, working on Animal Forest now.
by AI-M at 8:39 PM EDT on July 24, 2005
That seems like you need a lot of memory and storage on your HardDisk to decompress open huge files.

At least I can try doing Bomberman Hero sometime in the future. (My old method was to go straight into IDA and using a MIPS technical documentation ot figure out each code and foloowing it. I was mainly look up SEQ and nop jump commands.)
by hcs at 11:28 AM EDT on July 25, 2005
The method I described here worked well in ripping Extreme G 2, though the path to the song select fcn was a bit more complicated. I think I'll put together another walkthrough for that, though it'll be terser.
And terser is the proper word, I looked it up.
by hcs at 11:21 PM EDT on July 30, 2005
Here's my notes from Extreme G.
by hcs at 12:04 PM EDT on August 10, 2005
Remind me to ask you some day about why some usflibs end up... well, let's say a bit less sparse than others when it'd seem (to my untrained brain) that all useful info - music function call, tracks table and audio thread - should be cluttered close enough together (F-0 X 9.55MB lib says "hi").

F-Zero X uses streamed music, simple as that.
The idea was to save CPU for the 60 FPS 3D action.
Hopefully this works...later by unknownfile at 3:25 PM EDT on August 10, 2005
I managed to make a savestate for DK64usf, and sparsed it.

It doesn't do anything in 64th note as of now.

[This is an actual miniusf using the sr64 savestate]
[made in Breakpoint Software Hex Workshop plz kthx]

000000000 5053 4621 1800 0000 0000 0000 0000 0000 PSF!............
000000010 0000 0000 5352 3634 0400 0000 DC58 7400 ....SR64.....Xt.
000000020 0000 1A00 0000 0000 5B54 4147 5D5F 6C69 ........[TAG]_li
000000030 623D 646B 3634 2E75 7366 6C69 620A b=dk64.usflib.
by hcs at 11:45 PM EDT on August 11, 2005
I have a very nice DK64 save state which nevertheless doesn't work. My code in PJ64 was:

if (PROGRAM_COUNTER==0x80602A94) {
    GPR[4].UW[0]=0xae;
    //DisplayError("a0=%08x a1=%08x ra=%08x",GPR[4].UW[0],GPR[5].UW[0],GPR[31].UW[0]);

    ((DWORD*)N64MEM)[0x732330/4]=0; // disable Thread7 (useless)

    //((DWORD*)N64MEM)[0xC46C/4]=0; // diable Thread4 (kills dlist, but no progress)

    ((DWORD*)N64MEM)[0x60E17C/4]=0; // disable Thread8

    //((DWORD*)N64MEM)[0x60F18C/4]=0; // disable Thread5

    ((DWORD*)N64MEM)[0x5FC270/4]=0; // disable ThreadMain

    //((DWORD*)N64MEM)[0x4F48/4]=0; // disable Thread3
    //((DWORD*)N64MEM)[0x4F50/4]=0;        

    ((DWORD*)N64MEM)[0x5fed68/4]=0x08000000|(0x5FEE70>>2);
    ((DWORD*)N64MEM)[0x5fed6c/4]=0;

    ((DWORD*)N64MEM)[0x5FC0D0/4]=0; // disable calling stage fcn again

    ((DWORD*)N64MEM)[0x24000/4]=0x03E00008;
    ((DWORD*)N64MEM)[0x24004/4]=0;

    ((DWORD*)N64MEM)[0xA3A0/4]=0x03E00008;
    ((DWORD*)N64MEM)[0xA3A4/4]=0;

    ((DWORD*)N64MEM)[0xA3F0/4]=0x03E00008;
    ((DWORD*)N64MEM)[0xA3F4/4]=0;

    ((DWORD*)N64MEM)[0x60F168/4]=0;
    //((DWORD*)N64MEM)[0x60F490/4]=0; // kills alist
    //((DWORD*)N64MEM)[0x60F838/4]=0; // kills everything

    //((DWORD*)N64MEM)[0x60F418/4]=0;

    // try killing some osSendMesgs
    //((DWORD*)N64MEM)[0x4EF8/4]=0; // kills alist
        
    ((DWORD*)N64MEM)[0xC254/4]=0;
    ((DWORD*)N64MEM)[0xC294/4]=0;
    ((DWORD*)N64MEM)[0xC408/4]=0;
        
    //((DWORD*)N64MEM)[0xC450/4]=0; // <<<--- responsible for freezing everything
    //((DWORD*)N64MEM)[0xC464/4]=0; // <<<--- ditto

    ((DWORD*)N64MEM)[0x5FC224/4]=0;
    ((DWORD*)N64MEM)[0x601D98/4]=0;

    //((DWORD*)N64MEM)[0x601E04/4]=0; // no alists

    //((DWORD*)N64MEM)[0x6020D0/4]=0;

    ((DWORD*)N64MEM)[0x60B950/4]=0;

    ((DWORD*)N64MEM)[0x60F168/4]=0;

    //((DWORD*)N64MEM)[0x60F490/4]=0;

    ((DWORD*)N64MEM)[0x60F51C/4]=0;

    //((DWORD*)N64MEM)[0x60F8FC/4]=0;

    //((DWORD*)N64MEM)[0x60FACC/4]=0; // hmmm

    ((BYTE*)N64MEM)[0x745650^3]=1; // aha! "do sound NOW"
        
    ((DWORD*)N64MEM)[0x60FACC/4]=0;

    sprintf(SaveAsFileName,"DK64_MIGHTY");
    Machine_SaveState();
}

So how is yours created to a point where it works in PJ64 USF (mine doesn't)? You might want to try adding an _enablecompare tag.
by unknownfile at 4:26 AM EDT on August 12, 2005
It doesn't

I'll try using this savestate...when I get home from day camp. ;p
dk64 by Josh W at 7:19 PM EDT on August 22, 2005
I got somewhere with this.

Im giving it a go.
Check this out: sparse02.zip

Heh Heh.
by hcs at 8:16 PM EDT on August 22, 2005
keen beans.

I'm working on the new PJ64 1.6-based thingy, and it seems like the USFs I had made for DK64 work in it (as does everything else I've tried, Bust-a-Move '99 included (I don't have the Mischief Makers bits around anymore)). If yours works in the current version then all the better!

How'd you change my approach, or did you use something else?
by Josh W at 8:45 PM EDT on August 22, 2005
Well i fif the usual an traced the threads and looked for supicious things, and i think that i found thread 7 necessary (but my thread 7 might be different from yours -0x805FADF4).

Anyway i am trying a method of Terminating the graphcs thread (and all other ones that dont diable music) that i count how many Dlists i need to use before the music starts. Luckily the count for this was 2.

Something like this.
if(DlistCount>2)
{
    NOP_OUT(0x5F52F0)
    NOP_OUT(0xC46C)
    NOP_OUT(0x60E17C)
    NOP_OUT(0x60F18C)
    NOP_OUT(0x5FC270)
    NOP_OUT(0x4F48)
    NOP_OUT(0x4F50)
}

Now i am having a problem finding the acual musicselect number offset.
by hcs at 8:54 PM EDT on August 22, 2005
((BYTE*)N64MEM)[0x745650^3]=1; // aha! "do sound NOW"

This line here will start the music playing right away without having to wait for a few dlists, I ran into something similar.

And as far as I can tell a good place for music selection is 0x80602A94, with the song # in a0.
by Josh W at 2:53 PM EDT on August 23, 2005
It has come to my attention that i am using the European version of the rom. That would explain why your code didn't do anything to it.

I'll see if i can find an american version, but if i cant i will have to just keep working on what i got - in the dark.

Hmmm.
Just a thing that might help, but where is that being called from? It might be able to help me identify it in this version.

Also, i made a nice little thing to compare savestates and search for music variables, and i did a search using 2 roms and the (American) song index table.

I got some nice results from it, but these were misleading as they appeared to change the music,

they did nothing of the sort.

There was a few good hours wasted last night.


edited 10:11 PM EDT August 23, 2005
by hcs at 4:27 PM EDT on August 23, 2005
I don't remember where it was called from...

You might take a look at the GSCentral code porting program, I used that to find equivalent addresses between the US and European SM64.

edited 8:27 PM EDT August 23, 2005
by Josh W at 6:15 PM EDT on August 23, 2005
No such luck.

I tried and converted several values that should have done at least something, but they didn't :(

Well i guess its back to trying to find a usa rom.
by hcs at 8:18 PM EDT on August 23, 2005
I've tried to see if I can make a small diff between the european and US version, best I have is 6 MB. If you're on dialup and would rather get that than the 32 MB full version let me know.
by Josh W at 8:30 PM EDT on August 23, 2005
Yeah thanks.

Well im at Uni and they got a nice T3 connection. Me thinks that it is much better than dialup.

Well any one would do good for me, but i guess anyone would be nice. :)

edited 12:33 AM EDT August 24, 2005
by hcs at 9:26 PM EDT on August 23, 2005
Well I'm on dialup so it wouldn't make sense to get it from me unless you were, too.

Just Google "n64 roms donkey kong 64", the first page works and has the US version.
by Josh W at 10:04 PM EDT on August 23, 2005
Oh cool.

Hmm, bit slow though. In 4 minutes its downloaded 196k.
by Poobah at 12:13 AM EDT on August 24, 2005
http://thepiratebay.org/details.php?id=3250335&hit=1&filelist=1

If you have a good BitTorrent client like BitComet, you can choose to download individual N64 roms from the above torrent. Each 7zip archive contains every version of the specified game.

(Please remove this post if it's against this site's rules or anything.)
by Josh W at 8:57 PM EDT on August 25, 2005
Still downloading DK64. Talk about slow rates.

Im at 72% at 12:57 AM EDT on August 26, 2005

now im at 82.5% at 1:34 AM EDT August 26, 2005

Hmmm, i am exactly 14 hours ahead (Australian EST)




edited 1:36 AM EDT August 26, 2005
by Josh W at 2:52 PM EDT on August 29, 2005
Wewll i got the US rom and used it to locate the song select functions in the EU version (would not make sense to convert ~25 patches to the US).

However i am experiencing several problems with the rip process as you gentlemen have also.

However, further investigation into the problem (and ~150 patches - which to no avail), suggests that what i may be doing is correct and it should work in the batch ripper.

What got me thinking this is that the music will play if a different music plugin will play, and if it is ripped using this method - it will produce a tlb error in 64th Note.

This (for me) suggests that the batch ripper is actually at fault, and it shoudl rip perfectly. What i am thinking is that the problem exists in the modified audio plugin. Another occurance i noted, is that the DList count don't go up, and i cant be sure what this means, but i don't think that it is good. But i will be investigating it further.

If only how i could remember how i got the sample working - i forgot.

edited 6:55 PM EDT August 29, 2005
by hcs at 4:56 PM EDT on August 29, 2005
dlist count shouldn't go up if you've stopped graphics generation
by Josh W at 5:04 PM EDT on August 29, 2005
It should if i havnt disabled it before it loaded. The dlist should of gone up to 3, but it didn't.
The dlists should be at 3 before the music plays.
by Josh W at 6:28 PM EDT on August 29, 2005
hcs, do you think that if a rewrite of the batchripper and logging will help to aleviate this problem - cause the savestates work perfectly with all other versions of Pj64 ive tried, so theoretically a rewrite should make it work.

It only logs the memory and rom used, so if nothing else much is changed nothing can go wrong?
by unknownfile at 6:10 AM EDT on August 31, 2005
well, I tried Rocket: Robot on Wheels.

Here is my analysis:

-Game doesn't use standard library calls for loading (though it does use two al calls in memory)
-Regardless of how fast the game is going, the music always runs at the same speed
-Running an unoptimized savestate and ROM in 64th note has this annoying static
by Josh W at 4:24 PM EDT on August 31, 2005
Running an unoptimized savestate and ROM in 64th note has this annoying static

Im surprised that you got even that. A year ago i tried things like that to rip roms (now i know better).

If it doesn't use any standard audi functions then you have to be more intuitive and look for things that seem suspicious.

I found that in most cases, the musicselect function is called by a fucntion that comes off the main thread, ususally with a lot of other jals in it.

Speaking of which my new batchripper is going good, and it is using the Recompiler CPU instead of the Interpreter CPU for tracing.

I am calling it the "Recompiler Batchripper"
Now i gotta find sources for the original Audio and RSP plugins.

Also

by unknownfile at 4:30 PM EDT on August 31, 2005
Everybody say... YATTA!
by hcs at 4:38 PM EDT on August 31, 2005
Recompiler CPU for tracing? I don't see how that could be accurate, any compiled memory accesses won't be properly treated and code that is never run is read by the recompiler and would be included.
by Josh W at 6:02 PM EDT on August 31, 2005
Yes, what i planned to do is to create a mini-assembly routine to call a C function which would be put into the functions of x86.c

That should do it.



YATTA
Rocket Robot on Wheels - USF notes by unknownfile at 1:23 PM EDT on September 1, 2005
Well, I managed to find out how to make Rocket: Robot on Wheels quit running DLists on the title screen as follows

Set mode to INTERPRETER - otherwise PJ64 will crash! DO NOT TRY THIS UNDER RECOMPILER MODE!

In Project 64 v1.whatever (DON'T use PJ64USF yet):

Add the following cheat code

Name: Lock dlists up

800B9A92 0000
801490B1 0000
801490B3 0000
801490B5 0000
801490B7 0000
801490B9 0000
801490BB 0000
801490BD 0000
801490BF 0000
801490D1 0000
801490D3 0000
801490D5 0000
801490D7 0000
801490D9 0000
801490DB 0000
801490DD 0000
801490DF 0000
801490F1 0000
801490F7 0000

Let the game run through the logo screens, and then after around 300 dlists have been progressed after music starts playing, the game will quit processing aLists. If you are running on recompiler mode, the emulator will return an error.

So far, optimization in Pj64USF has not been successful due to the sparse rom being 0 bytes when it comes out of pj64usf.

Here's what I tried in pj64usf's batch ripper:

Trace: 8000CC0

Song value offset: anything
Song values: 0x2 to 0x2
Spend 4000 alists ripping
Do reset on new data read
by Josh W at 8:00 PM EDT on September 1, 2005
hey hcs, you wouldn't happen to have the original source code to the AudioHLE?

It seems to have disappeared.



While we are sharing USF notes

Turok: Dinosaur Hunter (USA)
MusicSelect Routine: Something(s) that calls 8008B5B0

Song value offset: Patch into A1 at 8008B628

Needed Patches
To remove the SFX Nop out 80089DD0
Graphics removal: NOP out the following:
800014DC
800A0F50
800A1010
800A1020
800A0F00
8002BA44




edited 12:10 AM EDT September 2, 2005
Rocket Robot on Wheels - Savestate by unknownfile at 10:03 AM EDT on September 2, 2005
I have the savestate for Rocket Robot on Wheels up.

http://unknown.halleyscometsoftware.com/xsfdev/

I was also able to make a sr64 image, but it doesnt work. AS USUAL.

Feel free to use this if you wish to rip the game.
Find Audio HLE source here by hcs at 1:16 PM EDT on September 2, 2005
http://www.zophar.net/utilities/n64plugins.html
I'm fairly sure that's the one I used.
by unknownfile at 4:08 PM EDT on September 5, 2005
By the way, what was the trace address that can be used to trace everything the game accesses again?
by Josh W at 4:26 PM EDT on September 5, 2005
Are you talkin to me?

Well, it doesn't matter - cause i cant get it to work, but you could try either 8008B5B4 or 8008B62C

Then again, i didn't do much unessential code cutting out either.


edited 8:37 PM EDT September 5, 2005
by Mouser X at 6:35 PM EDT on September 14, 2005
Hey, I was asking my dad about compilers. As a professional software engineer, he says he has a few different ones lying around. Seeing as I'm getting bored (more acurately that I feel I'm not doing my part), I was wondering where to get the source code I need so that I can start ripping. I have IDA, and the ROM I need, and savestates, and all that fun stuff. What I need, according to the write up in this thread, is source code so that I can add in my own breakpoint where osCreateThread is. That way, I can find out what's inside the N64 savestate so that I can actually start playing around with its inards. Thanks in advance for any help that can be offered. Mouser X over and out.
by Josh W at 6:47 PM EDT on September 14, 2005
Well you can get the source code Here

You should really use the savestate for analysis as it has all the code already in it and it better and quicker to analyze and uses less memory.

Then once its analysis is done find osCreateThread and get the number before it (usually some thing like 80001234) and use that as your breakpoint and use it's value in A2 (GPR[6].UW[0]) to find your thread.

Ive also found that my IDA plugin can usually find all threads as they use the "standard" function structure.
by hcs at 5:37 PM EDT on September 27, 2005
something I just now added: I created a sig file for n_audio (and the debug version n_audio_d), which is a slightly modified standard audio library (al). The USF Central page now links just to that, the archive contains all known sigs.
I don't know why I had overlooked n_audio before. A few games use it...

edited 9:37 PM EDT September 27, 2005
by unknownfile at 5:26 PM EDT on October 5, 2005
Here's the chatlog from hcs and I on Saturday regarding Diddy kong racing. Diddy Kong Lecture Series
by hcs at 5:57 PM EDT on October 5, 2005
Just note that I make a lot of typos... I don't think you want to read that unless you intend to become incredibly confused.
by hcs at 4:42 AM EST on November 8, 2005
Added another sound library to the list of SIGs, it's libmus from Software Creations. So far I haven't found a single game that uses it, though.
by kode54 at 2:48 AM EST on February 20, 2014
Delete me. (Dashlane was set to automatically "log in" and posted an empty post. Perhaps the forum should be updated to not allow empty replies?)

edited 2:48 AM EST February 20, 2014


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source