]> Git repositories of Nishi - tewi.git/commitdiff
wip but should work
authorNishi <nishi@nishi.boats>
Sun, 29 Sep 2024 05:55:18 +0000 (05:55 +0000)
committerNishi <nishi@nishi.boats>
Sun, 29 Sep 2024 05:55:18 +0000 (05:55 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@193 8739d7e6-ffea-ec47-b151-bdff447c6205

Platform/ps3.mk
Server/Makefile
Server/main.c
Server/tw_version.h
ps3.sh [new file with mode: 0755]
psp.sh

index 8d3c96ab0a3582ab2d4372270081d3276572f2b6..ba0e58ac3e2ce39e5c9f438b89678f3374843d32 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-PREFIX = /dev_hdd0/httpd
+PREFIX = /dev_hdd0/game/TEWI_00-0/USRDIR
 
 CC = ppu-gcc
 AR = ppu-ar
index 6ed2ed9dfa5f24ba52f3b1ee2957901996015782..e773e5b02d455147b47196a6bdb053071b6f0545 100644 (file)
@@ -28,8 +28,8 @@ tewi.self: tewi_strip$(EXEC)
 
 tewi.pkg: tewi.self
        mkdir -p pkg/USRDIR
-       cp /usr/local/ps3dev/bin/ICON0.PNG pkg/ICON0.PNG
-       make_self_npdrm tewi.elf pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000
+       cp ../Binary/ps3.png pkg/ICON0.PNG
+       make_self_npdrm tewi_strip$(EXEC) pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000
        sfo.py --title "Tewi HTTPd" --appid "TEWI" -f /usr/local/ps3dev/bin/sfo.xml pkg/PARAM.SFO
        pkg.py --contentid UP0001-TEWI_00-0000000000000000 pkg/ $@
        rm -rf pkg
index 0dce5df064c67718bfb42a1e018107f0ad9b1abc..3af5b8d219c8ae0e9552068eaff29f86958bb0ae 100644 (file)
@@ -308,42 +308,42 @@ int tt_height;
 
 void tt_putstr(const char* str) {
        int i;
-       for(i = 0; str[i] != 0; i++){
+       for(i = 0; str[i] != 0; i++) {
                tvram[tt_y * tt_width + tt_x] = str[i];
-               if(str[i] == '\n'){
+               if(str[i] == '\n') {
                        tt_x = 0;
                        tt_y++;
-               }else{
+               } else {
                        tt_x++;
-                       if(tt_x == tt_width){
+                       if(tt_x == tt_width) {
                                tt_x = 0;
                                tt_y++;
                        }
                }
-               if(tt_y == tt_height){
+               if(tt_y == tt_height) {
                        tt_y--;
                        int x, y;
-                       for(y = 0; y < tt_height - 1; y++){
-                               for(x = 0; x < tt_width; x++){
+                       for(y = 0; y < tt_height - 1; y++) {
+                               for(x = 0; x < tt_width; x++) {
                                        tvram[y * tt_width + x] = tvram[(y + 1) * tt_width + x];
                                }
                        }
-                       for(x = 0; x < tt_width; x++){
+                       for(x = 0; x < tt_width; x++) {
                                tvram[(tt_height - 1) * tt_width + x] = 0;
                        }
                }
        }
 }
 
-void tt_putchar(struct rsx_buffer* buffer, int x, int y, uint8_t c){
+void tt_putchar(struct rsx_buffer* buffer, int x, int y, uint8_t c) {
        int i, j;
        if(c < 0x20) c = 0x20;
        if(c >= 0x7f) c = 0x20;
-       for(i = 0; i < 7; i++){
+       for(i = 0; i < 7; i++) {
                uint8_t l = font[(c - 0x20) * 8 + i];
-               for(j = 0; j < 5; j++){
+               for(j = 0; j < 5; j++) {
                        uint32_t c = 0;
-                       if(l & (1 << 7)){
+                       if(l & (1 << 7)) {
                                c = 0xffffff;
                        }
                        l = l << 1;
@@ -387,17 +387,17 @@ void tt_printf(const char* tmpl, ...) {
        for(i = 0; tmpl[i] != 0; i++) {
                if(tmpl[i] == '%') {
                        i++;
-                       if(tmpl[i] == 's'){
+                       if(tmpl[i] == 's') {
                                char* tmp = log;
                                log = cm_strcat(tmp, va_arg(va, char*));
                                free(tmp);
-                       }else if(tmpl[i] == 'd'){
+                       } else if(tmpl[i] == 'd') {
                                char buf[513];
                                sprintf(buf, "%d", va_arg(va, int));
                                char* tmp = log;
                                log = cm_strcat(tmp, buf);
                                free(tmp);
-                       }else if(tmpl[i] == '%'){
+                       } else if(tmpl[i] == '%') {
                                char* tmp = log;
                                log = cm_strcat(tmp, "%");
                                free(tmp);
index b4785acd7fdf97a14d0fd2397b2fe47b4a1ef000..b0a2698f6e178c60f304218ee058617ca28ec4f4 100644 (file)
@@ -7,7 +7,7 @@
 extern "C" {
 #endif
 
-#define TW_VERSION "2.02-wip\0"
+#define TW_VERSION "2.03\0"
 
 const char* tw_get_version(void);
 const char* tw_get_platform(void);
diff --git a/ps3.sh b/ps3.sh
new file mode 100755 (executable)
index 0000000..e153d2b
--- /dev/null
+++ b/ps3.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# $Id$
+export PSPDEV=/usr/local/pspdev
+export PATH=$PATH:/usr/local/pspdev/bin
+cat config.h.tmpl | sed -E 's/#undef (NO_SSL)/#define \1/g' > config.h
+rm -rf TEWI_00-0
+make PLATFORM=ps3 DESTDIR=TEWI_00-0/ install || exit 1
+mkdir -p TEWI_00-0/USRDIR
+mv TEWI_00-0/dev_hdd0/game/TEWI_00-0/USRDIR/* TEWI_00-0/USRDIR/
+rm -rf TEWI_00-0/USRDIR/lib TEWI_00-0/USRDIR/bin
+rm -rf TEWI_00-0/dev_hdd0
+make_self_npdrm Server/tewi_strip.elf TEWI_00-0/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000
+sfo.py --title "Tewi HTTPd" --appid "TEWI" -f /usr/local/ps3dev/bin/sfo.xml TEWI_00-0/PARAM.SFO
+cp Binary/ps3.png TEWI_00-0/ICON0.PNG
+echo "Tewi HTTPd $(make get-version) for PS3" > TEWI_00-0/README
+echo "========================" >> TEWI_00-0/README
+echo "To install, just copy this \`TEWI_00-0' folder into your /game of PS3 HDD0." >> TEWI_00-0/README
+cat TEWI_00-0/README
+rm -f tewidist.zip
+zip -rv tewidist.zip TEWI_00-0
+rm -rf TEWI_00-0
diff --git a/psp.sh b/psp.sh
index fe455ab67a31aa58dbf3a2861fc3da001f141b5b..8a73bcfb297d45672bf76c76474ab0bd27510b01 100755 (executable)
--- a/psp.sh
+++ b/psp.sh
@@ -4,7 +4,7 @@ export PSPDEV=/usr/local/pspdev
 export PATH=$PATH:/usr/local/pspdev/bin
 cat config.h.tmpl | sed -E 's/#undef (NO_SSL)/#define \1/g' > config.h
 rm -rf httpd
-make PLATFORM=psp DESTDIR=httpd/ install
+make PLATFORM=psp DESTDIR=httpd/ install || exit 1
 mv httpd/ms0:/PSP/GAME/httpd/* httpd/
 rm -rf httpd/lib httpd/bin
 rm -rf httpd/ms0:
@@ -12,7 +12,7 @@ cp Server/tewi.pbp httpd/EBOOT.PBP
 echo "Tewi HTTPd $(make get-version) for PSP" > httpd/README
 echo "========================" >> httpd/README
 echo "To install, just copy this \`httpd' folder into your /PSP/GAME of the PSP memorystick." >> httpd/README
-cat httpd/readme
+cat httpd/README
 rm -f tewidist.zip
 zip -rv tewidist.zip httpd
 rm -rf httpd