Originally Posted by pmackinlay
With this in mind and from a very quick look at the 32016 tube implementation, you may be able to improve things a bit by eliminating your (8-bit) read/write trampolines.

There are a few different ways to do this, one of them as follows, mostly in device_reset():
  • Install your ram_device directly into the memory map.
  • Install the ROM shadow over it, overwriting the RAM read handler for the relevant range.
  • Install a write tap in the RAM region.

The tap logic does the following:
  • Re-installs the ram_device, overwriting the ROM shadow.
  • Deletes itself.

Thanks, very helpful. I'd never heard of or seen install_write_tap used anywhere before. Now that I'm aware of it I imagine I can make more use of it elsewhere too.

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.