[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [f-cpu] fcpu-iss



On Fri, Mar 12, 2004 at 08:28:50PM +0100, Pierre Tardy wrote:
[...]
> > In particular, it didn't allow different kinds of emulators to share
> > the emulator core.  That's a MUST since I don't want to maintain two
> > versions of the code.
> I totally agree with that.
> Do you include emumain.c in the core ?

I don't really consider emumain.c a part of the core any more.
With the hooks implemented all over emu.c, it will be just another
module - just like elfemu.c - that uses the core (which is basically
emu.c, plus the fcpu_opcodes library).

> > I'll provide an interface in the next release.  The basic idea is
> > that the emulator core will call external hooks (that is, functions
> > provided by the caller) when any of the following situations arise:
> [snip]
> Ok, that's what I thought.
> We have made:
> lsu_read(addr + j, R2) ;
> lsu_write(addr + j, R2, r(R1).C(b,BYTES(sz)-1-j));
> lsu_loadaddr(R1, r1.C(o,0));
> pf_loadaddr(R1,r1.C(o,0));
> pf_doJmp(R2);
> pf_updatePC();

Similarly, yes.  I will use pointers to functions, so that other
modules can provide their own versions easily, and change them on
the fly if necessary.  I didn't finish the interface yet, though.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/