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

Re: Logic Gate on Emulator



mjmahon@aol.com (Michael J. Mahon) writes:

> Bryan Parkoff asked:
> 
> >    Can you provide your theory for two different Emulator project?  First
> >project is to translate 6502 opcode instructions into 80x86 opcode
> >instruction that will be written in assembler language.  Second project is
> >to interpret 6502 opcode instructions into C/C++ language before it can be
> >complied/linked into 80x86 opcode instruction.
> >    I suspect that second project can be very slow than first project.
> 
> Both approached are problematic, since many Apple II programs
> modify their code during execution, and any store into the instruction
> space will require run-time emulation, not compile-time translation.

I agree with Michael.  Of course, it depends what the purpose of the project
is.  If this is a project for a university computer course it may be
sufficient if the translator works for "well-behaved" 6502 code.  And yes,
C/C++ will probably be slower than your hand-coded 80x86 assembly code.
How fast does it need to be?  The advantage of the second approach is that
it can be made to work on any architecture with a C/C++ compiler.

Scott
-- 
Scott Hemphill	hemphill@alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear