1 2
6 7
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
I've recently released a new Game Boy Advance emulator that I've been working on for quite some time. One of the goals for this emulator was making it more accurate than VBA, which seems to be the de facto GBA emulator. I absolutely love watching speedruns, TASes, and other very-high level playing, so another goal was to make a comprehensive workflow for power users, such as TASers and ROM hackers. However, I'm not sure how far along I am with the first goal, as this is only the first release. And as I'm not sure how accurate the emulator is, I postponed finishing up the re-recording tools for the second release. I figured there would probably be bugs bad enough that when I fix then, it may cause desync with older movies. I actually fixed such a bug shortly before I released the first version. Furthermore, I'm very interested in getting feedback from users as I develop the emulator so I can know what to focus on, what I'm doing right, and what I'm doing wrong. I could try to guess what people want, but given that I've never done TASes myself, I don't want to make any assumptions about what people would actually want. There is already re-recording support in the core. It's not currently exposed, but it's almost done being written. It takes a bit of a different approach to how movies work than other emulators, though, especially with regards to re-recording: each segment of a movie, from one savestate to another savestate, is a separate file. Savestates contain information about which file contains the latest branch of the movie, and each file contains information about its predecessors. In this way, it's similar to the "git" version control system. The two biggest things that are not implemented in the core at the moment are the ability to boil down this mess of files into a single file for a whole run, for the purposes of distribution, and the ability to resume recording of a movie. Obviously both of these are imperative, and I will be implementing them as soon as I get a basic GUI working. I've read the emulator feature page on the wiki, so I know approximately what I should implement, but I'm looking to be as involved with the community as possible during development so I can provide what people really want out of a re-recording emulator. In the realm of accuracy, I believe my emulator is quite accurate. However, I don't have an objective measure of this. I know there are bugs that I've seen in NO$GBA that don't exist in my emulator (for example, on the world map of Golden Sun, NO$GBA gets very glitchy), and I've also been informed of bugs in VBA that have reproduced in my emulator, before I fixed them (for example, the notorious slowdown near the snowman in Croket 2). There only seem to be a handful of GBA accuracy tests out there, and I pass all of the ones I've found, but they aren't very comprehensive. In fact, one of them fails on real hardware (so I match that failure, of course), so it's a bit questionable how useful that one is. I dug through the wiki and only found GB accuracy tests, but I do not support GB/C, only GBA. I'm hoping the people on this forum can help me find ways to gauge accuracy, either to prove my claims, or to find bugs so I can fix them and get closer to my goal. At the time of writing this post, I have no known game bugs. That definitely doesn't mean I don't have any game bugs, though. There are some graphical effect combinations I haven't implemented yet, for example (mostly relating to OBJWIN in different BG modes, or MOSAIC on transformed sprites). As an aside, I know I implement MOSAIC on sprites way better than VBA does, and I actually filed a bug on VBA-M's forums to this effect. I was promptly ignored. The first version is available on my website: http://endrift.com/mgba/ The source code (MPL2 licensed) is available on GitHub: https://github.com/mgba-emu/mgba (I'm not currently taking patches, but if anyone has something they really want to contribute, I may reconsider--I just want to get a bit more established before I open it up for contributions) Of note: there's a problem with the first version and stuttering. This is easily solved by going to Emulation and turning off Sync to video. This will be off by default in the second version. I've been in IRC for a good chunk of the day, trying to gauge interest from people, so if you want to catch me in IRC, I'm jpfau. A list of tasks left to complete before I call the emulator "good for TASing" can be found on my bugzilla with the keyword "TASBlocker". I'm very much still open to feature requests at this stage, although they may be put on the back burner, as there is a huge list of open tasks at the moment. tl;dr, tell me what you want and how to fix my emulator so I can make a great GBA emulator, especially for TASing and other power users!
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
I've been long frustrated by the stagnation I've seen in GBA emulation scene from a prevalence of VBA. I'm glad to see someone with the dedication and time to sort things out. I've read reference to some of the blindingly obvious mosaic bugs in VBA in documents that are over 10 years old at this point, but they never get fixed... Git-style fully branched rerecording sounds interesting; I don't do any rerecording myself though so I don't know how important that feature is to the community. So yeah, this project looks pretty cool.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4986
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Well, since this concerns about accuracy and you seem to know about GBA emulation: I asked about this before, but never managed to get an answer. Someone on youtube did attempted to check, but due to the strict frame precision (s)he gave up.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4045
If anyone needs stuff to test on GBA emulators, go to this page http://tasvideos.org/GameResources/GBx/MarioAndLuigiSuperstarSaga.html and look for all the glitches/setups that are like 'this works differently on emulator than on console' and see which behaviour it matches.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Tompa
Any
Editor, Expert player (2224)
Joined: 8/15/2005
Posts: 1943
Location: Mullsjö, Sweden
The #1 thing I want for a GBA emulator currently, is a way to TAS linked games (Four Swords). Good luck on this! Better accuracy than VBA would be neat to have!
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
I also wish you good luck on this project. A tip: Do head over to byuu.org as he has also tried working on a GBA emulator, perhaps you 2 can share progress and ideas in order to get the emulator even better!
Editor, Expert player (2331)
Joined: 5/15/2007
Posts: 3940
Location: Germany
Tompa wrote:
The #1 thing I want for a GBA emulator currently, is a way to TAS linked games (Four Swords).
this
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4038
This sounds great! I'll be sure to use this when it comes out if I ever want to make a GBA TAS. Good luck on the highly accurate GBA emulator!
Emulator Coder
Joined: 5/8/2014
Posts: 125
If you ever want to talk about GBA <-> GCN linking; the Dolphin Developers have shown interest in fixing it. I'm not sure which side has broken stuff on it, but people working on both sides should make it much easier to fix up and make work in all scenarios.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
jlun2 wrote:
Well, since this concerns about accuracy and you seem to know about GBA emulation: I asked about this before, but never managed to get an answer. Someone on youtube did attempted to check, but due to the strict frame precision (s)he gave up.
Since I use a completely different movie format from VBA, I'm not entirely sure how I'd go about checking this. I'd like to help, but I'm not quite sure how.
Patashu wrote:
If anyone needs stuff to test on GBA emulators, go to this page http://tasvideos.org/GameResources/GBx/MarioAndLuigiSuperstarSaga.html and look for all the glitches/setups that are like 'this works differently on emulator than on console' and see which behaviour it matches.
I want to take a look at this, but it looks like most of those are about halfway through the game. Does anyone have a savegame near there that I could yank? VBA savegames (not savestates!) are compatible with mGBA.
Tompa wrote:
The #1 thing I want for a GBA emulator currently, is a way to TAS linked games (Four Swords). Good luck on this! Better accuracy than VBA would be neat to have!
TASing of linked games is a thing I've been putting thought into. Given how the emulator is implemented, it's actually pretty easy to get two instances of the emulator running even in the same process. This would make setting up a relatively well synchronized emulation of two GBAs pretty easy to do. Unfortunately, guaranteeing they're in perfect lockstep might be difficult, but frame-perfect synchronization should be easier. I did a bit of work into getting two GBAs running at the same time, but had some audio issues. I'm planning on putting more work into a multi-head mode though; it should help in implementing SIO as intended.
Warepire wrote:
I also wish you good luck on this project. A tip: Do head over to byuu.org as he has also tried working on a GBA emulator, perhaps you 2 can share progress and ideas in order to get the emulator even better!
I'm actually already there! When working on this, I tried to figure out where the best places to get really targeted help on emulation would be, and TASVideos and Byuu.org were the two ideas I had: one site dedicated to extreme precision in games, and the other dedicated to extreme precision in emulation. So far, I've gotten pretty good advice out of both places.
JMC47 wrote:
If you ever want to talk about GBA <-> GCN linking; the Dolphin Developers have shown interest in fixing it. I'm not sure which side has broken stuff on it, but people working on both sides should make it much easier to fix up and make work in all scenarios.
This is a planned feature, so I'd definitely be interested in trying to get it working. Meanwhile, I've gotten a bunch of emails with feature suggestions and bug reports, so I've been cranking away at fixing things and taking note of the feature requests. I'm gonna be busy for a while!
Skilled player (1742)
Joined: 9/17/2009
Posts: 4986
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Are you able to use the save file from vba? If so play back the TAS, then as soon as it reaches the point where it goes to the stage select screen, stop the movie, and there should be a savefile generated. Enter the same room as shown in here on your emulator, then make a savestate. Pause and as soon as the game lags reset. The savestate part is due to sometimes it doesn't work on certain frames. Oh, and I almost forgot, but if you do this glitch on certain levels, on VBA you get message saying you need the BIOS to continue emulating correctly. :|
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
Well, I have some bad news for you. You managed to find a game that completely FUBARs my emulator! Congratulations, I've had trouble finding any games that break mGBA, despite the fact that I was sure more exist. I'll get to fixing this in time for 0.1.1! E] Good news, I fixed it. I still am not sure how to reproduce your glitch in my emulator, though. It looks like an extremely cycle-dependent thing, though, since it's save corruption. Nasty business, not likely to reproduce on hardware, especially if you're using the emulator's BIOS (as the VBM says you are). I really can't recommend using mGBA's HLE BIOS with TASes at all, and was planning to basically force you to use BIOS, as without them, cycle counting is horribly wrong for a lot of things. (Especially stage loading and switching screens, etc. Anything that loads graphics, basically, will be off, potentially by a frame or two.) Combining that with save corruption, which is what this TAS appears to do, and you have an unpredictable set of input that may get lucky. If it's Flash save corruption, instead of SRAM (this is SRAM), then you're basically just out of luck. That stuff takes a variable amount of time to write, and my emulator assumes that variable is 0.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4986
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Well, in that case I do have another game that may break emulation. Monster House crashes shortly at the start on the old rerecording version of VBA, runs fine at the old non -rerecording version and the vbam derived one.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
That game also broke my emulator, although this time it was a sound issue caused by a bug in my ARM7 emulation. Thank you once more! It has, again, been fixed and will be fixed in 0.1.1. (The irony is that I had that specific bugfix already in the Thumb version of this instruction, but not the ARM version. Sigh.)
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
As a casual user, I have to ask, what about the Pokemons. I know they have SRAM and RTC issues. Probably done, but I wanted to ask. The other major thing are the NES Classics. They working? The other other thing are the special game like Bokai (Sun sensor), Kirby Tilt and Tumble (I think that's the name), Warioware Twisted. Are those working? Don't think of me as anything important. Just asking for the casual crowd of users that don't. Also, making link play will make the E-Reader a TASable thing or even a playable thing.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
As far as I know, all Pokémon games work fine, saving and RTC. I've personally tested these games:
  • Pokémon Ruby (US)
  • Pokémon Sapphire (US)
  • Pokémon Emerald (US)
  • Pokémon FireRed (US)
  • Pokémon Mystery Dungeon: Red Team Rescue (US)
I believe that LeafGreen and all of the other regions will work as well, but I have not tested any others. NES Classics do not currently work. I've been looking into why, but it is a tedious process and I have yet to uncover all of the problems. Some of the sensors work, but are not exposed beyond API (and thus you can't actually use them, until I provide some way, e.g. using a Wiimote, or whatever). Regardless, they are tested and known to work. Others are not yet implemented. Rumble (used in Drill Dozer and WarioWare Twisted) and gyroscope (used in WarioWare Twisted) are implemented and work, but the light sensor (Boktai 1 & 2) and the accelerometer (Yoshi's Topsy-Turvy/Universal Gravitation) are not yet implemented. I am planning on implementing these in time for 0.2, though. e-Reader support was not planned, but I'm getting enough people asking me about it that I'll look into it for 0.3 or later. (PS: Kirby's Tilt n Tumble is a GBC game, not GBA)
Skilled player (1742)
Joined: 9/17/2009
Posts: 4986
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Regarding pokemon, I almost forgot: For the games Firered/Leafgreen/Emerald, on a real GBA, for some reason plugging in the wireless adapter makes the pokemon center have a faster fadeout than without the adapter.
Joined: 7/2/2007
Posts: 3960
I don't really have anything concrete to add, but I want to wish you good luck with your emulator! Seems like your head is in the right space for this kind of work. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
I wonder if it's the first emulator using Qt. And also if it can be built to run on microwaves all kinds of devices, which the recent Qt is known for.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
I mean, Higan can be compiled to use Qt or GTK on Linux, so mGBA definitely isn't the first emulator to run with Qt. Moreover, there was an article recently about Dolphin switching to Qt. That being said, the Qt frontend is only one port. There's an SDL one, too, and a few other ones I've been working on in branches (that I haven't pushed), including a 3DS one. The 3DS one isn't working too well, unfortunately, but I'd love to see it working on there at some point. The emulator is written in such a way that it can be ported to practically anything. It just takes some elbow grease. Oh, and to anyone who was asking if I'm going to support the Classic NES series, well, here's a screenshot from latest git: (The sound still needs fixing, but the games run fine otherwise!)
Fortranm
He/Him
Editor, Experienced player (879)
Joined: 10/19/2013
Posts: 1122
How about Phantasy Star Collection?
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
Seems to work fine, even in 0.1.0. It flickers, but I think the reason for that is just part of the port.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Can I have a recent Windows build?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
I guess so? It's open source and I'm pushing code pretty much continuously. An interim build is here: http://endrift.com/files/mgba/mGBA-interim-win32.7z but it's completely untested on Windows at the moment, so I don't even know if it'll launch. I may keep the link up to date in the future. This build is based on the very latest git revision (c52a5d2859a535cd439f914beffeb1f2eb49e9f6), so it should support the Classic NES series 100% now, since I fixed the audio bug I was having. The Classic NES series changes I made were kinda big, so they won't land in the bugfix release (0.1.1), but they will be in the next feature release (0.2.0). I intend to release 0.1.1 sometime in January, but I don't know yet when I'll have 0.2.0 done. I'm aiming for March.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
"Entry point into InitOnceExecuteOnce nut found in KERNEL32.dll." I'm running XP :(
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
1 2
6 7