680x0 cores

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

ex68k
Atari freak
Atari freak
Posts: 74
Joined: Sat Oct 26, 2013 11:13 am

Re: 680x0 cores

Postby ex68k » Sat Dec 29, 2018 6:37 pm

PurpleMelbourne wrote:If there is a 68000 or 68010 core which is faster than 68080 then I'll be happy to try it

Thought about it again, and don't like the "faster" at all ;-)
Get a correct core with all the original (MMU, FPU) bells & whistles, then we can speed it up.

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Tue Jan 01, 2019 5:16 pm

PurpleMelbourne wrote:If there is a 68000 or 68010 core which is faster than 68080 then I'll be happy to try it.


I lend the vampire team a complete MIST setup some years ago. They never returned it. Actually they never acknowledged having received it. And after asking them multiple times what happened to the board they told me they would keep it in return for all the work they've done porting the 68080 to the MIST ... which they never released and which i've never seen.

So I am actually pretty happy that that chapter ended there. Could have gotten worse. Still it's somewhat odd to know that there's a MIST setting in some drawer collecting dust for no useful reason.

I prefer to work with you guys :-)

But what will you use the speed for? If you want to see how an insanely fast ST or Amiga looks like i am sure there are emulators running on regular GHz PCs which will satisfy that curiosity.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Tue Jan 01, 2019 5:28 pm

ijor wrote:
fpgaarcade wrote:It runs at 28MHz in my old spartan3e no problem.

Doesn't seem too much.


The tg68k uses less cycles per instruction you can barely compare these. The STEroids mode of the MIST Atari core is basically a tg68k running at 32Mhz. As a result it scores roughly twice the numbers the Atari TT gets:

https://www.youtube.com/watch?v=Yxgwg7qeJyE

A tg68k running at 32Mhz is significantly faster than a 68k running at 40 Mhz.

But really love the fact that your core is cycle exact. It's way nicer than the higher speed of the tg68k. And don't see any use case for more speed _and_ cycle accuracy. Do you?
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Tue Jan 01, 2019 7:55 pm

Need not to mix 2 types of accuracy: cycle accuracy and functional accuracy.
Not sure about ST needs, but Amiga needs 020 instructions more than cycle accuracy.
As real Amiga used many versions of 68K, most its software don't relay on CPU cycle accuracy.
Basically there are 2 major division of Amiga: ECS/OCS with 68000 and AGA with 68020. So, 68020 instructions is absolute requirement for AGA version.
And since Amiga is perverted by different kind of accelerators, it's better to have an option for less cycles per instruction to be able to match some entry level accelerators.

I think tg68k is good model. It just lacks of full and proper 020 instructions implementation. 32bit bus would give some boost as well, especially when coupled with wide DDR memory.
Unfortunately, current Minimig code uses internal signals from tg68k, so it's hard to try other 68K implementations.

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Wed Jan 02, 2019 12:02 pm

Sorgelig wrote:Unfortunately, current Minimig code uses internal signals from tg68k, so it's hard to try other 68K implementations.


Which ones? The tg68k does not expose any internal signals. Maybe you confuse this with TG68K.vhd which is no part of the tg68k core itself. It's more an amiga specific wrapper that also does some of the autoconf/zorro magic. None of the other cores use/used this wrapper. Instead they interfaced directly to TG68KdotC_Kernel.vhd.

But the amiga doesn't seem to beed any cycle accuracy at all. I don't know of any plain 68k amiga game or demo that does not run with tg68k.

Yes, the 020 is needed for AGA. That's why i implemented and fixed the bitfield instructions. There never was an Atari ST with 020 so there's no benefit unless someone extrends it further to 030 for TT and Falcon stuff.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Wed Jan 02, 2019 12:31 pm

MasterOfGizmo wrote:Which ones? The tg68k does not expose any internal signals.

it is:

Code: Select all

   busstate       => state,         -- 00->fetch code 10->read data 11->write data 01->no memaccess
   CACR_out       => CACR_out,


020 is still not fully implemented as some games crash like Pinball Dreams (or Fantasy - i don't remember).

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Wed Jan 02, 2019 12:56 pm

Sorgelig wrote:
MasterOfGizmo wrote:Which ones? The tg68k does not expose any internal signals.

it is:

Code: Select all

   busstate       => state,         -- 00->fetch code 10->read data 11->write data 01->no memaccess
   CACR_out       => CACR_out,


020 is still not fully implemented as some games crash like Pinball Dreams (or Fantasy - i don't remember).


Busstate are just other names for read and write signals. And CACR is 020 specific and controls the cache.

And yes, the 020 is not fully implemented. I was talking about plain 68k and where it lacks accuracy. The Amiga just doesn't seem to care for that.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Wed Jan 02, 2019 1:15 pm

MasterOfGizmo wrote:Busstate are just other names for read and write signals.

Not just. It distinguishes between instruction fetch and data read.

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Wed Jan 02, 2019 4:12 pm

MasterOfGizmo wrote:
ijor wrote:
fpgaarcade wrote:It runs at 28MHz in my old spartan3e no problem.

Doesn't seem too much.


The tg68k uses less cycles per instruction you can barely compare these. The STEroids mode of the MIST Atari core is basically a tg68k running at 32Mhz. As a result it scores roughly twice the numbers the Atari TT gets:


Hi. I didn't mean that it has bad performance. I meant just that I expected to be able to run at higher frequencies. But it is possible that the lower fmax is precisely a consequence of using less cycle per instructions (more combinatorial logic).

Sorgelig wrote:Need not to mix 2 types of accuracy: cycle accuracy and functional accuracy.
Not sure about ST needs, but Amiga needs 020 instructions more than cycle accuracy.


The ST, at least some software, certainly needs cycle accuracy. But personally, I like cycle accuracy even when it is not strictly needed. I think that the ultimate ideal goal for emulators and clones are to be so accurate that no code could ever detect it is not running on the original hardware. Again, this is my very personal view.

I think tg68k is good model. It just lacks of full and proper 020 instructions implementation. 32bit bus would give some boost as well, especially when coupled with wide DDR memory. Unfortunately, current Minimig code uses internal signals from tg68k, so it's hard to try other 68K implementations.


I understand Mike version of TG68K already implements the missing 020 instructions. He also was able to run my FX68K core on his system.
Fx Cast: Atari St cycle accurate fpga core

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Wed Jan 02, 2019 4:13 pm

Sorgelig wrote:
MasterOfGizmo wrote:Busstate are just other names for read and write signals.

Not just. It distinguishes between instruction fetch and data read.


The 68000 exposes the so called function code on the FC signals. The function code tells you if it's a code or data reference. But a code reference is not exactly the same as an instruction fetch. Not sure what TG68K uses and what exactly Minimig needs.
Fx Cast: Atari St cycle accurate fpga core

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Wed Jan 02, 2019 4:22 pm

Double post
Last edited by MasterOfGizmo on Wed Jan 02, 2019 4:24 pm, edited 1 time in total.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1310
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: 680x0 cores

Postby MasterOfGizmo » Wed Jan 02, 2019 4:23 pm

Sorgelig wrote:Not just. It distinguishes between instruction fetch and data read.


Ok. But the minimig does not make use of that. The atari core in fact does to implement separate data and instruction caches.

It's just that the minimig core does not make use of any tg68k internal signal that does not have a regular external 68k equivalent on other cores.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

PurpleMelbourne
Atariator
Atariator
Posts: 25
Joined: Mon Dec 10, 2018 12:22 pm

Re: 680x0 cores

Postby PurpleMelbourne » Thu Jan 03, 2019 12:56 pm

I've never heard reference to cycle accuracy before. I assumed it was some kind of problem running demos, which I never do.

I want brute force speed. However I'm also not wanting to use a PC. By the sounds of it MiniMig is quite limited and unable to use a faster CPU core.
15 years ago I was using a Warp Engine 040 in my A4000, and I'd like something faster today for CPU intensive applications like Vista, Mand2000 or just web browsing an semi acceptable speeds.

I do not care about cycle accuracy and don't know why anyone would! :lol:

Sorgelig : Thanks for explaining a bit of that mystery.

PurpleMelbourne
Atariator
Atariator
Posts: 25
Joined: Mon Dec 10, 2018 12:22 pm

Re: 680x0 cores

Postby PurpleMelbourne » Thu Jan 03, 2019 1:05 pm

MasterOfGizmo wrote:I lend the vampire team a complete MIST setup some years ago. They never returned it. Actually they never acknowledged having received it. And after asking them multiple times what happened to the board they told me they would keep it in return for all the work they've done porting the 68080 to the MIST ... which they never released and which i've never seen.

That's pretty crap if they got your stuff and never gave it back. But could they have not got it and just be really terrible and communication? Like did you send it to Serbia where all the mail gets stolen before delivery?

Whatever happened, I'm glad you know that people like us here DO appreciate others trying to be helpful :cheers:

chaos
Atari nerd
Atari nerd
Posts: 48
Joined: Thu Dec 18, 2014 10:09 am
Contact:

Re: 680x0 cores

Postby chaos » Thu Jan 03, 2019 3:47 pm

MasterOfGizmo wrote:
Sorgelig wrote:Not just. It distinguishes between instruction fetch and data read.


Ok. But the minimig does not make use of that. The atari core in fact does to implement separate data and instruction caches.

It's just that the minimig core does not make use of any tg68k internal signal that does not have a regular external 68k equivalent on other cores.


Hi,

AFAIR at least the minimig-mist variant uses separate instruction / data caches:
https://github.com/rkrajnc/minimig-mist ... ram_ctrl.v
https://github.com/rkrajnc/minimig-mist ... ache_new.v

I do believe that the old unified cache implementation still works - commenting out the SDRAM_NEW_CACHE define in sdram_ctrl should be all that is necessary. You would need to replace the signals cpu_req and cpu_rw, which currently use the cpustate signals from withing tg68k.

Cheers!
** my minimig builds: http://somuch.guru/ **

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1996
Joined: Sun Jul 31, 2011 1:11 pm

Re: 680x0 cores

Postby Eero Tamminen » Fri Jan 04, 2019 9:03 pm

PurpleMelbourne wrote:I do not care about cycle accuracy and don't know why anyone would!


On Atari ST/STe it's needed for things like overscan and some trickier palette tricks i.e. getting larger resolutions and more colors than HW was originally designed for. These are mostly used in demos (because those techniques have overhead and constraint what rest of code can do), but few games do utilize them too. Some rare game protections also need cycle accuracy to work correctly.

PurpleMelbourne
Atariator
Atariator
Posts: 25
Joined: Mon Dec 10, 2018 12:22 pm

Re: 680x0 cores

Postby PurpleMelbourne » Sat Jan 05, 2019 12:10 am

Eero Tamminen wrote:On Atari ST/STe it's needed for things like overscan and some trickier palette tricks i.e. getting larger resolutions and more colors than HW was originally designed for. These are mostly used in demos (because those techniques have overhead and constraint what rest of code can do), but few games do utilize them too. Some rare game protections also need cycle accuracy to work correctly.


Ah so its an Atari thing, and that's why we don't hear about it in Amiga land.
What about when you use an 020, 030 or 040 accelerator card? Does that also disrupt things?
On Amiga a lot of games didn't work with accelerator cards until the A1200 and CD32 came out and forced the game programmers to lift up their game.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Sat Jan 05, 2019 12:23 am

PurpleMelbourne wrote:
Eero Tamminen wrote:On Atari ST/STe it's needed for things like overscan and some trickier palette tricks i.e. getting larger resolutions and more colors than HW was originally designed for. These are mostly used in demos (because those techniques have overhead and constraint what rest of code can do), but few games do utilize them too. Some rare game protections also need cycle accuracy to work correctly.


Ah so its an Atari thing, and that's why we don't hear about it in Amiga land.
What about when you use an 020, 030 or 040 accelerator card? Does that also disrupt things?
On Amiga a lot of games didn't work with accelerator cards until the A1200 and CD32 came out and forced the game programmers to lift up their game.


On Amiga there is a copper which watches the raster and do whatever game/demo wants without loading the CPU. That's why Amiga doesn't care of CPU cycle accuracy (unless it's insanely fast or slow).

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Sat Jan 05, 2019 3:45 am

MasterOfGizmo wrote:Ok. But the minimig does not make use of that. The atari core in fact does to implement separate data and instruction caches.


If you want separate caches you do need the CPU internal state to know if it is actually fetching an instruction or not. You can use the FC signals, but probably would work slightly less efficient because the reasons I explained above in my previous message. But I think in this case it is reasonable to use the CPU internal state. The L1 cache is supposed to be integrated in the CPU anyway.

But do note that you still need to check the FC code to distinguish user vs supervisor access. Or you flash and empty the cache on each change of the Supervisor state?
Fx Cast: Atari St cycle accurate fpga core

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Sat Jan 05, 2019 3:56 am

Sorgelig wrote:On Amiga there is a copper which watches the raster and do whatever game/demo wants without loading the CPU. That's why Amiga doesn't care of CPU cycle accuracy (unless it's insanely fast or slow).


That's not the only reason that cycle accuracy is needed on the ST. Many protections rely on cycle accuracy one way or the other. And even with cracks, many times the cracks removed the actual check for the disk protection but they left other pieces of the protection code that still need cycle accuracy.

I guess that if we ask Toni Wilen, Winuae maintainer, he probably knows about Amiga titles, especially copy protected software, and/or demos that do require cycle accuracy. Otherwise why he made such an enormous effort of making Winuae as much cycle accurate as possible. Of course, some people don't care about running games or demos that are broken (broken in the sense that they shouldn't depend on cycle accuracy). But other people do like to be able to run everything, including older and protected versions.
Fx Cast: Atari St cycle accurate fpga core

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Sat Jan 05, 2019 8:59 am

ijor wrote:I guess that if we ask Toni Wilen, Winuae maintainer, he probably knows about Amiga titles, especially copy protected software, and/or demos that do require cycle accuracy.

When you work on some project so many years, eventually you start to polish it and make cycle accurate. Especially when you have a mega power of modern CPU. It's not that cycle accuracy is absolutely not needed. It's nice to have, but not the first thing to have. Amiga spoiled by many versions of CPUs, so if game developer wanted his game to run on different Amigas, then he couldn't relay on CPU performance as A500 has 68000, A1200 has 68020, A4000 has 68040. And it's not included different accelerators. Protection can relay on many other factors not related to CPU performance. Usually protections relay on disk specific format. But i don't know if not de-protected games are still exist. Probably not.
Only some very few demos required specific CPU. Usually those demos either hacked later or can be run in WHDLoad which tunes performance close to required.

Anyway, Minimig is still far from the point where we should think about CPU cycle accuracy. Unfortunately Amiga community is very spoiled by commerce. No one with good low level Amiga knowledge want to improve the Minimig.

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Sat Jan 05, 2019 12:47 pm

Sorgelig wrote:Amiga spoiled by many versions of CPUs, so if game developer wanted his game to run on different Amigas, then he couldn't relay on CPU performance as A500 has 68000, A1200 has 68020, A4000 has 68040. And it's not included different accelerators.


Yes, I know. But the Amiga 1200 was released at the 90's. Plenty of games were released before the A1200 existed. And even then, it is very possible that some titles have internally two versions, one for the 68000 and other for the 020. Yes, they are the minority of course, and probably only original releases.

Protection can relay on many other factors not related to CPU performance. Usually protections relay on disk specific format.


Protections have two goals. One is to make you difficult to copy the software. That could be at the media or could be something from the packaging (manual, codewheel, etc). But the other goal is also to make you difficult to crack it. For this purpose protections use all sort of obfuscating and encryption techniques, sometimes depending on undocumented features, etc. It is here that many times compatibility breaks.
Fx Cast: Atari St cycle accurate fpga core

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Sat Jan 05, 2019 1:48 pm

ijor wrote:Yes, I know. But the Amiga 1200 was released at the 90's. Plenty of games were released before the A1200 existed. And even then, it is very possible that some titles have internally two versions, one for the 68000 and other for the 020. Yes, they are the minority of course, and probably only original releases.

there were also Amiga 2000, 1500, 3000 with so-called open architecture where you was free to choose which CPU card to use. So 68020 and 68030 appeared much earlier on Amiga than A1200.

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Sat Jan 05, 2019 2:30 pm

Sorgelig wrote:there were also Amiga 2000, 1500, 3000 with so-called open architecture where you was free to choose which CPU card to use. So 68020 and 68030 appeared much earlier on Amiga than A1200.


Interesting, I didn't know. Regardless, it is very likely that some earlier releases require cycle accuracy, or very close. Isn't what PurpleMelbourne just said?:

PurpleMelbourne wrote:On Amiga a lot of games didn't work with accelerator cards until the A1200 and CD32 came out and forced the game programmers to lift up their game.
Fx Cast: Atari St cycle accurate fpga core

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Sat Jan 05, 2019 3:22 pm

On 2000/1500/3000 it wasn't called accelerator. It was called CPU board.
It doesn't matter how it was called. Amiga had various CPUs from early ages.

Sure, there were few games depending on CPU cycle accuracy. But it's more marginal than usual. Amiga still needs 020 more than cycle accuracy. Preferably 32bit version. Faster instruction execution is also just plus for Amiga as there are some applications working better with faster CPU. Less cycles per instruction allows to use lower master clock on FPGA.


Return to “MiSTer”

Who is online

Users browsing this forum: sonycman and 11 guests