Dark Stalker
New member
Time for an overdue update. I haven't exactly got an abundance of time, but I do work on my emu occasionally. I've gotten enough done now that I thought it might be worthwile to make a WIP release.
I guess the biggest new feature of this release may be sound support. Implementing it was interesting and a lot of fun too. It wasn't really that hard either. Of course, since I haven't done anything sound related before, I had to learn a bit of the terminology and how sound waves tend to be represented digitally etc. After that things became a lot clearer. My general impression is that the accuracy is pretty good. The only quirk I know isn't emulated is the so-called "zombie volume change", which is wrongly or inaccurately documented. I think bgb is the only emu supporting this, and I've only found one rare game depending on it. I could make an implementation based on some guesses I suppose. The quality of the sound seems to be quite decent too, even though I don't use any complex filters or synthesis.
I also added the 10 sprites pr. line limit, in addition to sprite sorting by x-pos for DMG games, while doing some optimizations to sprites-rendering. This will make some sprites flash or disappear when the limit is exceeded like on the real GB. GB games tend to combine several sprites to make bigger ones, so usually it will be parts of sprites disappearing/flashing. For the same reason, DMG sprites that pass each other tend to have a somewhat segmented appearance.
Another new feature is input configuration as well as gamepad/joystick support. There's a simple addition to the GUI for this. Speaking of the GUI, I did some cleanups and changes to make it a bit less ugly. I also added some ifdefs so that the win32 build uses the native windows file selecting dialog. I'll probably make a nicer GUI later, but it's not the highest priority atm.
The RTC emulation now uses system time so that the time passed in the game will reflect the actual time passed between sessions. I also added support for games to change the actual rtc values through modifying the timestamp, although I haven't seen this used in any game.
Save-files now spawn in a seperate subfolder, so your rom-folders will no longer be spammed with .sav-files. Note that the save-files should be compatible with most other emus.
Cleaning up my drawing code, I came across some interesting issues. It turned out that the previous overlay-based renderer used a generally unsupported YUV-format, making it fall back to SDLs software implementation more often than not. Having fixed this, platforms supporting a hardware overlay should get essentially free scaling. However, it seems that the windows-version of SDL doesn't use an actual overlay, but rather uses the normal DirectDraw scaling-function (which should still be a good bit faster than software at least). According to SDL changelogs true overlay was disabled because of performance issues. I found that the performance problems they encountered were due to them misunderstanding how the DirectDraw UpdateOverlay-function works (they were calling it every screen update). If I get the time to implement a decent fix, I'll see if I can get it included in SDL.
Additionally there's been optimizations and cleanups all over the place, as well as some minor bug fixes and compatibility tweaks.
Downloads:
lameboy-0.10.0_i386_linux.tar.gz
lameboy-0.10.0_win32.zip
I guess the biggest new feature of this release may be sound support. Implementing it was interesting and a lot of fun too. It wasn't really that hard either. Of course, since I haven't done anything sound related before, I had to learn a bit of the terminology and how sound waves tend to be represented digitally etc. After that things became a lot clearer. My general impression is that the accuracy is pretty good. The only quirk I know isn't emulated is the so-called "zombie volume change", which is wrongly or inaccurately documented. I think bgb is the only emu supporting this, and I've only found one rare game depending on it. I could make an implementation based on some guesses I suppose. The quality of the sound seems to be quite decent too, even though I don't use any complex filters or synthesis.
I also added the 10 sprites pr. line limit, in addition to sprite sorting by x-pos for DMG games, while doing some optimizations to sprites-rendering. This will make some sprites flash or disappear when the limit is exceeded like on the real GB. GB games tend to combine several sprites to make bigger ones, so usually it will be parts of sprites disappearing/flashing. For the same reason, DMG sprites that pass each other tend to have a somewhat segmented appearance.
Another new feature is input configuration as well as gamepad/joystick support. There's a simple addition to the GUI for this. Speaking of the GUI, I did some cleanups and changes to make it a bit less ugly. I also added some ifdefs so that the win32 build uses the native windows file selecting dialog. I'll probably make a nicer GUI later, but it's not the highest priority atm.
The RTC emulation now uses system time so that the time passed in the game will reflect the actual time passed between sessions. I also added support for games to change the actual rtc values through modifying the timestamp, although I haven't seen this used in any game.
Save-files now spawn in a seperate subfolder, so your rom-folders will no longer be spammed with .sav-files. Note that the save-files should be compatible with most other emus.
Cleaning up my drawing code, I came across some interesting issues. It turned out that the previous overlay-based renderer used a generally unsupported YUV-format, making it fall back to SDLs software implementation more often than not. Having fixed this, platforms supporting a hardware overlay should get essentially free scaling. However, it seems that the windows-version of SDL doesn't use an actual overlay, but rather uses the normal DirectDraw scaling-function (which should still be a good bit faster than software at least). According to SDL changelogs true overlay was disabled because of performance issues. I found that the performance problems they encountered were due to them misunderstanding how the DirectDraw UpdateOverlay-function works (they were calling it every screen update). If I get the time to implement a decent fix, I'll see if I can get it included in SDL.
Additionally there's been optimizations and cleanups all over the place, as well as some minor bug fixes and compatibility tweaks.
Downloads:
lameboy-0.10.0_i386_linux.tar.gz
lameboy-0.10.0_win32.zip
Last edited: