PDA

View Full Version : Daedalus - Goldeneye (9 May Update)



blackrave
May 9th, 2007, 23:34
Yet another great update from StrmnNrmn's blog (strmnnrmn.blogspot.com):


While I'm at it with the blog updates, I also invesitgated why Goldeneye no longer works in Daedalus (it did run with some of the very early releases, but stopped working some time ago.)

Goldeneye is quite an unusual game in that it's one of the few titles that executes code from virtual memory. I'm not sure exactly why it does this, but I suspect that it's to allow it to free up as much RAM as possible. It sets up a virtual memory range for the code, and pages in chunks of data to physical RAM as required (i.e. on TLB miss exceptions). I guess this means that it can just keep a few dozen KiB of code in RAM at a time, rather than the entire code segment.

Anway, emulating this accurately is incredibly slow - for every instruction that is executed, the emulator needs to check whether the instruction fetch would cause a TLB (http://en.wikipedia.org/wiki/Translation_Lookaside_Buffer) miss exception, and if so invoke the N64's exception handler. This is quite a time consuming process, so I tend to cheat and assume that the instruction pointer is in physical memory.

To get around this problem with Goldenye, I set up a couple of bogus entries in Daedalus' memory map that point directly to the correct region in the ROM image. In a way it's as if the N64 has a much larger TLB, and all the pages are permenantly mapped.

Normally (i.e. on the PC version of Daedalus) this all works fine. The problem as far as the PSP version is concerned is that the rom (all 12 MiB for Goldeneye) must be permenantly loaded into memory, and there just [url=http://strmnnrmn.blogspot.com/2007/03/look-inside-daedalus.htmlisn't enough memory[/url] left to do this anymore. As most N64 roms are simply far too large to fit in the PSP's RAM, I have to page chunks in from the memory stick on demand (pretty similar to what Goldeneye was doing on the N64 really :D)

So, there are a few possibilities for getting Goldeneye to work:



Permenantly disable dynarec for Goldeneye, and reuse the dynarec buffers (6MiB) the expansion pak (unneeded anyway, 4MiB) and anything else I can scavenge, to fit the rom in a contiguous block in memory.
Investigate a way of getting the memory-mapping hack to work with rom caching.
Re-examine how I handle TLB miss exceptions for instruction fetches, and implement them correctly.



Of all of these, the first solution is probably the easiest, but it's a bit hacky (I'd have to allocate a 12 MiB for Goldeneye at startup, and carve this up for different subsystems if other roms were run).

The second solution is a bit less horrible, but I'm still not sure it's possible without checking the instruction pointer for every instruction that's executed (and paging in chunks of ROM as required).

That leaves the third solution which is probably the most work, but I think will be the most stable solution in the long run. It may also help a few other roms that are using similar techniques to Goldeneye to run correctly. If I can get it to work in conjunction with the current dynarec implementation, it shouldn't even be any slower than the current hack that's in place.

Anyway, given the work involved Goldeneye isn't an immediate priority, but I am thinking about it.

-StrmnNrmn

All these updates should keep us satisfied for some time. :)

Mc_Logical
May 10th, 2007, 00:16
This is one of the main roms i wanna see running on the psp, analog as directions, L as aim and R as shoot lol if this gets working on a future Daedalus emulator then COOL!!!!!!!! ive been trying goldeneye with every release

Gold Line
May 10th, 2007, 00:20
007 goldeneye was a work of art one of the best n64 games.

dj2005
May 10th, 2007, 00:21
StrmnNrmn is amazing. I'm glad the PSP scene has coders like him.

Gold Line
May 10th, 2007, 00:31
he works so hard and fast you gota love him!

Shadowblind
May 10th, 2007, 01:49
If anybody read that...

I'm not sure what he should do. Being a human and all, I think he shouldn't go through with the third choice unless he already has at least a guess of what went wrong with the TLB (Really, I can't tell you what all this means. Im sure someone like Yaustar can, if your curious) and has an idea of a way to correct it.

He seems very hard to discourage, but we shouldn't take any chances...if the PSP scene loses his coding Prowess and monster-ofanapp, then that would be a major blow...

Buddy4point0
May 10th, 2007, 02:07
wow way to tech for me to understand. i hope u get it working though

starogre
May 10th, 2007, 02:08
how is any of that even possible when throwing sound and audio into the equation?

i can't wait to play games like DK64, diddy kong racing and SSB with sound!

Jpdeathblade
May 10th, 2007, 02:15
could you make a fake ram on the memory stick? A lot of people have 512+ now (you kinda need something big for n64) so 12 to 20mb isnt much (and worth it for goldeneye, SSB and diddy kong racing)

Also some n64 games bigger then psp rams? How gay sony....*tisk tisk*

CaptainMorgan4
May 10th, 2007, 02:21
This is so amazing I can't believe these great updates, I think the hype for R12 just went through the roof! This is probably going to be the biggest release ever for Daedalus, think about it SSB working with dynarec and goldeneye possibly working and not to mention the Super Mario 64 hud being fixed.

LAMPRO
May 10th, 2007, 02:36
yeah, these blog updates peek into strmn hacking genious and further brings us closer to the running the best carts available for n64. mariokart64 running, ssb soon, goldeneye soon, these are the classics and im sure im not alone when i say- CANT WAIT TILL FULLSPEED WITH SOUND!! i have faith. thanks for all the hard work nrmn. pure 1337.

Gold Line
May 10th, 2007, 02:37
what about zelda mm any news on that?

pkmaximum
May 10th, 2007, 02:53
I look forward for when gets the dyranec bug fixed in Super Smash Bros. 64 because that he said that would boost up the game to around 30fps, is more than good news, because at that speed even with sound anabled it would still be more than enjoyable to play.

Also I still am curious to finding out why he doesn't talk about moving sound over to the ME because that would allow us to have sound w/o any slow down on the actual N64 process..... Well maybe its the fact Strmmmn hasn't taken time yet to learn and fully understand how the ME works on the PSP. If we just give it sometime I'm sure there are still a lot of great things to come from Strmmmn and the N64 emulator.

I would like to say hopefully one day I'll see ad hoc support, but I think that is most likely impossible on the PSP, as memory consumption and emulating the N64 alone is a very sketchy process for the PSP, so handling ad hoc, and emulating the N64 at the same time, almost seems impossible =[

And as far as using the PSP's memory stick for more ram on the PSP, that will not work at all. Sry I don't have a technical explanation mainly because I'm too tired to explain and this long post was originally just to compliment strmmmn and his hard work lol.

SnesR0X
May 10th, 2007, 03:16
what about zelda mm any news on that?

it doesn't work?

Gold Line
May 10th, 2007, 03:17
it doesn't work?

it dose work but crashes when you get the magic bar :(

dhraad
May 10th, 2007, 06:22
StrmnNrmn, kudos for your program. Goldeneye or not, we appreciate all of your work on the emulator and wish you the best.

Sharpy
May 10th, 2007, 11:09
Daedalus is a great emulator, StrmnNrmn's doing a lot of hard work there, we totally appreciate it and thanks for the updates

goldeneyegod
May 10th, 2007, 11:22
If you make goldeneye work, you will forever be regarded as a god, and I might even name one of my children after you! lol so pppppleeeeaaaasssee do your best I know you won't let us down!
(goldeneye if my favourite game of all time.....if you havnt guessed lol)

kharaboudjan
May 10th, 2007, 14:32
fantastic work you have donw Strmn!! you are leading the psp scene right now :D

Gold Line
May 10th, 2007, 14:34
he is a psp god dudes it must be so hard to get n64 game running on the psp ;)

Apoklepz
May 10th, 2007, 14:49
Nice, Strmn! GoldenEye would be a real treat on PSP...Best of luck with that!

Also, I noticed some game graphics dissapeared with R11, like the coin count and camera icons in Super Mario 64 and other stuff in Starfox 64...anybody else noticed?

Gold Line
May 10th, 2007, 14:51
yea he fixed the mario coin thing you will see it in the next update :)

Gizmo356
May 10th, 2007, 14:51
Yeah the same hapened to me.

Zion
May 10th, 2007, 14:58
could you make a fake ram on the memory stick? A lot of people have 512+ now (you kinda need something big for n64) so 12 to 20mb isnt much (and worth it for goldeneye, SSB and diddy kong racing)

Also some n64 games bigger then psp rams? How gay sony....*tisk tisk*

Ive suggested that before, apparently it doesnt get/send the data fast enough to be a feasible option.

Or so I was told.

On the adhoc thing, maybe there is a way that we could send out ir signals (psp has ir) to make the second psp controller 2 perhaps (on a muliplayer game) so you could pick what controller you wanted maybe.

I just thought of that then so i dont know if its possible. im sure though thats why pops lets you choose which controller port to use, i wouldnt be suprised if a similar thing to what i just mentioned is intregrated by sony into pops in the near future

shorty_carnage
May 11th, 2007, 09:10
does anyone else work on Daedalus other than StrmnNrmn???? If not WHY NOT???


Please other coders lend a hand it would really speed up the progress!!

Cheers