Open Source FPGA based GDROM Emulator

Thank you so much! I'm heading in now and will give it a shot.

The speed of the loading is not surprising... I was reading somewhere that an sd card in SPI mode transfers data at around 25kbps :S

Licensing aside, would there be anyway to enable 4 bit mode on this FPGA? This device would definitely be able to compete with GDEMU if that were the case!
Same behavior... 4 LEDS and not recognizing SD. ERGH!
IMO, the biggest non-legal problem with that would simply be getting it to fit inside the FPGA. It's not an especially big FPGA anyway and a lot of it is occupied by the AVR soft core. My personal feeling is that a better approach would be to remove the soft core and put a real CPU on the board - say one that has a built-in 4-wire SD interface in the silicon.
Wouldn't having a CPU on board drive up the price a bit? The cost of my build all said and done was about $70USD, add a CPU to the equation and you might as well just get a GD-EMU! :D

Could my problem be that I am flashing via iceprog for windows? Maybe I should try flashing on linux?
Yeah, it would increase the price a bit - but you don't need an especially powerful CPU for this application. Something that's a lot more capable than the soft core that's currently in use would probably cost something like $5 at single unit pricing.

The other thing that's worth considering is that currently the CPU is taking up about half the FPGA - and that's a $12 chip (also single unit) - so basically it's using $6 worth of resources to get a level of performance quite a bit less than a $5 CPU. If you used an external CPU, then it might also be possible to use a smaller and cheaper FPGA (and possibly one that's in a much more end-user friendly package than BGA).

You could also consider using a different FPGA family - I suspect the main reason that Marcus chose that one was simply that it had an open-source toolchain - something that's very unusual for programmable logic.

Of course, if you made all those changes you would end up with a completely different product...

I have no experience of using the Windows version of iceprog - I will see if I can download it and see if I can successfully flash that evaluation board.

Edit:

This might be a stupid question, but do you have the jumpers on the evaluation board in the correct positions?

It needs to be set up so that the FTDI programs the serial flash rather than configuring the FPGA - J7 should have a jumper installed and J6 should have jumpers across pins 1-3 and 2-4 (I.E. 3 jumpers installed, all in the same direction between the ICE and the FTDI chip).
https://assemblergames.com/threads/open-source-fpga-based-gdrom-emulator.62761/page-4#post-924926

how to flash via windows, with known working compiled bitstream in the archive.

Edit:

I see you say you used this archive. These are the files I used on mine, which worked once programmed.
hi guys, I managed to build 2 of these but cant get em to work.
I know when i remove the sd card it cycles threw the led lights. But cant get any game to load.
I wonder is there a special type of sd card needed. Format to fat32?. Also used the program to convert the image to GIO. Tried a few different disks makes no difference.
Any ideas.
I was working on my own drive replacement years back and got sidetracked after I hit a couple of stumbling blocks and the forum got nuked.

Now, it might be the time to actually try this again, since it looks like Marcus tackled most of the hard work. One of the things I did manage to finish was a basic 4-bit read-only SD card core.

Right now, I am working on a hardware design which will replace the ICE40 with an Cyclone 10LP so I can put some on board debug hardware on it. Board design is not really my forte, but I'll be giving it a go regardless.

If anyone wants to collaborate on a performance-oriented variant of Marcus' design, let me know. As an aside, I think in the long term, there should be an open-source alternative to GDEMU that is at least as performant as the original GD-ROM drive. Preferably one that can be built by people without really expensive equipment and flexible enough to be ported to future FPGA families.
@thepingas lifehack, you can made ATAPI CD-ROM emulator and debug on your PC, after replaced ATAPI command set to SPI
I spent most of the last month digging up my old GD-ROM documentation and have downloaded Marcus' Verilog code.

Unfortunately, there were some architectural decisions that prevent me from porting the code easily (use of I/O latch primitives for example) as well as some issues that will probably lead to metastability problems that could propagate into the device and lead to problematic behavior (gltiches, crashes, etc).

There are also issues with the codebase that have nothing to do with Marcus' work. The AVR core code is messy and uses reserved words so Quartus threw a fit when I imported the source. After I ironed out enough issues for the AVR core to synthesize, it turns out it takes up something like 2500 LUT, which is a rather lot considering the poor performance of the AVR. There are some modern alternatives which will work better, like C.Wolf's picorv32.

The good news is that Marcus basically solved all of the hard reverse engineering problems and his project will serve as a good reference design.

Unfortunately, I think the proliferation of cheap counterfeit GDEMU devices have kind of sapped a lot of the enthusiasm out of the community.
PCB came back last week and I managed to solder it together. I screwed up the regulator footprint (as is tradition) and had some other foibles, but it seems to not have any issues so bad as to make the thing unusable.

Now I actually have to start developing the code for it.

ode_mk_1.png
Impressive

Original thread: https://assemblergames.com/threads/open-source-fpga-based-gdrom-emulator.62761/