Game Glitches on MegaAGS

User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Game Glitches on MegaAGS

Unread post by Bren McGuire »

Hi, I'm new to MiSTer and the first thing I tried on minimig was the MegaAgs, initially I was disappointed in the MiSTer itself because many games I tried seemed to have glitches not present on the original.

But then I thought, let's try this game on ADF with an Amiga 500 configuration, I tried and... no glitches, it worked flawlessly.

So, I'd like to know, what's the reason of those glitches? Would they also be present on a real A1200?
Sterbi
Posts: 6
Joined: Mon Mar 08, 2021 9:41 am
Has thanked: 1 time
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Sterbi »

Did you follow instructions bundled within MegaAGS pack in ReadMe file? Part of it is copying config file for Amiga core, and also updating main MiSTer configuration for optimal video modes.

There's also warning about having enabled D-Cache option, which could result in having glitches in games.

https://ia802208.us.archive.org/view_ar ... ReadMe.txt
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Yes, please be a bit more specific. This project has been around for multiple years — not saying there aren’t still things to fix, but saying “it’s glitchy” isn’t really all that actionable. :)
Insert Disk Two
Posts: 149
Joined: Sun May 24, 2020 7:59 pm
Has thanked: 9 times
Been thanked: 22 times

Re: Game Glitches on MegaAGS

Unread post by Insert Disk Two »

Limi can you check Shadow Dancer? When I jump I get a graphical glitch on the sprite. Tested the game from adf, the glitch doesn't manifest. Thanks and well done for the awesome job!
akeley
Posts: 920
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 265 times
Been thanked: 245 times

Re: Game Glitches on MegaAGS

Unread post by akeley »

Bren McGuire wrote: Thu Jun 23, 2022 7:06 am So, I'd like to know, what's the reason of those glitches? Would they also be present on a real A1200?
WHDLoad is very convenient but not problem free. Many games have glitches or some sort of functionality issues. If you spot one it's best to check with Mantis bugtracker first, because it's possible its already known and has been reported to people who make these HDD installs.

Other reason might be that the problem is related to the Minimig core or MegaAGS itself, so if you don't see it in Mantis you can post here in Minimig forum and somebody will most likely try to check it out too.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

Sterbi wrote: Thu Jun 23, 2022 7:30 am Did you follow instructions bundled within MegaAGS pack in ReadMe file? Part of it is copying config file for Amiga core, and also updating main MiSTer configuration for optimal video modes.

There's also warning about having enabled D-Cache option, which could result in having glitches in games.

https://ia802208.us.archive.org/view_ar ... ReadMe.txt
Yes, I did. Only, there were two seemingly identical "MegaAGS<date>.7z" inside the torrent I downloaded, I used the newer one (according to the filename) and disregarded the other. D-cache is disabled. I forgot to update (although my installation is fairly new), I'm doing it now.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

Insert Disk Two wrote: Thu Jun 23, 2022 8:51 am Limi can you check Shadow Dancer? When I jump I get a graphical glitch on the sprite. Tested the game from adf, the glitch doesn't manifest. Thanks and well done for the awesome job!
Exactly. Also, the guy that throws green disks at you is often glitched.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

limi wrote: Thu Jun 23, 2022 7:50 am Yes, please be a bit more specific. This project has been around for multiple years — not saying there aren’t still things to fix, but saying “it’s glitchy” isn’t really all that actionable. :)
I've tried a couple of games, one was Shadow Dancer, we already talked about it here, then X-Out: the intro animation is glitched, and Metal Law: the chains in the foreground sometimes glitch (although after the update I did a quick play and it didn't happen).

P.S. is there a way to pause the screen where you can select cheats and controller options? It often goes away too fast.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

akeley wrote: Thu Jun 23, 2022 9:02 am WHDLoad is very convenient but not problem free. Many games have glitches or some sort of functionality issues. If you spot one it's best to check with Mantis bugtracker first, because it's possible its already known and has been reported to people who make these HDD installs.
None of the glitches I encountered are mentioned there.
akeley wrote: Thu Jun 23, 2022 9:02 am so if you don't see it in Mantis you can post here in Minimig forum and somebody will most likely try to check it out too.
OK, I'll make another post should I happen to find other glitches.
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Bren McGuire wrote: Thu Jun 23, 2022 3:49 pm P.S. is there a way to pause the screen where you can select cheats and controller options? It often goes away too fast.
Yes, WHDLoad has an option for keeping it up until you make a selection — check their documentation for details on that.
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

akeley wrote: Thu Jun 23, 2022 9:02 am WHDLoad is very convenient but not problem free. Many games have glitches or some sort of functionality issues. If you spot one it's best to check with Mantis bugtracker first, because it's possible its already known and has been reported to people who make these HDD installs.
Indeed. Very rarely are game glitches related to the Amiga core, but it does happen. The challenge is of course to verify it by testing the WHDLoad version against e.g. an Amiga 1200, so it’s not always an option for people who report bugs, which is understandable. I think the last major general core issue was with the Graftgold games, which was fixed in the core itself.
Malor
Posts: 120
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 5 times
Been thanked: 36 times

Re: Game Glitches on MegaAGS

Unread post by Malor »

Bren McGuire wrote: Thu Jun 23, 2022 7:06 am Hi, I'm new to MiSTer and the first thing I tried on minimig was the MegaAgs, initially I was disappointed in the MiSTer itself because many games I tried seemed to have glitches not present on the original.

But then I thought, let's try this game on ADF with an Amiga 500 configuration, I tried and... no glitches, it worked flawlessly.

So, I'd like to know, what's the reason of those glitches? Would they also be present on a real A1200?
Lots of games on the Amiga were written for the 68000 only, and don't natively work on later processors. The WHDLoad framework is a method of providing a virtual Amiga with a specific hardware configuration and Kickstart image, so that floppy games can be loaded on a hard drive, but it can't provide a virtual 68000. It provides whatever processor the computer has. WHDLoad recipes need to patch the original binary to work with the better CPUs, and since most of the patching was done by amateurs that had only compiled binaries to work with, problems are not uncommon. For the most part, they're pretty good, but they're fan patches, not official releases.

So, yes, in many cases, the glitches would indeed be present on a real A1200 if you tried to run the WHDLoad version. Typically, floppy images will also fail, even worse than the WHDLoad version. Most WHDLoad recipes greatly reduce the problems in running on chips past the 68000.

Minimig's emulation of the 68000 and the original chip set (OCS) are nearly perfect, so you can almost always run troublesome games that way. Its 68020 is not cycle-accurate, but few games that are 020-aware will give you problems; by then, most developers had learned not to make hard assumptions about how long code would take to run.

For the most part, the Minimig is better than a real A1200, because you have the option of switching back to a virtual A500 instead. The only game I know of that doesn't run well in any kind of emulation is Oil Imperium, which, I've been told, tries to read the mouse on every scanline, something like 12 thousand times a second on an NTSC machine. Maybe a SNAC adapter to a real Amiga mouse might work for that, but normal emulation input techniques fail miserably.
User avatar
LamerDeluxe
Posts: 714
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 422 times
Been thanked: 135 times

Re: Game Glitches on MegaAGS

Unread post by LamerDeluxe »

The MiniMig core is nearly perfect, though the game Hybris still doesn't display correctly on it, not even when using the adf. I met someone at a demoscene party who has been developing his own FPGA based Amiga, using a different MiniMig version and it turned out to have the same problem.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

Malor wrote: Thu Jun 23, 2022 5:24 pm Lots of games on the Amiga were written for the 68000 only, and don't natively work on later processors. The WHDLoad framework is a method of providing a virtual Amiga with a specific hardware configuration and Kickstart image, so that floppy games can be loaded on a hard drive, but it can't provide a virtual 68000.
minimig can, though
Malor wrote: Thu Jun 23, 2022 5:24 pm WHDLoad recipes need to patch the original binary to work with the better CPUs
I was thinking that I could switch to 68000 emulation to solve the problem, but since the games have been patched to work with the 68020, does this mean that they don't work with the 68000 anymore?
Malor wrote: Thu Jun 23, 2022 5:24 pm So, yes, in many cases, the glitches would indeed be present on a real A1200 if you tried to run the WHDLoad version. Typically, floppy images will also fail, even worse than the WHDLoad version. Most WHDLoad recipes greatly reduce the problems in running on chips past the 68000.
Thanks, this is what I wanted to know.
Malor wrote: Thu Jun 23, 2022 5:24 pm For the most part, the Minimig is better than a real A1200, because you have the option of switching back to a virtual A500 instead.
As I wrote above, launching the MegaAGS with a 68000 should solve the problem, unless there is some reason why you can't do that.
Malor
Posts: 120
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 5 times
Been thanked: 36 times

Re: Game Glitches on MegaAGS

Unread post by Malor »

You should be able to launch MegaAGS and individual games, but the 68000 is missing a hardware feature that WHDLoad needs; it doesn't save enough state to leave the virtual environment safely. This means that using WHDload to launch a game on a 68000 is a one-way trip; you can't quit and return to the OS, you can only reboot. This won't matter with arcade games, but I think ones with save games won't save properly. MegaAGS does cleanup when you exit, storing your save games onto the special hard drive image, and I don't think it can do that on a 68000.

The 68010 was the first CPU that saved enough info to allow virtualization, but I don't think Minimig does that.
akeley
Posts: 920
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 265 times
Been thanked: 245 times

Re: Game Glitches on MegaAGS

Unread post by akeley »

On a real A500 with certain expansion boards you can use WHDLoad with full functionality. I'm doing it on mine with ACA500+. WHDLoad problems are not always caused by being run on A1200, sometimes they are universal.

One solution, aside from running floppies, is to simply to install the game to a HDD. Quite a large number of Amiga games allows for that, some have native installers, some can be copied from the floppies manually. That's bit more involved than just running MegaAGS, but not that complicated either (you can probably even install to MegaAGS image itself if there's enough space or if you kick out some demos or games you don't like)
Optiroc
Posts: 38
Joined: Sun May 24, 2020 7:29 pm
Has thanked: 1 time
Been thanked: 11 times

Re: Game Glitches on MegaAGS

Unread post by Optiroc »

I fooled around a bit with making a MegaAGS variant for 68000/OCS, but it proved too slow and limited to be worthwhile. So the choice is between the speed and convenience of MegaAGS (or other way of launching WHDL installs on a 68020/AGA setup) and the compatibility and complete library you get with 68000/OCS and ADFs.

Luckily it’s very easy to switch configs and the MegaAGS distribution actually includes a few.
Texemosis
Posts: 33
Joined: Wed Jun 02, 2021 5:44 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Texemosis »

About Nightbreed Interactive movie. The clouds in the sky are graphically bugged out. However, I saw someone on Twitch using the MegaAGS on an Amiga system and the clouds were completely fine over there.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

akeley wrote: Thu Jun 23, 2022 7:22 pm On a real A500 with certain expansion boards you can use WHDLoad with full functionality. I'm doing it on mine with ACA500+. WHDLoad problems are not always caused by being run on A1200, sometimes they are universal.
As far as I know many Amiga expansion boards do upgrade the CPU, so you won't be running the 68000 anymore.
akeley wrote: Thu Jun 23, 2022 7:22 pm One solution, aside from running floppies, is to simply to install the game to a HDD. Quite a large number of Amiga games allows for that, some have native installers, some can be copied from the floppies manually. That's bit more involved than just running MegaAGS, but not that complicated either (you can probably even install to MegaAGS image itself if there's enough space or if you kick out some demos or games you don't like)
Forgive my ignorance, but isn't "install the game to an HDD" the same as using WHDLoad?
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Bren McGuire wrote: Thu Jun 23, 2022 11:51 pm Forgive my ignorance, but isn't "install the game to an HDD" the same as using WHDLoad?
He’s talking about games that have a native HD installer, which is… not very many of them, and certainly none of the games mentioned above do.
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Insert Disk Two wrote: Thu Jun 23, 2022 8:51 am Limi can you check Shadow Dancer? When I jump I get a graphical glitch on the sprite. Tested the game from adf, the glitch doesn't manifest.
I can see very minor glitches, very occasionally in NTSC mode (which is the default in MegaAGS, even though the music seems too fast), and the glitches become a lot worse in PAL. The ADF version running on a 68000 setup does indeed seem to be better. (Of course, I do recommend playing the Sega Mega Drive version which is a lot better, this is U.S. Gold, after all) 😅
Bren McGuire wrote: Thu Jun 23, 2022 3:49 pm X-Out: the intro animation is glitched, and Metal Law: the chains in the foreground sometimes glitch
Yes, both of these seem to have minor glitches under WHDLoad.
Texemosis wrote: Thu Jun 23, 2022 10:44 pm About Nightbreed Interactive movie. The clouds in the sky are graphically bugged out. However, I saw someone on Twitch using the MegaAGS on an Amiga system and the clouds were completely fine over there.
Major glitches in the sky rendering confirmed, both in PAL and NTSC under WHDLoad.

If you have the time, please report these to the WHDLoad issue tracker? (Ideally, these should be verified on an A1200 or similar too, but probably better to at least file them and get them rejected as working on original hardware if that is indeed the case)
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

limi wrote: Fri Jun 24, 2022 12:08 am (Of course, I do recommend playing the Sega Mega Drive version which is a lot better, this is U.S. Gold, after all) 😅
You don't wanna start this argument with me, I'm a staunch supporter of the Amiga version. It's the best home conversion of the arcade game, the Mega Drive version can't be better since it doesn't exist.😁
Malor
Posts: 120
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 5 times
Been thanked: 36 times

Re: Game Glitches on MegaAGS

Unread post by Malor »

Bren McGuire wrote: Thu Jun 23, 2022 11:51 pmForgive my ignorance, but isn't "install the game to an HDD" the same as using WHDLoad?
Well-behaved games that keep Workbench running can often be installed to a hard drive all by themselves. Nuclear War is one example(and a pretty good, albeit simple game). You just copy all the data from the disks to a subdirectory on the hard drive, and then IIRC assign the names "Nuclear War 1:" and "Nuclear War 2:" to that directory. Nuclear War uses names to access its files, so you can just assign those names to the hard disk, and if the floppies aren't present, it'll load them fine from the HD.

There's a lot of games that work that way, but then insist on checking copy protection on a physical disk. (I don't remember whether Nuclear War is one of them.) Defeating keydisk-based copy protection was one of the major reasons WHDLoad was invented, probably as a pirate tool as much as anything. It let you *completely* load a game to hard disk, instead of just mostly or not at all. It also lets the system provide old versions of Kickstart and Workbench, which many games need; ones written for Kickstart 1.3 may not work with 2.0 or higher, so WHDLoad can give the game a virtual environment with the exact Kickstart it expects.

ADF emulation doesn't cover many forms of copy protection, either, which makes WHDLoad even more important on Minimig. IPF format, to my knowledge, supports any kind of copy protection, but that's a lot more complex, and Minimig doesn't support it.
User avatar
Bren McGuire
Posts: 52
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 45 times
Been thanked: 2 times

Re: Game Glitches on MegaAGS

Unread post by Bren McGuire »

Malor wrote: Fri Jun 24, 2022 2:49 am It also lets the system provide old versions of Kickstart and Workbench, which many games need; ones written for Kickstart 1.3 may not work with 2.0 or higher, so WHDLoad can give the game a virtual environment with the exact Kickstart it expects.
Is there any difference between this Kickstart environment and having an appropriate Kickstart rom installed on your system (maybe a 1.3-3.1 switcher)? I'm talking about real Amiga hardware.
Malor wrote: Fri Jun 24, 2022 2:49 am ADF emulation doesn't cover many forms of copy protection, either, which makes WHDLoad even more important on Minimig.
Although most (all?) ADF images are cracked.
Malor wrote: Fri Jun 24, 2022 2:49 am IPF format, to my knowledge, supports any kind of copy protection, but that's a lot more complex, and Minimig doesn't support it.
Is there a chance that it could support it in the future?
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Bren McGuire wrote: Fri Jun 24, 2022 1:05 am You don't wanna start this argument with me, I'm a staunch supporter of the Amiga version. It's the best home conversion of the arcade game, the Mega Drive version can't be better since it doesn't exist.😁
Ooops! I was thinking of Revenge of Shinobi, ignore me 😅
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Bren McGuire wrote: Fri Jun 24, 2022 5:53 am [IPF format] Is there a chance that it could support it in the future?
Yes, I believe so. But someone would have to put in the work, of course.
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Bren McGuire wrote: Fri Jun 24, 2022 5:53 am Is there any difference between this Kickstart environment and having an appropriate Kickstart rom installed on your system (maybe a 1.3-3.1 switcher)? I'm talking about real Amiga hardware.
Yes, it’s still “virtualized” (I know, it’s not like it has hypervisors or anything, but it’s as close as you get), a hardware switch for Kickstart ROMs would be different.

In any case, as Optiroc already stated — the best way to get close to 100% identical behavior is to use the various CPU, Kickstart and ADF settings, but for a large number of games WHDLoad will be acceptably close. Of course, we should still file bugs and see if they can be fixed, but it does depend on the circumstances; sometimes it will be very hard to patch the original binary to work well on hardware it was not originally written for. It’s kind of a miracle that it works as well as it does, a lot of WHDL developers have put in a lot of clever work to make it be as good as it is. :)
Optiroc
Posts: 38
Joined: Sun May 24, 2020 7:29 pm
Has thanked: 1 time
Been thanked: 11 times

Re: Game Glitches on MegaAGS

Unread post by Optiroc »

limi wrote: Fri Jun 24, 2022 7:07 am
Bren McGuire wrote: Fri Jun 24, 2022 5:53 am [IPF format] Is there a chance that it could support it in the future?
Yes, I believe so. But someone would have to put in the work, of course.
Ideally “someone” would have to open source the format first. Software Preservation Society who invented/governs the format is pretty much as Amiga (in the anti OSS notion) as it gets.
User avatar
limi
Posts: 283
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 59 times
Been thanked: 140 times

Re: Game Glitches on MegaAGS

Unread post by limi »

Reading up on it some more — yes, IPF (SPS) is a terrible way to do this. I guess we’ll have to hope someone does this in a proper open source way. “Preservation, but only we have the ability to do it” is… suboptimal.
lroby74
Posts: 99
Joined: Tue May 26, 2020 2:59 pm
Has thanked: 90 times
Been thanked: 13 times

Re: Game Glitches on MegaAGS

Unread post by lroby74 »

I have glitches on Shadow of the Beast on MegaAgs on Mister, but not on Mist and other FPGAs and not on real A1200 neither
Post Reply