Page 1 of 3

Core rewrite

Posted: Mon Aug 25, 2008 4:40 pm
by spacy51

After having a nice chat with blargg on IRC, we both agreed that the current core architecture is like "spaghetti" with all the callbacks and global variables.

 

Additionally, blargg informed me, that "...maintaing GB emulation seems like a real waste, since Gambatte exists and is probably the most accurate GB emulator."

IMO, there are enough GB emulators out there, but VBA is the ONLY open source GBA emulator.

 

 

Having written most of the Qt GUI part until now, I feel like it is useless to rewrite the GUI but leave the core in this state. The current architecture prevents or makes it much harder to run multiple instances of it in different threads, and of course it is anything else than self-explaining how to use the cores.

 

 

So guys, what do you think about rewriting the GBA core additionally to the Qt GUI? I know it will be a lot of work, but I think the result would be much more pleasant than the current mess.


Core rewrite

Posted: Mon Aug 25, 2008 4:49 pm
by ZachBacon

While the "mess" you say we need to rewrite may be tedious work but I would say go for it, I may not program much but when I do I like to keep a nice clean look for my code.


Core rewrite

Posted: Mon Aug 25, 2008 5:07 pm
by mzk

IMO' date=' there are enough GB emulators out there, but VBA is the ONLY [b']open source[/b] GBA emulator.

There's also the new ReasonableGBA, which is really good, and the GBA driver for MESS, which I haven't tried yet.

 

By the way, VBA-M is the only GBA emulator that works full speed on my crappy computer. [img]<fileStore.core_Emoticons>/emoticons/biggrin.png[/img]/emoticons/biggrin@2x.png 2x" width="20" height="20" />


Core rewrite

Posted: Mon Aug 25, 2008 5:09 pm
by Hard Core Rikki

Can't say I find it nicely-sounding (risking to break stuff, along probably with compatibility, in the rewrite doesnt sound like a pleasant thought. While a cleaner codebase is desirable, if functionalty, compatibility or reliability are sacrificed for it...).

Isnt the current state of the core already better than at 1.8 beta3? (other than being a mess, as you say?)

 

If the code for the current core remains available to be used just in case people prefer using it rather than a rewritten core, why not (if its left experiemental pre-alpha till ready for public testing. People would certainly prefer the betterperforming more reliable core (the internal design architecture does not matter to people other than devs after all, only performance, compatibility and reliability do)


Core rewrite

Posted: Mon Aug 25, 2008 5:09 pm
by spacy51

<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-username="'spacy51" data-cite="'spacy51" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="186" data-ipsquote-contentclass="forums_Topic"><div>IMO' date=' there are enough GB emulators out there, but VBA is the ONLY [b']open source[/b] GBA emulator.

There's also the new ReasonableGBA, which is really good, and the GBA driver for MESS, which I haven't tried yet.

 

By the way, VBA-M is the only GBA emulator that works full speed on my crappy computer. [img]<fileStore.core_Emoticons>/emoticons/biggrin.png[/img]/emoticons/biggrin@2x.png 2x" width="20" height="20" />

</div></blockquote>
 

 

 

Ah thanks for the links. Maybe we can take a clean core form somewhere else [img]<fileStore.core_Emoticons>/emoticons/wink.png[/img]/emoticons/wink@2x.png 2x" width="20" height="20" />


Core rewrite

Posted: Mon Aug 25, 2008 5:45 pm
by ZachBacon

I say rewrite it but keep it separate from the current code for testing purposes.


Core rewrite

Posted: Mon Aug 25, 2008 6:22 pm
by spacy51

Of course. There's a reason SVN supports branches.


Core rewrite

Posted: Mon Aug 25, 2008 9:39 pm
by Boksha

The core code itself may be a mess, but as far as I can see (which isn't that far; I've only browsed through the sources for a bit; most of it's way beyond me anyway) the interface to it seems reasonably clean, with just a few functions that get called from outside of the core files. Maybe you could keep the changes "under the hood" so to speak?

Keeping the same interface could mean you can keep improving on the Qt and MFC GUIs while using the old core (and maybe get a working Qt port with emulation soon), while at the same time being able to test a modified/rewritten core by directly plugging it into the existing MFC GUI to see if it works.


Core rewrite

Posted: Mon Aug 25, 2008 9:48 pm
by Squall Leonhart

I don't like the idea of removing GB support, but thats because i like to use as few emulators as possible. If development went that way, i'd support it regardless, but im just saying, i like as much support as possible.

 

Gambatte may be accurate and all, but i like the functionality of VBA, i would much prefer to expand on functionally, rather then remove it.

 

Thats just my input however.

 

Though maybe im reading into it wrong?. would keeping CGB support maintain the ability to play DMG games on VBA?


Core rewrite

Posted: Tue Aug 26, 2008 9:56 am
by deniseweird

Core rewrite? Why not. I say go for it! As for open source GBA emulators, there is also mednafen: http://mednafen.sourceforge.net/

 

This emulator IS based on VBA though. But it does have improvements making it better than VBA. I do not know if the code is clean or not in mednafen, but you could check it out and see. The idea that Gambatte could replace the GB code sounds good to me too. Gambatte seems like a great emulator. I support the idea. [img]<fileStore.core_Emoticons>/emoticons/biggrin.png[/img]/emoticons/biggrin@2x.png 2x" width="20" height="20" />