Revision 64
Added by markw about 11 years ago
firmware/fat/pff_file.c | ||
---|---|---|
{
|
||
*dir++ = *path++;
|
||
}
|
||
--dir;
|
||
}
|
||
|
||
*dir = '\0';
|
||
... | ... | |
return file_of(&file->path[0]);
|
||
}
|
||
|
||
char const * file_path(struct SimpleFile * file)
|
||
{
|
||
return &file->path[0];
|
||
}
|
||
|
||
void file_init(struct SimpleFile * file)
|
||
{
|
||
file->path[0] = '\0';
|
firmware/fileselector.c | ||
---|---|---|
void file_selector(struct SimpleFile * file)
|
||
{
|
||
char dir[MAX_PATH_LENGTH];
|
||
dir_of(&dir[0],file_name(file));
|
||
if (file_name(file)[0] == '\0')
|
||
{
|
||
strcpy(&dir[0],"/atari800/user");
|
||
}
|
||
else
|
||
{
|
||
dir_of(&dir[0],file_path(file));
|
||
}
|
||
for (;;)
|
||
{
|
||
struct SimpleDirEntry * entry = dir_entries_filtered(dir,filter);
|
firmware/main.c | ||
---|---|---|
BIT_REG(,0x7,8,ram_select,zpu_out1)
|
||
BIT_REG(,0x3f,11,rom_select,zpu_out1)
|
||
|
||
BIT_REG_RO(,0x1,4,hotkey_softboot,zpu_in1)
|
||
BIT_REG_RO(,0x1,5,hotkey_coldboot,zpu_in1)
|
||
BIT_REG_RO(,0x1,6,hotkey_fileselect,zpu_in1)
|
||
BIT_REG_RO(,0x1,7,hotkey_settings,zpu_in1)
|
||
BIT_REG_RO(,0x1,8,hotkey_softboot,zpu_in1)
|
||
BIT_REG_RO(,0x1,9,hotkey_coldboot,zpu_in1)
|
||
BIT_REG_RO(,0x1,10,hotkey_fileselect,zpu_in1)
|
||
BIT_REG_RO(,0x1,11,hotkey_settings,zpu_in1)
|
||
|
||
void
|
||
wait_us(int unsigned num)
|
||
... | ... | |
baseaddr = (unsigned char volatile *)(40000 + atari_regbase);
|
||
set_reset_6502(1);
|
||
set_turbo_6502(1);
|
||
set_rom_select(1);
|
||
set_rom_select(2);
|
||
set_ram_select(2);
|
||
|
||
init_printf(0, char_out);
|
||
|
||
... | ... | |
init_drive_emulator();
|
||
|
||
|
||
struct SimpleDirEntry * entries = dir_entries("");
|
||
struct SimpleDirEntry * entries = dir_entries("/system/rom/atari800");
|
||
|
||
loadrom_indir(entries,"xlorig.rom",0x4000, (void *)0x704000);
|
||
loadrom_indir(entries,"xlhias.rom",0x4000, (void *)0x708000);
|
||
... | ... | |
loadrom_indir(entries,"osbhias.rom",0x4000, (void *)0x710000);
|
||
loadrom_indir(entries,"osborig.rom",0x2800, (void *)0x715800);
|
||
loadrom_indir(entries,"osaorig.rom",0x2800, (void *)0x719800);
|
||
|
||
loadrom_indir(entries,"ataribas.rom",0x2000,(void *)0x700000);
|
||
|
||
//ROM = xlorig.rom,0x4000, (void *)0x704000
|
firmware/simplefile.h | ||
---|---|---|
|
||
void file_init(struct SimpleFile * file);
|
||
|
||
char const * file_path(struct SimpleFile * file);
|
||
char const * file_name(struct SimpleFile * file);
|
||
enum SimpleFileStatus file_read(struct SimpleFile * file, void * buffer, int bytes, int * bytesread);
|
||
enum SimpleFileStatus file_seek(struct SimpleFile * file, int offsetFromStart);
|
firmware/test_file.c | ||
---|---|---|
|
||
fprintf(stderr,"\n\n");
|
||
|
||
entry = dir_entries("/UAE4ALL");
|
||
entry = dir_entries("/atari800");
|
||
while (entry)
|
||
{
|
||
fprintf(stderr, "Path:%s", dir_path(entry));
|
||
... | ... | |
|
||
fprintf(stderr,"\n\n");
|
||
|
||
entry = dir_entries("/UAE4ALL/DATA");
|
||
entry = dir_entries("/atari800/user");
|
||
while (entry)
|
||
{
|
||
fprintf(stderr, "Path:%s", dir_path(entry));
|
||
... | ... | |
|
||
{
|
||
printf("WTF\n");
|
||
struct SimpleDirEntry * entries = dir_entries("");
|
||
struct SimpleDirEntry * entries = dir_entries("/system/rom/atari800");
|
||
entries = dir_next(entries);
|
||
printf("WTF:%s\n",dir_filename(entries));
|
||
|
||
loadrom_indir(entries,"xlorig.rom",0x4000, (void *)0x704000);
|
||
loadrom_indir(entries,"xlhias.rom",0x4000, (void *)0x708000);
|
||
... | ... | |
loadrom_indir(entries,"ataribas.rom",0x2000,(void *)0x700000);
|
||
}
|
||
|
||
entry = dir_entries("/DCIM");
|
||
entry = dir_next(entry);
|
||
fprintf(stderr, " Name:%s", dir_filename(entry));
|
||
//entry = dir_entries("/atari800/user");
|
||
//entry = dir_next(entry);
|
||
//fprintf(stderr, " Name:%s", dir_filename(entry));
|
||
struct SimpleFile * file = alloca(file_struct_size());
|
||
file_open_dir(entry,file);
|
||
file_open_name("/atari800/user/acid800.atr",file);
|
||
fprintf(stderr, "XXX Name:%s", file_name(file));
|
||
file_selector(file);
|
||
|
||
return 0;
|
Also available in: Unified diff
use MCC paths (will differ per system - TODO)