1
0
Fork 0
forked from len0rd/rockbox

Major Rockboy update.

1) Adapt Rockboy to smaller screens (H10, X5, and iPod Nano).
2) Add the ability to use a preset palette on color targets. Choose 'Set Palette' from the main menu.
3) Clean up the code to remove any unused code and variables.
4) Changed tabs to spaces.
5) Disable reading and writing sound when sound is disabled.
6) Disbable writing to the RTC since it is not implemented yet.
7) Minor optimizations from WAC gnuboy CE and iBoy.
8) Massive clean up of code to make it appear consistent.
9) Change all C++ style comments to C style.
10) Completely reorganize dynarec. Add fixmes to all unimplemented opcodes. Add debug writes for all opcodes. Attempt to implement a few opcodes myself.
11) Silence some warnings when built using dynarec.
12) Minor reshuffling of IRAM, may or not offer a speed increase.
13) Include fixes found in the short-lived gnuboy CVS.

All in all, there's about a 10% improvement on my test roms when sound is disabled and slight improvement with sound. Especially noticable when there are few sprites on screen and less action is occurring. See FS #6567.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12216 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tom Ross 2007-02-06 21:41:08 +00:00
parent 1026c0f5b2
commit 2882b26a99
48 changed files with 4891 additions and 5419 deletions

View file

@ -5,24 +5,9 @@
#include "cpu-gb.h"
#include "mem.h"
#include "lcd-gb.h"
#include "rc.h"
#include "sound.h"
#include "rtc-gb.h"
static int framelen = 16743;
static int framecount;
rcvar_t emu_exports[] =
{
RCV_INT("framelen", &framelen),
RCV_INT("framecount", &framecount),
RCV_END
};
void emu_init(void)
{
}
/*
* emu_reset is called to initialize the state of the emulated
* system. It should set cpu registers, hardware registers, etc. to
@ -47,9 +32,8 @@ void emu_step(void)
* make things work in the mean time. */
void emu_run(void)
{
// void *timer = sys_timer();
/*void *timer = sys_timer();*/
int framesin=0,frames=0,timeten=*rb->current_tick, timehun=*rb->current_tick;
// int delay;
setvidmode(options.fullscreen);
vid_begin();
@ -63,24 +47,25 @@ void emu_run(void)
while (R_LY > 0 && R_LY < 144)
emu_step();
rtc_tick();
sound_mix();
if (!pcm_submit())
/* rtc_tick(); */ /* RTC support not implemented */
if(options.sound)
{
/* delay = framelen - sys_elapsed(timer);
sys_sleep(delay);
sys_elapsed(timer);*/
sound_mix();
pcm_submit();
}
doevents();
vid_begin();
if (!(R_LCDC & 0x80))
cpu_emulate(32832);
while (R_LY > 0) /* wait for next frame */
{
emu_step();
rb->yield();
rb->yield();
}
frames++;
framesin++;