Search found 12 matches
- Wed Jan 10, 2018 4:36 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
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 ...
- Mon Oct 30, 2017 4:36 am
- Forum: GBDev
- Topic: Gameboy CPU instruction set timings and lengths
- Replies: 12
- Views: 6329
Re: Gameboy CPU instruction set timings and lengths
Also, instructions E2 and F2 are listed as length 2. Are those typos? Yes, they are definitely only one byte long. Also, are the BIT n,(HL) instructions 12 or 16 T-cycles in length? Should be 12. At least I implemented them with 12 and that passes Blargg's tests. And it fits the 3 memory reads the ...
- Mon Aug 28, 2017 4:03 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
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...
- Mon Aug 28, 2017 11:51 am
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
Finally finished the improved r2 layout and assembled the first board. The new layout adds a microcontroller, USB, switching regulator, RGB status led, and many small improvements. The biggest change is the microcontroller, which does all the heavy lifting instead of the GB CPU. The microcontroller ...
- Thu Aug 10, 2017 4:15 am
- Forum: GBDev
- Topic: C compilers targeting Game Boy, not just Zilog
- Replies: 5
- Views: 4576
Re: C compilers targeting Game Boy, not just Zilog
SDCC is probably your best option. Beware that GBDK ships with an ancient version (~2002?) of SDCC, but the mainline version of SDCC also supports GBZ80, so you can use that instead. And even now, SDCC sometimes generates really stupid code and has some weird quirks. There is also gbdk-n , which mak...
- Thu Feb 23, 2017 3:05 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
The project isn't dead, I just have been busy with work, but I still made some progress. I have completely reorganized the firmware and rewritten several parts of it. Instead of one giant state machine with 20+ states which handles everything, the blocks are now connected to a wishbone bus and the G...
- Wed Nov 30, 2016 10:57 am
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
Quick update: I added persistent saves a while back and played halfway through Link's Awakening without issues. Pushing a button on the cartridge resets the gameboy and the loader then writes the save back to the SD card. The cartridge now runs the memory at 100MHz and everything else at 50MHz to al...
- Sat Oct 22, 2016 5:29 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
As it turns out, the problem was caused by a stupid mistake in the address handling. Instead of mapping the ROM to 0x000000 and the SRAM to 0x800000, the highest bit got lost, causing all writes to SRAM to overwrite parts of the ROM instead... :oops: I spend some time cleaning up and optimising the ...
- Tue Oct 18, 2016 4:05 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
I narrowed the crashes down to writes to the save RAM, but still have no idea what goes wrong. ROM and RAM access is virtually identical and everything works during simulation, so something weird is happening or I have a very stupid bug... Disabling SRAM writes 'fixes' the problem and has some inter...
- Sun Oct 16, 2016 2:33 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
Pokemon still crashes after the intro, but the emulator doesn't show anything interesting at that point. It switches rom banks all the time without issues and I verified the mapping by dumping the game after it was loaded. Why does it always have to be weird bugs like that... :? To write a 4MB game ...
- Sat Oct 15, 2016 3:00 pm
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Re: Gameboy FPGA Cartridge
I implemented MBC5 emulation and optimised the code enough to load Pokemon Blue in ~20s instead of >5 minutes. It plays the intro and then (of course, why would I have expected something else) crashes. Whelp, I probably messed up the bank switching somewhere. I should check what the game does in the...
- Sat Oct 15, 2016 7:15 am
- Forum: GBDev
- Topic: Gameboy FPGA Cartridge
- Replies: 17
- Views: 18649
Gameboy FPGA Cartridge
Hi, this is a project I have been working on in my spare time for a while now. The plan is to build a cart that can run all MBC1-5 games including RTC support and learn something about PCB layout, SMD soldering and FPGA programming. This is not really my first experience in that direction, but the f...