Page 1 of 2

BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue May 03, 2016 7:49 am
by Mask of Destiny
Hello folks,

I've finally put together a new release of BlastEm. This one finally features a basic GUI though it is a rather eccentric one. The UI is actually a Genesis ROM running inside the emulator with some "custom hardware" to provide access to things like directory listings and certain emulator functionality. There will probably be a real UI at some point, but this was a fun little experiment.

The integrated 68K debugger has two new commands 'co' and 'di'. 'co' allows you to run a list of debugger commands whenever a particular breakpoint is hit. 'di' allows you to print a certain register/location before each debugger prompt (the Z80 debugger already had this previously).

There are a ton of accuracy improvements and bugfixes. Big thanks to Eke and Nemesis for their documentation/tests/notes.

I've had a report that GDB remote debugging is not working with GDB 7.11, but I haven't had a chance to investigate. Expect a fix soon.

You can see the full changelog and download links here.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue May 03, 2016 9:06 pm
by Sik
The biggest problem with such an approach is that it can't provide any functionality once a game has been loaded. Still, keeping this thing around maybe could be useful for building other tools on top that could make some use of the emulation.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue May 03, 2016 9:48 pm
by Mask of Destiny
Sik wrote:The biggest problem with such an approach is that it can't provide any functionality once a game has been loaded.
It can. Hit the escape key and the display switches back to the menu without unloading the game. Currently, the "pause" menu lets you save and load savestates or switch to another game. At the moment it's not possible to actually run both the UI ROM and the game ROM simultaneously (though making that work isn't totally impossible), but apart from debugger windows I'm not sure how desirable that is anyway.
Sik wrote:Still, keeping this thing around maybe could be useful for building other tools on top that could make some use of the emulation.
That's an interesting idea. I had thought about expanding the "hardware" exposed to the menu a little so it could support things like playing VGM files, but authoring tools for the Genesis/Megadrive are something I hadn't really considered.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Sun Jul 17, 2016 9:26 pm
by panzeroceania
Great job on this release! I just found out about BlastEm and am really impressed with the performance and game compatibility and look forward to future updates. I had no issues with my favorite games, but I decided to boot up a bunch of different titles to give the emulator a test drive like I do when I first use a lot of emulators. I found a few issues with booting some games that I'll post below.

Madden NFL 98 (USA).md

Code: Select all

Fatal Error

Illegal read from PSG port 14
Phelios (Japan).md

Code: Select all

Fatal Error

unimplemented Z80 instruction: daa at 10C4
Z80 RAM has been saved to zram.bin for debugging
Power Monger (Japan, Korea).md

Code: Select all

Fatal Error

unimplemented Z80 instruction: otir at 67
Z80 RAM has been saved to zram.bin for debugging
Prince of Persia 2 - The Shadow and the Flame (Europe) (Proto).md

Code: Select all

Fatal Error

unimplemented Z80 instruction: otir at 848
Z80 RAM has been saved to zram.bin for debugging
Sonic Crackers (Japan) (Proto).md

Code: Select all

BlastEm Info

Read from VDP data port while writes are configured, CPU is now frozen. VDP Address: 4, CD: 5
I also have a list of games that when you try to open them, will cause BlastEm to freeze for various reasons, some probably being due to save format, others possibly to the region of the game, etc.

Wonder Boy V - Monster World III (Japan, Korea).md -- hangs at title screen, likely because of eeprom save
Wonder Boy in Monster World (USA, Europe).md -- hangs at title screen, likely because of eeprom save

Alisia Dragoon (Japan).md
Alisia Dragoon (USA).md
Alisia Dragoon (Europe).md

Greatest Heavyweights (Japan).md
Greatest Heavyweights (USA).md
Greatest Heavyweights (Europe).md


Paperboy 2 (USA, Europe).md
Zombies Ate My Neighbors (USA).md
Daikoukai Jidai II (Japan).md
Dragon Slayer - Eiyuu Densetsu (Japan).md
Dragon Slayer - Eiyuu Densetsu II (Japan).md
Gambler Jiko Chuushinha - Katayama Masayuki no Mahjong Doujou (Japan).md
J. League Pro Striker Perfect (Japan).md
Janou Touryuumon (Japan).md
Langrisser II (Japan).md
Hybrid Front, The (Japan).md
Madou Monogatari I (Japan).md
Nobunaga no Yabou - Haouden (Japan).md
Super Daisenryaku (Japan).md
Advanced Daisenryaku - Deutsch Dengeki Sakusen (Japan) (Rev A).md
Twinkle Tale (Japan).md
Yu Yu Hakusho Gaiden (Japan).md
Zan Yasha Enbukyoku (Japan).md

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 6:37 am
by Mask of Destiny
Thanks for the kind words. Someone just told me about Madden 98 and Power Monger the other day, but some of the others are new to me so the report is very much appreciated. There are legitimately some Z80 instructions that aren't yet implemented, though at this point it's only ones that aren't useful on the Genesis/MD. On my TODO list, but lower priority than genuine compatibility problems. If these games are actually using DAA and OTIR that obviously bumps those up on the priority list, but I'm guessing there's a problem elsewhere that's causing them to jump to garbage. I'll have to dig in to see what's actually going on.
panzeroceania wrote:Wonder Boy in Monster World (USA, Europe).md -- hangs at title screen, likely because of eeprom save
This is embarrassing. I actually added this game to my ROM DB and had it working, but somehow I managed to remove it when I was making some other change. Thanks for catching this.
panzeroceania wrote:Zombies Ate My Neighbors (USA).md
This is a regression caused by a failed attempt at using the "domestic" name if the "international" name is empty. I thought I had tested it before the 0.4.0 release, but I obviously didn't since it causes a crash whenever that code path gets hit. I suspect this is also what's causing at least some of those Japanese games to fail as they often don't have the domestic name field populated. I fixed this a little while back, but I've been procrastinating on a point release as there's a couple of other things I wanted to fix first.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 6:50 am
by Mask of Destiny
panzeroceania wrote: Sonic Crackers (Japan) (Proto).md

Code: Select all

BlastEm Info

Read from VDP data port while writes are configured, CPU is now frozen. VDP Address: 4, CD: 5
I took a quick peek in the Genesis Plus GX source tree (Eke Eke is good about leaving comments mentioning problematic games that depend on quirky behavior) and I found this in the HISTORY file:
* added 'Force DTACK' option for prototype games usually hanging on real hardware (example: Sonic Crackers)
Apparently this proto does actually lock up the CPU when run on real hardware so this is not a bug per se.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 7:35 am
by Sik
Note that if I recall correctly the PSG can be accessed through a port (don't remember which one) so that may be a legitimate use of OTIR (setting all values for all four channels would take up 11 writes - suddenly OTIR starts looking attractive, doesn't it?).

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 8:30 am
by Stef
PSG accessible through a port ? not in Genesis mode at least. On Gens port instructions are not connected and as far i can tell no game relies on them.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 6:59 pm
by Mask of Destiny
Here's what Charles MacDonald's doc has to say about IO ports in Genesis mode:
All I/O ports return FFh, and writing to them has no effect. The Thunder
Force games read port BFh in the IRQ subroutine, this would appear to be
a misunderstanding on the programmer's behalf.
I have not personally done any testing to this effect, but I haven't seen any reason to doubt it either.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 8:37 pm
by panzeroceania
Yeah, I figured with the prototype that there was likely a problem with the game itself, not the emulator. I thought I would just post them anyways since they gave a specific crash report, so at the very least you would be aware of the bug in the game.

Also the previous reports on Twitter were me, I'm @TimNetwork

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Mon Jul 18, 2016 11:11 pm
by Mask of Destiny
panzeroceania wrote:Yeah, I figured with the prototype that there was likely a problem with the game itself, not the emulator. I thought I would just post them anyways since they gave a specific crash report, so at the very least you would be aware of the bug in the game.
The report is indeed appreciated.
panzeroceania wrote:Also the previous reports on Twitter were me, I'm @TimNetwork
Ah, I was wondering if that was the case given the overlap, but didn't want to assume.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue Jul 19, 2016 10:51 am
by King Of Chaos
Hey MoD, nice work on this emulator! Anyways, I'm getting this error when attempting to run on the latest Windows 10 Insider Preview (which is either pre-RTM or is the RTM of the Anniversary Update);

Image

And...

Image

Looks like it's looking for/expecting a Linux directory, not a Windows directory.

Also, it looks like the file browser is limited to the OS drive (in Windows' case) and can't selected other drives (where the ROM files are).

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue Jul 19, 2016 5:53 pm
by panzeroceania
I can reproduce this same issue on Windows Vista. As stated, likely a forward slash, backward slack issue.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Tue Jul 19, 2016 7:43 pm
by Mask of Destiny
King Of Chaos wrote:Looks like it's looking for/expecting a Linux directory, not a Windows directory.
A dirty little secret is that Windows actually supports Unix-style directory separators and I've been abusing this since the first Windows release (though 0.4.0 does more path manipulation than previous versions) . 0.4.0 actually cleaned this up a bit, but there are still some remnants I need to fix. I should probably also create these in something like "Application Data" on Windows, rather than the Unixy .local/share. Not sure why the directory creation failed though. Were any of the intermediate directories created?
panzeroceania wrote:I can reproduce this same issue on Windows Vista. As stated, likely a forward slash, backward slack issue.
I did test this on my Windows 10 box at some point. I'll have to test again with the existing save directories deleted to see if I broke it at some point or whether this issue is environment specific.
King Of Chaos wrote:Also, it looks like the file browser is limited to the OS drive (in Windows' case) and can't selected other drives (where the ROM files are).
To be somewhat pedantic, it's limited to whatever drive the starting path is on. By default, this path is your home directory, but you can change it by setting the "initial_path" value in the "ui" section of the config file. I'd like to fix this for 0.4.1, but getting a list of drives is somewhat annoying on non-Windows platforms and I don't like to add Windows-only features if I can avoid it.

Re: BlastEm 0.4.0 - Now with GUI, improved debugger and more

Posted: Wed Jul 20, 2016 5:01 am
by Mask of Destiny
Deleted the save directory tree on my Windows test box and I can indeed reproduce the error. The Windows version of a function I wrote for recursively creating a directory had a bug that would cause it to fail in some cases when the path contained a mix of Windows-style and Unix-style path separators. This is now fixed in the repository. I'll definitely put out a point release this weekend since this breaks save state and SRAM/EEPROM functionality on Windows unless you manually create the .local\share\blastem folder in your home directory.