How to compile DreamShell ?

Technical help for Dreamcast console, accessories and games only. Ask questions and find answers here. For Online help see the Online Forum

Moderator: pcwzrd13

sundance
undertow
Posts: 28

Re: How to compile DreamShell ?

Post#11 » Mon Mar 16, 2020 7:35 pm

OK, thanks !
I couldn't find `g1_ata_max_lba()` in the normal KallistiOS, so I presumed it came from the modified KOS installation, carrying the DreamShell patches.
Then I searched libkallisti.a for symbols, using `nm`, and could find `g1_ata_max_lba()`.
So why would it not link ?
I presumed a config error, so I restarted `source environ.sh`.
And voila.
Now DreamShell compiles fine.
All the missing symbols were present in the modified KOS, and for some reason, the build process was accessing the original KOS instead.

With DreamShell compilation completed, I was thinking that it would be nice to test it, typically using some emulator, like `lxdream`.
This works fine with sample KOS projects.

Unfortunately, I've not yet reached that stage, since the production of the file to test requires multiple transformation stages, depending on additional binaries stored in sdk/bin. But these binaries are built for Windows, so it's necessary to build manually the same tools for Linux. And building these tools doesn't work easily, so that's slow progresses. Well, eventually, I may get there.

Another thing that surprised me is the content of `build/` after compilation.
My understanding is that whatever is in `build/` should end up in `DS/` directory in the SD card.
So I was expecting to find the same important files at root, such as `DS_CORE.BIN`.

But that's not the case. Instead, I find `1DS_CORE.BIN`.
I have no idea if this is equivalent, if this will be found by the loader, etc.

_edit_ :
I finally completed compilation of tools in `sdk.bin`,
making it possible to generate a *.cdi image to be tested on lxdream.

Unfortunately, it doesn't work well enough :
lxdream reports : "unrecognized file DS.cdi"
I tested my copy of lxdream with a *.cdi file of Propeller Arena, it works well.
So, it's likely that DS.cdi generation went wrong.

While searching for DS.cdi, I also found DS_CORE.BIN.
But it's located at the root of DreamShell directory, and not in `build/`.
It's becoming less clear to me what's being built when invoking `make` and how to use it.

_edit 2_ :
Looking around, I found another make target `lxelf`, which loads lxdream with `DS.elf` instead of `DS.cdi`,
bypassing the .cdi creation issue.
Besides, it's the way the mini KOS projects are loaded into lxdream, so it felt appropriate.

For information, my copy of `lxdream` doesn't accept argument `-e`, even though it's latest (v0.9.1).
After removing it, the program starts in the emulator, with the DreamShell splash screen.
And soon after, it crashes.

Here are the last lines of the log :
```
Initializing DreamShell Core...
Checking for G1 ATA devices...
16:59:17 8C10E85A WARN IDE: Unimplemented command: EC
Can't read MBR from IDE by LBA
Checking for SD card...
_mutex_unlock_as_thread
16:59:17 8C01ED40 WARN SCSPTR2 not implemented: Write 000000E3 16:59:17 8C01ED40 WARN SCSPTR2 not implemented: Write 000000E3 16:59:17 8C01EECA WARN SCSPTR2 not implemented: Write 000000A3 16:59:17 8C01FCF4 WARN SCSPTR2 not implemented: Write 000000A3 make: *** [Makefile:186: lxelf] Floating point exception (core dumped)
```

This is the farthest I've ever reached.
I'm wondering if this is the "expected" result.
After all, DreamShell uses some pretty low level system calls, I wouldn't be surprised if some of them are not properly emulated by lxdream.

  • Similar Topics
    Replies
    Views
    Last post

Return to “Support”

Who is online

Users browsing this forum: No registered users