Next Generation Emulation banner
1 - 20 of 60 Posts

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #1 · (Edited)
Hi @ all.
I'm trying to contribute a little to VBA.
I'm working on the Direct3D rendering part of VBA.

I also tryed to port it to Direct3D9. I could compile it without errors, but everything is then very slow, and I really don't know why. There were only minor changes necessary to do this. Maybe some one can tell me what I did wrong.

Moreover, i'm going to make the following changes, just for those who are interested:
- Speed up rendering process
- delete unnecessary code
- add "Select Fullscreen Resolution" option
- use DirectX font for frame rate display (at the moment only status messages use this; the advantage is, that the frame rate is then besser visible in greater resolutions and alpha blendig is faster)

A dream - will it come true?:
- Use textured quads for putting all the GBA Layers and Sprites together, so that less software processing is needed.
 

· InnarX
Joined
·
2,759 Posts
I don't know about everyone else, but it's really encouraging to see others contributing to the emu scene, regardless in which project that is. I know some very good programmers, so I will show them your code and get feedback for you if there is any. ;)

r2rX :D
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #3 ·
Ok, i've finished some points in the list.
Select Resolution is not ready.

I've got an idea:
I can try to implement the HQ4X Filter.
This would be nice for fullscreen ^_^

If I'm ready, I'll post my changed version here and mail the changes to the authors.
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #4 · (Edited)
Yeah, after hours, i finally found out why dx9 was much slower than dx8.

*g*
D3DPRESENT_PARAMETERS.PresentationIntervall was set with ZeroMemory to 0.
In Dx8, this defaultet to D3DPRESENT_IMMEDIATE, but in Dx9, it defaulted to VSync. I found this thanks to Fraps, which showed me 75 Hz in Windowed Mode > My Flat Screens Sync rate.

Now it runs as fast as dx8. ^_^

YEAAAAAAAAAAAH ( I feel hardcore... *g* )

Now I can take care of the other things ;)

*Crazy* *g*


Seems like I'm still a n00b in programming ^_^"
 

· Registered
Joined
·
425 Posts
Can't wait to see HQ4X implemented. Good to see someone taking up the reins.
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #6 · (Edited)
Hi all.

Status:
3x and 4x Filter's usable, already made my own Simple4X (wow *g*)
But I just don't have a clue how to implement HQ3X/HQ4X, because I don't
understand the interface, somehow it reads a 16bit bitmap but outputs a
32bit one or something like that. I really could need some help there.
Sorry for being so incompetently *g*
I'll post the source in some hours [edit: or more] because I need to fix my VC++ (It makes some problems).
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #7 · (Edited)
OK, here's what I've done for now.
It would be great if someone could add now the filters to the files hq3x.cpp and hq4x.cpp.

Here's the info file's content:
Code:
Changes:
removed unnecessary/updated code

tried to optimize d3d rendering speed a little

fps were shown with vba-internal font-renderer -> changed to d3dfont

Filtering (Nearest<>Bilinear) was always read from registry during resizing.
This was bad when the filtering was changed and then the window resized

Updated from Direct3D8 to Direct3D9

Added Windows XP Icon format Symbols to main icon.

Direct3D is now affected by VSync option

exe compressed with upx

Added white semi-transparent box to the status texts

Sorted project files

VSync now affects Direct3D




IMPORTANT:
Added the Framework for 3x and 4x Magnification filters.
Restrictions:
	Only Direct3D
	Seems to be really slow
	Be sure to set the correct window size when trying it out
	Example filter only 32bit color

If you want to complete this: Look at files hq4x.cpp (example filter) and hq3x.cpp

I only changed the project file for VC++ 2003



Build Help:
Add NASM and UPX to your VC++ BIN-Folders.
I used the latest DirectX SDK (April 2005) from Microsoft
 > You need the latest runtime!!


This package is based on the CVS source from 27.02.2005 (D.M.Y)

Finished: 20:45 08.05.2005
Spacy
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #10 ·
Can anyone tell me why there are 2 versions of the zlib and libpng libs in VBAs lib folder? What's the differenc ebetween "libpng.lib" and "libpngMD.lib"?

I tried to update these libraries a bit, but VC++ says "libpngMD.lib not found" despite I removed it from any include paramters o.o?

I'm making a little update release when I solved that problem...
 

· Registered
Joined
·
3,042 Posts
Spacy, the current VBA author is having trouble keeping the project up.
Give him a ring and contribute whatever you have so far and join the team if you feel up to it.

One little request, could you please compile your version of VBA. I really don't want to go to all the trouble to compile all of it.
It really got me when I couldn't run the executable because the libs were missing and I didn't find them in your source code.

On the topic of maginification filters, are they supposed to allow you to get a small image, size it larger and keep roughly the same quality?
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #13 · (Edited)
Thanks for that information.

Sorry, but I really don't like to bind myself on very popular projects, because on the one hand I'm not that good as many others and on the other hand I don't have that much time that I could work on it many hours a day. I did that yesterday but then it was so late that i had to do homeworks properly. But it's really interesting to support this project mroe or less "behind the scenes". Another problem is, that I don't know anything detailed about GBA emulation, more about N64 emulation, but I choosed this project to get some skills that can help with N64 emulation.

On the topic of maginification filters, are they supposed to allow you to get a small image, size it larger and keep roughly the same quality?
Magnification filters in general take a source image of whatever size and enlarge it with a special algorhitm that makes the image look less "blocky".
A very important thing is the processing speed, because a filter shouldn't make a game unplayable because of slowness.


PS:
At the moment I'm enabling 3x and 4x Filters for Windows GDI. OpenGL should do someone else, I never wrote any code for it.

By the way:
Does anyone know how to rebuild every file except the GBA.cpp?
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #14 · (Edited)
Hi again.
Release 2 finished.

Changelog:
VBA with Changes by Spacy, Release 2:
Code:
- Added Simple3/4x Filter
- Optimized filter menu
- Some corrections in the VC2003 project file
- Updated zlib and libpng components
- Added GDI support for 3x and 4x filters
- Fixed Bug: RegKey for VBA was also created when using ini file
- Workaround: Couldn't save settings correctly during debugging
  because the CString object with ini pathname is automaticly
  destroyed when calling saveSettings() at ~VBA()
3x and 4x filters work now with GDI, Direct3D but not OpenGL. They also worked with DirectDraw without any changes on that.

EXE attached (optimized build, took about 10 minutes to compile on Athlon XP 1800+)
Link to source:
http://magicstone.de/spacy/download/VBAr2_SRC.7z


INFO:
There's no Hq3x/HQ4x filter implemented for now, only the framework for it. Any help with HQxX filters is appreciated.
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #16 · (Edited)
Progress Report:
HQ3X Running perfectly with GDI in 32bit mode.
HQ3X is weird thing. It Uses 16bit colors for the input bitmap and 32bit colors for the out bitmap, so I had to wrote a color converter, another weird thing si that it uses a strange 16bit color order: 16bit: BBBBBGGGGG0RRRRR
The zero isn't at the beginning or at the end, but before the 5bit red component o.o"
Start to be excited for the next release ;)
Look at the 2 screens, first one show Simple3x, second one shows hq3x
 

· Experenced But New User
Joined
·
866 Posts
wow, theres a good difference between Simple3x and hq3x. Looks very impressive.
 

· VBA 2 developer
Joined
·
404 Posts
Discussion Starter · #19 ·
The real interesting thing is the difference between HQ2X, HQ3X and HQ4X in High Resolutions.

By the way, HQ4X is working as well.

But there are some bugs at the moment that i want to fix before the next release.
Moreover I get weired artefacts in 16bit mode and Direct3D still doesn't like the new HQ filters.
 
1 - 20 of 60 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top