Commit 8791d241 authored by Donald Haase's avatar Donald Haase
Browse files

Initial commit of Beta 2 source code

parent ace7aae2
Loading
Loading
Loading
Loading

Makefile.dc

0 → 100644
+276 −0
Original line number Diff line number Diff line
USE_CPUASM=1
#USE_CPUASM_MIXTO=1
USE_GL=1
USE_MMU=1

TARGET = snes4all

BACK_KOS_AS=$(KOS_CC_BASE)/bin/$(KOS_CC_PREFIX)-as
KOS_AS = $(KOS_CCPLUS) -ml -m4-single-only  -c

OPTFLAGS=-O3 -fomit-frame-pointer -DDREAMCAST -DDATA_PREFIX="/rd/" -ffast-math -g0
#OPTFLAGS=-Os -fomit-frame-pointer -DDREAMCAST -DDATA_PREFIX="/rd/" -ffast-math -g0
#OPTFLAGS+= -falign-functions=32 -falign-labels=32 -falign-loops=32 -falign-jumps=32
OPTFLAGS+= -falign-functions=32 -falign-labels=4 -falign-loops=4 -falign-jumps=4
#OPTFLAGS+= -falign-functions -falign-labels -falign-loops -falign-jumps

DEFS += -DSNES4ALL_MAX_ROM_SIZE=0x600000
#DEFS += -DNORES256

DEFS += -DUSE_RASTER_DIFF
DEFS +=	-DCPU_SHUTDOWN
DEFS += -DSPC700_SHUTDOWN 
DEFS += -DEXECUTE_SUPERFX_PER_LINE
DEFS += -DSPC700_C
DEFS += -DVAR_CYCLES
DEFS += -DSDD1_DECOMP
DEFS += -DUSE_OLD_DSP1
DEFS += -DUSE_NO_WAIT_WHEN_IRQ
DEFS += -DNO_INLINE_SET_GET
#DEFS += -DUSE_MMU_BOUNDARY
#DEFS += -DUSE_MMU_MASK
DEFS += -DUSE_MMU_DIRECT_INDEX
#DEFS += -DUSE_MMU_BASEPOINTER
#DEFS += -DUSE_MEMORY_SPEED
#DEFS += -DUSE_BLOCK_RAM
DEFS += -DUSE_ASM_ALIGN_OPCODES
DEFS += -DUSE_ASM_SMALL
#DEFS += -DUSE_ASM_R5
DEFS += -DUSE_ASM_R12
#DEFS += -DENABLE_ECHO_SOUND
#DEFS += -DENABLE_MASTER_VOLUMEN
#DEFS += -DUSE_SOUND_DESYNC
#DEFS += -DUSE_REAL_SOUND_MUL
#DEFS += -DENABLE_INTERPOLATE_SOUND
DEFS += -DUSE_ALTDECODE=5
#DEFS += -DENABLE_FIX_FREQUENCY
#DEFS += -DUSE_MODE7_INTERPOLATE
DEFS += -DENABLE_GRAPHIC_WINDOWS
DEFS += -DENABLE_HDMA
#DEFS += -DUSE_HDMA_EVENT
#DEFS += -DNEW_COLOUR_BLENDING
#DEFS += -DOLD_COLOUR_BLENDING
#DEFS += -DSNES4ALL_NUM_CHANNELS=6
#DEFS += -DSNES4ALL_STEREO
#DEFS += -DUSE_VIDEOGL_DIRECT_SLOT
#DEFS += -DDIRECT_COLOR_MAP
DEFS += -DTEST_CACHETILE
DEFS += -DTILES_INLINE
DEFS += -DUSE_SETPPU_TABLE
#DEFS += -DUSE_SETPPU_SMALL_TABLE
DEFS += -DUSE_GETPPU_TABLE
DEFS += -DUSE_ASM_GET_SPC
DEFS += -DUSE_ASM_SET_MATRIX
DEFS += -DUSE_ASM_IRQ_INLINE
DEFS += -DUSE_ASM_PREFETCH
DEFS += -DUSE_VIDEOGL_SELECTIVE_CACHE_RESET=4
DEFS += -DVIDEO_GL_MAX_TEX=32768
DEFS += -DVIDEO_GL_RASTER=64
#DEFS += -DUSE_VIDEOGL_EXTEND_TILELIST
#DEFS += -DUSE_VGL_TABLE
#DEFS += -DUSE_VGL_LARGE_TABLE

#DEFS += -DNOSOUND

#DEFS += -DAUTOLOAD="/cd/Aladdin.zip"
#DEFS += -DAUTOLOAD="/cd/smario.zip"
#DEFS += -DAUTOLOAD="/cd/starwars.zip"
#DEFS += -DAUTOLOAD="/cd/turrican.zip"
#DEFS += -DAUTOLOAD="/cd/castlevania.zip"
#DEFS += -DAUTOLOAD="/cd/jamespond.zip"
#DEFS += -DAUTOLOAD="/cd/Parodius.zip"
#DEFS += -DAUTOLOAD="/sd/snes4all/EarthwormJim.zip"
#DEFS += -DAUTOLOAD="/sd/snes4all/KirbySuperstar.zip"
#DEFS += -DAUTOSAVESTATE
#DEFS += -DAUTO_LOADSAVESTATE="jamespond.ssn"
#DEFS += -DAUTO_LOADSAVESTATE="castlevania.ssn"
#DEFS += -DAUTO_LOADSAVESTATE="turrican.ssn"
#DEFS += -DAUTO_LOADSAVESTATE="aladdin.ssn"
#DEFS += -DAUTO_LOADSAVESTATE="smario.ssn"
#DEFS += -DAUTO_LOADSAVESTATE="starwars.ssn"
#DEFS += -DAUTO_EVENTS
#DEFS += -DMAX_AUTO_EVENTS=500

#DEFS += -DSHOW_DMA

#DEFS += -DPROFILER_SNES4ALL

#DEFS += -DDEBUG_FRAMESKIP
#DEFS += -DAUTO_DEBUG_FRAMESKIP=1000
#DEFS += -DDISPLAY_FRAMERATE

#DEFS += -DDEBUG_TILECACHE
#DEFS += -DAUTO_DEBUG_TILECACHE=2000

DEFS += -DREBOOT_DREAMCAST

ifdef USE_GL
DEFS += -DUSE_GL
endif

ifdef USE_CPUASM
DEFS += -DUSE_OPC_ASM

DEFS += -DASMSTRUC_NOP_PATCH
DEFS += -DSA1ADDR_NOP_PATCH
DEFS += -DASMADDR_NOP_PATCH
DEFS += -DUSE_OLD_APUTIMER
#DEFS += -DUSE_OLD_END_REFRESH
#DEFS += -DUSE_OLD_START_REFRESH
#DEFS += -DUSE_OLD_SYNC_SPEED
#DEFS += -DUSE_ALWAYS_APU_SYNC
endif

ifdef USE_CPUASM_MIXTO
DEFS += -DUSE_OPC_ASM_MIXTO
endif

ifdef USE_MMU
KOS_CFLAGS= -Isrc/mmu_handle/kos-patch/kernel/arch/dreamcast/include -O3 -fomit-frame-pointer -ml -m4-single-only -fno-optimize-sibling-calls -I$(KOS_BASE)/include -I$(KOS_BASE)/addons/include -I$(KOS_BASE)/kernel/arch/dreamcast/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing
KOS_LDFLAGS = -Lsrc/mmu_handle/kos-patch/lib/dreamcast -Lsrc/mmu_handle/kos-patch/addons/lib/dreamcast -ml -m4-single-only -Wl,-Ttext=0x8c010000 -nostartfiles -nostdlib -L$(KOS_BASE)/lib/dreamcast -L$(KOS_BASE)/addons/lib/dreamcast
MORE_CFLAGS = -DUSE_MMU -Isrc/mmu_handle -I$(KOS_BASE)/addons/include/SDL -I$(KOS_BASE)/addons/include $(OPTFLAGS)
else
MORE_CFLAGS = -I$(KOS_BASE)/addons/include/SDL -I$(KOS_BASE)/addons/include $(OPTFLAGS)
endif

MORE_CFLAGS +=	-Isrc/include -Isrc/unzip -Isrc/menu -Isrc/sh -DMITSHM \
		$(DEFS) -DUNZIP_SUPPORT -DZLIB -DHAVE_MKSTEMP  \
		-DACCEPT_SIZE_T=int

#MORE_CFLAGS += -DNOSOUND

KOS_CFLAGS += $(MORE_CFLAGS)
KOS_CPPFLAGS += $(MORE_CFLAGS)
KOS_AFLAGS = $(MORE_CFLAGS)

all: $(TARGET).bin

include $(KOS_BASE)/Makefile.rules

KOS_CPPFLAGS=-fno-operator-names -fno-exceptions

ifdef USE_CPUASM
ifdef USE_CPUASM_MIXTO
OBJS +=	\
	src/cpuexec.o 
endif
OBJS +=	\
	src/sh/cpuexec.o \
	src/sh/cpuops.o \
	src/sh/cpumem.o
ifdef USE_MMU
OBJS +=	src/sh/sa1ops.o
else
OBJS += src/sa1cpu.o
endif

else
OBJS +=	\
	src/cpuops.o \
	src/cpuexec.o \
	src/sa1cpu.o
endif

ifdef USE_MMU
OBJS += src/mmu_handle/mmu_handle.o
endif


OBJS +=	\
	src/globals.o \
	src/fxinst.o \
	src/c4emu.o \
	src/fxemu.o \
	src/2xsai.o \
	src/apu.o \
	src/c4.o \
	src/cheats.o \
	src/cheats2.o \
	src/clip.o \
	src/cpu.o \
	src/data.o \
	src/dma.o \
	src/dsp1.o \
	src/gfx.o \
	src/loadzip.o \
	src/memmap.o \
	src/netplay.o \
	src/obc1.o \
	src/ppu.o \
	src/sa1.o \
	src/screenshot.o \
	src/sdd1.o \
	src/sdd1emu.o \
	src/server.o \
	src/seta.o \
	src/seta010.o \
	src/seta011.o \
	src/seta018.o \
	src/snaporig.o \
	src/snapshot.o \
	src/soundux.o \
	src/spc700.o \
	src/spc7110.o \
	src/srtc.o \
	src/tile.o \
	src/sdl/config.o \
	src/sdl/machine.o \
	src/sdl/vmu.o \
	src/sdl/sdl.o \
	src/unzip/explode.o \
	src/unzip/unreduce.o \
	src/unzip/unshrink.o \
	src/unzip/unzip.o \
	src/menu/fade.o \
	src/menu/menu.o \
	src/menu/menu_main.o \
	src/menu/menu_save.o \
	src/menu/menu_load.o \
	romdisk.o

ifdef USE_GL
OBJS += \
	src/sdl/videogl.o \
	src/tilegl.o
endif

ifdef USE_GL
LIBS= -lSDL_mixer_126 -lSDL_gl_1213 -lkglx -lz_123 -lm  
else
LIBS= -lSDL_mixer_126 -lSDL_1213 -lz_123 -lm  
endif

clean:
	rm -f $(OBJS) $(TARGET).elf $(TARGET).bin  romdisk.o romdisk.img example.iso offsets.bin offsets.elf src/offsets.o

$(TARGET).elf: $(OBJS)
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET).elf $(KOS_START) \
	$(OBJS) $(OBJEXTRA) $(LIBS)  $(KOS_LIBS)

offsets.elf: src/offsets.o
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o offsets.elf $(KOS_START) \
	src/offsets.o $(OBJEXTRA) -lm  $(KOS_LIBS)

$(TARGET).bin: $(TARGET).elf
	$(KOS_OBJCOPY) -R .stack -O binary $(TARGET).elf $(TARGET).bin

offsets.bin: offsets.elf
	$(KOS_OBJCOPY) -R .stack -O binary offsets.elf offsets.bin

romdisk.o: romdisk.img
	KOS_AS=$(BACK_KOS_AS) KOS_AFLAGS=-little $(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
#	bin2odc romdisk.img romdisk.o

romdisk.img:
	$(KOS_GENROMFS) -f romdisk.img -d data -v

example.iso: example
	mkisofs -joliet-long -l -o example.iso -graft-points /=example/

run: $(TARGET).bin example.iso
	$(KOS_LOADER) $(TARGET).bin -i example.iso
#	$(KOS_LOADER) $(TARGET).bin

offsets: offsets.bin
	$(KOS_LOADER) offsets.bin > offsets.h

Makefile.linux

0 → 100644
+274 −0
Original line number Diff line number Diff line
#USE_CPUASM=1
#USE_MMX=1
#USE_ZSNES_FX=1
USE_GL=1


NAME   = snes4all
O      = o
RM     = rm -f
CC     = gcc
CXX    = g++
AS     = c++
STRIP  = strip

PROG   = $(NAME)

DEFS += -DSNES4ALL_MAX_ROM_SIZE=0x600000
ifdef USE_GL
DEFS += -DUSE_GL
else
#DEFS += -DNORES256
endif

#DEFS += -DPLAYBACK_RATE=22050
DEFS += -DCPU_SHUTDOWN
DEFS += -DSPC700_SHUTDOWN 
DEFS += -DEXECUTE_SUPERFX_PER_LINE
DEFS += -DSPC700_C
DEFS += -DVAR_CYCLES
DEFS += -DSDD1_DECOMP
DEFS += -DUSE_NO_WAIT_WHEN_IRQ
DEFS += -DNO_INLINE_SET_GET
#DEFS += -DUSE_MEMORY_SPEED
#DEFS += -DUSE_BLOCK_RAM
#DEFS += -DENABLE_ECHO_SOUND
#DEFS += -DENABLE_MASTER_VOLUMEN
#DEFS += -DUSE_SOUND_DESYNC
#DEFS += -DENABLE_INTERPOLATE_SOUND
#DEFS += -DUSE_ALTDECODE=1
#DEFS += -DENABLE_FIX_FREQUENCY
#DEFS += -DUSE_MODE7_INTERPOLATE
DEFS += -DENABLE_GRAPHIC_WINDOWS
DEFS += -DENABLE_HDMA
#DEFS += -DUSE_HDMA_EVENT
DEFS += -DUSE_OLD_DSP1
#DEFS += -DNEW_COLOUR_BLENDING
#DEFS += -DOLD_COLOUR_BLENDING
#DEFS += -DSNES4ALL_NUM_CHANNELS=6
#DEFS += -DSNES4ALL_STEREO
#DEFS += -DDIRECT_COLOR_MAP
#DEFS += -DTEST_CACHETILE
#DEFS += -DTILES_INLINE
DEFS += -DUSE_RASTER_DIFF
DEFS += -DUSE_SETPPU_TABLE
DEFS += -DUSE_GETPPU_TABLE
#DEFS += -DUSE_VIDEOGL_SELECTIVE_CACHE_RESET=1
DEFS += -DUSE_VIDEOGL_SELECTIVE_CACHE_RESET=4
#DEFS += -DUSE_VIDEOGL_EXTEND_TILELIST
#DEFS += -DUSE_VGL_TABLE
#DEFS += -DUSE_VGL_LARGE_TABLE

#DEFS += -DNOSOUND

#DEFS += -DAUTOLOAD=\"example/Super\ Metroid.zip\"
#DEFS += -DAUTOLOAD=\"example/Aladdin.zip\"
#DEFS += -DAUTOLOAD=\"example/castlevania.zip\"
#DEFS += -DAUTOLOAD=\"example/smario.zip\"
#DEFS += -DAUTOLOAD=\"example/fzero.zip\"
#DEFS += -DAUTOLOAD=\"example/rrunner.zip\"
#DEFS += -DAUTOLOAD=\"example/supergoal.zip\"
#DEFS += -DAUTOLOAD=\"example/dkcountry.zip\"
#DEFS += -DAUTOLOAD=\"example/pacintime.zip\"
#DEFS += -DAUTOLOAD=\"example/starwars.zip\"
#DEFS += -DAUTOLOAD=\"example/jurassic.zip\"
#DEFS += -DAUTOLOAD=\"example/jimpower.zip\"
#DEFS += -DAUTOLOAD=\"example/turrican.zip\"
#DEFS += -DAUTOLOAD=\"example/sfighter.zip\"
#DEFS += -DAUTOLOAD=\"example/rtype.zip\"
#DEFS += -DAUTO_LOADSAVESTATE=\"castlevania.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"rtype.1ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"sfighter.2ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"jimpower.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"turrican.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"pacintime.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"jurassic.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"supergoal.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"smario.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"fzero.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"smario.1ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"prueba.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"rrunner.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"Aladdin.ssn\"
#DEFS += -DAUTO_LOADSAVESTATE=\"Super\ Metroid.1ssn\"
#DEFS += -DAUTO_EVENTS
#DEFS += -DMAX_AUTO_EVENTS=50
#DEFS += -DMAX_AUTO_EVENTS=500

#DEFS += -DPROFILER_SNES4ALL

#DEFS += -DDEBUG_FRAMESKIP
#DEFS += -DAUTO_DEBUG_FRAMESKIP=1000
#DEFS += -DDISPLAY_FRAMERATE

#DEFS += -DDEBUG_TILECACHE
#DEFS += -DAUTO_DEBUG_TILECACHE=2000

DEFS +=  -DLINUX -DUNIX

ifdef USE_CPUASM
DEFS += -DUSE_X86_ASM
endif

ifdef USE_MMX
DEFS += -DMMX
endif

ifdef USE_ZSNES_FX
DEFS += -DZSNES_FX
endif


DEFAULT_CFLAGS = `sdl-config --cflags`
LDFLAGS        = `sdl-config --libs` -lSDL_mixer -lz

ifdef USE_GL
LDFLAGS += -lGL
endif


MORE_CFLAGS = -O3 -DDATA_PREFIX=\"data/\" 

MORE_CFLAGS +=	-Isrc/include -Isrc/unzip -Isrc/menu -Isrc/i386 -DMITSHM \
		$(DEFS) -DUNZIP_SUPPORT  -DZLIB -DHAVE_MKSTEMP -DHAVE_STRINGS_H \
		-DHAVE_SYS_IOCTL_H '-DACCEPT_SIZE_T=int'

#MORE_CFLAGS += -DNOSOUND


CFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CPPFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)

OBJS =	\
	src/2xsai.o \
	src/apu.o \
	src/c4.o \
	src/cheats.o \
	src/cheats2.o \
	src/clip.o \
	src/cpu.o \
	src/data.o \
	src/dma.o \
	src/dsp1.o \
	src/gfx.o \
	src/globals.o \
	src/loadzip.o \
	src/memmap.o \
	src/netplay.o \
	src/obc1.o \
	src/ppu.o \
	src/sa1.o \
	src/screenshot.o \
	src/sdd1.o \
	src/sdd1emu.o \
	src/server.o \
	src/seta.o \
	src/seta010.o \
	src/seta011.o \
	src/seta018.o \
	src/snaporig.o \
	src/snapshot.o \
	src/soundux.o \
	src/spc700.o \
	src/spc7110.o \
	src/srtc.o \
	src/tile.o \
	src/sdl/config.o \
	src/sdl/machine.o \
	src/sdl/sdl.o \
	src/unzip/explode.o \
	src/unzip/unreduce.o \
	src/unzip/unshrink.o \
	src/unzip/unzip.o \
	src/menu/fade.o \
	src/menu/menu.o \
	src/menu/menu_main.o \
	src/menu/menu_save.o \
	src/menu/menu_load.o

ifdef USE_GL
OBJS += \
	src/sdl/videogl.o \
	src/tilegl.o
endif

ifdef USE_CPUASM
OBJS += \
	src/i386/cpuexec.o \
	src/i386/cpuops.o \
	src/i386/sa1ops.o \
	src/i386/spc.o
else
OBJS += \
	src/cpuexec.o \
	src/sa1cpu.o
endif

ifdef USE_MMX
OBJS += \
	src/i386/2xsaimmx.o \
	src/i386/bilinear.o
endif

ifdef USE_ZSNES_FX
OBJS += \
	src/i386/fxemu2.o \
	src/i386/fxemu2b.o \
	src/i386/fxemu2c.o \
	src/i386/fxtable.o \
	src/i386/sfxproc.o \
	src/i386/zsnes.o \
	src/i386/zsnesc4.o \
	src/i386/c4.o
else
OBJS += \
	src/cpuops.o \
	src/fxinst.o \
	src/c4emu.o \
	src/fxemu.o
endif


$(PROG): $(OBJS) 
	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
	$(STRIP) $(PROG)


run: $(PROG)
	./$(PROG)

clean:
	$(RM) $(PROG) $(OBJS)

src/i386/2xsaimmx.o: src/i386/2xsaimmx.asm
	nasm -f elf src/i386/2xsaimmx.asm $(DEFS)

src/i386/bilinear.o: src/i386/bilinear.asm
	nasm -f elf src/i386/bilinear.asm $(DEFS)

src/i386/c4.o: src/i386/c4.asm
	nasm -f elf src/i386/c4.asm $(DEFS)

src/i386/fxemu2.o: src/i386/fxemu2.asm
	nasm -f elf src/i386/fxemu2.asm $(DEFS)

src/i386/fxemu2b.o: src/i386/fxemu2b.asm
	nasm -f elf src/i386/fxemu2b.asm $(DEFS)

src/i386/fxemu2c.o: src/i386/fxemu2c.asm
	nasm -f elf src/i386/fxemu2c.asm $(DEFS)

src/i386/fxtable.o: src/i386/fxtable.asm
	nasm -f elf src/i386/fxtable.asm $(DEFS)

src/i386/sfxproc.o: src/i386/sfxproc.asm
	nasm -f elf src/i386/sfxproc.asm $(DEFS)

src/i386/spc.o: src/i386/spc.asm
	nasm -f elf src/i386/spc.asm $(DEFS)

src/i386/zsnes.o: src/i386/zsnes.asm
	nasm -f elf src/i386/zsnes.asm $(DEFS)

src/i386/zsnesc4.o: src/i386/zsnesc4.asm
	nasm -f elf src/i386/zsnesc4.asm $(DEFS)

Makefile.win32

0 → 100644
+237 −0
Original line number Diff line number Diff line
#USE_CPUASM=1
#USE_MMX=1
#USE_ZSNES_FX=1
USE_GL=1


NAME   = snes4all
O      = o
RM     = rm -f
CC     = gcc-3
CXX    = g++-3
AS     = c++-3
STRIP  = strip

PROG   = $(NAME)

DEFS += -DSNES4ALL_MAX_ROM_SIZE=0x600000 
ifdef USE_GL
DEFS += -DUSE_GL
else
#DEFS += -DNORES256
endif

DEFS += -DCPU_SHUTDOWN
DEFS += -DSPC700_SHUTDOWN 
DEFS += -DEXECUTE_SUPERFX_PER_LINE
DEFS += -DSPC700_C
DEFS += -DVAR_CYCLES
DEFS += -DSDD1_DECOMP
DEFS += -DUSE_NO_WAIT_WHEN_IRQ
DEFS += -DUSE_OLD_DSP1
#DEFS += -DNO_INLINE_SET_GET
#DEFS += -DENABLE_ECHO_SOUND
#DEFS += -DENABLE_MASTER_VOLUMEN
#DEFS += -DUSE_SOUND_DESYNC
#DEFS += -DENABLE_INTERPOLATE_SOUND
#DEFS += -DUSE_ALTDECODE=1
#DEFS += -DENABLE_FIX_FREQUENCY
#DEFS += -DUSE_MODE7_INTERPOLATE
DEFS += -DENABLE_GRAPHIC_WINDOWS
DEFS += -DENABLE_HDMA
#DEFS += -DUSE_HDMA_EVENT
#DEFS += -DNEW_COLOUR_BLENDING
#DEFS += -DOLD_COLOUR_BLENDING
#DEFS += -DSNES4ALL_NUM_CHANNELS=6
#DEFS += -DSNES4ALL_STEREO
#DEFS += -DDIRECT_COLOR_MAP
#DEFS += -DTEST_CACHETILE
#DEFS += -DTILES_INLINE
DEFS += -DUSE_RASTER_DIFF
DEFS += -DUSE_GETPPU_TABLE


#DEFS += -DNOSOUND

#DEFS += -DAUTOLOAD=\"example/smario.smc\"
#DEFS += -DAUTO_EVENTS
#DEFS += -DMAX_AUTO_EVENTS=1000

#DEFS += -DPROFILER_SNES4ALL

#DEFS += -DDEBUG_FRAMESKIP
#DEFS += -DAUTO_DEBUG_FRAMESKIP=1000
#DEFS += -DDISPLAY_FRAMERATE

#DEFS += -DDEBUG_TILECACHE
#DEFS += -DAUTO_DEBUG_TILECACHE=2000

DEFS +=  -D__DJGPP__ -D__DJGCC -D_WINDOWS

ifdef USE_CPUASM
DEFS += -DUSE_X86_ASM -DUSE_OPC_ASM
endif

ifdef USE_MMX
DEFS += -DMMX
endif

ifdef USE_ZSNES_FX
DEFS += -DZSNES_FX
endif


DEFAULT_CFLAGS = `sdl-config --cflags`
LDFLAGS        = `sdl-config --libs` -lSDL_mixer -lz

MORE_CFLAGS = -O3 -DDATA_PREFIX=\"data/\"  -U__WIN32__

MORE_CFLAGS +=	-Isrc/include -Isrc/unzip -Isrc/menu -Isrc/i386 -DMITSHM \
		$(DEFS) -DUNZIP_SUPPORT -DZLIB -DHAVE_MKSTEMP -DHAVE_STRINGS_H \
		'-DACCEPT_SIZE_T=int'



CFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CPPFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)

OBJS =	\
	src/2xsai.o \
	src/memmap.o \
	src/apu.o \
	src/c4.o \
	src/cheats.o \
	src/cheats2.o \
	src/clip.o \
	src/cpu.o \
	src/data.o \
	src/dma.o \
	src/dsp1.o \
	src/gfx.o \
	src/globals.o \
	src/loadzip.o \
	src/netplay.o \
	src/obc1.o \
	src/ppu.o \
	src/sa1.o \
	src/screenshot.o \
	src/sdd1.o \
	src/sdd1emu.o \
	src/server.o \
	src/seta.o \
	src/seta010.o \
	src/seta011.o \
	src/seta018.o \
	src/snaporig.o \
	src/snapshot.o \
	src/soundux.o \
	src/spc700.o \
	src/spc7110.o \
	src/srtc.o \
	src/tile.o \
	src/sdl/config.o \
	src/sdl/machine.o \
	src/sdl/sdl.o \
	src/unzip/explode.o \
	src/unzip/unreduce.o \
	src/unzip/unshrink.o \
	src/unzip/unzip.o \
	src/menu/fade.o \
	src/menu/menu.o \
	src/menu/menu_main.o \
	src/menu/menu_save.o \
	src/menu/menu_load.o

ifdef USE_GL
OBJS += \
	src/sdl/videogl.o \
	src/tilegl.o
endif

ifdef USE_CPUASM
OBJS += \
	src/i386/cpuexec.o \
	src/i386/cpuops.o \
	src/i386/sa1ops.o \
	src/i386/spc.o 
else
OBJS += \
	src/cpuexec.o \
	src/sa1cpu.o
endif

ifdef USE_MMX
OBJS += \
	src/i386/2xsaimmx.o \
	src/i386/bilinear.o
endif

ifdef USE_ZSNES_FX
OBJS += \
	src/i386/fxemu2.o \
	src/i386/fxemu2b.o \
	src/i386/fxemu2c.o \
	src/i386/fxtable.o \
	src/i386/sfxproc.o \
	src/i386/zsnes.o \
	src/i386/zsnesc4.o \
	src/i386/c4.o 
else
OBJS += \
	src/cpuops.o \
	src/fxinst.o \
	src/c4emu.o \
	src/fxemu.o
endif


all: $(PROG)

run: $(PROG)
	./$(PROG)

clean:
	$(RM) $(PROG).exe $(OBJS) stdout.txt stderr.txt

src/i386/2xsaimmx.o: src/i386/2xsaimmx.asm
	nasm -f gnuwin32 src/i386/2xsaimmx.asm $(DEFS) 

src/i386/bilinear.o: src/i386/bilinear.asm
	nasm -f gnuwin32 src/i386/bilinear.asm $(DEFS)

src/i386/c4.o: src/i386/c4.asm
	nasm -f gnuwin32 src/i386/c4.asm $(DEFS)

src/i386/fxemu2.o: src/i386/fxemu2.asm
	nasm -f gnuwin32 src/i386/fxemu2.asm $(DEFS)

src/i386/fxemu2b.o: src/i386/fxemu2b.asm
	nasm -f gnuwin32 src/i386/fxemu2b.asm $(DEFS)

src/i386/fxemu2c.o: src/i386/fxemu2c.asm
	nasm -f gnuwin32 src/i386/fxemu2c.asm $(DEFS)

src/i386/fxtable.o: src/i386/fxtable.asm
	nasm -f gnuwin32 src/i386/fxtable.asm $(DEFS)

src/i386/sfxproc.o: src/i386/sfxproc.asm
	nasm -f gnuwin32 src/i386/sfxproc.asm $(DEFS)

src/i386/spc.o: src/i386/spc.asm
	nasm -f gnuwin32 src/i386/spc.asm $(DEFS)

src/i386/zsnes.o: src/i386/zsnes.asm
	nasm -f gnuwin32 src/i386/zsnes.asm $(DEFS)

src/i386/zsnesc4.o: src/i386/zsnesc4.asm
	nasm -f gnuwin32 src/i386/zsnesc4.asm $(DEFS)


$(PROG): $(OBJS)
ifdef USE_GL
	$(CC) -L/usr/lib/mingw -L/usr/local/lib  -L/usr/lib/w32api/ -L/usr/X11R6/lib -lglu32 -lopengl32 -o $(PROG) -lmingw32 $(OBJS)  -lglu32  -lopengl32 -lSDL_static_1212 -lGL -lpthread -mwindows -mno-cygwin -luser32 -lgdi32 -lwinmm -ldxguid
else
	$(CC) -L/usr/lib/mingw -L/usr/local/lib -o $(PROG) -lmingw32 $(OBJS) -lz -lSDL_static_129 -mwindows -mno-cygwin -luser32 -lgdi32 -lwinmm -ldxguid
endif
	$(STRIP) $(PROG).exe

README.md

deleted100644 → 0
+0 −92
Original line number Diff line number Diff line
# snes4all



## Getting started

To make it easy for you to get started with GitLab, here's a list of recommended next steps.

Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!

## Add your files

- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:

```
cd existing_repo
git remote add origin https://gitlab.completext.com/Dreamcast/snes4all.git
git branch -M main
git push -uf origin main
```

## Integrate with your tools

- [ ] [Set up project integrations](https://gitlab.completext.com/Dreamcast/snes4all/-/settings/integrations)

## Collaborate with your team

- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)

## Test and Deploy

Use the built-in continuous integration in GitLab.

- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)

***

# Editing this README

When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.

## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.

## Name
Choose a self-explaining name for your project.

## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.

## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.

## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.

## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.

## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.

## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.

## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.

## Contributing
State if you are open to contributions and what your requirements are for accepting them.

For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.

## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.

## License
For open source projects, say how it is licensed.

## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

data/background.bmp

0 → 100644
+4.8 KiB
Loading image diff...
Loading