Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LCD grid filter #6

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*.bak
[Tt]humbs.db
log
source/opendingux/tools/generate_cc_lut
10 changes: 8 additions & 2 deletions source/opendingux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)
OBJS := main.o draw.o port.o port-asm.o od-input.o ../video.o \
../input.o ../bios.o ../zip.o ../sound.o ../mips/stub.o \
../stats.o ../memory.o ../cpu_common.o ../cpu_asm.o od-sound.o \
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o \
cc_lut.o

HEADERS := cheats.h ../common.h ../cpu_common.h ../cpu.h draw.h main.h \
../input.h ../memory.h message.h ../mips/emit.h ../sound.h \
../stats.h ../video.h ../zip.h port.h od-sound.h ../sha1.h \
imageio.h ../unifont.h od-input.h settings.h
imageio.h ../unifont.h od-input.h settings.h cc_lut.h

INCLUDE := -I. -I.. -I../mips
OPTIMIZE = -O2 -mno-mips16 -fomit-frame-pointer -fno-builtin \
Expand All @@ -27,12 +28,17 @@ DEFS := -DGCW_ZERO -DMIPS_XBURST \
-DSCREEN_WIDTH=320 -DSCREEN_HEIGHT=240 \
-DGIT_VERSION=$(shell git describe --always)

ifdef PLAYGO
DEFS += -DPLAYGO
DEFS += -DUSE_MMAP
else
ifdef RG350
DEFS += -DRG350
DEFS += -DUSE_MMAP
else
DEFS += -DLOAD_ALL_ROM
endif
endif
HAS_MIPS32R2 := $(shell echo | $(CC) -dM -E - |grep _MIPS_ARCH_MIPS32R2)
ifneq ($(HAS_MIPS32R2),)
DEFS += -DMIPS_32R2
Expand Down
5 changes: 3 additions & 2 deletions source/opendingux/Makefile.dingoo
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)
OBJS := main.o draw.o port.o port-asm.o od-input.o ../video.o \
../input.o ../bios.o ../zip.o ../sound.o ../mips/stub.o \
../stats.o ../memory.o ../cpu_common.o ../cpu_asm.o od-sound.o \
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o \
cc_lut.o

HEADERS := cheats.h ../common.h ../cpu_common.h ../cpu.h draw.h main.h \
../input.h ../memory.h message.h ../mips/emit.h ../sound.h \
../stats.h ../video.h ../zip.h port.h od-sound.h ../sha1.h \
imageio.h ../unifont.h od-sound.h od-input.h settings.h
imageio.h ../unifont.h od-sound.h od-input.h settings.h cc_lut.h

INCLUDE := -I. -I.. -I../mips
DEFS := -DDINGOO_A320 -DMIPS_XBURST -DUSE_MMAP \
Expand Down
81 changes: 81 additions & 0 deletions source/opendingux/Makefile.rg350
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
RG350=1

TARGET := regba

TOOLCHAIN_DIR := /opt/gcw0-toolchain/usr/bin
CROSS_COMPILE ?= $(TOOLCHAIN_DIR)/mipsel-linux-
CC := $(CROSS_COMPILE)gcc
STRIP := $(CROSS_COMPILE)strip

SYSROOT := $(shell $(CC) --print-sysroot)
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)

OBJS := main.o draw.o port.o port-asm.o od-input.o ../video.o \
../input.o ../bios.o ../zip.o ../sound.o ../mips/stub.o \
../stats.o ../memory.o ../cpu_common.o ../cpu_asm.o od-sound.o \
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o \
cc_lut.o

HEADERS := cheats.h ../common.h ../cpu_common.h ../cpu.h draw.h main.h \
../input.h ../memory.h message.h ../mips/emit.h ../sound.h \
../stats.h ../video.h ../zip.h port.h od-sound.h ../sha1.h \
imageio.h ../unifont.h od-input.h settings.h cc_lut.h

INCLUDE := -I. -I.. -I../mips
OPTIMIZE = -O2 -mno-mips16 -fomit-frame-pointer -fno-builtin \
-fno-common -Wno-write-strings -Wno-sign-compare -ffast-math -ftree-vectorize \
-funswitch-loops -fno-strict-aliasing

DEFS := -DGCW_ZERO -DMIPS_XBURST \
-DSCREEN_WIDTH=320 -DSCREEN_HEIGHT=240 \
-DGIT_VERSION=$(shell git describe --always)

ifdef RG350
DEFS += -DRG350
DEFS += -DUSE_MMAP
else
DEFS += -DLOAD_ALL_ROM
endif
HAS_MIPS32R2 := $(shell echo | $(CC) -dM -E - |grep _MIPS_ARCH_MIPS32R2)
ifneq ($(HAS_MIPS32R2),)
DEFS += -DMIPS_32R2
OPTIMIZE += -mips32r2
else
OPTIMIZE += -mips32 -march=mips32
endif

CFLAGS := $(SDL_CFLAGS) -mno-abicalls -Wall -Wno-unused-variable \
-fomit-frame-pointer $(DEFS) $(INCLUDE) $(OPTIMIZE)
ASFLAGS := $(CFLAGS) -D__ASSEMBLY__
LDFLAGS := $(SDL_LIBS) -lpthread -lz -lm -lpng -s

DATA_TO_CLEAN := .opk_data $(TARGET).opk

include ../Makefile.rules

.PHONY: all opk

all: $(TARGET)

opk: $(TARGET).opk

$(TARGET).opk: $(TARGET)
$(SUM) " OPK $@"
$(CMD)rm -rf .opk_data
$(CMD)cp -r data .opk_data
$(CMD)cp ../../game_config.txt .opk_data
$(CMD)cp ../../bios/gba_bios.bin .opk_data
$(CMD)cp $< .opk_data/regba
$(CMD)$(STRIP) .opk_data/regba
$(CMD)$(TOOLCHAIN_DIR)/mksquashfs .opk_data $@ -all-root -noappend -no-exports -no-xattrs -no-progress >/dev/null

# The two below declarations ensure that editing a .c file recompiles only that
# file, but editing a .h file recompiles everything.
# Courtesy of Maarten ter Huurne.

# Each object file depends on its corresponding source file.
$(C_OBJS): %.o: %.c

# Object files all depend on all the headers.
$(OBJS): $(HEADERS)
5 changes: 3 additions & 2 deletions source/opendingux/Makefile.rs90
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)
OBJS := main.o draw.o port.o port-asm.o od-input.o ../video.o \
../input.o ../bios.o ../zip.o ../sound.o ../mips/stub.o \
../stats.o ../memory.o ../cpu_common.o ../cpu_asm.o od-sound.o \
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o
../sha1.o imageio.o ../unifont.o gui.o od-memory.o settings.o \
cc_lut.o

HEADERS := cheats.h ../common.h ../cpu_common.h ../cpu.h draw.h main.h \
../input.h ../memory.h message.h ../mips/emit.h ../sound.h \
../stats.h ../video.h ../zip.h port.h od-sound.h ../sha1.h \
imageio.h ../unifont.h od-input.h settings.h
imageio.h ../unifont.h od-input.h settings.h cc_lut.h

INCLUDE := -I. -I.. -I../mips
DEFS := -DRS90 -DMIPS_XBURST -DUSE_MMAP \
Expand Down
Loading