-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indiana Jones/Battle of Naboo microcode Implementation #1259
Comments
Only if somebody will decode that microcode. |
Same applies fro the factor 5 games like rogue squadron. |
Maybe microcode for, Battle for Naboo, Rogue Squadron, Indiana Jones will be quite similar if not the same. |
I looked at Rogue Squadron implementation in Lemmy plugin. Very specific and unique thingy. |
@Frank-74 For your information, I started some prelimilary work on those games. They are significant different than SWRG but Indy and Battle of Naboo are quite the same (some differences exists). For the time being, I am hopeful it can be done with a lot of efforts. |
I'd like to help here, but except for the n64 Manuals (http://ultra64.ca/resouorces/documentation/) |
This ucode is really complex. For those interested, there is an old article about the game here: http://www.ign.com/articles/2000/11/10/bringing-indy-to-n64 A good part of the ucode was rewritten but it was not totally "rewritten from scratch". Few features in this ucode are very unique. Interesting but challenging. |
I dumped some ucode from battle for naboo/indy and compared it with rogue squadron. |
@olivieryuyu Can you provide any useful information on how i can help with decoding? |
I already deciphered a big portion of the microcode. Thanks for proposal though! |
@olivieryuyu sounds great, thank you. Can you give a short status? Blog entry maybe? |
Update will be shared where possible. Stay tuned. |
@olivieryuyu, i would love to read a bit more about your adventures with reverse engineering. I understand as far as dumping the microcode and translating MIPS assembly to x86 or C, but im sure you've learned some tricks to identify certain patterns. Would be cool to see a video or guide that tells someone what they need to get the job done |
We started new crowdfunding campaign for Indi and Naboo on Idiegogo: Visit it to see what is already done and what is planned to be done when the campaign will reach the goal. Any kind of support is welcome. |
Supported of course! Like to see "unknown ucode" message vanished. |
How about to post a reddit entry? |
I have no reddit. The campaing does not seem to be successful, that is a bit unfortunate... It is a hard work to do the reverse engineering and the microcode of Factor 5 are really huge and complex compared to the others. For instance Indiana Jones/Battle of Naboo is double the size of F3DEX2, which was the biggest Nintendo microcode. |
It probably got deleted because there's already one for the campaign: https://www.reddit.com/r/emulation/comments/7ogzuc/gliden64_indiana_jones_and_the_infernal_machine/?utm_source=amp&utm_medium=comment_header |
@oddMLan @olivieryuyu |
I am sure there are others that will donate more before the campaign is over. And the campaign is very modest, it will be filled. Although, yes, i do think this should drive more attention. |
It might be useful to make sure that people realize that the dev is not Gonetz, who has a running patreon for GLideN64. |
It is a campaing of both Sergey and me, the work on the HLE project being done together. After Indy, there is still many things in HLE to do: Batte of Naboo specific commands Of course this campain for Indy would be the last one for supporting HLE reverse engineering in GlideN64. But seeing the little attention it brings, it is a bit demotivating :( |
@olivieryuyu what is your input for the 64DD games? Certainly those will need some work, too. Campaign is funded so get it done please! :) |
mhhh one spend anonymously the rest to fill the 600 Dollar, it's the second time one did. |
@weinerschnitzel. Thanks! 64DD games uses standard ucodes, I already checked out. @StenApp : at the end of my HLE adventures (many months), I will do a small introduction on how I do the reverse engineering. Yet the first step is to understand MIPS (https://chortle.ccsu.edu/AssemblyTutorial/index.html) |
@olivieryuyu |
It should be checked on real hardware first. The game is weird on this aspect. |
This glitch does not appear with angrylion's plugin. Most likely it is a problem with my mip-mapping shader. |
Ok then i guess it should be a new ticket for this issue. |
Done: #1833 |
Hello everyone, I found another glitch in (Star Wars BFN) now in the screen selection menu, I recorded a video showing the glitch. https://www.youtube.com/watch?v=fFKR-Im8cNo |
It's a core issue. Set counter factor/Count per op to 1 fix the menus. |
@fzurita Corrected, thank you. 👍 |
@Diduz Could you give me savestate for Indiana from the same place but for Project64? |
@gonetz I'm afraid I'm not able to get the game working under Project64. I get a black screen with the NTSC version. The unreleased PAL version starts, but it gets garbled after some screens. I'm using Project64 2.3.2.202. |
Indy/Naboo do not work under PJ64 2.3.x. Use Project 64 2.4.x. You can get nightly builds at pj64-emu.com or emucr. |
here the savestate Indiana Jones and the Infernal Machine (E) (Unreleased).pj.zip It seems incorrect in both LLE and HLE. |
@olivieryuyu Thanks! |
I fixed the issue with mip-mapping. I noticed, that Project64 still have issues with this game: there are problems with shading, both in HLE and LLE. mupen64plus works just fine. New beta build: |
@gonetz Works like a charm! :-) Indy seems perfect to me now. Thanks for all your work! |
@gonetz @olivieryuyu That's too bad... I guess my ignorance on this topic is pretty clear. Id be fine to dump the microcode myself, but I have no clue how/where to start... I DO own a 3.2 gameshark and an ultrasave cart tool from http://64drive.retroactive.be/features.php#ultrasave, so I could, in theory, do it myself. I am more than willing to learn and am well aware of the cliff-face level of an uphill battle I face... That said, I am willing to go the distance. Can you point me in the right direction on some instructions, docs, etc to do this? Also, does loading a custom microcode change the ABI for the RCP? Or do I still use libultra? If it changes, do you have the ABI that I could code against? Finally, is it possible to simply inline "compiled" microcode (as in "straight from the rom" in some kind of ascii-like encoded form) in c++ using the correct syscall? Or would I have to reverse engineer and reproduce the assembly and inline it that way? Hell, Id still be willing to pay for a nice set of documentation/instructions to explain details about all of this if you'd be willing to create it. You clearly have a LOT more knowledge in this particular field of CS than I do. Id be willing to even upfront some of it as a good-faith gesture. Let me know if that would be worthwhile with respect to your time, etc. |
@olivieryuyu Also, where can i find this Sergei and/or his ucode implementation? |
@nterry here are the commits for the HLE code https://github.com/gonetz/GLideN64/commits/indi_naboo |
@nterry I have no skills in microcode decoding and can't help you. |
I am afraid that using a microcode would be much more complex than deciphering it (I intend in the future to provide a short tutorial in this respect). You would need to dump properly the ucode (both Nemu and PJ64 are unable to do it without bugs), then you would need to compile it with the N64 SDK (I would guess, I am not sure, that it does support the RSP asm, which is not at all standard) to get potentially a library usable for compiling a homebrew rom with this ucode. Of course you would need to change the gbi.h to support the related commands (see and understand in depth Sergey implementation in this respect, it is not needed to decipher the ucode as such). Also as written by the devs, the OS of N64 had been modified, most likely to manage differently the segmentation of the memory and potentially to use COP1 for some operations (as the MP matrix calculated on the CPU side). As you may understand, this is far from being a trivial exercise to do. |
What is your method of dumping? |
Mix of both and manual corrections where necessary. |
@olivieryuyu i made some dumps. But you meant they were partly ones. How can i be sure that i got the whole ucode? |
You will need to go through the code and catch all overlays with PJ64. Then compare them with Nemu ucode extraction to get the full ucode dump. Then correct incorrect address (mostly offset) of some asm commands. Gillou has potentially a way to do at once but I dunno how he does that. |
@Gillou68310 Can you please help us here? Do you have a hint how to get the ucode of a n64 game? |
That's more similar to recovering the DNA of a fossil, but without worrying about DNA contamination from third parties and bacteria. |
Yes I wrote a bit of code to dump the ucode text and data sections directly from rdram provided that TASK_UCODE_SIZE and TASK_UCODE_DATA_SIZE have correct values, otherwise I just dump 4096 bytes. But you won't be able to build a ROM with just the text and data sections. The "makerom" utility from the SDK requires ucodes in ELF format. A tool like "rsp2elf" could potentially do the job but it's not included in the SDK. Also since the application code can reference the RSP text and data sections, a symbol file will be required. |
Merged to master. |
Any chance of work being done to HLE this game?
I've made a fixed branch of Project64 that has an RDB option hack for Indiana Jones and Battle for Naboo here: https://github.com/Frank-74/project64/tree/ForceFpuLoc
This build has fixes for savestates as well, so both old and new types work, compressed or uncompressed.
Compiled build with VS2008 SP1 here: https://dl.dropboxusercontent.com/u/9498358/n64/Project64FixFpuLoc.zip
GLideN64 just hangs with a black screen, whereas Glide64 responds with:
Error: Unsupported uCode!
crc: d5c4dc96.
Jabo 1.7 just crashes the emulator, but 1.6.1 gives this:
Unable to detect microcode settings
Microcode ID: $8A4F88F1.
LLE is fine, but it's slow.
The text was updated successfully, but these errors were encountered: