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
Yet another great update from StrmnNrmn's blog:
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 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 )
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.
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
007 goldeneye was a work of art one of the best n64 games.
StrmnNrmn is amazing. I'm glad the PSP scene has coders like him.
he works so hard and fast you gota love him!
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...
Miniviews:
Spoiler!
wow way to tech for me to understand. i hope u get it working though
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!
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*
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks