Help with LUA scripting. - Версия для печати +- DC-SWAT Forum (http://www.dc-swat.ru/forum) +-- Форум: DreamShell (/forum-3.html) +--- Форум: Programming (/forum-28.html) +--- Тема: Help with LUA scripting. (/thread-4103.html) |
Help with LUA scripting. - MastaG - 07.08.2024 12:31 Hi threre gang, I'd like to offer my Dreamcast for helping out with some automated test cases. For that I'd like DreamShell to download an iso file from a plain http server and run it at startup instead of showing the main menu. So I'm trying to edit the DS/lua/startup.lua file: Код: ----------------------------------------- As you can see I didn't got very far. Any help would be greatly appreciated. RE: Help with LUA scripting. - MastaG - 07.08.2024 13:09 I figured out the isoloader command: Код: isoldr -i -a -x 0x8c004000 -f /ide/GAMES/mygame/game.iso -o 1 -h 0 But it seems to hang on boot. RE: Help with LUA scripting. - SWAT - 08.08.2024 05:57 Hang on network? In general, there is some issues in KOS related to the simultaneous operation of AICA and BBA. In DS music plays at startup. Try to wait until it finishes playing or just turn it off by commenting this line: https://github.com/DC-SWAT/DreamShell/blob/master/src/main.c?ts=4#L217 In it not help, seems issues in lua http, I never test it. You can also try the http module, it adds a /http to the file system through which you can work with normal file operations, for example: /http/192.168.1.2/file.iso But again, all the network stuff is not very stable yet, I haven’t got around to it. And there are issues in the KOS itself, which are clearly visible in the FTP server, in one direction the data goes very poorly, in the other direction it goes well. RE: Help with LUA scripting. - MastaG - 08.08.2024 11:59 Then I need to build v4.0.0 from source, using the source code from: https://github.com/DC-SWAT/DreamShell/releases/tag/v4.0.0.Release For the toolchain which compiler version did you use? config.mk.10.5.0.sample config.mk.12.3.0.sample config.mk.14.0.1-dev.sample config.mk.9.3.0-legacy.sample config.mk.stable.sample config.mk.11.4.0.sample config.mk.13.2.1-dev.sample config.mk.4.7.4-legacy.sample config.mk.9.5.0-winxp.sample EDIT the binary DS_CORE of the v4.0.0 final release says: sh-elf-gcc (GCC) 13.2.0 So I'm going to use: config.mk.13.2.1-dev.sample EDIT2: Just need to read the README.md of the source code release. RE: Help with LUA scripting. - MastaG - 08.08.2024 14:23 @SWAT Would you happen to know if the iso loader was still working with this commit (and KOS commit?): https://github.com/DC-SWAT/DreamShell/commit/d7767d0d678e337d1bda154791534b0067422670 I want to build the last commit where both the iso loader and bios was working. I think this would be: https://github.com/DC-SWAT/DreamShell/commit/83b39f4a9e331fd75e2077bd9ec3f27462df1e07 Because after this commit, you've updated ds/sdk/doc/KallistiOS.txt with a newer version and I think you said that it broke the bios and iso loader. EDIT: Nope.. https://github.com/DC-SWAT/DreamShell/commit/83b39f4a9e331fd75e2077bd9ec3f27462df1e07 Seems too far ahead. Quake3 reboots itself. RE: Help with LUA scripting. - SWAT - 09.08.2024 06:11 Updating the KOS only affects the core and bootloader. It does not affect the ISO loader. The ISO Loader is a bit broken at the moment, as some development is going on. If you want a working version, use the release version. If you want to develop something, just run other games that work. Most games work. What is your goal? RE: Help with LUA scripting. - MastaG - 09.08.2024 18:40 You're correct about the iso loader, in later versions it seems most games work fine. Well my goal is to turn on the DC. It should Download an iso file from a http server and then run the iso loader. My first goal is to not have it show the DreamShell logo, but actually show what is going on by showing the conole. I've edited main.c to read: Код: setenv("HOST", "DreamShell", 1); Without any edits to startup.lua. But it hangs now.. RE: Help with LUA scripting. - MastaG - 09.08.2024 19:28 Okay so I got a bit further. In src/main.c I've only commented out the startup sound. It seems ShowLogo(); is required after InitVideoHardware(); Now in lua/startup.lua: I've only added network init and trying to start gta3: Код: self:InstallingApps(path .. "/apps"); Also the following modules are enabled: http, minilzo, isofs and isoldr. But the isoldr command right before the OpenApp seems to hang the console. RE: Help with LUA scripting. - MastaG - 09.08.2024 19:44 Okay, got the iso to auto start Код: self:InstallingApps(path .. "/apps"); Now I only need to copy the new iso from the http server before it executes the isoloader. RE: Help with LUA scripting. - MastaG - 12.08.2024 11:56 I'm still awaiting my serial cable so I can actually see what is going on. But according to "the inernet", it should be something like this: Код: ... Unfortunately it seems to hang here. Any ideas @SWAT ? RE: Help with LUA scripting. - SWAT - 13.08.2024 06:51 Network issue, HTTP module issue, Lua issue I don't know and I haven't tested it like that. Network capabilities in DS have still received little attention. What I tested well is ping and ftp server module. They work, but ftp server shows that in KallistiOS there is a issue with the network in one direction, from PC to DC. You can get data from the DC well, but you can only send a small amount to the DC in a reasonable amount of time. A large size will make it infinite. |