nesdev.com
http://forums.nesdev.com/

Gameboy FPGA Cartridge
http://forums.nesdev.com/viewtopic.php?f=20&t=14944
Page 2 of 2

Author:  RĂ¼diger [ Mon Aug 28, 2017 4:03 pm ]
Post subject:  Re: Gameboy FPGA Cartridge

It's a STM32F072. The requirements were 2 SPI ports (one for the FPGA and one for the SD card), battery backed RTC, USB, and a TQFP48 package.
I recently discovered the STM32L433 which is even more powerful and pin-compatible. I still have to check how fast the SD card access is,
but the F072 should be fast enough.

Author:  infiniteneslives [ Mon Aug 28, 2017 5:11 pm ]
Post subject:  Re: Gameboy FPGA Cartridge

Great choice, the stm32f07x series is a great mcu for USB. I recently upgraded to some of my designs to the same chip family and have been enjoying getting to know the chip.

Author:  RĂ¼diger [ Wed Jan 10, 2018 4:36 pm ]
Post subject:  Re: Gameboy FPGA Cartridge

I didn't post here for quite a while, but I'm still working on it from time to time and did some bigger improvements over the holidays.

A lot of small changes to the FPGA and ARM code. I can load games from the SD card and run them. The FPGA provides a SPI interface to the ARM to read and write the cartridge memory independent of the GB CPU,
and I wrote a small logic analyzer for the FPGA to capture the GB bus and record 1024 compressed samples, which corresponds to about 200-300us of data.
Last weekend I also started working on a file browser on the GB, so that I don't have to use the USB shell for everything.

Thanks to the logic analyzer, I also managed to figure out why it didn't work on the DMG and SGB.
I didn't decode adresses properly in all cases and would drive the bus when /rd goes low, even if the adress is not in external memory. This wasn't an issue on the GBA (and probably CGB), but on the older models the internal and external buses are apparently not completely isolated and the CPU would get a wrong value when trying to read from internal RAM.
So it would execute fine most of the time, but CALLing a subroutine and the RET would read garbage from the cartridge instead of the proper return adress from the stack...

Now I'm checking the adress properly and it works.
I also looked at the double speed switch, but I don't see anything wrong with it. It just hangs after the STOP instruction, but the registers look fine. There is also nothing obvious in the firmware, that part is virtually identical to the one from the older working cartridge version. :?

And I added more improvements to the PCB layout. Reading from the SD card produces noise on the speaker, so I improved the decoupling. But I don't see any significant noise on the supply, so I'm not sure if it helps.
I also want to connect the DAC to the GB audio input and upgrade to the faster STM32 while I'm at it.

Image Image Image

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/