Sunday, 03 February 2008

I realized a few weeks ago that I haven't filled out a blog for a while, even about things that aren't related necessarily to PJ. The comments section of the last blog is a mess, but there seems to be a mix of people that still believe in the project and others who think it's dead. So I thought I'd just drop a note on the blog to say hello and fill you in on some of the things I've been up to. If you haven't heard by now over the Christmas holiday I released a new version of Jnes, so that kept me busy for a few months working with the beta team for a few months to get that out the door.

Prior to that I was deeply involved in Legend of Zelda Twilight Princess, and more recently I just finished Phantom Hourglass. These games were great I can honestly say Phantom Hourglass is my favorite handheld zelda, better than Link's Awakening if not just for the graphics. Twilight Princess was insanely fun as well, definitely my favorite zelda game since Ocarina of Time dare I say it.

I've also enjoyed Guitar Hero 3 as well on occasion, playing Poison on Medium is addictive. Anyway that's all I have for now, life is busy and hopefully we'll have more updates in 2008, there is always active discussions behind the scenes but not always blogs like this. Please be respectful of us, and each other if you choose to leave a comment, we welcome feedback. Also like to wish everyone a happy new year!

 

Friday, 06 April 2007

With the new site, we get a new logo and icon. So it was time to use these in project64 as well. I have made a new about window, changed the language select screen and the icon for the application as well. I know these are screens people rarely sees, but I am really happy with how they are looking in the beta. I am going to try to get this version I am working on done this weekend and upload it this weekend for the donators.

Here are some screen shots of the new user interface:

App Icon:



Language Select:



About Window:

 

Tuesday, 03 April 2007

I re-wrote a lot of the internal handling of compiled code a few builds ago. This is one of the few games that came off worse for wear for it. I was debugging in to it today to see if I could understand what was going on with the game and why it behaved worse.

I have worked out why the game is worse off. Where in 1.6 I could use protected memory and the game worked great. I currently have to turn on other self modification methods that slow the game down significantly. What the game is doing is it has 3 buffers with code in memory and one virtual address pointing to these code blocks. It constantly is changing the buffer that it points to, so turning on self mod methods detects this change and constantly recompiles these buffers.

What broke it in latter beta builds is that I found the virtual address and said this code already existed and replaced it with the old one. So it had both virtual locations pointing to the same physical location. I had built the original solution on how games like golden eye and conkers bad fur day used the TLB. I am going to re-write some of the function lookup to make use of Physical address as well as virtual address. I hope I should be able to fix this problem in the next beta build.

Read here to get access to the beta development of pj64

 

Thursday, 22 February 2007

One of the bugs reported in the new beta was that some games did not have sound/sound effects/music where they did in version 1.6. So some games might have music but no sound effects. The game this was first noticed in was doom64. It had sound in the intro sequence, but once you got in to the game it had no sound. I figured that since this worked in 1.6 but not in 1.7 then it should not be too hard to fix. Maybe 4 hour’s worth of work, boy was I wrong.

First off change all the normal setting, change to interpreter, use all the same plug-ins from 1.6. It should work but it doesn't. The game has still has sound in the intro, but once in game it does not. Ok make a save state in 1.6 and take it across, now have sound from save but no sound effects. Change the source code so I can log what is data is being to the RSP. After a day of tweaking I am able to get the same timings, it seems to generate the exact same data. It does not appear anything is different here, so I have no clue what is causing it. I try using Azimers audio plugin and set it to HLE the audio. This works, the audio is now playing, this suggests that what is sent to the RSP is correct.

I am totally confused at this point, I know it was working in 1.6 so I try one of the oldest version of 1.7 I had the source for (1.7.0.7). This is still failing, so I decide to slowly de-evolve the source back to the 1.6 code. Make sure all the interpreter ops are the same. On to getting the memory code back to the original, after that timing. Then the code for plugins. Then timing code. Then settings, I am totally confused there is not much left and none of the code left should effect the game. Then change some on the initialization code and it is working. Only took me a week to get to this point.

Ok, now I am getting somewhere. 8 hours latter I have narrowed down exactly what allows 1.6 to play with audio and 1.7 does not. The difference was that in 1.6 I created a thread to load the game and then this spawned another thread to execute the emulated core. In 1.7 I reduced it down to not re-spawning because I did not think it was needed. Ok I have a solution, this works when I start the CPU I just do it in another thread.

I just do not like this solution it might work but it makes no sense. I start to move more code in to the CPU thread to find out if there was anything that could give me a better idea what is actually causing this to happen. I find what does not like to be in the same thread as the emulation, initialization of the graphics plug-in. WTF initialization of the gfx plugin in another thread fixes the audio in game! Ok time to try the other gfx plugins. All the Direct X ones have the same effect with doom64, although the opengl has sound working.

Now it is time to talk to Jabo, to see if he has any clue. He has none. He has tracked down the problem to initiating d3d, do this and no sound effect, skip this you got audio. Ok do some more research it suggests that the creating the d3d object should be done in the thread that controls the UI because it adds different hooks in to the message handling. I change this so after loading the rom it will send a message to the UI to initialize the plugins there. This works, not necessarily the nicest solution, and I do not know exactly how it caused the issues. But at least it is working now and better then just spawning a thread for the sake of it.

 

Account Login

Categories

News Archive