Cpasjuste / retrodream

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

Retrodream and serial port #1

Closed Cyan4973 closed 1 year ago

Cyan4973 commented 4 years ago

I'm trying to understand the relation between RetroDream and DreamShell. I'm testing RetroDream with an SD Card reader on the serial port, and so far it works fine, with the usual limitations related to this interface.

Reading the introductory README.md, it looks like RetroDream is mostly an overlay on top of DreamShell, replacing DS/DS_CORE.BIN, and the rest of the directory structure is kept identical.

Something I noticed, when looking at the directory structure : DS/firmware/isoldr contains only one file, ide.bin. And in my case, the ISO loader version is said to be v0.6.0 in the logs.

So, I recompiled the isoldr firmware file from the DreamShell source, to update them. They are now at version v0.6.7, and consist of 4 files, cd.bin, dcl.bin, ide.bin and sd.bin. If ide.bin is replaced with these files, hence with the newer version of ide.bin : it doesn't work anymore. The log message states that the version is v0.6.7, confirming the update, but the loading process stop at (not) detecting the IDE interface and freezes there. But, when rebooting to DreamShell, and loading the ISO from there (as opposed to from RetroDream), it works fine, and the iso / gdi / cdi archive is correctly loaded from the SD card.

Hence I'm at a loss to explain this behavior. Is there more to it in RetroDream ? Does it also modify the firmware files ? Or is the difference entirely within ide.bin, and something happened there, entirely out of control (although not without consequences) from RetroDream ?

Cpasjuste commented 4 years ago

Hi,

There's no modifications to the loaders in RetroDream, they are loaded by the "isoldr" "driver" which is integrated in RetroDream sources with very minors modifications.

All the available loaders we tested from dreamshell are working fine in RetroDream. But note that ide.bin is (should be) only used when launching iso from HDD. In your case, you can only use sd.bin else it won't work. I need to take a closer look, but I think if sd.bin is not found it will default to ide.bin, which is wrong in your case. Maybe older ide.bin loader was able to load stuff from SD and this was later removed.

Cpasjuste commented 4 years ago

Also, I had a bug on older RetroDream versions where sd.bin was not correctly loaded, it's maybe your problem, also. It has been fixed but I'm not sure I did made a release since then. I'll try to take a look tomorrow and provide latest sources as a release here.

Cyan4973 commented 4 years ago

if sd.bin is not found it will default to ide.bin, which is wrong in your case

I made a quick test, by letting only sd.bin be present in firmware/isoldr. This unfortunately would not work. Nothing get loaded with this setup. Actually, the GUI doesn't even move on selecting an ISO.

So the current suspicion is that it requires ide.bin, and only ide.bin.

Cpasjuste commented 4 years ago

As you can see here: https://github.com/Cpasjuste/retrodream/blob/master/src/isoloader.cpp#L49 If the iso is located on SD, it will use sd.bin, unless you changed the loaders option/preset (Y when highlighting a game). If it doesn't work then maybe you're using an old RetroDream version which have the sd.bin not correctly loaded bug. I'll update the release page tomorrow so you can try. Anyway, I don't think there's any changes in sd loader since a while, so it won't change anything in your case. By the way, you can name your custom loaders "1.bin", "2.bin" and so on so you can select them in the game settings menu (Y).

Cyan4973 commented 4 years ago

I had a bug on older RetroDream versions where sd.bin was not correctly loaded

I found over Internet (from the same source that provided me the first Retrodream pack) a file named RetroDream Beta v2, which includes a DS_CORE.BIN, to replace the previous one.

And indeed, with this new version, and leaving only ds.bin in the firmware/isoldr directory, loading works correctly.

So as you suggested, this was likely a bug from an early version, which is now fixed.

I'll update the release page tomorrow so you can try.

This made me noticed that you also have a "Release" section, with the latest one being v1.0.2. The attachment is retrodream-1.0.2.zip, which contains a file retrodream.bin. I'm not sure how it correspond to the "beta 2" found over Internet, since :

By the way, you can name your custom loaders "1.bin", "2.bin" and so on so you can select them in the game settings menu (Y).

So that's what is meant by loader 10 in DragonCity data base ? So this sheet presumes that some additional loaders are available in firmware/isoldr ?


Lastly, with the updated DS_CORE.BIN, and the updated ds.bin iso loader, the log message indeed mentions v0.6.7, which is the latest available SD loader version in the master branch of DreamShell. Apart from that, it doesn't change much, which was to be expected.

More specifically, I was hoping for .cso support (compressed iso files). This support is hinted here and there, including in source files, mentioned from time to time on forum, but I've never seen any definitive statement that says that .cso files are supported, or are not supported. Do you happen to know something about this topic ?

Cpasjuste commented 4 years ago

I'm not sure how it correspond to the "beta 2" found over Internet....

DragonCity "guy" is helping me testing RetroDream, so he may have released something newer than in my release section yes. But i'll update the release section today or tomorrow so we are up to date.

So that's what is meant by loader 10 in DragonCity data base ? So this sheet presumes that some additional loaders are available in firmware/isoldr ?

Exactly, in the DragonCity package you'll find the additional loaders (1.bin, ... 10.bin..). But they all target ide (hdd). I highly encourage you to install a g1-ata mod in your dreamcast, if you can. It's 100 times faster and stable.

More specifically, I was hoping for *.cso support

I'll take a closer look this week.

Cyan4973 commented 4 years ago

I tried latest release of RetroDream, v1.1.0.

Regarding the topic mentioned above, *.cso support for SD Card reader on serial port, I have not been able to make it work with this new version.

Here is what I'm experiencing: If the archive is named archive.cso, the RetroDream UI consider it's a file, with no special role, and just doesn't even attempt nor propose to load it. It it's named archive.iso.cso, then "something" try to happen, as the LED indicator of the SD Card reader shows some activity, but ultimately, nothing actually happen, and we just stay within RetroDream UI (one can still move around). If it's named archive.iso, it's the same thing.

What I suspect is that, in these last 2 cases, it tries to load the archive as an ISO file, but then fails, since it's a CSO one. It's probably a "clean" failure, with error code, that RetroDream catches, and therefore cancel the operation, without prejudice. The only issue is that, since there is also no log displayed, it's pretty difficult for a normal user to understand what's going on.

In the meantime, I checked the source code of sd.bin, and it seems it should be able to support .cso files, albeit with the limitation that it doesn't support asynchronous load (code exists, but is broken). That would nonetheless be enough to start some .cso archives (it would likely fail later, but that would be enough for a start).

Cpasjuste commented 4 years ago

Hi,

In fact I didn't had the time to look as cso yet, so for now RetroDream only recognize iso, cdi and gdi extension. So a file with a cso extension won't be loaded at all. I'll try to take a closer look soon, but I can't give a date :)