Lemonboy (Super/color Gameboy Emu)
#1
Posted 01 July 2009 - 03:09 PM
Source: http://dl.openhandhe...?0,0,0,0,46,133
Features a number of new scalers such as Notaz's gpsp interpolation scaler, scale2x filter modes.
Supports internal overlocking at wiz speeds.
Sound is still a bit rough (if anyone wants to take a look, feel free as im stumped)
#4
Posted 01 July 2009 - 09:17 PM
#5
Posted 01 July 2009 - 09:37 PM
It runs too slow on both ones. Definately slower than the real GB should. I guess that's the reason the sound sounds a bit strange - it's also too slow :)
Clockspeed doesn't change anything, it runs as slow on 200MHz than it does at 500MHz.
Are you sure clockspeed is working? Or does the emulator itself have some timing bug making it run slower? (which would explain the slightly distorted sound)?
#6
Posted 02 July 2009 - 01:19 AM
Rlyeh's GB emu on the 133 MHz GP32 ran perfectly with great accurate sound. It is too bad he never releases the source code to his emus and he has stopped developing. That would be a much better codebase to start from I think.
Are there any other GB emus that could be ported that were made with low powered devices like handhelds in mind? Maybe something from the PSP or DS?
#8
Posted 02 July 2009 - 03:12 PM
This post has been edited by Orkie: 02 July 2009 - 03:12 PM
#9
Posted 02 July 2009 - 03:25 PM
Orkie, on 02 July 2009 - 11:12 AM, said:
So maybe this constant is wrong: static int framelen = 16666;
Edit: Ok the constant is right 1000/60, but if you look at the frame count it hovers around 50 fps. Im taking a look at the timer function in wiz_lib to verify they are correct and on the same scale.
This post has been edited by Pickle: 02 July 2009 - 03:48 PM
#10
Posted 02 July 2009 - 03:56 PM
Pickle, on 02 July 2009 - 05:25 PM, said:
Try to remove the call to sys_sleep(delay) in emu.c, just to check. It is the only code that limits the frame time, I think. If it runs as hell (it does in Gp2x), then we have to review the framelimit code :)
Anyway, I definitely changed the framelen variable in this very version. The Gp2x is using framelen=16748. It should be a value close to 1,000,000/60.
I've considered to port GEST but it involves tons of work. Gnuboy runs reasonably ok, it is pretty easy to port and its performance is not the best but more than enough for little devices. In runs 95% of games at fullspeed in Gp2x at 200MHz, so it should run all games nearly perfect in Wiz at any speed. Unfortunately, the code of Gnuboy is hard to read, at least for me.
#12
Posted 02 July 2009 - 04:10 PM
juanvvc, on 02 July 2009 - 11:56 AM, said:
Pickle, on 02 July 2009 - 05:25 PM, said:
Try to remove the call to sys_sleep(delay) in emu.c, just to check. It is the only code that limits the frame time, I think. If it runs as hell (it does in Gp2x), then we have to review the framelimit code :)
Anyway, I definitely changed the framelen variable in this very version. The Gp2x is using framelen=16748. It should be a value close to 1,000,000/60.
I've considered to port GEST but it involves tons of work. Gnuboy runs reasonably ok, it is pretty easy to port and its performance is not the best but more than enough for little devices. In runs 95% of games at fullspeed in Gp2x at 200MHz, so it should run all games nearly perfect in Wiz at any speed. Unfortunately, the code of Gnuboy is hard to read, at least for me.
Taking out that line does remove any limit and runs as fast as the wiz clockspeed is. I think the wiz_lib timer method isnt correct. The timer read is using the function clock() which is the ticks since the game started. I think this is the reason for getting 50 fps rather than 60 fps.
Update: I take that back clock() should work fine, basically its the number of usec the program has run. I dont see why the fps is around 50 fps
This post has been edited by Pickle: 02 July 2009 - 05:39 PM
#13
Posted 02 July 2009 - 07:38 PM
Update:
You can get it at pickle.gp2x.de/vba.zip
Ive included a gmenu file you can put in one of the gmenu sections. You should or course change any paths. This will act as ok frontend.
Press A+X+MENU+SELECT (or gameboy buttons A+B+SELECT+START if you remap buttons)
Look at the cfg file to change settings. A frameskip of 2 seems pretty good, if you could got to 1 with overclock
This post has been edited by Pickle: 02 July 2009 - 11:15 PM
#14
Posted 03 July 2009 - 09:53 AM
In fact, I ripped the SGB support from VisualBoyAdvance as tou can see in supergb.c and CREDITS :D
BTW, maybe you can change the call to spend_cycles in the function wiz_timer_delay of wiz_lib for "do nothing". That is:
void wiz_timer_delay(clock_t ticks)
{
clock_t ini=wiz_timer_read();
while (wiz_timer_read()-ini<ticks);;
}
Or maybe reduce the time of spend_cycles to, I don't know, 256.
#15
Posted 03 July 2009 - 02:02 PM
juanvvc, on 03 July 2009 - 05:53 AM, said:
In fact, I ripped the SGB support from VisualBoyAdvance as tou can see in supergb.c and CREDITS :D
BTW, maybe you can change the call to spend_cycles in the function wiz_timer_delay of wiz_lib for "do nothing". That is:
void wiz_timer_delay(clock_t ticks)
{
clock_t ini=wiz_timer_read();
while (wiz_timer_read()-ini<ticks);;
}
Or maybe reduce the time of spend_cycles to, I don't know, 256.
I tried both of those ideas yesterday in the attempt to find out why the delay was off. I tried usleep in there too, but that made it worse.
Ive also found another gb emu called gngb its fast, the frame limiter if good, sound is shakey. This is C based using SDL. It actually has a built in menu, but it only changes some settings not select a rom.

Sign In
Register
Help

MultiQuote