Skip to content

Commit

Permalink
Update to beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
NuVanDibe committed Apr 5, 2022
1 parent cb48d3c commit d1385ab
Show file tree
Hide file tree
Showing 96 changed files with 71 additions and 79 deletions.
Binary file removed data/fonts/fixed4.font
Binary file not shown.
Binary file removed data/fonts/fixed5.font
Binary file not shown.
Binary file removed data/fonts/fixed6.font
Binary file not shown.
Binary file removed data/fonts/nokia.font
Binary file not shown.
Binary file removed data/fonts/screenfox.font
Binary file not shown.
Binary file removed libfc_visoly_xg1/dual.o
Binary file not shown.
Binary file removed libfc_visoly_xg1/libflashcart.a
Binary file not shown.
Binary file removed libfc_visoly_xg1/main.o
Binary file not shown.
Binary file removed libfc_xrom/go.o
Binary file not shown.
60 changes: 0 additions & 60 deletions libfc_xrom/go.s.bak

This file was deleted.

Binary file removed libfc_xrom/libflashcart.a
Binary file not shown.
Binary file removed libfc_xrom/main.o
Binary file not shown.
Binary file removed libpogo/lib/libpogo.a
Binary file not shown.
Binary file removed libpogo/lib/libpogod.a
Binary file not shown.
Binary file removed libpogo/source/obj/aes.o
Binary file not shown.
Binary file removed libpogo/source/obj/console.o
Binary file not shown.
Binary file removed libpogo/source/obj/core.o
Binary file not shown.
Binary file removed libpogo/source/obj/core_misc.o
Binary file not shown.
Binary file removed libpogo/source/obj/cursor.o
Binary file not shown.
Binary file removed libpogo/source/obj/debug.o
Binary file not shown.
Binary file removed libpogo/source/obj/device.o
Binary file not shown.
Binary file removed libpogo/source/obj/editbuf.o
Binary file not shown.
Binary file removed libpogo/source/obj/font.o
Binary file not shown.
Binary file removed libpogo/source/obj/io.o
Binary file not shown.
Binary file removed libpogo/source/obj/keyboard.o
Binary file not shown.
Binary file removed libpogo/source/obj/memory.o
Binary file not shown.
Binary file removed libpogo/source/obj/misc.o
Binary file not shown.
Binary file removed libpogo/source/obj/romfilesys.o
Binary file not shown.
Binary file removed libpogo/source/obj/rtc.o
Binary file not shown.
Binary file removed libpogo/source/obj/screen.o
Binary file not shown.
Binary file removed libpogo/source/obj/sema.o
Binary file not shown.
Binary file removed libpogo/source/obj/smartkey.o
Binary file not shown.
Binary file removed libpogo/source/obj/sram_access.o
Binary file not shown.
Binary file removed libpogo/source/obj/sramfile.o
Binary file not shown.
Binary file removed libpogo/source/obj/string.o
Binary file not shown.
Binary file removed libpogo/source/obj/vkeyboard.o
Binary file not shown.
Binary file removed libpogo/source/objd/aes.o
Binary file not shown.
Binary file removed libpogo/source/objd/console.o
Binary file not shown.
Binary file removed libpogo/source/objd/core.o
Binary file not shown.
Binary file removed libpogo/source/objd/core_misc.o
Binary file not shown.
Binary file removed libpogo/source/objd/cursor.o
Binary file not shown.
Binary file removed libpogo/source/objd/debug.o
Binary file not shown.
Binary file removed libpogo/source/objd/device.o
Binary file not shown.
Binary file removed libpogo/source/objd/editbuf.o
Binary file not shown.
Binary file removed libpogo/source/objd/font.o
Binary file not shown.
Binary file removed libpogo/source/objd/io.o
Binary file not shown.
Binary file removed libpogo/source/objd/keyboard.o
Binary file not shown.
Binary file removed libpogo/source/objd/memory.o
Binary file not shown.
Binary file removed libpogo/source/objd/misc.o
Binary file not shown.
Binary file removed libpogo/source/objd/romfilesys.o
Binary file not shown.
Binary file removed libpogo/source/objd/rtc.o
Binary file not shown.
Binary file removed libpogo/source/objd/screen.o
Binary file not shown.
Binary file removed libpogo/source/objd/sema.o
Binary file not shown.
Binary file removed libpogo/source/objd/smartkey.o
Binary file not shown.
Binary file removed libpogo/source/objd/sram_access.o
Binary file not shown.
Binary file removed libpogo/source/objd/sramfile.o
Binary file not shown.
Binary file removed libpogo/source/objd/string.o
Binary file not shown.
Binary file removed libpogo/source/objd/vkeyboard.o
Binary file not shown.
Binary file removed shell2/backdrop.o
Binary file not shown.
Binary file removed shell2/bitmap.o
Binary file not shown.
Binary file removed shell2/bmpview.o
Binary file not shown.
Binary file removed shell2/crt0.o
Binary file not shown.
55 changes: 51 additions & 4 deletions shell2/filesys.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@
#include "filesys.h"
#include "filetype.h"

#define MARKED_STACK_DEPTH 128

extern uint16 marked;

//static int dot_hide = 0;
static char current[128];
#if 0
static char return_dir[128];
#endif
static uint16 marked_stack[MARKED_STACK_DEPTH];
static char currtemp[128];
static DirList *lastlist;
static uint64 key[2];

int current_marked_level = 0;

/*
static char *tmp_item;
static int item_size;
Expand Down Expand Up @@ -209,7 +218,7 @@ int filesys_change_hidden_dir(void)
{
ioctl(rfd, RM_SETKEY, key);
close(rfd);
return filesys_cd(tmp);
return filesys_cd(tmp, marked);
}
}
close(rfd);
Expand Down Expand Up @@ -269,7 +278,9 @@ char *filesys_get_current(void)
int filesys_parent(void)
{
char *p = strrchr(current, '/');
#if 0
*return_dir = 0;
#endif

//if(p)
// fprintf(stderr, "%s => %s\n", current, p);
Expand All @@ -279,12 +290,18 @@ int filesys_parent(void)
if(p)
{
*p = 0;
return 1;
current_marked_level--;
if (current_marked_level < MARKED_STACK_DEPTH)
marked = marked_stack[current_marked_level];
else
marked = 0;
return 0;
}

return 0;
return -1;
}

#if 0
int filesys_back(void)
{
if(*return_dir)
Expand All @@ -297,7 +314,9 @@ int filesys_back(void)
return filesys_parent();

}
#endif

#if 0
int filesys_enter(int i)
{
if(i < 0) return NULL;
Expand All @@ -311,6 +330,7 @@ int filesys_enter(int i)
}
return 0;
}
#endif

char *filesys_fullname(int i)
{
Expand All @@ -321,15 +341,42 @@ char *filesys_fullname(int i)
return currtemp;
}

int filesys_cd(char *name)
int filesys_cd_marked(char *name)
{
char *p;
int slash = 0;

if (filesys_cd(name, 0)) {
p = current;
while (*p) {
if (*p == '/') {
if (slash < MARKED_STACK_DEPTH)
marked_stack[slash] = 0;
slash++;
}
p++;
}
current_marked_level = slash;
return 1;
}
return 0;
}

int filesys_cd(char *name, uint16 prev_marked)
{
DIR *dir;

if((dir = opendir(name)))
{
closedir(dir);
#if 0
strcpy(return_dir, current);
#endif
strcpy(current, name);
if (current_marked_level < MARKED_STACK_DEPTH)
marked_stack[current_marked_level] = prev_marked;
current_marked_level++;
marked = 0;
return 1;
}
//fprintf(stderr, "Couldnt open %s\n", name);
Expand Down
3 changes: 2 additions & 1 deletion shell2/filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ int filesys_parent(void);
int filesys_back(void);
int filesys_enter(int i);
char *filesys_fullname(int i);
int filesys_cd(char *name);
int filesys_cd_marked(char *name);
int filesys_cd(char *name, uint16 marked);
char *filesys_get_current(void);

enum { FSTATE_NORMAL, FSTATE_ROOT, FSTATE_SRAM, FSTATE_GAMES };
Expand Down
12 changes: 7 additions & 5 deletions shell2/filetype.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "settings.h"
#include "misc.h"

extern uint16 marked;

void bmp_view(char *fname);
void jpg_view(char *fname);
void jpe_view(char *fname);
Expand Down Expand Up @@ -56,15 +58,15 @@ static int check_extention(char *data, DirList *entry)
return 0;
}

/* void clear_vram(void)
void clear_vram(void)
{
unsigned short *vram = (unsigned short *) VRAM;
int i;

// Start after screen.
for (i = 240*160; i < (VRAM_END-VRAM)/sizeof(unsigned short); i++)
vram[i] = 0;
}*/
}

int execute_mb(char *cmd, char *fname, int keys)
{
Expand All @@ -74,7 +76,7 @@ int execute_mb(char *cmd, char *fname, int keys)
//close(fd);

save_state();
//clear_vram();
clear_vram();

set_ram_start(0);

Expand Down Expand Up @@ -133,7 +135,7 @@ int execute_plugin(char *cmd, char *fname, int keys)
args[0] = fname;

save_state();
//clear_vram();
clear_vram();

//sprintf(tmp, ".shell/plugins/%s", cmd);
strcpy(tmp, GET_PATH(PLUGINS));
Expand Down Expand Up @@ -187,7 +189,7 @@ int set_font(char *cmd, char *fname, int keys)

int changedir(char *cmd, char *fname, int keys)
{
filesys_cd(fname);
filesys_cd(fname, marked);
return 2;
}

Expand Down
Binary file removed shell2/gameromfs.o
Binary file not shown.
Binary file removed shell2/guiparser.o
Binary file not shown.
Binary file removed shell2/iwram.o
Binary file not shown.
Binary file removed shell2/jpeg.o
Binary file not shown.
Binary file removed shell2/jpgview.o
Binary file not shown.
20 changes: 11 additions & 9 deletions shell2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ char *path[4];

int sram_game_size = 64;

uint16 marked;

const char *PogoVersion = "2.0b3mod5";

/* State, saved to /sram/.state */
struct {
unsigned /*short*/ char settings[NO_SETTINGS];
char dirstart;
char marked;
uint16 marked;
} __attribute__ ((packed)) state;

/* Save current state to SRAM */
Expand All @@ -74,6 +75,7 @@ void save_state(void)
char *name = filesys_get_current();

memcpy(state.settings, settings, NO_SETTINGS);
state.marked = marked;

fd = open("/sram/.state", O_CREAT);
if(fd >= 0)
Expand Down Expand Up @@ -132,7 +134,8 @@ int load_state(int what)
read(fd, &state, sizeof(state));
read(fd, tmp, 100);
close(fd);
filesys_cd(tmp);
filesys_cd_marked(tmp);
marked = state.marked;
memcpy(settings, state.settings, NO_SETTINGS);
/*if (settings[SF_THEME] >= theme_count)
settings[SF_THEME] = 0;
Expand Down Expand Up @@ -374,7 +377,7 @@ void update_list(void)
listview_addline(MainList, filetype_icon(t), &dirname[i*32], &dirsize[i*10]);
}

listview_set_marked(MainList, 0);
listview_set_marked(MainList, marked);

if(filesys_getstate() == FSTATE_SRAM)
pprintf(tmp, TEXT(TITLEBAR_SRAM));
Expand All @@ -391,7 +394,7 @@ static BitMap **icon_list;
void textreader_set_font(int n, Font *f);


void setup_screen()
void setup_screen(void)
{
char tmp[80];
int i, count;
Expand Down Expand Up @@ -593,7 +596,6 @@ int main(int argc, char **argv)
int converted = 0;
int have_state;
int count = 0;
int marked = 1;
int srsize = -1;
//uint32 *mem = (uint32 *)0x02000000;

Expand Down Expand Up @@ -672,7 +674,7 @@ int main(int argc, char **argv)

sram_fd = open("/sram", 0);

filesys_cd("");
filesys_cd_marked("");

read_texts(config_fp);
read_users(config_fp);
Expand Down Expand Up @@ -834,10 +836,10 @@ int main(int argc, char **argv)

case RAWKEY_B:
if(qualifiers == 2)
filesys_cd("");
filesys_cd_marked("");
else
if(qualifiers == 1)
filesys_cd("/sram");
filesys_cd_marked("/sram");
else
filesys_parent();
update_list();
Expand Down
Binary file removed shell2/misc.o
Binary file not shown.
Binary file removed shell2/msgbox.o
Binary file not shown.
Binary file removed shell2/pogo_visoly_xg1.elf
Binary file not shown.
Binary file removed shell2/pogo_visoly_xg1.gba
Binary file not shown.
Binary file removed shell2/pogo_xrom.elf
Binary file not shown.
Binary file removed shell2/pogo_xrom.gba
Binary file not shown.
Binary file removed shell2/rle.o
Binary file not shown.
Binary file removed shell2/savesystem.o
Binary file not shown.
Binary file removed shell2/settings.o
Binary file not shown.
Binary file removed shell2/sram_convert.o
Binary file not shown.
Binary file removed shell2/syscall.o
Binary file not shown.
Binary file removed shell2/text.o
Binary file not shown.
Binary file removed shell2/users.o
Binary file not shown.
Binary file removed shell2/visoly_xg1_obj/filesys.o
Binary file not shown.
Binary file removed shell2/visoly_xg1_obj/filetype.o
Binary file not shown.
Binary file removed shell2/visoly_xg1_obj/main.o
Binary file not shown.
Binary file removed shell2/widgets/listview.o
Binary file not shown.
Binary file removed shell2/widgets/textbar.o
Binary file not shown.
Binary file removed shell2/widgets/textflow.o
Binary file not shown.
Binary file removed shell2/widgets/textreader.o
Binary file not shown.
Binary file removed shell2/widgets/tricontainer.o
Binary file not shown.
Binary file removed shell2/window.o
Binary file not shown.
Binary file removed shell2/xrom_obj/filesys.o
Binary file not shown.
Binary file removed shell2/xrom_obj/filetype.o
Binary file not shown.
Binary file removed shell2/xrom_obj/main.o
Binary file not shown.

0 comments on commit d1385ab

Please sign in to comment.