From 5bdb89900dfda2167d0765495f35f41b4310988e Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Sat, 31 Mar 2018 19:23:46 -0700 Subject: [PATCH] Test now compiling, but with icon errors --- hwTestSuite/Makefile | 45 --------------------- hwTestSuite/{testSuite.rcp => TstSuite.rcp} | 0 hwTestSuite/make.sh | 27 +++++++++++++ hwTestSuite/testSuite.c | 12 +++--- hwTestSuite/ugui.h | 1 - hwTestSuite/ugui_config.h | 4 +- 6 files changed, 36 insertions(+), 53 deletions(-) delete mode 100644 hwTestSuite/Makefile rename hwTestSuite/{testSuite.rcp => TstSuite.rcp} (100%) create mode 100755 hwTestSuite/make.sh diff --git a/hwTestSuite/Makefile b/hwTestSuite/Makefile deleted file mode 100644 index e3ec9a5..0000000 --- a/hwTestSuite/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -APPNAME = TstSuite -ICONTEXT = "HWTests" -APPID = TstS - -SRCS = testSuite.c ugui.c - -CC = m68k-palmos-gcc -palmos3.5 -BUILDPRC = build-prc -PILRC = pilrc -OBJRES = m68k-palmos-obj-res - -# File names -RESFILE = $(APPNAME).rcp -PRC = ../$(APPNAME).prc -OBJS = $(SRCS:.c=.o) - -# Compile options -DEFINES = -DHW_TEST -CSFLAGS = -O2 -S $(DEFINES) $(INCLUDES) -CFLAGS = -O2 -g $(DEFINES) $(INCLUDES) - -# Makefile targets - -.S.o: - $(CC) $(TARGETFLAGS) -c $< - -.c.s: - $(CC) $(CSFLAGS) $< - -$(PRC): code.stamp bin.stamp - $(BUILDPRC) $@ $(ICONTEXT) $(APPID) *.grc *.bin - -code.stamp: $(APPNAME) - $(OBJRES) $(APPNAME) - touch code.stamp - -bin.stamp: $(RESFILE) - $(PILRC) $(RESFILE) - touch bin.stamp - -$(APPNAME): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@ - -clean:: - rm -rf *.[oa] $(APPNAME) *.bin *.stamp *.grc *~ \ No newline at end of file diff --git a/hwTestSuite/testSuite.rcp b/hwTestSuite/TstSuite.rcp similarity index 100% rename from hwTestSuite/testSuite.rcp rename to hwTestSuite/TstSuite.rcp diff --git a/hwTestSuite/make.sh b/hwTestSuite/make.sh new file mode 100755 index 0000000..9e43879 --- /dev/null +++ b/hwTestSuite/make.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +cd $DIR + +APPNAME="TstSuite" +ICONTEXT="HWTests" +APPID="TstS" +CREATORID="guiC" +RESFILE=$APPNAME.rcp +PRC=$APPNAME.prc + +SRCS="testSuite.c ugui.c" +DEFINES="-DHW_TEST" +CSFLAGS="-O2 -S $DEFINES $INCLUDES" +CFLAGS="-O2 -g $DEFINES $INCLUDES" + +if [ "$1" = "clean" ]; then + rm -rf *.o *.a $APPNAME $PRC *.bin *.grc + exit +fi + +m68k-palmos-gcc -palmos3.5 $CFLAGS $SRCS -o $APPNAME +m68k-palmos-obj-res $APPNAME +pilrc $RESFILE +build-prc $PRC $APPID $CREATORID *.grc *.bin diff --git a/hwTestSuite/testSuite.c b/hwTestSuite/testSuite.c index 01b2175..3cf4df9 100644 --- a/hwTestSuite/testSuite.c +++ b/hwTestSuite/testSuite.c @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include "ugui.h" /* register for direct video hardware access on OS 3.1 */ #define LSSA *(( void **)0xFFFFFA00) @@ -91,7 +91,7 @@ void testerExit(){ LLBAR = oldLlbar; } -Bool testerFrameLoop(){ +Boolean testerFrameLoop(){ uint16_t buttons = KeyCurrentState(); if(buttons & keyBitHard3){ @@ -105,12 +105,12 @@ Bool testerFrameLoop(){ } DWord PilotMain(Word cmd, Ptr cmdBPB, Word launchFlags){ - Bool running = true; - testerInit() + Boolean running = true; + testerInit(); while(running){ running = testerFrameLoop(); - usleep(333333);//30 fps + SysTaskDelay(4);//30 fps } testerExit(); diff --git a/hwTestSuite/ugui.h b/hwTestSuite/ugui.h index 628eaec..2746508 100755 --- a/hwTestSuite/ugui.h +++ b/hwTestSuite/ugui.h @@ -17,7 +17,6 @@ #ifndef __UGUI_H #define __UGUI_H -#include "system.h" #include "ugui_config.h" diff --git a/hwTestSuite/ugui_config.h b/hwTestSuite/ugui_config.h index 6ca0bfd..8057461 100755 --- a/hwTestSuite/ugui_config.h +++ b/hwTestSuite/ugui_config.h @@ -1,5 +1,7 @@ #ifndef __UGUI_CONFIG_H -#define __UGUI_CONFIG_H +#define __UGUI_CONFIG_H + +#include /* -------------------------------------------------------------------------------- */ /* -- CONFIG SECTION -- */