JavaGear |
|
|
Java Sega Master System & Game Gear Emulator
Sections
Main Downloads Play Online Getting Started Documentation Links My Blog smspower.org JBenchmark Java Project Diary (Old) |
Sunday, December 23, 2001
Ok, my computer hasn't been connected to the internet for a while, so I haven't been able to update this diary as much as I'd have liked. Here's what's new: Memory: Fixed a silly bug relating to my emulation of RAM, that had caused a handful of titles not to work. Now Ghostbusters, Forgotten Worlds and Street Fighter 2 and a lot more. This has increased compatibility to 80%. VDP: Implemented sprite collisions, and tidyed up the code a bit more. Interrupts: Followed some advice I found on a mailing list, relating to lowering the IRQ line in relation to immediate changes to IE0 and IE1. This has made the effects in a couple of titles work better. ROM Loader: This now handles zip files. Applet: Spent ages rewritting JavaGear to run as both an applet and an application. Whilst doing this, I fully investigated Java Threads, and worked out why the emulator was so jerky under SunOS (different thread handling than Windows...). I rewrote the main emulation loop as a minimum priority thread - which made everything run so much more smoothly. Display: Made the screen refresh itself only at the end of a frame as opposed to all the time. This, combined with the thread changes have provided a speed increase of about 10%. This means that JavaGear now runs at 45% real SMS speed on my P450. Tuesday, December 11, 2001
My first project inspection took place today. I initially had a problem with the keyboard input not working on the Linux machines. This turned out to be a bug, from what I could gather in the JDK, causing focusing issues to behave differently between platforms. (the keyboard was never getting focus). I rewrote the Controllers class in a different way, and this fixed the problem. I implemented a more intelligent ROM loader, so that memory is allocated as necessary for different sized ROMs. Now, Sonic Blast works correctly. I also investigated undocumented Z80 opcodes. Zool, Xenon 2 and Speedball 2 all used a large number of these. I implemented a considerable chunk of them, and these titles are now working correctly. I rewrote the code that converts the SMS palette into the Java palette. It now uses a lookup table, which makes things considerably faster. Compatibility tests show that 75% run correctly, a further 20% run with serious errors and the final 5% don't work at all. There must be another bug in the CPU core, and I'd like to correct this before a beta release. I aim to fix this over Christmas. Sunday, December 09, 2001
CPU: Initialised the IX and IY to 0, instead of 0xFFFF. The Z80 actually initalises them to 0xFFFF on powerup, but doing this breaks Prince of Persia, as it expects them to be set to 0. I assume the original SMS Bios sets these registers to 0. Prince of Persia now runs. Saturday, December 08, 2001
Fixed some incorrect VDP interrupt code, which now means that the road scrolls correctly in OutRun, Battle OutRun and Hang On among others! I also optimised some more of the CPU core, which has sped things up somewhat. In terms of speed, the emulator runs at about 35% real SMS speed on my P2 450 with no frameskipping. This is quite slow, but I am trying to optimise the code as much as possible. I'd like to have an applet version available for you all to try out by the New Year. Wednesday, December 05, 2001
VDP: Vertical Tile Scrolling and Horizontal Tile Scrolling now work 100% I believe. I've optimized the VDP code and it's now a lot cleaner and efficient. The leftmost column is also blanked correctly. CPU: Optimised a lot of the code, which yielded a 15% increase in speed! I also fixed some broken opcodes along the way, fixing Sonic the Hedgehog 1, Ghouls and Ghosts and Asterix. ![]() ![]() GUI: As you can see in the screenshots above, there's now an option to select a transparent FPS counter, there's also system region selection, a file selector, and frameskip options. |