I have a way to go before it is running correctly, but I am beginning to get the NES to run on Blackice Mx using the SDRAM:
This is based on a version I did for the iCEBreaker ice40 fpga, which was based on an ice40 port to the up5k by @daveshah which in turn was based on the Mist implementation, which was based on fpganes by Ludvig Strigeus.
I have used my Mist/Mister Gameboy implementation of SDRAM which does reads and writes in a fixed 8 cycles.
I have some work to get the VGA and game speed correct, but when I do that, the audio and controller should work, as they did on the iCEBreaker, and smaller NES games like SuperMario Bros and Tetris ought to work correctly.
The game cartridge ROM is held in flash memory and copied to the SDRAM and executed from there. On the iCEBreaker up5k SPRAM was used instead and that is much easier to use as you can access it in a single clock cycle.
Using the flash memory on the Blackice Mx is currently a challenge as there is limited support in the firmware, even the latest version.
I used my SaxonSoc flash write program to copy the game to ROM. Games are currently 256kb, although this version only uses 128kb plus one 32-bit word.
There is not much flash memory on the Blackice Mx. Most ice40 devices have much bigger flash memory chips. So the single game uses the whole of the second half of the flash memory, starting at address 0x40000.
The NES port only works when it is loaded from flash memory and built with the icepack -s flag. That is because the flash memory chip goes to sleep on the Blackice Mx when not in use, and loading from flash and using the -s flag stops that from happening. I have tried to add wake code to the flash reading code but with no luck so far.
There is another problem with writing the bitstream to flash with the latest (unreleased) firmware. If the currently running bitstream is using flash, then pressing the mode button and writing to flash hangs. So I first have to upload a bitstream that doesn't access flash, then press the mode button, and write the NES image to flash memory.
Having got reading the ROM from flash memory working, writing it to SDRAM is also a problem as it needs eight cycles and needs to be synced with the SDRAM writing code. But with a few kludges, that is currently working.
I can then use the SDRAM as the ROM cartridge memory.
The pll clock speed is currently 21.5Mz. This is needed for the custom 512x480 VGA mode that is used. That mode works on most VGA monitors but not most TVs.
The NES then runs at a quarter of the speed. (5.375 Mhz) and the CPU runs in one out of every 3 cycles, so at a third of that speed (about 1..79 Mhz). The other 5.375 Mhz clock cycles are used by the Picture Processing Unit (PPU).
I had to increase the the divisor from the VGA/SDRAM clock speed to the PPU clock speed from 4 to 8, so that I can get in 8 SDRAM clock cycles for every PPU clock cycle. For that reason the VGA currently only shows a quarter of the screen and the game runs at half speed.
To fix that I plan to increase the pll clock speed to 43Mhz and to run the VGA at half that. If that doesn't work, taking two PPU cycles to access the SDRAM might work as it should only be used by the CPU which only runs every third PPU cycle. The NES video and working RAM (as opposed to cartridge ROM) currently use the ice40 BRAM.
Techniques similar to the ones I have used here ought to work to run other retro computer ports (like @hoglet's Beeb, Atom and Z80 CP/M ones) using SDRAM and the external flash memory.
I should be able to make uses of the 2Mb of SDRAM to run bigger games than were possible on the up5k, but that may be limited by the size of the Blackice Mx flash memory.
A better solution might be to read the ROM from an SD card into the SDRAM, but that is a lot more work.
On the iCEBreaker, I also got NES working with the iCEBreaker HDMI Pmod, but again in tends to work on monitors but not HDMI TVs because of the non-standard VGA mode. That Pmod should also work on the Blackice Mx.