squall926 wrote: ↑Sun Apr 11, 2021 8:29 pm
I tried a STM32H750(1mB ram) running at 400Mhz to emulate a sms cart, but without luck.
On stm32f417(192kB ram) running at 168Mhz worked.
Yeah, I initially thought those faster MCUs would allow for much faster GPIO speeds, but unfortunately
the opposite seems to be the case. I think it has to do with how far removed from the GPIO the CPU is on these micros. It has to go over four different bus arbitrers or something before getting to the peripheral.
However, a few high-speed peripherals sit on the same bus as the CPU and I
think they have direct access to the pins when you configure them in the alternate mode? The FMC, LCD display controller, SDMMC and Quad SPI peripherals are all in that category. So, yeah, maybe some shenanigans could be pulled off with those.
Ben Boldt wrote: ↑Tue Nov 17, 2020 9:51 am
I really spent some time thinking of how to use DMA for this, because these micros do have really good DMA abilities. The problem is that there are multiple PRG-ROM banks. You have to use the high-order CPU address bits to
decide which bank you are in; i.e. which register to push out to the extended PRG bits. With DMA, you don't have the ability to put a decision like that in there.
I thought about this for a while and I
think there's a way to implement the mapper logic with the DMA peripherals alone. STM isn't super clear about this but, as far as I understand, there's no round-robin between the DMA channels (I might be completely wrong about this). So, a high-priority transfer will be finished before any of the lower priority ones begin,
You could make it so PPU /RD going low triggers two transfers: the higher priority one reads the MSBs of the PPU address and saves them in the least significant byte of the source address of another DMA channel. The lower priority one activates that other channel. That third channel now reads the bank number from a LUT and spits it out through GPIO for an external memory to use.
Using timers and configuring DMA2 channels using DMA1 transfers, you could pull off all sorts of interesting operation sequences... probably.