Jump to content
Visual Boy Advance-M
dualscreenman

Qt GUI feature suggestion thread

Recommended Posts

"As long as the shaders are portable, I'm all for it!"

 

GLSL shaders ARE portable....its only the platform specific implementation of the filtering renderer that is non portable.

 

For example glxGetProcAddress and wglGetProcAddress() for Linux and Windows respectively...

 

And GLSL is often equivalent to SM2/3/4, so there will be zero issues.

 

*I need to get MSVC2008 SP1 first to compile...damn you Spacy! >.<*

Share this post


Link to post
Share on other sites

*I need to get MSVC2008 SP1 first to compile...damn you Spacy! >.<*

 

Wtf, why?

 

Don't tell me the project files i created with SP1 are incompatible with non-SP1 o.O

 

 

Didn't you compile with MinGW until now???

 

 

 

Anyway, sorry for being the Microsoft-follower I am... I know I'll burn in hell for that.

Share this post


Link to post
Share on other sites

Today I added a "Close ROM" function, some inferior GB/GBA ROM detection and added the whole GB core to the QMake file.

 

All core files are now in and compile fine.

 

Next thing I'll do is rewrite the gbLoadRom(const char *szFile) function to accept a pointer to the ROM data in memory, instead of loading it itself.

 

It would be great if someone could look into creating a logging dialog and functions because I'm pretty sure we'll need that soon. The core currently uses a winlog() function which is actually empty and does nothing. [Maybe I should change the name to just log()]

 

 

Btw, I switched to using just the Express Edition of VC++ 2008 SP1 now, so everyone can be sure the project files don't need professional features. All the necessary steps to help developing are in the file "DevInfo.Qt.Win" now, so don't hesitate to try it out everyone.

 

If you don't like the Microsoft shit, you can still compile with just the QMake file:

qmake -o Makefile vba-m.pro
make

Share this post


Link to post
Share on other sites

Don't compile. :(

 

jonathan@jonathan-desktop:~/svnrepos/vbam/branches/qt/build/qmake$ qmake -o Makefile vba-m.pro

WARNING: Found potential symbol conflict of sidewidget_cheats.cpp (../../src/qt/sidewidget_cheats.cpp) in SOURCES

WARNING: Found potential symbol conflict of sidewidget_cheats.h (../../src/qt/sidewidget_cheats.h) in HEADERS

jonathan@jonathan-desktop:~/svnrepos/vbam/branches/qt/build/qmake$ make

Makefile:700: warning: overriding commands for target `sidewidget_cheats.o'

Makefile:289: warning: ignoring old commands for target `sidewidget_cheats.o'

Makefile:720: warning: overriding commands for target `moc_sidewidget_cheats.o'

Makefile:708: warning: ignoring old commands for target `moc_sidewidget_cheats.o'

Makefile:738: warning: overriding commands for target `../../src/qt/moc_sidewidget_cheats.cpp'

Makefile:726: warning: ignoring old commands for target `../../src/qt/moc_sidewidget_cheats.cpp'

g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DBKPT_SUPPORT -DNO_PNG -DC_CORE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/include/qt3 -o main.o ../../src/qt/main.cpp

In file included from ../../src/qt/main.h:22,

from ../../src/qt/main.cpp:19:

../../src/qt/precompile.h:24:23: error: QtGui/QtGui: No such file or directory

../../src/qt/precompile.h:25:29: error: QtOpenGL/QtOpenGL: No such file or directory

In file included from ../../src/qt/MainWnd.h:24,

from ../../src/qt/main.cpp:21:

../../src/qt/EmuManager.h:44: error: expected ‘,’ or ‘...’ before ‘&’ token

../../src/qt/EmuManager.h:44: error: ISO C++ forbids declaration of ‘QString’ with no type

../../src/qt/EmuManager.h:47: error: ‘QString’ does not name a type

../../src/qt/EmuManager.h:57: error: ‘QString’ does not name a type

In file included from ../../src/qt/MainWnd.h:25,

from ../../src/qt/main.cpp:21:

../../src/qt/GraphicsOutput.h:26: error: expected class-name before ‘{’ token

../../src/qt/GraphicsOutput.h:27: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type

../../src/qt/GraphicsOutput.h:29: error: expected ‘;’ before ‘public’

../../src/qt/GraphicsOutput.h:43: error: expected `:' before ‘slots’

../../src/qt/GraphicsOutput.h:44: error: expected primary-expression before ‘void’

../../src/qt/GraphicsOutput.h:44: error: ISO C++ forbids declaration of ‘slots’ with no type

../../src/qt/GraphicsOutput.h:44: error: expected ‘;’ before ‘void’

../../src/qt/GraphicsOutput.h:47: error: ‘QPaintEvent’ has not been declared

In file included from ../../src/qt/main.cpp:21:

../../src/qt/MainWnd.h:28: error: expected class-name before ‘{’ token

../../src/qt/MainWnd.h:29: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type

../../src/qt/MainWnd.h:31: error: expected ‘;’ before ‘public’

../../src/qt/MainWnd.h:35: error: expected `:' before ‘slots’

../../src/qt/MainWnd.h:36: error: expected primary-expression before ‘void’

../../src/qt/MainWnd.h:36: error: ISO C++ forbids declaration of ‘slots’ with no type

../../src/qt/MainWnd.h:36: error: expected ‘;’ before ‘void’

../../src/qt/MainWnd.h:47: error: ISO C++ forbids declaration of ‘QTranslator’ with no type

../../src/qt/MainWnd.h:47: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:48: error: ‘QString’ does not name a type

../../src/qt/MainWnd.h:49: error: ISO C++ forbids declaration of ‘QSettings’ with no type

../../src/qt/MainWnd.h:49: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:50: error: ISO C++ forbids declaration of ‘QMenu’ with no type

../../src/qt/MainWnd.h:50: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:51: error: ISO C++ forbids declaration of ‘QMenu’ with no type

../../src/qt/MainWnd.h:51: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:52: error: ISO C++ forbids declaration of ‘QAction’ with no type

../../src/qt/MainWnd.h:52: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:53: error: ISO C++ forbids declaration of ‘QMenu’ with no type

../../src/qt/MainWnd.h:53: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:54: error: ISO C++ forbids declaration of ‘QMenu’ with no type

../../src/qt/MainWnd.h:54: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:55: error: ISO C++ forbids declaration of ‘QDockWidget’ with no type

../../src/qt/MainWnd.h:55: error: expected ‘;’ before ‘*’ token

../../src/qt/MainWnd.h:59: error: expected `:' before ‘slots’

../../src/qt/MainWnd.h:60: error: expected primary-expression before ‘bool’

../../src/qt/MainWnd.h:60: error: ISO C++ forbids declaration of ‘slots’ with no type

../../src/qt/MainWnd.h:60: error: expected ‘;’ before ‘bool’

../../src/qt/main.cpp: In function ‘int main(int, char**)’:

../../src/qt/main.cpp:25: error: ‘QApplication’ was not declared in this scope

../../src/qt/main.cpp:25: error: expected `;' before ‘theApp’

../../src/qt/main.cpp:27: error: ‘QSettings’ was not declared in this scope

../../src/qt/main.cpp:27: error: expected `;' before ‘settings’

../../src/qt/main.cpp:28: error: ‘QTranslator’ was not declared in this scope

../../src/qt/main.cpp:28: error: ‘translator’ was not declared in this scope

../../src/qt/main.cpp:30: error: ‘settings’ was not declared in this scope

../../src/qt/main.cpp:30: error: new initializer expression list treated as compound expression

../../src/qt/main.cpp:31: error: ‘class MainWnd’ has no member named ‘show’

../../src/qt/main.cpp:33: error: ‘theApp’ was not declared in this scope

../../src/qt/main.cpp: At global scope:

../../src/qt/main.cpp:23: warning: unused parameter ‘argc’

../../src/qt/main.cpp:23: warning: unused parameter ‘argv’

make: *** [main.o] Error 1

Share this post


Link to post
Share on other sites

../../src/qt/precompile.h:24:23: error: QtGui/QtGui: No such file or directory

../../src/qt/precompile.h:25:29: error: QtOpenGL/QtOpenGL: No such file or directory

 

Hm, maybe you can try to replace these lines with just QtGui / QtOpenGL without subfolder.

I don't know how Linux sets the Qt SDK up.

Share this post


Link to post
Share on other sites

Hmm, everything worked a few days ago. I think there's a problem on my end...

..and whoa, I just noticed... why is it including qt3?

 

*EDIT* Oh, I was using qmake-qt3. Silly me.

Share this post


Link to post
Share on other sites

I've been trying to compile the qt branch.

I did get everything to work by using the QT4 version of qmake. The compile, however, did manage to fail during linking:

g++ -Wl,--no-undefined -o VisualBoyAdvance main.o MainWnd.o sidewidget_cheats.o MainOptions.o configdialog.o emu.o EmuManager.o GraphicsOutput.o Globals.o bios.o Cheats.o EEprom.o Flash.o Sram.o elf.o RTC.o Sound.o memgzio.o fex_mini.o Util.o Mode0.o Mode1.o Mode2.o Mode3.o Mode4.o Mode5.o gb.o gbCheats.o gbDis.o gbGfx.o gbGlobals.o gbMemory.o gbPrinter.o gbSGB.o gbSound.o Blip_Buffer.o Effects_Buffer.o Gb_Apu.o Gb_Apu_State.o Gb_Oscs.o Multi_Buffer.o agbprint.o GBA.o GBAGfx.o GBA-arm.o GBA-thumb.o moc_MainWnd.o moc_sidewidget_cheats.o moc_MainOptions.o moc_configdialog.o moc_GraphicsOutput.o qrc_vba-m.o    -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread                                                                     
/usr/bin/ld: cannot find -lGL                                                                  
collect2: ld returned 1 exit status   

Share this post


Link to post
Share on other sites

I recently compiled it in GNU/Linux with latest SVN. Most of it looks good. But selecting Input Keys is hard, if possible. And the options aren't saved.

Share this post


Link to post
Share on other sites

Well, it's still a WIP.

I'd actually love to play with this port for a bit (seeing as it's the only one I can even compile as I CBA to get any version of MSVC) but right now we'll just have to wait and see what's being done with it.

Share this post


Link to post
Share on other sites

Speaking of reporting, you guys might've already done something about this (last SVN I got was 595), but anyway I noticed this in the MainWnd.cpp:

 

// 1000 / 60 = 60 fps, but only results to 40 fps in reality.

// possible workaround: call timer more often and return or wait if too early

 

After tinkering with it for a bit, I found that the timer Qt provides has a granularity of 1ms, but only if you set it to a repeat of less than 10ms; above input of 10ms, it first skips to slightly over 15ms real time, and input of 16ms and above it waits 25 real milliseconds every time (hence the 40 FPS). Constantly changing the timer causes some delay as well; on my PC the Qt port runs at almost exactly 60 FPS when first setting the timer to wait 7, then 8 ms, before every repaint, even though that should be 1000/(7+8)=67 FPS.

 

Using a QBasicTimer object with a period of 1ms in the GraphicsOutput object (with timer.start(1, this); in the constructor) and the following timerEvent function:

 

void GraphicsOutput::timerEvent(QTimerEvent * event)
{
const int tickms[3] = {16,17,17};
static unsigned char curframeof3 = 0;
static int counter = 16;

counter--;

if (counter <= 0)
{
	counter = tickms[curframeof3];
	curframeof3++;
	if (curframeof3 > 2)
		curframeof3 = 0;
	repaint();
}
}

 

The FPS seem to converge to 60 or at least something very close to it (60.005 or 59.995 or something)

Share this post


Link to post
Share on other sites

I think we'll use a seperate emulation thread, that gets a QTimer with an Overflow time of 0 (idle time processing or something like that). But for now, the Timer is in the Main Application thread until we get some basic IO.

Share this post


Link to post
Share on other sites

Yes it would, but if you use techniques like Audio Sync or VSync, it won't. Well, this are just some ideas, it is possible to change in the actual code. I learn Qt by developing this, so of course I can't plan far ahead :P

Share this post


Link to post
Share on other sites

I don't really know anything about Qt myself. :P (well, besides what I learnt from the first few tutorials, some experiments and the manual)

Seems Qt at least has full threading support. If using that the Qt port ends up running as smoothly as the Win32 VBAM does right now that'd be great.

Share this post


Link to post
Share on other sites

I would like to suggest that the gameboy player (gamecube) would be emulated and somehow merged within the emulator (QT Gui) to show different borders that you can choose when playing games without borders and have it function similarly to the gameboy player. When some key is pressed, an overlay will appear over the emulator and this is when you would choose which border to pick (while rom is active [similar overlay formula like zsnes's overlay when you switch to the emulator options while playing]).

 

Would function like: [video=youtube]

@6:17

 

Will overlay similarly while functioning like: f071246a-a604-41be-8a4b-dd758fd23aab_3_full.gif

Share this post


Link to post
Share on other sites

Is the Qt frontend still being worked on? Or has it been discontinued? I can't find any Qt related code in the trunk or any of the branches (maybe I didn't look hard enough?)

 

If the port is still active, where could I get a glance at the code? If it's not, would it be possible to know why it was discontinued?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×