Re: ti-emu: RE: A86: Re: new emulator


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

Re: ti-emu: RE: A86: Re: new emulator




If you make a 256 byte table of cycle counts for opcodes, you can get a fast
and accurate core emulation.  If you don't, interrupts will be _very_
inaccurate, depending on how you do things (as you can do the indexed lookup
and add in only one instruction...though the C compiler might handle it
differently).  For example, a NOP only takes 4 t-states, but an LDIR takes
21 (I realize that it's a repeated LDI, which is 16, but again that depends
on how it's processed).  Games and such, and probably even the ROM, that
copy large chunks of memory, will be off when it comes to interrupts.

> ah, you see, I'm not exactly doing a cycle-accurate emulation of the
core -
> TI86Emu actually counts the number of cycles each instruction requires to
> execute, and hence emulates the interrupts accurately. Mine doesnt - it
> counts the number of instructions, because that's the easiest, and I want
> this thing to be as fast as possible (it *is* for a m68k @ 16Mhz, after
all
> :)
> I doubt the final version will ever run at full speed, but that's not
really
> the point - I need a decent calculator for my Palm (my TI86's just too
much
> to carry on some occassions <g>)




Follow-Ups: References: