Why Doesn’t the Lion King Run Well on the AO486 Core?

suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

Disney Lion King (DOS) has a recommended specification of 80386 or higher if it was released in 1994. I adjusted the memory from dos32a to 16MB to run this game on ao486, adjusted the cpu speed to 30Mhz and turned off the L2 cache switch. However, the frame skip on the lion king occurred and the game was not soft and weird. Wing commander 3 is also working well, but I don't know why this game can't run normally only in AO486. And despite this problem, can the AO486 core fix this problem for a long time?
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Malor »

The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

Malor wrote: Sat Jul 23, 2022 12:09 am The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
AO486 is a core with the ability to install up to Windows 95. I don't think it's just because the ao486 performance is bad.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Malor »

suww37 wrote: Sat Jul 23, 2022 12:29 am
Malor wrote: Sat Jul 23, 2022 12:09 am The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
AO486 is a core with the ability to install up to Windows 95. I don't think it's just because the ao486 performance is bad.
I'm reading that as pretty much gibberish, it's totally unrelated to your problem.

If the Lion King game is skipping frames, that means your CPU is too slow. You manually crippled it, so of course it's not working. I was assuming that was obvious from my comment that 90MHz was comparable to a 486-33. Turn all the performance options back on and you should get something closer to what you are expecting.

And then I was making the general observation that the AO486 core isn't that great. I've been pretty disappointed with it, overall. You can't expect it to react like an actual 90Mhz 80486.
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

Malor wrote: Sat Jul 23, 2022 12:38 am
suww37 wrote: Sat Jul 23, 2022 12:29 am
Malor wrote: Sat Jul 23, 2022 12:09 am The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
AO486 is a core with the ability to install up to Windows 95. I don't think it's just because the ao486 performance is bad.
I'm reading that as pretty much gibberish, it's totally unrelated to your problem.

If the Lion King game is skipping frames, that means your CPU is too slow. You manually crippled it, so of course it's not working. I was assuming that was obvious from my comment that 90MHz was comparable to a 486-33. Turn all the performance options back on and you should get something closer to what you are expecting.

And then I was making the general observation that the AO486 core isn't that great. I've been pretty disappointed with it, overall. You can't expect it to react like an actual 90Mhz 80486.
I'm also very disappointed with the ao486 core. I think ao386 would have been better if MISTer's performance resources were a problem. However, when running lionking, it's very strange to turn off l2 cache and lower the memory to 16M. on dos32a. I don't know why I have to do this to run the lion king. This is not the case on the actual 386 PCs. I think the ao486 core has an error.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Malor »

There's at least an error in memory handling with large amounts of extended memory. It's been pretty well characterized, but Sorgelig isn't working on it anymore, so it's gone unfixed for most of a year.
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

Malor wrote: Sat Jul 23, 2022 1:24 am There's at least an error in memory handling with large amounts of extended memory. It's been pretty well characterized, but Sorgelig isn't working on it anymore, so it's gone unfixed for most of a year.
The ao486 core is open source. If sorgelig doesn't, it might be modified by other developers, but aren't other developers interested? Or is it because the ao486 core modifying requires a sorgelig permission? I'm sorry to hear that.
dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 397 times
Been thanked: 95 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by dmckean »

Anyone can work on the ao486 core but it's difficult because it's so full and it is clocked so high.
C-R-T
Posts: 205
Joined: Wed Mar 03, 2021 5:10 pm
Has thanked: 21 times
Been thanked: 92 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by C-R-T »

Lion King runs horribly on a real 386. It works, but it’s slooooow.
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

C-R-T wrote: Sat Jul 23, 2022 12:01 pm Lion King runs horribly on a real 386. It works, but it’s slooooow.
I don't currently have a real 386, so I didn't know the lion king game was very slow when playing. If so, I think the recommended lionking specification is 486sx and it seems clear that MiSTer's ao486 is not implementing enough performance of 486sx.
User avatar
NegSol
Posts: 49
Joined: Mon May 25, 2020 4:34 pm
Has thanked: 32 times
Been thanked: 5 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by NegSol »

Recommended specifications for a a gamemean very little in the early days of pc gaming. It was not all 60 frames per sec back then.I have first hand experience with all pc generation and 486sx 33 Mhz is a good characterization to me. In most applications not involving a coprocessor it beats a 486 with 66 Mhz easy. Also I/O is faster by a lot.
Schyz
Posts: 63
Joined: Sun Jul 12, 2020 4:53 pm
Has thanked: 18 times
Been thanked: 13 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Schyz »

suww37 wrote: Sun Jul 24, 2022 3:34 am
C-R-T wrote: Sat Jul 23, 2022 12:01 pm Lion King runs horribly on a real 386. It works, but it’s slooooow.
I don't currently have a real 386, so I didn't know the lion king game was very slow when playing. If so, I think the recommended lionking specification is 486sx and it seems clear that MiSTer's ao486 is not implementing enough performance of 486sx.
AO486 is not the name that Sorgelig or the MiSTer FPGA community decided, it's the name of the original implementation that Sorgelig ported to the DE-10 Nano:
https://github.com/alfikpl/ao486

As you can see in the description:
"The ao486 is an x86 compatible Verilog core implementing all features of a 486 SX"

The term 486 doesn't point to a certain performance (let alone in in games), but the instruction set of a 486 CPU. Even 2 authentic i486SX could have very different performance just by using different graphics cards, imagine what all the different FPGA solutions in the market could achieve. Maybe you could get the performance of a 486 @ 800MHz like this one.
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by aberu »

Malor wrote: Sat Jul 23, 2022 12:09 am The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
It's extremely difficult to work on that core, Robert Peip graced us with a ton of work getting the cache implemented. I think a lot of devs used to get discouraged from working on it because it would only successfully compile 1/3 times. Now it successfully compiles 2/3 times due to the fitter setting changes I submitted a few months ago, in the hopes that more devs would feel encouraged. Right around that time we saw a wave of contributions.

To be honest, with a core like this it takes a village, not just one person.
birdybro~
arromdee
Posts: 31
Joined: Mon Jul 11, 2022 9:24 am
Been thanked: 3 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by arromdee »

aberu wrote: Mon Jul 25, 2022 5:51 pm It's extremely difficult to work on that core,
Is this also true for video or sound problems in ao486 that don't affect the main CPU? So we should expect progress to be slow on those too?
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by aberu »

It all depends, if you are talking about the lack of support for a wider variety of sound cards, that probably won't be addressed as sound cards take up a very large amount of logic space on the FPGA, and there isn't much left. If problems with video you mean CGA video not being fully supported, the PC-XT core is being developed to address that. If you mean slow 3d, there is no space for a 3d GPU really. Not without some major refactor of all the other bigger components.
birdybro~
User avatar
Chilli_Vibes
Posts: 129
Joined: Sat Mar 12, 2022 4:47 pm
Has thanked: 53 times
Been thanked: 33 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Chilli_Vibes »

The Lion King was on a multitude of platforms, all better than DOS - at that time.

NES, SNES, Megadrive, Amiga, Game Gear, Master System, GameBoy - Just play it on one of those cores, far, far superior to the awful DOS version.
arromdee
Posts: 31
Joined: Mon Jul 11, 2022 9:24 am
Been thanked: 3 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by arromdee »

aberu wrote: Mon Jul 25, 2022 9:12 pm It all depends...
I was talking about things like the thread on "AdLib Emulation - Missing Percussion?" which implies that the problem won't be fixed. I could swear there was a VGA bug which wasn't going to be fixed either, but I can't find the reference.
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by suww37 »

Chilli_Vibes wrote: Mon Jul 25, 2022 9:24 pm The Lion King was on a multitude of platforms, all better than DOS - at that time.

NES, SNES, Megadrive, Amiga, Game Gear, Master System, GameBoy - Just play it on one of those cores, far, far superior to the awful DOS version.
I am well aware of that fact. But I wanted to run on ao486 because of the memories of playing lion king in Dos.
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by aberu »

arromdee wrote: Mon Jul 25, 2022 9:26 pm
aberu wrote: Mon Jul 25, 2022 9:12 pm It all depends...
I was talking about things like the thread on "AdLib Emulation - Missing Percussion?" which implies that the problem won't be fixed. I could swear there was a VGA bug which wasn't going to be fixed either, but I can't find the reference.
Sorgelig already addressed this, the hardcoded drum set isn't put in. Those hardcoded drum sets that were on the sound chips require the use of BlockRAM to be implemented unfortunately (unless someone wants to soft emulate them, any volunteers?), and there's not a whole lot.

The referenced thread links to dosbox's implementation, but doesn't link to the fact that they use samples to simulate the drums, which those samples take up space and would have to be added to BlockRAM, or maybe loaded in SDRAM (making the core require SDRAM).
birdybro~
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by flynnsbit »

All the graphics issues feel like they were resolved by all the code changes that Alex did. The scrolling bug, univbe, etc all feel solved. I can see the speed issue depending on the setting and it not being quite right. I haven't tried a combination of slowmo + the core settings which might get you closer. Lion King in particular seems to have a very specific sweet spot. I have a 386DX I can test it on when I have time.
arromdee
Posts: 31
Joined: Mon Jul 11, 2022 9:24 am
Been thanked: 3 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by arromdee »

Wait a minute, ao486 is supposed to be a non-SDRAM core? I would have thought that as something that pushes the system to its limit it would be permitted to use SDRAM.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Malor »

So many people have SDRAM that if it made any significant performance difference, adding that requirement would probably generate very little community angst.
farag
Posts: 6
Joined: Wed Jun 22, 2022 4:24 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by farag »

How difficult could be having the VGA using SDRAM and the DDR3 for normal RAM?
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by bbond007 »

farag wrote: Tue Jul 26, 2022 7:20 pm How difficult could be having the VGA using SDRAM and the DDR3 for normal RAM?
The VGA speed is already very fast proportionally to the CPU performance...
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Caldor »

suww37 wrote: Sat Jul 23, 2022 1:11 am
Malor wrote: Sat Jul 23, 2022 12:38 am
suww37 wrote: Sat Jul 23, 2022 12:29 am
AO486 is a core with the ability to install up to Windows 95. I don't think it's just because the ao486 performance is bad.
I'm reading that as pretty much gibberish, it's totally unrelated to your problem.

If the Lion King game is skipping frames, that means your CPU is too slow. You manually crippled it, so of course it's not working. I was assuming that was obvious from my comment that 90MHz was comparable to a 486-33. Turn all the performance options back on and you should get something closer to what you are expecting.

And then I was making the general observation that the AO486 core isn't that great. I've been pretty disappointed with it, overall. You can't expect it to react like an actual 90Mhz 80486.
I'm also very disappointed with the ao486 core. I think ao386 would have been better if MISTer's performance resources were a problem. However, when running lionking, it's very strange to turn off l2 cache and lower the memory to 16M. on dos32a. I don't know why I have to do this to run the lion king. This is not the case on the actual 386 PCs. I think the ao486 core has an error.
The Lion King needs to have L2 cache turned off? At full cache and such it runs as a 33mhz 486SX, but without l2 cache its much slower.

Does this game really need L2 cache turned off? Also lowering the memory to 16M even with DOS32A? DOS32A should fix that issue on its own.

Seems strange. I will do some tests when I get home.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Caldor »

Yeah... that sure seems strange. Lion King wont run with L2 cache enabled, but when its disabled it still does not run well. The menu animations seems much too fast and it crashed when going into the game. I tried with FreeDOS and DOS 7.0. Maybe it works better with DOS 6.22, but it does seem the game just has some problem with the AO486 core in some way. I remember Alladin having the problem with the RAM, but it could run when limiting it to 16MB which is as it should be, because that is a bug in DOS4GW that should be solved by using DOS32A instead. But not sure what its issue is with the level 2 cache? I do not remember other games having such obvious timing issues.
throAU
Posts: 181
Joined: Fri Sep 11, 2020 1:06 am
Has thanked: 233 times
Been thanked: 27 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by throAU »

Malor wrote: Sat Jul 23, 2022 12:09 am The AO486 is nowhere near as fast as a real 486. Setting it to 90MHz brings it roughly comparable to a 486SX-33.

In general, the core isn't that great. It's like owning a very offbrand PC with a Cyrix chip or something. The main dev is Sorgelig, and he seems to have lost all interest in it. He's got a lot on his plate.
Performance wise, it really does depend on what it’s doing but I agree with your premise. It’s ways faster than a 486 running windows 95 for example (I know, I had a 486dx33 back in the day).

In some things ao486 is faster in some much slower. Comparison to an off brand obscure chip is pretty accurate but it’s even more so that way than the alternatives like Cyrix were back in the day.

I’d agree it’s definitely one of the weaker cores but to be honest it’s kinda cool to have any sort of pc compatibility in a box like this at all.

My view on this is to just run games like lion king on a more suitable core. Amiga, mega drive etc.
throAU
Posts: 181
Joined: Fri Sep 11, 2020 1:06 am
Has thanked: 233 times
Been thanked: 27 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by throAU »

arromdee wrote: Tue Jul 26, 2022 4:26 pm Wait a minute, ao486 is supposed to be a non-SDRAM core? I would have thought that as something that pushes the system to its limit it would be permitted to use SDRAM.
The pc architecture from back then was not very high bandwidth, and latency between components was crap.

It was very much a case of reasonably high speed components (e.g. cpu, memory, video) stuck with shitty low speed buses between them. Timing requirements were not a thing due to the multitude of different memory standards, levels of cache, different add in card bus types etc.

Very very different from any of the other compute or console platforms from back then which mostly had tight timing requirements between components.

The de10 on board ddr is fine both in terms of speed latency and capacity for the pc cores.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Caldor »

I think its a small miracly that the AO486 core has come as far as it has. I do think the Lion King is probably a good example of cache and or memory issues that it still has.

But I think it finally got rid of certain mouse problems it had. So you can play Red Alert or Command And Conquer for hours and not always run into that bug where you suddenly cannot really use the mouse at all.

I think if we are to see big improvements, it would probably need to be a new implementation from scratch. That might free up FPGA logic space. Its hard to compare PSX and x86, because x86 is just a lot more complicated, but it still seems to me that more performance should be possible to gain from an x86 implementation. But maybe not. Robert Peip is without doubt one of the most experimenced FPGA developers we have... he just went over what he has done with the PSX core. Not only did he implement PSX fully, but made several improvements in ways that make them optional turbo modes and such, and only very in depth understanding of the hardware made that possible.

Several times he made updates to the core to save maybe just 1 CPU cycle for specific operations, to optimize performance. Given they are likely done many times that might matter a lot more than it sounds like.

But it would be such a big project to start over on an x86 core that thries to replicate a 486 and there are still a lot of other projects that could use work while AO486 is in a pretty good place. It can even run Duke Nukem 3D quite well.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Why Doesn’t the Lion King Run Well on the AO486 Core?

Unread post by Malor »

One big issue there is that the only open-source 486 core for the FPGA is the eponymous AO486. Doing one from scratch that had similar timings to the original would be an enormous undertaking. This is a guess, but I suspect a lot of the reason the AO486 core is slow is because it's using things like microcode to save FPGA space, so a proper 486 with correct timings might be a lot larger, and size is the biggest problem with the current core already.

This is an opinion from an amateur, and should be discarded if anyone with actual expertise opines otherwise, but it seems like we'd need an FPGA at least twice the size of the Cyclone V to do a 486 really well, plus a hell of a lot of development effort.

edit to add: a real 486 has between 1.2 and 1.6 million transistors. Duplicating that accurately would be a gigantic project.
Post Reply