It is currently Thu Feb 22, 2018 4:05 pm

All times are UTC - 7 hours

Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Aug 28, 2017 4:03 pm 

Joined: Fri Oct 16, 2015 1:14 pm
Posts: 12
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.

PostPosted: Mon Aug 28, 2017 5:11 pm 
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1972
Location: WhereverIparkIt, USA
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.

If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers

PostPosted: Wed Jan 10, 2018 4:36 pm 

Joined: Fri Oct 16, 2015 1:14 pm
Posts: 12
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

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group