PDA

View Full Version : VBA 1.72 with Kega Fusion plugin system



suanyuan
August 11th, 2005, 22:27
I have add Kega Fusion plugin system to my VBA 1.72 derived version. If you want to run VBA faster with high end filter, you should give it a try.

Binary can download from VBA's official forum:
http://www.ngemu.com/forums/showthread.php?t=63952

suanyuan
August 12th, 2005, 03:57
Here is the compiled binary and source code.

suanyuan
August 13th, 2005, 19:32
In VBA172_smooth_V5 version, I restore "synchronize" option's behavor.

Now "auto skip frame" option has no relation with "synchronize" option.
If you want VBA sounds better, you should turn on "synchronize".
If you want VBA runs game faster you can turn off "synchronize".

Now when "auto frame skip" option turn off, VBA172_smooth_V5 behaves
just like official VBA172.





the changes for VBA172_smooth_V5:

- restore "synchronize" option's behavor
- rewrite part of Direct3DDiplay class rendering code
- rewrite plugin system to support hq3x, hq4x, lq3x, lq4x, Scale3x, Scale4x filter plugin
- change frame adjust code, to stable FPS
- output notify message on screen when "auto skip frame" on/off



In my computer of P4 2.53 G, VBA172_smooth_V5 can run F-ZERO with hq3x
filter almos 95% CPU speed with both "synchronize" and "auto skip frame" turn on.
Alough I can't tell the differences between outputs of hq2x and hq3x.

Squaresoft74
August 13th, 2005, 22:13
Works like a charm here , very nice job Suanyuan. :cheers:

Ash
August 25th, 2005, 11:42
Whoa. Very nice indeed.

suanyuan
August 28th, 2005, 19:20
Base on VBA smooth v5, I continue to enhance audio synchronizaion.

This version I try to keep track audio synchronization with multi-thread, and let VBA core speed a little bit slow than 100% to get a better audio.

Now VBA smooth v6 can run almost 98% cpu speed with synchronize option on. And the problem when enter a cafe CPU speed drop to 75% for GBC "Lufia - The Legend Returns (U) [C][!]" is also fixed.

Try "Castlevania - Circle of the Moon" to find out the improvement.


This version can't run well at computers without hyper-thread hardware support.
I am trying to fix this problem.

Squaresoft74
August 29th, 2005, 03:18
Thanks for the update , i will test it asap. :)

bohdy
August 29th, 2005, 16:30
Hi suanyuan, I have tried your latest version with Circe of the Moon (US), and the synchronisation seems worse if anything. Sound stutters and core speeds up too fast every now and again.

Btw, I like what you are doing, but I wish you would move your changes to the latest 1.8 version as there are many timing fixes that certain games need to run smoothly in that one.

suanyuan
August 29th, 2005, 20:28
Hi suanyuan, I have tried your latest version with Circe of the Moon (US), and the synchronisation seems worse if anything. Sound stutters and core speeds up too fast every now and again.

Btw, I like what you are doing, but I wish you would move your changes to the latest 1.8 version as there are many timing fixes that certain games need to run smoothly in that one.


(1) Have you turned on the "auto frame skip" option?

When turn on "auto frame skip", throttle option will change to "no throttle", frame skip option will change to "skip 0", and synchronize option will turn on automatically.

The VBA speed shuld be 96% - 98% a little bit slow than 100% for this setting.



(2) VBA official coder PokemonHacker is working on ARM CPU core for more acculate timing and more speed boost. Before he finished his modifcation of ARM core, it's difficult for VBA 1.8b2 to get 60 FPS with sound synchronization and high level filter like hq2x, hq3x.

bohdy
August 30th, 2005, 04:23
(1) Have you turned on the "auto frame skip" option?


Of course. That is where the main work of your version is, no? In comparison, one of your previous versions (first with new plugin system I believe) synchronises better with less sound stutter. Also, in your build with no throttle and no auto frame skip the emulator goes as fast at it can, while it stays at 60 with the original 1.8b2. Is it meant to?

(2) VBA official coder PokemonHacker is working on ARM CPU core for more acculate timing and more speed boost. Before he finished his modifcation of ARM core, it's difficult for VBA 1.8b2 to get 60 FPS with sound synchronization and high level filter like hq2x, hq3x.

I see, so you will integrate updated core when it is finished. Btw I should mention that the noticeable timing fixes (that get rid of slowdown whenever there are too many moving sprites in a few games) are not implemented in the original 1.8 as I had assumed, but they are in kode54's build. See here (http://board.zsnes.com/phpBB2/viewtopic.php?t=2248&postdays=0&postorder=asc&start=0).

suanyuan
August 30th, 2005, 18:06
Of course. That is where the main work of your version is, no? In comparison, one of your previous versions (first with new plugin system I believe) synchronises better with less sound stutter. Also, in your build with no throttle and no auto frame skip the emulator goes as fast at it can, while it stays at 60 with the original 1.8b2. Is it meant to?


I see, so you will integrate updated core when it is finished. Btw I should mention that the noticeable timing fixes (that get rid of slowdown whenever there are too many moving sprites in a few games) are not implemented in the original 1.8 as I had assumed, but they are in kode54's build. See here (http://board.zsnes.com/phpBB2/viewtopic.php?t=2248&postdays=0&postorder=asc&start=0).

I found the problem you said in a computer of P4-253 without hyper threading hardware. And the frame rate is not stable in this computer.

Thank you for informing me the bug this version introduced, and I will try to find some way to fix this bug.:P

suanyuan
August 31st, 2005, 20:06
I found the problem you said in a computer of P4-253 without hyper threading hardware. And the frame rate is not stable in this computer.

Thank you for informing me the bug this version introduced, and I will try to find some way to fix this bug.:P

Here is VBA smooth v6.1, and I fixed the bug that made none hyper-thread PCs frame rate not stable.

Keith
August 31st, 2005, 20:18
Nice work suanyuan :)

bohdy
August 31st, 2005, 22:16
It is better now, with no random speedups and less sound crackling, but still not as good as your previous (v5, I think) version. Compare the music during the Circle of the Moon title screen: It still crackles a little in v6.1, but not in v5.

Squaresoft74
September 1st, 2005, 01:53
Same result my side.
V5 works best on my machine.

UltimaClaud
September 1st, 2005, 04:49
As the GBC Lufia is quite tough,suanyuan make a special fix for it in v6.
Maybe fix brings some other bugs.That's pity... >_<

suanyuan
September 1st, 2005, 06:18
It is better now, with no random speedups and less sound crackling, but still not as good as your previous (v5, I think) version. Compare the music during the Circle of the Moon title screen: It still crackles a little in v6.1, but not in v5.

When VBA wants to update sound buffer but the update position is same as the current position DirectSound is playing, then crackles happens.

There still some space to enhane the sound playback, but right now I don't have a better idea. Maybe fix this problem in later version of VBA smooth.

For computer with less power or want to play GBC with normal speed, I think v6.1 is a better choice. on the other hand v5 behaves more like official VBA.

Techman
September 2nd, 2005, 07:55
Why don't you use VBA 1.7.1. It works a lot better than 1.7.2 o_o

suanyuan
September 5th, 2005, 21:33
VBA smooth v6.2

new features:
- add Kode54's PCM interpolation module

bug fix:
[DarkDancer] Suggest me to reference Gens when playing music synchronized based on audio playback speed to avoid sound crackling.
[neoragex2002] Suggests me to reference Aaron Giles's new timer system design to handle audio synchronization problem.
- remove multi-thread audio synchronization mechanism (new mechanism not implement yet ;-) )

[sjyune] Can't open Rom Select window since v6.0
[Drain] when try to change a "all gameboy advance" to "gameboy advance" in filetypes emu crashes
- fix bug in open gba file dialog that make some computers crashed.

[Kirby] once you do delete the file and create a new one, VBA Smooth only runs in 16 bit color mode now (which means refreshing the desktop and whatnots)
- adjust settings for VBA.ini of other version of VBA
- use Direct3D, filter plugin, scale2x as default settings
- remove VBA.ini from replease zip file

[many people] when run VBA smooth v6.1, OS report lack of mfc71.dll, msvcp71.dll, msvcr71.dll
- use static link with MFC intead of dynamic link

[many people] can't run VBA smooth v6 in non-intel CPU computers.
- change the optimization option of ICC 9.0 for non-intel CPUs


For more information you can find at VBA official forum:

http://vbasmooth.emulation64.com/

Bug report or suggestions please post here:

http://www.ngemu.com/forums/showthread.php?t=63952

Download from:

http://vbasmooth.emulation64.com/

bohdy
September 6th, 2005, 05:27
It sounds good, suanyuan, but I find that it runs at only 30FPS (even though it reports 60fps) compared to V5 which always stays at 60.

Also, you forgot to update the version in the title bar ;)

revl8er
September 6th, 2005, 16:12
Very Nice job

epockrandt
September 11th, 2005, 20:36
Hi, i'm facing some big problems with your mod.

After installing version 6.2, i can't open save directories neither rom' directories. Do you know why? Is it a bug?

I'll wait.
Bye.

Carlos

suanyuan
September 12th, 2005, 06:29
Hi, i'm facing some big problems with your mod.

After installing version 6.2, i can't open save directories neither rom' directories. Do you know why? Is it a bug?

I'll wait.
Bye.

Carlos

One friend in ngemu forum has post a bug looks like your, or maybe this is an bug.


the vba.ini file should be deleted from each release (it took me 10 minutes to realize why my saves weren't loading )...but once you do delete the file and create a new one, VBA Smooth only runs in 16 bit color mode now (which means refreshing the desktop and whatnots)...maybe I'll do some research on this problem with WinMerge

*edit* found it.....in your new vba.ini file, change:
renderMethod=1
to
renderMethod=2 (then again, using Direct3D will disable all smoothing filters)

I wonder why using renderMethod=1 in original VBA 1.7.2 doesn't cause it to use 16 bit colors


Please setup the directories of VBA smooth 6.2 again, after doing that try to open save directories and rom directories.


If you still can't open save directories and rom directories, please send your e-mail address to suanyuan@ms14.url.com.tw. I will check the code and try to locate the bugs and send you a new version after fixing these bugs.

suanyuan
September 13th, 2005, 19:55
VBA smooth v6.3

new features:
- auto select driver, select Direct3d firt, if failed to initialize then select DirectDraw.
- add window size 1.5x (thanks mikoxc's suggestion)
- add Simple Chinese Language DLL (簡體中文語言包, thanks mikoxc to provide this dll )

bug fix:

[mikoxc] when select menu File => Import => Battery file => Flash save, then VBA crash
- fix GBA import battery dialog bug

[mixoxc] when using HQ3X and HQ4X filter with window size x2, VBA only show black screen with sound
- fix bug in D3D driver

[suanyuan] if using filter and change window size from 4x or 3x or 2x to 1x, VBA crashed
- force to disable filter when window size is 1x or 320x240

[suanyuan] pokemonhacker release his code to CVS
- apply most crash bugs fix from latest VBA version on CVS

[many people] It’s very annoyed every time VBA smooth switches to 16 bit color depth, the screen blinked.
- now VBA smooth select the best rendering driver for you

source code and compiled binary can download from:
http://vbasmooth.emulation64.com/

bohdy
September 14th, 2005, 16:30
6.3 still runs at half framerate in automatic mode, just like if frameskip 1 was selected.

suanyuan
September 14th, 2005, 18:10
6.3 still runs at half frame rate in automatic mode, just like if frame skip 1 was selected.

Let me explain a little bit about "auto frame skip" option in VBA smooth:

The original "auto frame skip" mechanism in official VBA build is to detect VBA running speed every 10 frames. If the speed is too fast above 100% then slow down VBA by using Sleep() system call. If VBA is running too slow, it won't do anything and you need to adjust "skip frame" manually to improve VBA running speed.

My approach is to let VBA run at 60 fps, 0 skip and detect VBA running speed. If VBA running too fast, it slow a bit by using Sleep() call every frame. If VBA is running too slow, I bypass the output process from VBA internal frame buffer to display card including image filtering process, to save some CPU to speed up VBA a little bit.

I also apply some constrains to the "auto frame skip" mechanism. It won't continually skip two frames and minimum frame rate output to display card is 30 FPS. The purpose for these constrains are to keep VBA looking as normal as possible.

If your computer is not powerful enough, you can increase VBA speed by two ways - one is turn off "synchronize" option, the other is don't use high level filter for example hq2x.


*update*
I can't realize this bug until I use FRAPS to measure the real frame rate of VBA smooth and I will fix this problem in next release.

Thank you for report this bug twice.:bye3:

Squaresoft74
September 14th, 2005, 21:06
Nice release suanyuan :)
But i noticed i'm getting a minor gfx "glitch" with this build.
On the top and left sides of the screen i get blue lines that weren't there with previous builds.

I attached a snapshot to this post so you can give it a look.

My video card is a GeForce 4 TI 4600 with 45.23 (Whql) drivers.
I don't use newer ones since they break older PC games with my cards (such as Metal Gear 2).

suanyuan
September 14th, 2005, 22:04
Nice release suanyuan :)
But i noticed i'm getting a minor gfx "glitch" with this build.
On the top and left sides of the screen i get blue lines that weren't there with previous builds.

I attached a snapshot to this post so you can give it a look.

My video card is a GeForce 4 TI 4600 with 45.23 (Whql) drivers.
I don't use newer ones since they break older PC games with my cards (such as Metal Gear 2).

It's not a display card driver problem, I crop the output image with 1 pixel around the boarder. I will fix this problem in next release.

Kaminari
September 28th, 2005, 07:23
Hi Suanyuan,

Thanks for carrying on the VBA legacy, you're doing a great job there. I understand that VBA Smooth is compatible with Kega's filter plugins. It works great, except for the recent 2XPM plugin developed by PM (http://2xpm.tripod.com/). When selecting this filter, the emulator's display is heavily distorded with white diagonal strips. It works perfect in Kega Fusion. Could you investigate this?

suanyuan
September 28th, 2005, 15:33
After checking the source code of 2xpm, I am lucky to find out the bug that make 2xpm plugin's display is heavily distorted with white diagonal strips.

I have sent a updated copy of 2xpm project to 2xpm author Pablo Medina.

Here is the updated 2xpm zip file, including source code.

Kaminari
September 28th, 2005, 22:27
This is brilliant. Many thanks =]