Cpasjuste / retrodream

GNU General Public License v3.0
67 stars 6 forks source link

Eliminate partition->read in flashRom method #19

Open zarkon0 opened 7 months ago

zarkon0 commented 7 months ago

Hello.

I've a dreamcast with corrupt zero partition of the flash memory.

The dreamcast boot and I can boot retrodream but if I tried to flash system rom with the system rom (that retrodreams includes in https://github.com/Cpasjuste/retrodream/tree/master/data/common/datadir/RD/roms/VA1_PAL), retrodream shows me "bad magic" and I can't flash the system rom.

I can see that in filer.cpp file the method:

void Filer::flashRom(const RetroFile &file)

is doing before write:

    if (!partition->read(io, file.data.path)) {
        retroDream->showStatus("FLASH ROM READ ERROR", partition->getErrorString());
        delete (partition);
        return;
    }

And then the read method calls to checkMagic() method and the bios restore write fails.

It fails because my partition is corrupt and not contains Dreamcast chain nor Katana chain.

Can you eliminate the read of the partition and only write directly the bios to flash system rom?

Regards.

a500plus40 commented 1 month ago

Hi did you manage to fix your flash I think I have the same issue

zarkon0 commented 1 month ago

My last hope was tried the dreamshell command "flashrom" with wrong results:

https://github.com/sega-dreamcast/dreamshell/tree/master/commands/flashrom

I don't remember the params but the command made nothing to me.

Finally I sold my dreamcast for spare parts.