Создать ответ 
 
Рейтинг темы:
  • Голосов: 0 - Средняя оценка: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Development of a new menu
Автор Сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #1
Development of a new menu
Hi Swat,

I made a menu with tsunami libraries by Dan Potter, I can create the cdi and test it in the emulator but when I try to create an application in DreamShell it hits and errors, because they are "cpp" files that I have not been able to compile it, I do it with:

kos-c++ -o $(TARGET) $(OBJS) -ltsunami -lstdc++ -lparallax -lpng -ljpeg -lkmg -lz -lkosutils -lm

(I put the tsunami library and compiled it inside the libs folder, I had no problems with this, it was fast.)

but dreamshell only uses C Sad, can you help me?

I already moved it to the Makefile application and Makefile.loadable many times.

This is the menu, it is a prototype.
https://youtu.be/cdckXFmu0Mg
(Последний раз сообщение было отредактировано 05.06.2024 в 06:13, отредактировал пользователь SWAT.)
05.06.2024 04:09
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #2
RE: Development of a new menu
Nice! Try link -lstdc++ to application module.

Add to module Makefile:
PHP код:
LIBS=-ltsunami -lstdc++ 

Other libs already linked to Core.
(Последний раз сообщение было отредактировано 05.06.2024 в 06:17, отредактировал пользователь SWAT.)
05.06.2024 06:16
Вебсайт Найти все сообщения Цитировать это сообщение
 Сказали спасибо: VeraBecker
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #3
RE: Development of a new menu
(05.06.2024 06:16)SWAT писал(а):  Nice! Try link -lstdc++ to application module.

Add to module Makefile:
PHP код:
LIBS=-ltsunami -lstdc++ 

Other libs already linked to Core.

Thanks, I was already scared, I thought you deleted the message, ok, I'll try it today.
05.06.2024 22:08
Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #4
RE: Development of a new menu
Hi Swat, I was already able to compile it but I had to add an argument -r -Wl (I really don't know what it's for), here:

Код:
ifndef NO_LD_DEBUG
    #$(KOS_CC) -g -ml -m4-single-only -O2 -g -Wl, -Ttext=0x00000000 -e _start -nostartfiles -nodefaultlibs -o dbg-$(TARGET) $(OBJS) $(KOS_LIB_PATHS) - Wl,--start-group $(LIBS) $(DBG_LIBS) $(DBG_GCC_LIB) -Wl,--end-group
     $(KOS_CC) -g -ml -m4-single-only -O2 -g -Wl,-r -Wl,-Ttext=0x00000000 -e _start -nostartfiles -nodefaultlibs -o dbg-$(TARGET) $(OBJS) $ (KOS_LIB_PATHS) -Wl,--start-group $(LIBS) $(DBG_LIBS) $(DBG_GCC_LIB) -Wl,--end-group
endif

But now it shows this error when opening the app:
symbol '___cxa_atexit' is undefined

what is that?

I made a video
https://youtu.be/XgMAMO5B7Io
(Последний раз сообщение было отредактировано 06.06.2024 в 06:37, отредактировал пользователь VeraBecker.)
06.06.2024 05:42
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #5
RE: Development of a new menu
-r seems just ignore this error on link test of module.
Try add to module Makefile:
PHP код:
GCC_LIB=-lgcc 
06.06.2024 15:08
Вебсайт Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #6
RE: Development of a new menu
(06.06.2024 15:08)SWAT писал(а):  -r seems just ignore this error on link test of module.
Try add to module Makefile:
PHP код:
GCC_LIB=-lgcc 


I already set the variable in makefile
GCC_LIB=-lgcc

But I went back to the beginning, I removed the "-r" and I got all those errors, here comes the _atexit one

It doesn't let me use std::string and so on, I can define it in the class but when I use it in the constructor it shows me all these errors:

Inside the class:
std::string image_file;

Inside the constructor
image_file = "ok";

If I remove the line from image_file = "ok"; build correctly.

Video:
https://youtu.be/Ujw685Koubc

Код:
/opt/toolchains/dc/sh-elf/bin/sh-elf-gcc -g -ml -m4-single-only -O2 -g -Wl,-Ttext=0x00000000 -e _start -nostartfiles -nodefaultlibs -o dbg-app_games.klf module.o ItemMenuFake.o exports.o -L/usr/local/dc/kos/kos/lib/dreamcast -L/usr/local/dc/kos/kos/addons/lib/dreamcast -L/usr/local/dc/kos/kos/../kos-ports/lib -L/usr/local/dc/kos/kos/ds/sdk/lib -L/usr/local/dc/kos/kos/ds/sdk/lib -Wl,--start-group -lstdc++ -ltsunami -lds -lkallisti_exports -lgcc -Wl,--end-group
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/lib/libstdc++.a(eh_globals.o): in function `_GLOBAL__sub_I__ZN17__eh_globals_init7_S_initE':
(.text.startup._GLOBAL__sub_I__ZN17__eh_globals_init7_S_initE+0x34): undefined reference to `__dso_handle'
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: (.text.startup._GLOBAL__sub_I__ZN17__eh_globals_init7_S_initE+0x3c): undefined reference to `__cxa_atexit'
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/lib/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentropy(void*)':
(.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x24): undefined reference to `getentropy'
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/lib/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_arc4random(void*)':
(.text._ZNSt12_GLOBAL__N_117__libc_arc4randomEPv+0x8): undefined reference to `arc4random'
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/lib/libstdc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
(.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traits​IcESaIcEEE+0xa4): undefined reference to `getentropy'
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: dbg-app_games.klf: hidden symbol `___dso_handle' isn't defined
/opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [../../../sdk/Makefile.loadable:116: app_games.klf] Error 1
make[1]: Leaving directory '/usr/local/dc/kos/kos/ds/applications/games/modules'
make: *** [/usr/local/dc/kos/kos/Makefile.rules:57: _dir_modules] Error 2
(Последний раз сообщение было отредактировано 06.06.2024 в 17:26, отредактировал пользователь VeraBecker.)
06.06.2024 17:16
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #7
RE: Development of a new menu
Well, apparently still need to work with the Core.
I've never used C++ in modules so it’s not surprising that there are issues with this.
(Последний раз сообщение было отредактировано 06.06.2024 в 19:24, отредактировал пользователь SWAT.)
06.06.2024 19:24
Вебсайт Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #8
RE: Development of a new menu
(06.06.2024 19:24)SWAT писал(а):  Well, apparently still need to work with the Core.
I've never used C++ in modules so it’s not surprising that there are issues with this.


What alternative can be done?

In the LIB folder include tsunami (I already have it) and include my project to export only the methods to use them in C in applications?
06.06.2024 19:50
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #9
RE: Development of a new menu
Yes you can link libtsunami to Core and add new export functions in C style as I do for SDL GUI library that used in applications.
Or just doesn't use C++ and tsunami, look on it implementation and write the same on C and PVR or Parallax API.
But really, if you do C-style API for libtsunami it will be great for future usage in another apps. Also I will try to solve the C++ issues in modules someday.
(Последний раз сообщение было отредактировано 08.06.2024 в 08:33, отредактировал пользователь SWAT.)
08.06.2024 08:22
Вебсайт Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #10
RE: Development of a new menu
Excellent, a few hours ago I started transferring it to C, based on SDL, I saw that you had already created something similar.

I started making the menu with parallax but when I found tsunami I saw that it was much simpler and already had functions for making animations and drawing.

These days I will tell you how the conversion to C was.

thanks Swat!
08.06.2024 08:55
Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #11
RE: Development of a new menu
Hi Swat,

I already passed the tsunami libraries, but something strange happens, there is a flicker on the screen, do I have to deactivate the SDL or something like that?

Here video:
https://youtu.be/BvOLpi46UWE

Thanks!
16.06.2024 08:23
Найти все сообщения Цитировать это сообщение
 Сказали спасибо: SWAT
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #12
RE: Development of a new menu
(16.06.2024 08:23)VeraBecker писал(а):  Hi Swat,

I already passed the tsunami libraries, but something strange happens, there is a flicker on the screen, do I have to deactivate the SDL or something like that?

Here video:
https://youtu.be/BvOLpi46UWE

Thanks!


Swat, I already could, but I think I did it wrong, execute the function ShutdownVideoThread(); , and now the flickering is removed and it works very well, can I use that function or what is the right way?

New Video:
https://youtu.be/umXoVucuZeM
(Последний раз сообщение было отредактировано 16.06.2024 в 21:43, отредактировал пользователь VeraBecker.)
16.06.2024 19:38
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #13
RE: Development of a new menu
Great!
Look for DrawHandler, EventHandler and AddEvent here:
https://github.com/DC-SWAT/DreamShell/bl.../preview.c

In DreamShell video in separate thread, so you need shutdown DS video or integrate.
Preview of Dreameye as an example as it is integrated into DS video.
You can made base UI in XML and use tsunami for covers and animation only, as I do in Dreameye app for camera preview.
(Последний раз сообщение было отредактировано 17.06.2024 в 07:46, отредактировал пользователь SWAT.)
17.06.2024 07:39
Вебсайт Найти все сообщения Цитировать это сообщение
 Сказали спасибо: VeraBecker
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #14
RE: Development of a new menu
Swat, look at please,

Big Grin !!! very happy!!

https://youtu.be/BmPtrp4BELg

Yes, in DreamEye I saw what you told me about the events, but due to the free time I have I think I will do it later Wink
17.06.2024 08:27
Найти все сообщения Цитировать это сообщение
 Сказали спасибо: SWAT
SWAT Не на форуме
Администратор
*******

Сообщений: 7217
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 149
Поблагодарили 1209 раз(а) в 759 сообщ.
Сообщение: #15
RE: Development of a new menu
Good job, keep up the good work!
If you need immediate help, you can get it on Discord.
17.06.2024 09:53
Вебсайт Найти все сообщения Цитировать это сообщение
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #16
RE: Development of a new menu
Hi Swat!,

I already have the new menu ready, but now I need tests, please check:

https://youtu.be/0OeT9N7UlQs?si=RUp30_4RLtmHRpKV
24.06.2024 01:01
Найти все сообщения Цитировать это сообщение
pcwzrd13 На форуме
Продвинутый
***

Сообщений: 464
Зарегистрирован: 04.05.2017
Рейтинг: 2
Сказал спасибо: 166
Поблагодарили 215 раз(а) в 163 сообщ.
Сообщение: #17
RE: Development of a new menu
The menu looks really nice!

A couple suggestions:

One thing that would be cool is if you could have it play the CDDA music when a game is selected like with the regular ISO Loader. Video previews like RetroDream would be cool too but I'm sure that would be a lot more work.

One other thing would be the ability to set "favorite" games. Maybe press a button on a game to add it to favorites and you can have a view that only shows favorite games. You could put a star icon on the cover to show that the game is favorited.

If you're looking for testers, I'll be happy to help. Smile

Dreamcast Live | YouTube Channel | DreamShell IDE Compatibility List
(Последний раз сообщение было отредактировано 24.06.2024 в 01:40, отредактировал пользователь pcwzrd13.)
24.06.2024 01:33
Найти все сообщения Цитировать это сообщение
 Сказали спасибо: VeraBecker
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #18
RE: Development of a new menu
(24.06.2024 01:33)pcwzrd13 писал(а):  The menu looks really nice!

A couple suggestions:

One thing that would be cool is if you could have it play the CDDA music when a game is selected like with the regular ISO Loader. Video previews like RetroDream would be cool too but I'm sure that would be a lot more work.

One other thing would be the ability to set "favorite" games. Maybe press a button on a game to add it to favorites and you can have a view that only shows favorite games. You could put a star icon on the cover to show that the game is favorited.

If you're looking for testers, I'll be happy to help. Smile

Thank you, very good ideas, little by little I will incorporate what I can.
(Последний раз сообщение было отредактировано 24.06.2024 в 08:08, отредактировал пользователь VeraBecker.)
24.06.2024 01:48
Найти все сообщения Цитировать это сообщение
 Сказали спасибо: pcwzrd13
VeraBecker Не на форуме
Пользователь
**

Сообщений: 85
Зарегистрирован: 13.08.2018
Рейтинг: 0
Сказал спасибо: 36
Поблагодарили 44 раз(а) в 32 сообщ.
Сообщение: #19
RE: Development of a new menu
(24.06.2024 01:48)VeraBecker писал(а):  Thank you, very good ideas, little by little I will incorporate what I can.


Look at please:
https://youtu.be/J7PfA45wNYs?si=OO6JRPKSLfkNw6Zj
24.06.2024 08:09
Найти все сообщения Цитировать это сообщение
 Сказали спасибо: SWAT , megavolt85 , pcwzrd13
pcwzrd13 На форуме
Продвинутый
***

Сообщений: 464
Зарегистрирован: 04.05.2017
Рейтинг: 2
Сказал спасибо: 166
Поблагодарили 215 раз(а) в 163 сообщ.
Сообщение: #20
RE: Development of a new menu
That was quick! Haha! Very nice!

Dreamcast Live | YouTube Channel | DreamShell IDE Compatibility List
24.06.2024 16:36
Найти все сообщения Цитировать это сообщение
Создать ответ 


Переход:


Пользователи просматривают эту тему: 5 Гость(ей)