Zipped ROM support
This commit is contained in:
@@ -83,9 +83,9 @@ EXTSYM pal16bxcl,ram7fa,regptra,regptwa,srama,vidmemch2,vidmemch4
|
|||||||
EXTSYM vidmemch8,vcache2b,vcache4b,vcache8b,vram,wramdata
|
EXTSYM vidmemch8,vcache2b,vcache4b,vcache8b,vram,wramdata
|
||||||
EXTSYM wramdataa
|
EXTSYM wramdataa
|
||||||
EXTSYM fname,fnames,GetCurDir
|
EXTSYM fname,fnames,GetCurDir
|
||||||
;EXTSYM GUIcurrentdir,extractzip,PrintStr
|
EXTSYM GUIcurrentdir,extractzip,PrintStr
|
||||||
;STUB DDOI
|
;STUB DDOI
|
||||||
EXTSYM GUIcurrentdir, PrintStr
|
;EXTSYM GUIcurrentdir, PrintStr
|
||||||
EXTSYM GUIsmcfind,GUIsfcfind,GUIswcfind,GUIfigfind,GUIfind058,GUIfind078,GUIfindBIN
|
EXTSYM GUIsmcfind,GUIsfcfind,GUIswcfind,GUIfigfind,GUIfind058,GUIfind078,GUIfindBIN
|
||||||
;EXTSYM GUIfindUSA,GUIfindJAP,GUIfindZIP,GUIfind1,DTALoc,GUIfindall,ZipError
|
;EXTSYM GUIfindUSA,GUIfindJAP,GUIfindZIP,GUIfind1,DTALoc,GUIfindall,ZipError
|
||||||
EXTSYM GUIfindUSA,GUIfindJAP,GUIfindZIP,GUIfind1,DTALoc,GUIfindall
|
EXTSYM GUIfindUSA,GUIfindJAP,GUIfindZIP,GUIfind1,DTALoc,GUIfindall
|
||||||
@@ -3562,9 +3562,6 @@ InvalidZip db 'ZSNES Version A does not support .ZIP files.',13,10,'Please use V
|
|||||||
|
|
||||||
ZipError db 0
|
ZipError db 0
|
||||||
|
|
||||||
extractzip:
|
|
||||||
ret
|
|
||||||
|
|
||||||
UnZipFile:
|
UnZipFile:
|
||||||
cmp byte[OSPort],1
|
cmp byte[OSPort],1
|
||||||
jne .noasm
|
jne .noasm
|
||||||
@@ -3575,14 +3572,24 @@ UnZipFile:
|
|||||||
jmp DosExit
|
jmp DosExit
|
||||||
.noasm
|
.noasm
|
||||||
; get Drive/Dir
|
; get Drive/Dir
|
||||||
|
%ifdef __LINUX__
|
||||||
|
mov ebx,GUIcurrentdir
|
||||||
|
%else
|
||||||
mov ebx,GUIcurrentdir+3
|
mov ebx,GUIcurrentdir+3
|
||||||
|
%endif
|
||||||
mov edx,GUIcurrentdir
|
mov edx,GUIcurrentdir
|
||||||
call Get_Dir
|
call Get_Dir
|
||||||
|
%ifndef __LINUX__
|
||||||
add byte[GUIcurrentdir],65
|
add byte[GUIcurrentdir],65
|
||||||
|
%endif
|
||||||
cmp byte[InGUI],0
|
cmp byte[InGUI],0
|
||||||
je near .nochange
|
je near .nochange
|
||||||
; locate end of string & append filename
|
; locate end of string & append filename
|
||||||
|
%ifdef __LINUX__
|
||||||
|
mov eax,GUIcurrentdir
|
||||||
|
%else
|
||||||
mov eax,GUIcurrentdir+3
|
mov eax,GUIcurrentdir+3
|
||||||
|
%endif
|
||||||
.loop
|
.loop
|
||||||
cmp byte[eax],0
|
cmp byte[eax],0
|
||||||
je .endfound
|
je .endfound
|
||||||
@@ -3591,7 +3598,11 @@ UnZipFile:
|
|||||||
.endfound
|
.endfound
|
||||||
cmp byte[eax-2],':'
|
cmp byte[eax-2],':'
|
||||||
je .noaddslash
|
je .noaddslash
|
||||||
|
%ifdef __LINUX__
|
||||||
|
mov byte[eax],'/'
|
||||||
|
%else
|
||||||
mov byte[eax],'\'
|
mov byte[eax],'\'
|
||||||
|
%endif
|
||||||
inc eax
|
inc eax
|
||||||
.noaddslash
|
.noaddslash
|
||||||
mov ebx,fname+1
|
mov ebx,fname+1
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ DWORD ZFileGetFTime()
|
|||||||
DWORD ZFileMKDir()
|
DWORD ZFileMKDir()
|
||||||
{
|
{
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
return(mkdir(MKPath, 0xff));
|
return(mkdir(MKPath, (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)));
|
||||||
#else
|
#else
|
||||||
return(mkdir(MKPath));
|
return(mkdir(MKPath));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ GUIDIR=gui
|
|||||||
VIDEODIR=video
|
VIDEODIR=video
|
||||||
WINDIR=linux
|
WINDIR=linux
|
||||||
OBJDIR=obj
|
OBJDIR=obj
|
||||||
|
ZIPDIR=zip
|
||||||
|
|
||||||
CHIPSOBJ=${CHIPDIR}/sfxproc.o ${CHIPDIR}/fxemu2.o ${CHIPDIR}/dsp1proc.o\
|
CHIPSOBJ=${CHIPDIR}/sfxproc.o ${CHIPDIR}/fxemu2.o ${CHIPDIR}/dsp1proc.o\
|
||||||
${CHIPDIR}/fxemu2b.o ${CHIPDIR}/fxemu2c.o ${CHIPDIR}/fxtable.o\
|
${CHIPDIR}/fxemu2b.o ${CHIPDIR}/fxemu2c.o ${CHIPDIR}/fxtable.o\
|
||||||
@@ -51,10 +52,12 @@ WINDOSOBJ=${DOSDIR}/debug.o ${DOSDIR}/joy.o ${DOSDIR}/modemrtn.o ${DOSDIR}/vesa2
|
|||||||
|
|
||||||
#PREOBJ=${OBJDIR}/unzip.o ${OBJDIR}/zzip.o ${DOSDIR}/zsipx.o
|
#PREOBJ=${OBJDIR}/unzip.o ${OBJDIR}/zzip.o ${DOSDIR}/zsipx.o
|
||||||
|
|
||||||
|
ZIPOBJ=${ZIPDIR}/zzip.o ${ZIPDIR}/unzip.o
|
||||||
|
|
||||||
MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
|
MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
|
||||||
|
|
||||||
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${WINDOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ}
|
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${WINDOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ}
|
||||||
LIBS=`sdl-config --libs`
|
LIBS=`sdl-config --libs` -lz
|
||||||
CFLAGS=-g -D__LINUX__ `sdl-config --cflags`
|
CFLAGS=-g -D__LINUX__ `sdl-config --cflags`
|
||||||
ASM=nasm
|
ASM=nasm
|
||||||
ASMFLAGS=-f elf -D__LINUX__ -g
|
ASMFLAGS=-f elf -D__LINUX__ -g
|
||||||
@@ -63,7 +66,7 @@ PP=g++
|
|||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .c .cpp .asm
|
.SUFFIXES: .c .cpp .asm
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
${CC} ${CFLAGS} -o $@ -c $<
|
${CC} ${CFLAGS} -o $@ -c $<
|
||||||
|
|
||||||
@@ -72,13 +75,15 @@ PP=g++
|
|||||||
|
|
||||||
%.o: %.asm
|
%.o: %.asm
|
||||||
${ASM} ${ASMFLAGS} -o $@ $<
|
${ASM} ${ASMFLAGS} -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
ALL: zsnes
|
ALL: zsnes
|
||||||
|
|
||||||
zsnes: ${OBJS}
|
zsnes: ${OBJS}
|
||||||
${CC} -o zsnes ${OBJS} ${LIBS}
|
${CC} -o zsnes ${OBJS} ${LIBS}
|
||||||
|
|
||||||
|
${ZIPDIR}/unzip.o: ${ZIPDIR}/unzip.c ${ZIPDIR}/unzip.h
|
||||||
|
${ZIPDIR}/zzip.o: ${ZIPDIR}/zzip.c ${ZIPDIR}/unzip.h
|
||||||
${DOSDIR}/zloader.o: ${DOSDIR}/zloader.c
|
${DOSDIR}/zloader.o: ${DOSDIR}/zloader.c
|
||||||
fixsin.o: fixsin.c
|
fixsin.o: fixsin.c
|
||||||
water.o: water.c
|
water.o: water.c
|
||||||
|
|||||||
Reference in New Issue
Block a user