Giter Club home page Giter Club logo

dc-swat / dreamshell Goto Github PK

View Code? Open in Web Editor NEW
408.0 51.0 56.0 99.68 MB

Operating system for the Sega Dreamcast

Home Page: http://www.dc-swat.ru

Makefile 2.01% C 88.55% Lua 0.72% C++ 0.68% Assembly 2.91% Ruby 0.01% Python 0.30% Perl 0.02% Shell 2.99% Objective-C 0.02% Awk 0.01% HTML 1.06% CSS 0.01% CMake 0.01% Pascal 0.02% DIGITAL Command Language 0.06% Batchfile 0.02% Clean 0.01% XC 0.03% M4 0.57%
c cpp lua xml driver embedded emulator firmware homebrew operating-system

dreamshell's Introduction

DreamShell

The Dreamshell is the operating system for the Sega Dreamcast based on the KallistiOS kernel. It has a dynamic loadable modular system and interface for creating applications with XML UI and both C/C++ and Lua script on. You can see examples in ready-made applications and modules, drivers for various devices, formats and interfaces. Examples for audio and video decoding, compression, packaging, binding, network, emulation, scripts and more. From hardcore low-level assembler to high-level applications. There are also large subproject is the ISO Loader, which contains emulation of BIOS system calls, CDDA playback and VMU, also it can hooking interrupts for various SDKs and more.

Build

Setup environment

Packages
sudo apt-get install -y genisoimage squashfs-tools
sudo apt-get install -y libpng-dev libjpeg-dev liblzo2-dev liblua5.2-dev
cd /tmp && git clone https://github.com/LuaDist/tolua.git && cd tolua
mkdir build && cd ./build
cmake ../ && make && sudo make install
Code
sudo mkdir -p /usr/local/dc/kos
sudo chown -R $(id -u):$(id -g) /usr/local/dc
cd /usr/local/dc/kos
git clone https://github.com/KallistiOS/kos-ports.git
git clone https://github.com/KallistiOS/KallistiOS.git kos && cd kos
git clone https://github.com/DC-SWAT/DreamShell.git ds
git checkout `cat ds/sdk/doc/KallistiOS.txt`
cp ds/sdk/toolchain/environ.sh environ.sh
cp ds/sdk/toolchain/patches/*.diff utils/dc-chain/patches
Toolchain
sudo mkdir -p /opt/toolchains/dc
sudo chown -R $(id -u):$(id -g) /opt/toolchains/dc
cd /usr/local/dc/kos/kos/utils/dc-chain
cp config/config.mk.stable.sample config.mk
make && cd ../../
SDK
cd /usr/local/dc/kos/kos
source ./environ.sh
make && cd ../kos-ports && ./utils/build-all.sh && cd ./lib
mv libfreetype.a libfreetype-kos.a
mv liboggvorbisplay.a liboggvorbisplay-kos.a
mv libogg.a libogg-kos.a
mv libvorbis.a libvorbis-kos.a
mv libwav.a libwav-kos.a
cd ../../kos/ds/sdk/bin/src && make && make install && cd ../../../
ln -nsf `which tolua` sdk/bin/tolua
ln -nsf `which mkisofs` sdk/bin/mkisofs
ln -nsf `which mksquashfs` sdk/bin/mksquashfs

Use environment

for each new terminal type:
cd /usr/local/dc/kos/kos/ds && source ../environ.sh

Build code

Core and libraries
make
Modules, applications and commands
cd ./modules && make && make install && cd ../
cd ./commands && make && make install && cd ../
cd ./applications && make && make install && cd ../
Firmwares
cd ./firmware/bootloader && make && make release && cd ../../
cd ./firmware/isoldr && make && make install && cd ../../../
Full build (modules, apps etc)
make build
Make release package
make release

Running

  • dc-tool-ip: make run
  • dc-tool-serial: make run-serial
  • lxdream emulator: make lxdream
  • nulldc emulator: make nulldc
  • make cdi image: make cdi

Links

dreamshell's People

Contributors

cpasjuste avatar cyan4973 avatar darcagn avatar dc-swat avatar jfdelnero avatar keizel avatar mastag avatar megavolt85 avatar yevgeniy-logachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dreamshell's Issues

isoldr doesn't compile

Hi there,

I was trying to build DreamShell by following the instructions.
But it seems to fail near the end: cd ../isoldr/loader && make && make install

sh-elf-gcc -ml -m4-single-only -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -Wall -std=c11 -Wextra -Werror -DVERSION=\"0.8.0.Beta\" -DLOADER_ADDR=0x8ce00000 -I./kos -I./include -I./kos -I../../../include -D_FS_READONLY=1 -DHAVE_CDDA=1 -DHAVE_EXPT=1 -DNO_ASIC_LT=1 -Wa,--isa=sh4a-nofpu -DMAX_OPEN_FILES=3 -DDEV_NAME=\"DC-LOAD\" -DDEV_TYPE_DCL=1 -Wl,--gc-sections -Tshlelf.xc -nostartfiles -nostdlib -nodefaultlibs -o build/dcl.elf startup.os main.o syscalls.o reader.o mmu.o utils.o malloc.o descramble.o gdc_syscall.o menu_syscall.o sys_syscall.o bfont_syscall.o flash_syscall.o ./kos/src/memmove.o ./kos/src/memcpy.o ./kos/src/memset.o ./kos/src/memcmp.o ./kos/src/memchr.o ./kos/src/strlen.o ./kos/src/timer.o ./kos/src/cache.o ./kos/src/biosfont.o pcm_split.o cdda.o exception-lowlevel.o exception.o asic.o ubc.o dcload.o dcload-syscall.o ./fs/dcl/fs.o -lgcc
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/9.3.0/../../../../sh-elf/bin/ld: main.o: in function `_main':
main.c:(.text.startup.main+0x1f4): undefined reference to `_fs_enable_dma'
collect2: fout: ld gaf exit-status 1 terug
make[1]: *** [Makefile.dcl:18: build/dcl.elf] Fout 1
make[1]: Map '/usr/local/dc/kos/kos/ds/firmware/isoldr/loader' wordt verlaten
make: *** [Makefile:28: build/dcl.bin] Fout 2

Any ideas?

Working or not ?

So i have burn it and lunch it on my dreamcast, but no way to lunch the sd card ?
Uploading IMG_2194.JPG . . .
Uploading IMG_2195.JPG . . .
img_2196

so i can lunch dreamShell, what is wrong ?

Where's VMU Manager App?

I downloaded a build folder from this GitHub page and renamed build folder to DS folder and place it to root of SD Card. After boot to DreamShell. VMU Manager App is not there anymore!

Can you please add VMU Manager back in next build version on GitHub? Or you're just waiting until the next major update version on main website?

set5v1.001.bin GD-ROM BUG

I recently flashed this version to my DC and I lost the use of my GD-ROM. Any disk I put in just hangs on the initial read. If I boot the DC with the disk in the drive it hangs on boot logo. V01 DC was running perfectly with region free bios chip on JC and DS bios before this. Without the use of the GD-ROM I'm stuck on this bios with no way to load DS to flash a good firmware.

Failing to compile toolchain on macOS High Sierra

I followed all of the instructions in the toolchain Makefile (installed gcc 8.1.0 and exported path correctly).

Patching fails on one file for some reason, one of the KOS headers but I was able to easily make the patch changes manually.

Then running make build compiles for a while then I hit this error:

../../../gcc-7.1.0/libgcc/libgcc2.c \
	  -fexceptions -fnon-call-exceptions -fvisibility=hidden -DHIDE_EXPORTS
../../../../gcc-7.1.0/libgcc/libgcc2.c: In function ‘__divdi3’:
../../../../gcc-7.1.0/libgcc/libgcc2.c:1091:9: internal compiler error: Segmentation fault: 11
      d0 = 1 / d0; /* Divide intentionally by zero.  */
      ~~~^~~~~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[5]: *** [_divdi3.o] Error 1
make[4]: *** [multi-do] Error 1
make[3]: *** [all-multi] Error 2
make[2]: *** [all-target-libgcc] Error 2
make[1]: *** [all] Error 2
make: *** [build-sh4-gcc-pass1] Error 1

Any ideas? I see that the macOS toolchain build instructions were literally added days ago by @yevgeniy-logachev, so I assume it should work.

Can't build DreamShell

Hi,

I'm trying to create a Docker-Container to build DreamShell within.
I already created a container including the KOS-Toolchain, which works just fine.

Based on that container, I build the DS-Toolchain & libs, patched & rebuild KOS. Every Makefile exits with Returncode 0. See the Dockerfile for details. [0]
I forked DS to fix KOS-Patching & change KOS-Location in Makefile. See [1] for details.

But I still got a problem linking DS:

/opt/toolchains/dc/kos/utils/genexports/genexports.sh exports.txt ./src/exports.c ds_symtab
/opt/toolchains/dc/kos/utils/genexports/genexportstubs.sh exports.txt ./src/exports_stubs.c
make -f Makefile.stubs
make[1]: Entering directory '/opt/toolchains/dc/kos/ds'
kos-cc  -c src/exports_stubs.c -o src/exports_stubs.o
rm -f ./sdk/lib/libds.a
/opt/toolchains/dc/sh-elf/bin/sh-elf-ar rcs ./sdk/lib/libds.a ./src/exports_stubs.o
make[1]: Leaving directory '/opt/toolchains/dc/kos/ds'
kos-cc  -c src/exports.c -o src/exports.o
/opt/toolchains/dc/kos/utils/genexports/genexports.sh exports_gcc.txt ./src/exports_gcc.c gcc_symtab
/opt/toolchains/dc/kos/utils/genexports/genexportstubs.sh exports_gcc.txt ./src/exports_gcc_stubs.c
make -f Makefile.gcc_stubs
make[1]: Entering directory '/opt/toolchains/dc/kos/ds'
kos-cc  -c src/exports_gcc_stubs.c -o src/exports_gcc_stubs.o
rm -f ./sdk/lib/libds_gcc.a
/opt/toolchains/dc/sh-elf/bin/sh-elf-ar rcs ./sdk/lib/libds_gcc.a ./src/exports_gcc_stubs.o
make[1]: Leaving directory '/opt/toolchains/dc/kos/ds'
kos-cc  -c src/exports_gcc.c -o src/exports_gcc.o
/opt/toolchains/dc/kos/utils/genromfs/genromfs -f romdisk.img -d romdisk -v
0    rom 5a699a15         [0xffffffff, 0xffffffff] 37777777777, sz     0, at 0x0
1    .                    [0xc4      , 0x97ca6c  ] 0040755, sz     0, at 0x20
1    ..                   [0xc4      , 0x97c281  ] 0040755, sz     0, at 0x40     [link to 0x20    ]
1    logo.kmg.gz          [0xfd18    , 0x4a958f  ] 0100644, sz 31403, at 0x60
/opt/toolchains/dc/kos/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
/opt/toolchains/dc/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -ffunction-sections -fdata-sections  -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -I/opt/toolchains/dc/kos/ds/sdk/include -I/opt/toolchains/dc/kos/ds/sdk/include/SDL -DTARGET_NAME= -DDS_ARCH_DC -I./include -I./include/SDL -I./include/fatfs -I./include/ntfs -DHAVE_SDLIMAGE -DVER_MAJOR=4 -DVER_MINOR=0 -DVER_MICRO=0 -DVER_BUILD=0x24    -ml -m4-single-only -Wl,-Ttext=0x8c010000 -Wl,--gc-sections -T/opt/toolchains/dc/kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/opt/toolchains/dc/kos/lib/dreamcast -L/opt/toolchains/dc/kos/addons/lib/dreamcast -L/opt/toolchains/dc/kos/../kos-ports/lib -L./lib -o DS.elf \
        ./src/main.o ./src/video.o ./src/console.o ./src/gui/gui.o ./src/commands.o ./src/module.o ./src/events.o ./src/fs/fs.o ./src/lua/lua.o ./src/lua/lua_ds.o ./src/lua/packlib.o ./src/app/app.o ./src/app/load.o ./src/list.o ./src/img/pvr.o ./src/cmd_elf.o ./src/vmu/vmu.o ./src/irq/exceptions.o ./src/irq/setjmp.o ./src/settings.o ./src/drivers/spi.o ./src/drivers/sd.o ./src/drivers/enc28j60.o ./src/drivers/asic.o ./src/drivers/rtc.o ./lib/SDL_gui/SDL_gui.o ./lib/SDL_gui/Exception.o ./lib/SDL_gui/Object.o ./lib/SDL_gui/Surface.o ./lib/SDL_gui/Font.o ./lib/SDL_gui/Callback.o ./lib/SDL_gui/Drawable.o ./lib/SDL_gui/Screen.o ./lib/SDL_gui/Widget.o ./lib/SDL_gui/Container.o ./lib/SDL_gui/FastFont.o ./lib/SDL_gui/TrueTypeFont.o ./lib/SDL_gui/Layout.o ./lib/SDL_gui/Panel.o ./lib/SDL_gui/CardStack.o ./lib/SDL_gui/FastLabel.o ./lib/SDL_gui/Label.o ./lib/SDL_gui/Picture.o ./lib/SDL_gui/TextEntry.o ./lib/SDL_gui/AbstractButton.o ./lib/SDL_gui/Button.o ./lib/SDL_gui/ToggleButton.o ./lib/SDL_gui/ProgressBar.o ./lib/SDL_gui/ScrollBar.o ./lib/SDL_gui/AbstractTable.o ./lib/SDL_gui/ListBox.o ./lib/SDL_gui/VBoxLayout.o ./lib/SDL_gui/RealScreen.o ./lib/SDL_gui/ScrollPanel.o ./lib/SDL_gui/RTF.o ./lib/SDL_gui/Window.o ./lib/SDL_gui/FileManager.o ./lib/SDL_Console/src/SDL_console.o ./lib/SDL_Console/src/DT_drawtext.o ./lib/SDL_Console/src/internal.o ./src/utils.o ./src/utils/gmtime.o ./src/utils/strftime.o ./src/utils/debug_console.o ./src/utils/memcpy.op ./src/utils/memset.op ./src/utils/memmove.op ./src/fs/fat/utils.o ./src/fs/fat/option/ccsbcs.o ./src/fs/fat/option/syscall.o ./src/fs/fat/ff.o ./src/fs/fat/dc.o ./src/exports.o ./src/exports_gcc.o romdisk.o   -lcfg -lmxml -lparallax -lSDL_1.2.13 -lSDL_image_1.2.12 -lSDL_ttf_2.0.11 -lSDL_rtf_0.1.1 -lSDL_gfx_2.0.25 -lfreetype -lkmg -ljpeg -lpng -lz -llua_5.1.4-2 -lkosext2fs -lkosutils -lstdc++ -lm -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/7.1.0/../../../../sh-elf/lib/libstdc++.a(eh_throw.o): In function `__gxx_exception_cleanup':
/opt/toolchains/dc/kos/ds/sdk/toolchain/build-gcc-sh-elf-7.1.0/sh-elf/libstdc++-v3/libsupc++/../../../../gcc-7.1.0/libstdc++-v3/libsupc++/eh_throw.cc:44: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
collect2: error: ld returned 1 exit status
Makefile:141: recipe for target 'DS.elf' failed
make: *** [DS.elf] Error 1
The command '/bin/sh -c bash -c 'source /opt/toolchains/dc/kos/environ.sh; make'' returned a non-zero code: 2

Any advice?

[0] https://github.com/Nold360/docker-kallistios-sdk/blob/dreamshell/Dockerfile
[1] master...Nold360:master

Trying to build on debian, getting errors about gcc

Heya,

not sure if anyone even still reads this. I tried to compile everything as written at https://github.com/DC-SWAT/DreamShell

Problem 1: it wasn't written, that I need the lua package, which I have installed (maybe add it in the first two apt-gets?)

Problem 2: I'm at the point of the list where I should make source ./environ.sh, but:
grafik

I have downloaded and extracted the gcc 5.2.0 from the webpage, but inside are only Windows executables? How can I compile with them?

Trying to build with the most recent github repository because when I try to dump Sonic Adventure 2 or Ecco with DreamShell 4.0 RC 4 CDI Image the Sega Logo never even starts becoming blue, the whole DC hangs and on the SD disc I only have a 0 byte file.
I was able to dump Sonic Adventure 1 with it. I hoped, the most recent repository version might have a different outcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.