Question

I have been building knowledge of computers and C++ for quite a while now, and I've decided I want to try making an emulator to get an even better understanding. I want to try making a TI-83 Emulator (runs on a Zilog Z80 CPU). I currently have two problems:

The first is that the "PC" register that points to the current instruction is only 16 bits, but the Ti-83 ROM I downloaded is 256Kb. How is 16 bits of data supposed to point to an address beyond ~64Kb?

Secondly, where is the entry point on the ROM? Does the execution just begin at 0x0000?

Thanks, and hopefully you can help me understand a bit on how this works.

Was it helpful?

Solution

There's is most likely a programmable paging register outboard of the processor core that can be set to map a portion of the 256K at a time into part of the 64K address space. You will need to emulate that. Hopefully you can find out about this in official or unofficial documentation. If you have a schematic or PCB it might even be visible as an external PAL or collection of logic chips.

I forget off the top of my head where a z80 starts executing on reset, but I'm sure you will find it in the processor manual, which would be a necessary tool to write an emulator for it.

You'll want to make sure the core used is truly a z80 and not some kind of custom extended version thereof.

And of course I'm sure someone has already done this, so your project is likely to be more about learning - though in the end you might surpass any available solution if you work on it long enough.

OTHER TIPS

The Developer Guide describes how memory is arranged, although it doesn't actually describe how the mapping works.

Short version: the address space is divided into four 16K pages, the first of which always maps page 0 of the 32-page flash ROM.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top