banner logo
Updates Blog Support Contact Links
Programming JdiWeb JdiMOO JdiBoy JdiMail JdiMOOpp NetCheck Tutorials
Gaming AVR Othello

Archive for June, 2008

IT WORKS!

Sunday, June 22nd, 2008

First off, I apologize for the outages. I upgraded the OS on my server, and it took a few days to put things back in order. It took a few more days to get this database back up. But everything is restored, and it seems that nothing was lost, thankfully. The last time I messed with my OS like that, I lost everything. But I took precautions this time.

While I’m still off topic, I’d also like to say that I’m enjoying my new job, learning a lot about systems administration, and how much things really cost for IT. I had a project where I audited all the backup tapes to find out how old they really are, and ended up making up orders for $10,000 worth of new tapes O_O.

Now onto the topic. The emulator works. I updated the project page when it happened and several people now know about it. But I thought I’d take the time to explain where the project is in full. I started with the C++ source code, and ported it to RB. That turned out to be the easy part, but it caused most of the errors. Stupid copy/paste errors. Stupid errors from not reading the original correctly. Then the hard errors where the original code was so complicated, and mine was so complicated, it just made it hard. But I tracked down many many many errors with that and got it to the point where it will run.

Now, bear in mind that it runs slowly. Even though the Gameboy only ran at 4MHz, what I wrote is probably terribly inefficient. I don’t know what all I can do to help it at this point, though. I did fix one thing a while back with the video. The original code wrote the image data to basically a memoryblock, then passed it out to an outside library for the video handling. Well, that’s not an option here, so I took that memoryblock and turned it into a picture. But that two step process proved very *very* inefficient. But now, I need to find more places like that in my code. I found a profiling utility from TrueNorthSoftware that should help me analyses my  code to find bottlenecks. Hopefully that will help a lot. I probably need to rework some of the dispatching code in the CPU class, and I might need to disable some background things in some functions. But I have a feeling that most of the problems lies with my code.

There are still glitches in at least the video portion of my code. I could try and track this down first, but it’s a pain to do so. Everything is so slow that it would take me hours to just get to where I needed to be in code to watch it go, then I might accidentally miss it.  So I plan on pausing real debugging while I remove the “slugs” as an article on wiki called them.

I also don’t have sound yet. I haven’t managed to figure out how the original sound code works. It seems to write some sound data to a memoryblock and pass it out to that external library. If I can figure out what format that sound is in, I can do something with it, I think. I have suspicions that it is WAV data. So I could possibly do something with that and play it, but I don’t quite know. It might also be possible to use declares to generate the sound directly, but that is also iffy.

So that’s where I stand on the emulator: Need to speed it up, then fix the minor glitches, then add sound. As this is an open source project, feel free to take a peak. Any assistance would be greatly appreciated. I’m trying to keep a list of who all has helped me so I can put it to be distributed with this.

Oh, before I forget: I still need a name. JdiBoy sounds kinda strange. I’ve heard REALboy (but I think that RS wouldn’t like that), Pinchioco (get it? ;) , and Greenboy (again, RS might have qualms, but it sounds interesting). Suggestions in the name/icon department would help greatly for you nonprogramming people, or those that don’t want to touch other people’s code.

EDIT: I had to repost this after things going nuts with my server. It’s the only thing that was lost except for comments that may or may not have existed. Please repost any missing comments.