P. 1
Study of the techniques for emulation programming by Victor Moya del Barrio

Study of the techniques for emulation programming by Victor Moya del Barrio

4.4

|Views: 12,435|Likes:
Published by Moe B. Us
In the time I started to learn about how an emulator is programmed I found that there was a limited amount of documentation. Documentation about how an emulator should be programmed or about the characteristics of the machines to be emulated. Thinking about how to contribute to the emulation I found that the second part would mean the construction of a database with all the information available of a large amount of computers and systems. This wasn’t very suited neither with a university project for
with my own preferences, and there are a few sites in Internet which more or less serve to that purpose. The first part meant to study and learn the various techniques and knowledges related to emulator programming. Since I like a lot learning and also writing I thought that could be my way to contribute. So I thought it would be nice to have a large, ordered and precise documentation about how to program an emulator. That is the purpose of this document and my work in the last months
In the time I started to learn about how an emulator is programmed I found that there was a limited amount of documentation. Documentation about how an emulator should be programmed or about the characteristics of the machines to be emulated. Thinking about how to contribute to the emulation I found that the second part would mean the construction of a database with all the information available of a large amount of computers and systems. This wasn’t very suited neither with a university project for
with my own preferences, and there are a few sites in Internet which more or less serve to that purpose. The first part meant to study and learn the various techniques and knowledges related to emulator programming. Since I like a lot learning and also writing I thought that could be my way to contribute. So I thought it would be nice to have a large, ordered and precise documentation about how to program an emulator. That is the purpose of this document and my work in the last months

More info:

Published by: Moe B. Us on Jun 04, 2007
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/04/2016

pdf

text

original

Tile/Sprite based graphic engines are the most common in 80s and 90s videogame computers. They
were very popular because of their ability to produce good graphics and animations without too much
CPU or memory usage. Different videogame computers implemented tiled engines in different manners.
Arcade systems implemented powerful sprite generators with a lot of memory and pattern tables,
videogame consoles implemented simpler tile/sprite engines and used less video memory. But all the
different engines share the same basic principles. In this section we will introduce how it works one of
such engines using as an example the Sega Master System VDP and the Sega Genesis (also called Mega
Drive in Europe) VDP. For emulation both graphic and sound hardware the basic is to understand how
the hardware works. After this a simple algorithm reproducing the hardware behaviour can be
implemented. The next step would be to optimize this basic algorithm to perform a faster emulation.
Both graphic and sound emulation has a lot of space for performance improving.

Sega Master System (and its equivalent handheld version GameGear) is an 8-bit videogame console
release in the year 1982. It uses a Zilog Z80 at 3.579 MHz as main CPU, has 8 KB of work RAM and the
games are packed in ROM cartridge from 16KB to 512KB in size. The hardware is very similar to the
MSX computer which uses the same CPU. The graphic and sound hardware is a derived version MSX
equivalent hardware. The original Texas Instrument TMS9918 was extended with a new video mode to
provide a 32 colors background and 32 colors sprite layer. The SMS VDP (Video Display Processor) has
a 16 KB video RAM (VRAM) which is accessed through IO ports by the Z80 CPU. It maintains some
compatibility with the old TMS9918 video modes. Arcade machines using an equivalent hardware were
also released (System-E, uses two SMS VDPs). The SMS VDP shows the very basics of a tile engine and
it is a good example to start with.

The Sega Genesis is a 16-bit videogame console. It was releases at the 89/90. It uses a 7.6 MHz
Motorola 68000 CPU as main processor and a Zilog Z80 at 3.58 as sound CPU and for SMS
compatibility. It has 64KB of main RAM (68K) and 8KB of RAM for the sound CPU. It can handle
ROM cartridges up to 4 - 5MB. The Genesis VDP is also derived from the SMS VDP (and the original
TMS9918) but their capabilities are far better. It can handle two background layers with tile priorities, a
sprite layer and window (which replaces the background layer). Up to 64 colors in screen from a palette
of 512. It has 64 KB of VRAM which is also accessed through IO ports (in this case memory mapped IO,
the 68K does not have separated IO ports). The VDP can also perform DMA (Direct Memory Access)
operations from and to the VRAM (read, write and fill). The Genesis VDP is already a good example of
the capabilities which can have a good tile engine. Although it does not has any additional sprite effects
(zooms or rotations for example) it is really impressive. Other videogame consoles, and most of the 16-
bit era arcade machines had more powerful graphic hardware but the basics are the same.

111

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->