Login
Back to forumSee the full topicGo to last reply

Posted By

ytm
on 2024-09-14
16:53:49
 Re: How much ROM is faster than RAM

There is a project that replaces real 6502 with an emulated one using Teensy4.1 with some latches and buffers to shift 3.3V logic into 5V and back. Teensy is a module that has ARM processor, onboard RAM and Flash.

The benefit (compared to FPGA or trying to interface with 65C816) is that it's an emulation, so there is complete control over what the emulated CPU does and sees on the bus.

For instance the memory access can be realized in different modes:
A: reads and writes go to computer's bus (100% cycle accurate, no speedup)
B: using onboard RAM: reads go from Teensy's RAM, writes go to computer's bus (speedup and changed bytes exist in mainboard RAM, so they are visible to the video chip)
C: using onboard RAM: reads and writes access only Teensy's RAM (huge speedup, but no data is passed to mainboard RAM, nothing would change on the screen)

This can be assigned to any memory area (mixed and matched) and resembles a bit Amiga's fast/chip/slow RAM types. I/O area is a special case and always has to use mode A.

ROMs were simply put into Teensy's flash to make them available at full speed in any mode. The author of the original project even added some more optimizations for modes B/C - like skipping over otherwise "wasted" cycles of 6502.

These modes can be switched in software but also by a physical switch (SCPU had it). For C64 I added fast mode that mimics C128 2MHz mode (but faster). SCPU also had a default mode for BASIC where whole memory area except the screen RAM was in the fast mode. So BASIC was running fast but any writes to the screen were synchronized with onboard RAM to make them visible for VIC.

I have played a bit with this for C64: https://github.com/ytmytm/teensy64 - I left it to be redesigned a bit.



Back to top


Copyright © Plus/4 World Team, 2001-2024