Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Ahhh! That's genius! Reply to this message
Posted byBart T.
Posted on12/15/03 01:17 AM



> > > It's a good approach, especially when you don't have to keep re-fetching
> code
> > > (if it's mostly in ROM, for instance, or in protected non-writeable memory
> > > pages) and you want to avoid having to write a full-blown dynarec.
>
> I assume that by fetching, you really mean decoding.

Both. If it's in RAM, you have to keep track of whether it's been overwritten, which can introduce significant overhead.

These sort of interpreters are essentially what's known as a "threaded interpreter." They have some of the same drawbacks as a dynarec.

> > > I don't know if it would be worth it for emulating a 68K on X86, though.
> Flag
> > > calculation is simple (LAHF, SETO AL), and decoding can be pretty optimal,
> as
> > > A68K shows.
>
> The only problem is that works only if you program the instruction handlers in
> assembly and its only going to work if you have native flags and flag extraction
> instructions.

Right, that's exactly what I was saying. If it's possible to do it good and fast in assembly, and you don't care too much about portability, go for it!

> For an interpreter, I would use an all-or-nothing approach. Do the flag
> analysis and select between handlers which calculate all flags and which
> calculate no flags. This significantly reduces the number of handler routines
> you will have to generate.

Agreed. But there may be a handful of instructions that often require a particular flag to be calculated, so it might be beneficial to occasionally generate that one extra handler.

> This is how the Nuon Aries3 processor works.

Speaking of which, is there a programmer's manual for this processor? I'd love to add it to my little collection of CPU/DSP documentation :)


----
Bart

-
Entire Thread
Subject  Posted byPosted On
*Does Generator have a 68000 Dynarec?  finaldave12/10/03 03:35 PM
.*Re: Does Generator have a 68000 Dynarec?  Bart T.12/10/03 03:48 PM
..*Ahhh! That's genius!  finaldave12/11/03 05:03 AM
...*Re: Ahhh! That's genius!  smf12/12/03 07:56 AM
....*Re: Ahhh! That's genius!  ElSemi12/13/03 07:31 AM
.....*Re: Ahhh! That's genius!  finaldave12/13/03 05:19 PM
......*Re: Ahhh! That's genius!  Bart T.12/13/03 08:31 PM
.......*Re: Ahhh! That's genius!  ElSemi12/14/03 05:18 AM
........*Re: Ahhh! That's genius!  Riff12/15/03 00:38 AM
..........Re: Ahhh! That's genius!  Bart T.12/15/03 01:17 AM
..........*Re: Ahhh! That's genius!  Riff12/15/03 02:27 PM
...........*Re: Ahhh! That's genius!  Bart T.12/16/03 03:20 AM
...........*Re: Ahhh! That's genius!  finaldave12/15/03 03:48 PM
............*Re: Ahhh! That's genius!  Bart T.12/15/03 04:30 PM
.............*Re: Ahhh! That's genius!  Kayamon12/18/03 08:56 AM
..............*Re: Ahhh! That's genius!  finaldave12/18/03 09:36 AM
...............*Re: Ahhh! That's genius!  smf12/19/03 04:33 AM
.............*Re: Ahhh! That's genius!  finaldave12/16/03 05:16 AM
..............*Re: Ahhh! That's genius!  Bart T.12/16/03 01:04 PM
...............*Re: Ahhh! That's genius!  finaldave12/16/03 03:40 PM
................*Re: Ahhh! That's genius!  smf12/17/03 06:33 AM
.................*Re: Ahhh! That's genius!  finaldave12/17/03 06:39 AM
..................*Re: Ahhh! That's genius!  smf12/17/03 09:57 AM
...................*Re: Ahhh! That's genius!  finaldave12/17/03 12:39 PM
....................*Re: Ahhh! That's genius!  smf12/17/03 02:59 PM