Download Link:
http://visualboyadvance-m.googlecode.com...ance470.7z
DLL package:
http://visualboyadvance-m.googlecode.com/files/dll.7z
Changes:
- Direct3D + Pixel Filter now profits from multi-core CPUs
The number of threads to create is detected automatically on first run or when the option is not present or invalid in the ini.
To manually change the number of threads to create, change the value after "maxCpuCores" in the ini file.
Big thanks go out to chrono for making the asm filters thread safe.
It would be great if someone with a quad-core or octa-core PC could post some benchmarks for different thread numbers. HQ2x/3x/4x filters are most interesting.
Spacy, an integer divide by zero crash occurs when trying to load a rom using D3D + Filtering.
I have a Q6600 CPU I'd be happy to post some benchmarks, but not sure how to perform it or what game works best at whcih part, etc.. etc.. ?
If you can let me know I'll report back for you. Nice job with VBA btw. I had not even realized until this morning that work continued on it by anyone. nice surprise.
Use Direct3D & enable speed info message. Disable VSync, Throttle, Frame Skip, Triple Buffering & Audio Sync.
I recommend a static image in any game, for example a title screen or an ingame scene, sothat the emu core does the same amount of work all the time.
Select for example the HQ4x filter and write down the average fps.
Then close the emu, open the ini and decrement the value behind maxCpuCores.
Start VBA again and write down the average fps you get now.
It would also be interesting to see the total amount of CPU power VBA uses (look in the Task-Manager). The higher the percentage, the more does VBA make use of all your cores. 100% is ideal, 100%/NCORES is worst case (app only uses one core).
It's kind of hard to gauge an average as it simply jumped to much. I'm just giving the lowest I would see and the highest in each test.
HQ2x, HQ3x, and HQ4x all seemed no different in numbers. And not once did it use more than 25% of the CPU no matter what number of cores I used.
Advance Wars 2 on the first battle scene of training
1 core - 355% to 375%
2 core - 370% to 375%
3 core - 375% to 400%
4 core - 375% to 400%
Completely impossible to play like this, lol.
yes, well, while it works on multicores, its going to bork on single and hyperthreaded cores.
I just uploaded a patch for it. It can only be caused if your CPU returns 0 as the number of CPU cores. Probably a behaviour of single core CPUs? I also restricted the maximum number of core to use to 16, since image Quality might get worse if more cores are used.
@Squall:
Until the next binary is released, you should manually set the value in the ini file.
indeed, on all systems the first core is 0, second is 1, and so on.
if you look at CPU Affinity it confirms this
argh, since this sites playing up a tad,
a
use multithreading tick box in the filters section would go down well, its strange, since multicore cpu's also return the first core as Core 0. most apps just read it wrongly as core 1, theres only a few apps which actually do report it right, windows task manager being one of them.
Code:
int VBA::detectCpuCores()
{
int CPUInfo[4];
__cpuid( CPUInfo, 1 );
int processor_count = ( CPUInfo[1] & 0x00FF0000 ) >> 16;
// some CPUs probably do not support this instruction properly
if( processor_count < 1 ) processor_count = 1;
return processor_count;
}
is probably Intel-specific code
try
Code:
int VBA::detectCpuCores()
{
SYSTEM_INFO info;
GetSystemInfo(&info);
return info.dwNumberOfProcessors;
}
is there a reason you haven't been given developer access on source forge? lol.
I don't think the CPUID instruction is Intel-specific, but probably not all fields are supported by every processor.
chrono Wrote:try
Code:
int VBA::detectCpuCores()
{
SYSTEM_INFO info;
GetSystemInfo(&info);
return info.dwNumberOfProcessors;
}
I must have overlooked this in the SDK, thank you, I'll use that instead.
Edit:
Patch uploaded: SVN472
The next step is to add some code to remove the visible border of the filter areas.
Edit2:
Here are some results with my CPU underclocked:
C2D E6300 @ 266 MHz * 6 = 1600 MHz
Aeneon 4GB @ DDR2-800 5-5-5-16
Advance Wars 2 custom battle scene, HQ4x:
2 cores: 140%
1 core: 120%
I just added the possibility to enable/disable this feature for D3D.
I also reduced the maximum number of threads to use from 16 to 8 so the image won't look too bad with 8 filter borders. ANything above 8 cores will possibly have enough calculation power anyway.
My next task will be to work on thread->core assignments sicne I have the feeling windows often executes all the threads on the same core :/