JdiBoy is my first attempt at an emulator. If it gets finished, I believe it would also be the first emulator made in RealBasic. JdiBoy is the working name for the project, so let me know if you have a better idea. One option would be to call it "RGB: RealGameBoy" which is a possibility. Pieces will be posted here as they get done. There's a lot to it.
JdiBoy is based on an abandoned project on SourceForge called Mario. But this is a total port by hand, so don't think of this as a simple recompile. I am licensing this under the BSD license. This mean, in layman's terms, that the source is freely available to use, distribute and change at will, as long as you give me some credit. I also kindly ask that you let me know if you do use it. This encourages me, knowing that people use it.
Update-7/12 - I'm working on releasing a somewhat good version and then annoucing this project more publicly. This is more of me saying that the emulator works, dispite the bugs and issues. Hopefully this will generate interest and possibly more input. The latest version will be available like normal, but periodicly a simi-stable version will be release. In prepration for this, I'm also looking at maybe reformating this page, so if it changes, do freak out. If you have suggestions on site features you want, drop me a line. I also would like to hear from people about names and icons. I'll make a blog post about this to facilitate with feekback.
Update-7/9 - As many of you know, Realbasic 2008r3 came out the other day. And wouldn't you know it includes a code profiler. Through the genrosity of robl, I got two profiles of my code. The first run shows a slow down primarly in the Video portion. Sorting further, I deduced that it came from VideoDriver.Display() that only draws the image to the canvas. Testing some more, I found that scaling there in RB is *slow*. robl ran another test with the scaling turned off. There is no obvious problems, so I am searching further, but we are up to about 1/2 speed, and using 80% of the processor, rather than 100%. So progress is being made, just with a smaller screen. One last note, the emulator doesn't work well with Mac. You have to change some code to get it to work for now: the FileLoad menuhandler needs to change so that you can select a game, and the key mappings in the timer event are off.
Update-6/30 - I have done some preliminary profiling on my code to find out where the slowdown is, but I was unable to find any conclusive results. Maybe someone with more experience reading these things can help me. See the download section for the files.
Update-6/15 - With no real changes to the code, I managed to get it to do *something*. It's glitchy, slow, and not playable, but it actually does stuff. Below is a screen shot of it playing Tetris. The attached code is also my current version, although, I can't say what changed.
Update-6/6 - Once again, I have updated the project file. I tracked down several errors in the CPU code related to the problem. Most of it came from improperly incrementing the HL word registers. After I got that cleared up, the game progressed a little further. In Tetris, you see the copyright screen. It then waits in a tight loop, checking RAM. I can only assume that it is waiting for a button press. I found major issues with the joypad/button classes, and I fixed some. However, the joypad interrupt doesn't seem to go off, as it doesn't seem to get enabled. But things are looking brighter!
Update-6/2 - I have updated the project file. It seems more broken now then before, but I really did fix some things. The lines from before where actually a stack overflow, so that wasn't really good. I fixed that, partially. At some point, the program will get back into that condidion, and I'm still tracking it down, so for now, use the debug mode in RB to run it, as it will catch it when it occures. I had to refactor some code, as some problems where from RB confusing the constants and the properties if they had the same name, but it didn't direclty complain. Go Figure. I took down the links to the parts of the project. It was a pain to keep those updated. Just use the project file. Finally, I removed some old updates and flipped the update order around.
Update-5/31- I found some errors with some memory mapping functions that whre preventing it from working right. There are probably more. I have went through all the CPU code, all the Video code, and some other code. I need to check the Cartridge code still, but it does get further, but not by much. Also, I speed up the video routines greatly. It now only takes about a second to draw the logo. Check out all the updated things below
Update-5/27- Finally! The emulator lives! All files have been updated again. The main problem was with the palette table. One default value wasn't being set, so the palette table was being filled impropertly, so only the white was being draw. So far, it only draws the Nintendo logo, but it is doing it, abet slowly. Speed and sound to come, but it lives!