Page 2 of 4
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 6:39 pm
by Malor
pgimeno wrote: ↑Sun Nov 13, 2022 12:53 pm
Is cycle accuracy beyond 4.77 MHz really important?
It's probably not that important, but if you're going to emulate hardware, might as well do it accurately, particularly if it's relatively easy, as the other comments make it sound. Max speed being inaccurate should provide the best of all worlds; the XT will be 'correct' unless you want to wring all the performance you can out of it, in which case, you keep the pieces if it breaks.
For the same reason, I wonder if a 286 core makes sense at all, given that ao486 covers basically all of the needs that a 286 is capable of. Beyond the preservation of specific popular computers like the 5160 or the PS/2, I don't see a need for such a core.
I'm not a huge fan of the 286, and doing an accurate recreation would be a real pain. Actually being able to use it well depends on some undocumented features that were discovered later on. It would allow some early Windows releases to run, but versions before 3.0 don't have much software. It would probably be a low-payoff effort. It does, admittedly, add the High Memory Area, which frees up most of 64K for other uses, but you can typically still free up enough RAM to run almost anything on an XT, particularly with the Mister's upper memory blocks.
I wouldn't mind seeing an accurate 80386 with VGA and a Soundblaster, because that's where PC gaming really started to get interesting. But unless it was a near-perfect repro, it wouldn't offer much over the AO486 core, and doing a truly accurate 80386 on an FPGA would take a long, long time. And I was looking up VGA yesterday, out of interest, and that looks like it would be an enormous PITA to re-create. It's CGA, EGA, the headline VGA modes, and then all these weird modes that programs set for themselves. A truly solid, accurate 386 core with proper VGA would be one tall mountain to climb.
It seems like maybe improving the AO486 core would be a better use of scarce FPGA programmer time. Just getting that stupid DOS4GW extended memory bug fixed would be a major improvement. If it could be trimmed down and made more efficient, so that there was room to work, the VGA emulation could be improved, and the OPL synthesis could stand fixing. edit: oh, and the IDE is really bad, and will barely run any version of Windows. That could definitely use some work.
None of that's easy, but it seems a lot easier than an 80386-from-scratch would be. It would probably even be easier than a 286-from-scratch. But that's a guess based on zero FPGA programming experience.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 7:13 pm
by MicroCoreLabs
None of that's easy, but it seems a lot easier than an 80386-from-scratch would be. It would probably even be easier than a 286-from-scratch. But that's a guess based on zero FPGA programming experience.
Developing CPU cores is time consuming and difficult.. at least it is for me..
Some of the recent bug fixes for the MCL86 were absolute needles in the haystack and I am very impressed how short the time between members of this group identifying bugs and @spark2k06 and @kitune-san isolating and helping to fix them!
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 7:49 pm
by Hodor
MicroCoreLabs wrote: ↑Sun Nov 13, 2022 7:13 pm
[...]
Developing CPU cores is time consuming and difficult.. at least it is for me..
Some of the recent bug fixes for the MCL86 were absolute needles in the haystack and I am very impressed how short the time between members of this group identifying bugs and @spark2k06 and @kitune-san isolating and helping to fix them!
In Spain, I don´t know if elsewhere applies too, there is a common saying that claims "four eyes see more than two"
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 7:55 pm
by dmckean
Malor wrote: ↑Sun Nov 13, 2022 6:39 pm
I'm not a huge fan of the 286, and doing an accurate recreation would be a real pain. Actually being able to use it well depends on some undocumented features that were discovered later on. It would allow some early Windows releases to run, but versions before 3.0 don't have much software. It would probably be a low-payoff effort. It does, admittedly, add the High Memory Area, which frees up most of 64K for other uses, but you can typically still free up enough RAM to run almost anything on an XT, particularly with the Mister's upper memory blocks.
I wouldn't mind seeing an accurate 80386 with VGA and a Soundblaster, because that's where PC gaming really started to get interesting. But unless it was a near-perfect repro, it wouldn't offer much over the AO486 core, and doing a truly accurate 80386 on an FPGA would take a long, long time. And I was looking up VGA yesterday, out of interest, and that looks like it would be an enormous PITA to re-create. It's CGA, EGA, the headline VGA modes, and then all these weird modes that programs set for themselves. A truly solid, accurate 386 core with proper VGA would be one tall mountain to climb.
I wouldn't discourage anyone from attempting an 80286 core but it doesn't have a huge game library. The XT/Tandy library is fun, eclectic and spans an entire decade but the 286 basically just got worse versions of games already available to play on other cores like AtartiST, Amiga, Genesis and SNES. PCs were largely ignored in the early 386 era as well and it really wasn't until the 25mhz, 33mhz and 40mhz parts came along that developers could no longer ignore how powerful PCs had become and start making games that took advantage of that.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 10:07 pm
by suww37
spark2k06 wrote: ↑Sun Nov 13, 2022 4:20 pm
I have merged the commits, and removed the cycle-accurate option to include it only in the maximum speed clock (I attach the binary):
https://github.com/MiSTer-devel/PCXT_Mi ... prerelease
cpu_speed.png
The maximum speed option is currently based on a clock of
14.318Mhz without cycle-accurate, in the future this could be increased.
I change
10Mhz for
9.54MHz, but only at the text level... now it may be approximate, but that is the maximum real speed of the versions of the chip that were ready for it.
MicroCoreLabs wrote:
kitune-san wrote: ↑Sun Nov 13, 2022 2:30 pm
Above 14 MHz cannot be raised due to the SDRAM module. SDRAM module needs to be improved.
Once the RAM is improved, it should be possible to raise it to 25 MHz.
Above that, the frequency of clk_chipset needs to be increased to 100MHz. However, this will be difficult as many timing errors are likely to occur.
Even less than
25MHz could be the maximum limit imposed by the
MCL86 architecture, if I'm not mistaken... I think @MicroCoreLabs said something about that.
In any case, more than enough for an
Intel 8088-based CPU.
Thank you very much for your hard work.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Sun Nov 13, 2022 10:08 pm
by suww37
kitune-san wrote: ↑Sun Nov 13, 2022 11:44 am
spark2k06 wrote: ↑Sun Nov 13, 2022 10:43 am
I think it would be nice to have
4.77,
7.16 and
9.58 MHz with cycle accuracy, and then an additional one with as much speed (Max. speed) as we can and without cycle accuracy... that would cover everything.
Added cycle accurate switch.
Thank you very much
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 1:44 am
by Newsdee
dmckean wrote: ↑Sun Nov 13, 2022 7:55 pm
I wouldn't discourage anyone from attempting an 80286 core but it doesn't have a huge game library.
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
Somebody mentioned The Lion King not working well with ao486, and there was one racing game that seemed to run optimally at 12Mhz (which might work fine in PCXT at 14Mhz, I haven't tried). Speed limiters have been brought up but they don't work well - e.g. Megaman plays much better at 14Mhz in PCXT than in ao486 with disabled caches or a slowdown program.
In any case having a slightly faster PCXT (at 14Mhz even) is great to cover these fringe cases.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 1:54 am
by dmckean
Newsdee wrote: ↑Mon Nov 14, 2022 1:44 am
dmckean wrote: ↑Sun Nov 13, 2022 7:55 pm
I wouldn't discourage anyone from attempting an 80286 core but it doesn't have a huge game library.
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
Somebody mentioned The Lion King not working well with ao486, and there was one racing game that seemed to run optimally at 12Mhz (which might work fine in PCXT at 14Mhz, I haven't tried). Speed limiters have been brought up but they don't work well - e.g. Megaman plays much better at 14Mhz in PCXT than in ao486 with disabled caches or a slowdown program.
In any case having a slightly faster PCXT (at 14Mhz even) is great to cover these fringe cases.
The 80286 executes the same instructions much faster than an 8088 and you would probably need an 8088 running at ~90mhz to equal an 80286 running at 12 mhz. This core might eventually run that fast though. I do believe that eventually between the two cores we'll be able to handle most fringe cases as ao486 continues to slowly improve over time.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 3:57 am
by thorr
Deathtrack works well with a 286 12MHz and Wing Commander works well with a 386 33MHz. Both games are not throttled in software and are too fast or too slow on other hardware.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 4:49 am
by suww37
thorr wrote: ↑Mon Nov 14, 2022 3:57 am
Deathtrack works well with a 286 12MHz and Wing Commander works well with a 386 33MHz. Both games are not throttled in software and are too fast or too slow on other hardware.
I totally agree with your opinion.
Death track is still slow and weird on pcxt core 14Mhz. The ao486 speed can be controlled by software, but it is difficult to achieve the optimal speed for the game. I think that 286 12Mhz is necessary to run the Death track game smoothly. Wing commander 1 also seems to be a game optimized for 386 33Mhz. On my 486 dx2 real machine, if I control it with a utility called setmul, I can play at a relatively close speed, but it is not available on the ao486. I disagree with those who think the ao486 core can be implemented well by integrating old IBM PCs.
I think that 8088 (PC XT) core, 80286 core, 80386 core, 80486 (ao486) core are all needed to properly enjoy classic IBM PC games.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 7:20 am
by jordi
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 10:45 am
by Newsdee
There is also this working on MiST:
https://github.com/gyurco/Next186
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 11:10 am
by jordi
they had issues porting into Mister
In any case both cores are far less accurate than this one. Kitune, MCL and Spark did a very great job.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 1:31 pm
by kitune-san
I experimented with 25MHz clock and CGA did not work well, MDA works.
I will prepare a test version with a reduced clock.
EDIT:
I gave up because the CGA did not work properly even after lowering the frequency to 20MHz.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 2:36 pm
by Newsdee
jordi wrote: ↑Mon Nov 14, 2022 11:10 am
In any case both cores are far less accurate than this one. Kitune, MCL and Spark did a very great job.
Absolutely! PCXT is on a class of its own now
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 5:09 pm
by thisisamigaspeaking
dmckean wrote: ↑Mon Nov 14, 2022 1:54 am
Newsdee wrote: ↑Mon Nov 14, 2022 1:44 am
dmckean wrote: ↑Sun Nov 13, 2022 7:55 pm
I wouldn't discourage anyone from attempting an 80286 core but it doesn't have a huge game library.
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
Somebody mentioned The Lion King not working well with ao486, and there was one racing game that seemed to run optimally at 12Mhz (which might work fine in PCXT at 14Mhz, I haven't tried). Speed limiters have been brought up but they don't work well - e.g. Megaman plays much better at 14Mhz in PCXT than in ao486 with disabled caches or a slowdown program.
In any case having a slightly faster PCXT (at 14Mhz even) is great to cover these fringe cases.
The 80286 executes the same instructions much faster than an 8088 and you would probably need an 8088 running at ~90mhz to equal an 80286 running at 12 mhz. This core might eventually run that fast though. I do believe that eventually between the two cores we'll be able to handle most fringe cases as ao486 continues to slowly improve over time.
Are you sure? I thought the major difference was in MUL, IMUL, DIV, and IDIV instructions, but in overall instructions/clock they are pretty similar?
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 5:48 pm
by breiztiger
And protected mode …
Buggy
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 6:29 pm
by thorr
If this core can be overclocked to 286 12MHz or 16 MHz levels of performance, then we can probably skip the 286 generation unless there is 286 specific software that won't run on any other CPU. Of course, we might eventually want a VGA card if there was no 286 core, or an underclocked 386 core might suffice. Then if we can get a cycle perfect 386 core with the ability to underclock and overclock that, then we would have most of our bases covered for compatibility. By the time the 486 came out, I think software throttling was pretty much always there. Also, with the 386 core, a math coprocessor might fit in the FPGA for even more compatibility. Additional caches could be added to the 386 core to get 486 levels of performance. Perhaps the FM Towns core will become the 386 core. I don't know enough about that to say. Maybe the CPU can be used at least.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 7:16 pm
by dmckean
thisisamigaspeaking wrote: ↑Mon Nov 14, 2022 5:09 pm
dmckean wrote: ↑Mon Nov 14, 2022 1:54 am
Newsdee wrote: ↑Mon Nov 14, 2022 1:44 am
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
Somebody mentioned The Lion King not working well with ao486, and there was one racing game that seemed to run optimally at 12Mhz (which might work fine in PCXT at 14Mhz, I haven't tried). Speed limiters have been brought up but they don't work well - e.g. Megaman plays much better at 14Mhz in PCXT than in ao486 with disabled caches or a slowdown program.
In any case having a slightly faster PCXT (at 14Mhz even) is great to cover these fringe cases.
The 80286 executes the same instructions much faster than an 8088 and you would probably need an 8088 running at ~90mhz to equal an 80286 running at 12 mhz. This core might eventually run that fast though. I do believe that eventually between the two cores we'll be able to handle most fringe cases as ao486 continues to slowly improve over time.
Are you sure? I thought the major difference was in MUL, IMUL, DIV, and IDIV instructions, but in overall instructions/clock they are pretty similar?
I'm absolutely positive. The 8088 was already hampered by the 8-bit bus and operated at about half the speed of a 8086 for most tasks. Then you had two more generations of speed optimizations with the 80286. It operated so much faster at the same Mhz.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 7:19 pm
by dmckean
thorr wrote: ↑Mon Nov 14, 2022 6:29 pm
If this core can be overclocked to 286 12MHz or 16 MHz levels of performance, then we can probably skip the 286 generation unless there is 286 specific software that won't run on any other CPU. Of course, we might eventually want a VGA card if there was no 286 core, or an underclocked 386 core might suffice. Then if we can get a cycle perfect 386 core with the ability to underclock and overclock that, then we would have most of our bases covered for compatibility. By the time the 486 came out, I think software throttling was pretty much always there. Also, with the 386 core, a math coprocessor might fit in the FPGA for even more compatibility. Additional caches could be added to the 386 core to get 486 levels of performance. Perhaps the FM Towns core will become the 386 core. I don't know enough about that to say. Maybe the CPU can be used at least.
I think the big issue is the ao486 core needs a lot of work and it's a very hard core to work on because it's so full. Lion King runs great on a real i486 using slowdown programs. It's really our ao486 core that has the issues.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 8:06 pm
by thisisamigaspeaking
Newsdee wrote: ↑Mon Nov 14, 2022 1:44 am
dmckean wrote: ↑Sun Nov 13, 2022 7:55 pm
I wouldn't discourage anyone from attempting an 80286 core but it doesn't have a huge game library.
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
Somebody mentioned The Lion King not working well with ao486, and there was one racing game that seemed to run optimally at 12Mhz (which might work fine in PCXT at 14Mhz, I haven't tried). Speed limiters have been brought up but they don't work well - e.g. Megaman plays much better at 14Mhz in PCXT than in ao486 with disabled caches or a slowdown program.
In any case having a slightly faster PCXT (at 14Mhz even) is great to cover these fringe cases.
The first thing that came to mind for me as an "AT/EGA" game was F-19 Stealth Fighter but I looked into it and it basically supported all PC hardware in use in 1988. Not sure how it runs on ao486.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Mon Nov 14, 2022 8:28 pm
by thorr
The thing that bugs me most about ao486 is that it is a massive (but quite impressive) hack that works pretty good (not meaning to offend anyone). I am much more of a purist, and really appreciate PCXT. However, I definitely prefer ao486 to any software emulators. Another thing that bugs me about ao486 is that it requires the scaler. I provided a bunch of modelines that helped, but having the built-in requirement to use the scaler is annoying when a video card could be properly implemented instead.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 1:31 am
by Newsdee
kitune-san wrote: ↑Mon Nov 14, 2022 1:31 pm
I experimented with 25MHz clock and CGA did not work well, MDA works.
I will prepare a test version with a reduced clock.
EDIT:
I gave up because the CGA did not work properly even after lowering the frequency to 20MHz.
Thanks for trying! 14Mhz is already fast enough for an XT..!
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 4:29 am
by thisisamigaspeaking
dmckean wrote: ↑Mon Nov 14, 2022 7:16 pm
thisisamigaspeaking wrote: ↑Mon Nov 14, 2022 5:09 pm
dmckean wrote: ↑Mon Nov 14, 2022 1:54 am
The 80286 executes the same instructions much faster than an 8088 and you would probably need an 8088 running at ~90mhz to equal an 80286 running at 12 mhz. This core might eventually run that fast though. I do believe that eventually between the two cores we'll be able to handle most fringe cases as ao486 continues to slowly improve over time.
Are you sure? I thought the major difference was in MUL, IMUL, DIV, and IDIV instructions, but in overall instructions/clock they are pretty similar?
I'm absolutely positive. The 8088 was already hampered by the 8-bit bus and operated at about half the speed of a 8086 for most tasks. Then you had two more generations of speed optimizations with the 80286. It operated so much faster at the same Mhz.
Weird for some reason I had it in my mind for a long time that an 8086 or 80186 wasn't much faster than an 8088. Glad to correct that. Are there any useful benchmarks to compare?
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 4:45 am
by spark2k06
kitune-san wrote: ↑Mon Nov 14, 2022 1:31 pm
I experimented with 25MHz clock and CGA did not work well, MDA works.
I will prepare a test version with a reduced clock.
EDIT:
I gave up because the CGA did not work properly even after lowering the frequency to 20MHz.
You have already achieved a lot in terms of the stability of the current system. I wouldn't give much more importance to this point, more speed only makes sense for running games designed for other graphics cards (
EGA,
VGA...) which I don't intend to support in this core.
Thanks again for the great work done on this aspect
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 6:09 am
by thorr
There were 16Mhz XT's so if that works, then cool!
Thanks for the efforts regardless of the outcome.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 6:59 am
by arromdee
Newsdee wrote: ↑Mon Nov 14, 2022 1:44 am
I'd like to see a list of any games that won't fit either the PCXT or the ao486 cores. It will probably be a very small list and we might find workarounds to make the games work in existing cores.
I tried to unzip a zip file in ao486. The unzip I could find was compiled with DJGPP and hung with a
known problem. It's not a game, but it is something I ran into by accident in actual use of the core; I wasn't looking for things that don't run.
I assume that it won't run in PCXT. I was using it to unzip something for use with ao486 anyway. Of course the workaround is just to unzip it on my PC and send it over.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 7:22 am
by spark2k06
thorr wrote: ↑Tue Nov 15, 2022 6:09 am
There were 16Mhz XT's so if that works, then cool!
Thanks for the efforts regardless of the outcome.
But the
16Mhz is reached by the original
8088, or by the
NEC v20? This is actually an
80188 compatible with
8088.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 8:36 am
by thorr
spark2k06 wrote: ↑Tue Nov 15, 2022 7:22 am
But the
16Mhz is reached by the original
8088, or by the
NEC v20? This is actually an
80188 compatible with
8088.
Oops I think that's right. I think what we have now is as fast as it will get unless all the other components are modified to deal with the faster speeds with clock dividers, etc.
Re: PCXT Core 10Mhz CPU Speed Possible?
Posted: Tue Nov 15, 2022 12:56 pm
by kitune-san
Now that I know why the CGA is not working well, I have created a 25MHz (cycle accurate disabled) test version.
It may not be the true 25 MHz because one additional clock was added during memory readout.
However, this is the maximum speed that can be achieved with the current MiSTer_PCXT.
https://github.com/kitune-san/PCXT_MiST ... 25mhz-test