Saltar al contenido ForoHackers

Emulation: start here

Emulación
#2993 · · Citar · Denunciar

An emulator is a program that behaves like another machine, so software written for one processor and its hardware runs on a different computer. Writing one is a deep exercise in how real machines work. It also keeps old systems usable. Run only software you own or have the right to use, such as your own programs and homebrew.

Key concepts

  • CPU emulation: an interpreter that fetches, decodes and executes each instruction, or a translator that converts blocks into native code.
  • Memory and bus: the address space, with RAM, ROM and device registers each handled at its address.
  • Device emulation: video chips, sound chips, timers and controllers, each with its own behaviour.
  • Timing and synchronisation: keeping components in step, either approximately or cycle by cycle.
  • Accuracy and speed: exact behaviour costs time, so every emulator picks a trade-off.

Vocabulary

  • Interpreter and dynamic recompiler: running instructions one at a time, or translating them into native code on the fly.
  • Cycle-accurate: modelling the exact clock timing of the original hardware.
  • Test ROM: a program written to check one behaviour and report whether it passed.
  • Homebrew: new software that people write for old systems.

What to study, in order

  1. Number systems, binary and hexadecimal, and the structure of a simple instruction set.
  2. Write a CHIP-8 interpreter, a tiny virtual machine, and run programs you write.
  3. Read the public documentation of a simple 8-bit processor and implement its instructions.
  4. Pass published test programs for the CPU, instruction by instruction, comparing against known logs.
  5. Add a video and an input device, then timing; learn why synchronisation is the hard part.

Related tags

#computer-architecture #retrocomputing #virtualization #assembly

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder