aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/n64
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/n64')
-rw-r--r--backends/platform/n64/Makefile8
-rw-r--r--backends/platform/n64/README.N646
-rw-r--r--backends/platform/n64/module.mk2
-rw-r--r--backends/platform/n64/n64.mk29
-rw-r--r--backends/platform/n64/osys_n64_base.cpp4
-rw-r--r--backends/platform/n64/pad_rom.sh6
6 files changed, 42 insertions, 13 deletions
diff --git a/backends/platform/n64/Makefile b/backends/platform/n64/Makefile
index b8b2e61f77..cffe277312 100644
--- a/backends/platform/n64/Makefile
+++ b/backends/platform/n64/Makefile
@@ -15,7 +15,7 @@ AR = $(GCCN64PREFIX)ar cru
RANLIB = $(GCCN64PREFIX)ranlib
DEFINES += -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DENABLE_VKEYBD -DUSE_ZLIB
-LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
+LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
#DEFINES += -D_ENABLE_DEBUG_
@@ -31,7 +31,7 @@ DEFINES += -DUSE_VORBIS -DUSE_TREMOR
LIBS += -lvorbisidec
endif
-LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
+LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
CXXFLAGS = -g -mno-extern-sdata -O2 --param max-inline-insns-auto=20 -fomit-frame-pointer -march=vr4300 -mtune=vr4300 -mhard-float -fno-rtti -fno-exceptions -Wno-multichar -Wshadow -I$(LIBN64PATH) -I$(TOOLPATH)/include -I./ -I$(srcdir) -I$(srcdir)/engines
LDFLAGS = -g -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0 -L$(LIBN64PATH) -L$(TOOLPATH)/lib $(LIBS) -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map
@@ -49,7 +49,7 @@ USE_RGB_COLOR=0
ENABLED=STATIC_PLUGIN
-ENABLE_SCUMM = $(ENABLED)
+#ENABLE_SCUMM = $(ENABLED)
#ENABLE_SCI = $(ENABLED)
#ENABLE_GOB = $(ENABLED)
#ENABLE_PARALLACTION = $(ENABLED)
@@ -74,7 +74,7 @@ all: $(TARGET).v64
$(TARGET).v64: $(TARGET).bin ROMFS.img bootcode
cat bootcode $(TARGET).bin ROMFS.img > $(TARGET).v64
- ./pad_rom.sh
+ ./pad_rom.sh $(TARGET).v64
ROMFS.img:
genromfs -f ./ROMFS.img -d ./ROMFS -V romtest
diff --git a/backends/platform/n64/README.N64 b/backends/platform/n64/README.N64
index c6ae6f021e..b47b239658 100644
--- a/backends/platform/n64/README.N64
+++ b/backends/platform/n64/README.N64
@@ -97,15 +97,15 @@ A - '.' / Skip dialogues in some games
C buttons - Numeric keypad keys
* Using a N64 Mouse:
-Used like a normal PC mouse.
+Used like a normal PC mouse.
Notes
=====
-- If virtual keyboard doesn't show up, you need to make sure you included
+- If virtual keyboard doesn't show up, you need to make sure you included
'vkeybd_default.zip' in the root of your romfs image.
-- In some games (mostly gob) cursor movement might be choppy, it's a known
+- In some games (mostly gob) cursor movement might be choppy, it's a known
problem and related on how N64 port manages screen updates.
diff --git a/backends/platform/n64/module.mk b/backends/platform/n64/module.mk
index 429b63802e..c8ceb32701 100644
--- a/backends/platform/n64/module.mk
+++ b/backends/platform/n64/module.mk
@@ -6,7 +6,7 @@ MODULE_OBJS := \
osys_n64_events.o \
osys_n64_utilities.o \
pakfs_save_manager.o \
- framfs_save_manager.o
+ framfs_save_manager.o
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
diff --git a/backends/platform/n64/n64.mk b/backends/platform/n64/n64.mk
new file mode 100644
index 0000000000..2e383e670d
--- /dev/null
+++ b/backends/platform/n64/n64.mk
@@ -0,0 +1,29 @@
+N64_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
+
+bundle_name = n64-dist/scummvm
+BASESIZE = 2097152
+
+all: $(N64_EXE_STRIPPED)
+
+$(N64_EXE_STRIPPED): $(EXECUTABLE)
+ $(STRIP) $< -o $@
+
+n64-distclean:
+ rm -rf $(bundle_name)
+ rm $(N64_EXE_STRIPPED)
+
+n64-dist: all
+ $(MKDIR) $(bundle_name)
+ $(MKDIR) $(bundle_name)/romfs
+ifdef DIST_FILES_ENGINEDATA
+ $(CP) $(DIST_FILES_ENGINEDATA) $(bundle_name)/romfs
+endif
+ $(CP) $(DIST_FILES_DOCS) $(bundle_name)/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/romfs
+ genromfs -f $(bundle_name)/romfs.img -d $(bundle_name)/romfs -V scummvmn64
+ mips64-objcopy $(EXECUTABLE) $(bundle_name)/scummvm.elf -O binary
+ cat $(N64SDK)/hkz-libn64/bootcode $(bundle_name)/scummvm.elf $(bundle_name)/romfs.img > scummvm.v64
+ $(srcdir)/backends/platform/n64/pad_rom.sh scummvm.v64
+ rm scummvm.bak
+ mv scummvm.v64 $(bundle_name)/scummvm.v64
+
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 06ff38e586..8862693138 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -859,7 +859,7 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
// No RTC inside the N64, read mips timer to simulate
// passing of time, not a perfect solution, but can't think
// of anything better.
-
+
uint32 now = getMilliTick();
t.tm_sec = (now / 1000) % 60;
@@ -867,7 +867,7 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
t.tm_hour = (((now / 1000) / 60) / 60) % 24;
t.tm_mday = 1;
t.tm_mon = 0;
- t.tm_year = 1900;
+ t.tm_year = 110;
return;
}
diff --git a/backends/platform/n64/pad_rom.sh b/backends/platform/n64/pad_rom.sh
index 0660f6c204..085203306f 100644
--- a/backends/platform/n64/pad_rom.sh
+++ b/backends/platform/n64/pad_rom.sh
@@ -1,13 +1,13 @@
#!/bin/bash
-TARGET="scummvm"
+TARGET=$1
BASESIZE=2097152
-CARTSIZE=`ls -l $TARGET.v64 | cut -d" " -f5`
+CARTSIZE=`ls -l $1 | cut -d" " -f5`
REMAINDER=`echo $CARTSIZE % $BASESIZE | bc`
REMAINDER=`echo $BASESIZE - $REMAINDER | bc`
CARTSIZE=`echo $CARTSIZE + $REMAINDER | bc`
-ucon64 -q --n64 --v64 --chk --padn=$CARTSIZE $TARGET.v64
+ucon64 -q --n64 --v64 --chk --padn=$CARTSIZE $1