Hi,
compared to other emulator (i.e. kawak), mame does not perform very well in terms of speed of emulation against Neo Geo games. Looking at profiling data for these neo geo games, we can see : --------------------------------------------------------- % cumulative self self total time seconds seconds calls s/call s/call name 18.40 18.80 18.80 971070 0.00 0.00 video_update_neogeo 10.42 29.45 10.65 4416 0.00 0.00 texture_set_data 10.06 39.73 10.28 1144463 0.00 0.00 sprite_line_timer_callback 6.24 46.10 6.37 187970965 0.00 0.00 astring_cmpc 3.77 49.95 3.85 35732143 0.00 0.00 memory_region --------------------------------------------------------- I was wondering why functions like 'astring_cmpc' and 'memory_region' where in the top 5 of the most time consuming functions. The answer is found in the function 'draw_sprites' from 'mame/video/neogeo.c' where 'memory_region' is called for each sprites for each VIDEO_UPDATE. I patched mame in order to keep track of this 'memory_region'. This is done in VIDEO_START via a global variable (region_zoomy) just like in some other drivers.
This commit is contained in:
parent
decc35b5f2
commit
8a78b0252d
@ -35,6 +35,7 @@ static emu_timer *auto_animation_timer;
|
||||
|
||||
static emu_timer *sprite_line_timer;
|
||||
|
||||
static const UINT8 *region_zoomy;
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -504,7 +505,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, int scanlin
|
||||
}
|
||||
}
|
||||
|
||||
sprite_y_and_tile = memory_region(machine, "zoomy")[(zoom_y << 8) | zoom_line];
|
||||
sprite_y_and_tile = region_zoomy[(zoom_y << 8) | zoom_line];
|
||||
sprite_y = sprite_y_and_tile & 0x0f;
|
||||
tile = sprite_y_and_tile >> 4;
|
||||
|
||||
@ -902,6 +903,8 @@ VIDEO_START( neogeo )
|
||||
state_save_register_global(auto_animation_frame_counter);
|
||||
|
||||
state_save_register_postload(machine, regenerate_pens, NULL);
|
||||
|
||||
region_zoomy = memory_region(machine, "zoomy");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user