diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-06-12 20:10:00 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-06-12 20:10:00 +0200 |
| commit | 5f85c4b279aded17bf6e689d27d04426d5ed760b (patch) | |
| tree | ff678a51919e788614ba55148663f099c2613123 | |
| download | fx-snake-5f85c4b279aded17bf6e689d27d04426d5ed760b.tar.gz fx-snake-5f85c4b279aded17bf6e689d27d04426d5ed760b.zip | |
| -rw-r--r-- | AddinInfo.txt | 12 | ||||
| -rw-r--r-- | Debug/Addin.mak | 101 | ||||
| -rw-r--r-- | Debug/FXADDINror.abs | bin | 0 -> 10484 bytes | |||
| -rw-r--r-- | Debug/FXADDINror.dbg | bin | 0 -> 9936 bytes | |||
| -rw-r--r-- | Debug/FXADDINror.fsy | 93 | ||||
| -rw-r--r-- | Debug/FXADDINror.map | 393 | ||||
| -rw-r--r-- | Debug/Snake.lst | 71 | ||||
| -rw-r--r-- | FXSH_Build.bat | 22 | ||||
| -rw-r--r-- | INIT/CasioRAM.mem | bin | 0 -> 48532 bytes | |||
| -rw-r--r-- | INIT/CasioRAMCPU.mem | bin | 0 -> 80 bytes | |||
| -rw-r--r-- | MainIcon.bmp | bin | 0 -> 138 bytes | |||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | Snake.c | 246 | ||||
| -rw-r--r-- | Snake.dlr | 412 | ||||
| -rw-r--r-- | Snake.dlw | 125 | ||||
| -rw-r--r-- | Snake.g1w | 15 | ||||
| -rw-r--r-- | eActivityIcon.bmp | bin | 0 -> 106 bytes |
17 files changed, 1491 insertions, 0 deletions
diff --git a/AddinInfo.txt b/AddinInfo.txt new file mode 100644 index 0000000..4e33f12 --- /dev/null +++ b/AddinInfo.txt @@ -0,0 +1,12 @@ +//------------------------------------------------------------------ +// Addin-Application header control file, created with the CASIO SDK +//------------------------------------------------------------------ +[OUTPUT] : "SNAKE.G1A" +[BINDATA] : "FXADDINror.bin" +[DISPNAME] : "Snake" +[APPNAME] : "@SNAKE" +[VERSION] : "01.00.0000" +[APL_ICON] : "MainIcon.bmp" +[MODULE_NUM] : 0 +[MOD1_TITLE] : "Snake" +[MOD1_ICON] : "eActivityIcon.bmp" diff --git a/Debug/Addin.mak b/Debug/Addin.mak new file mode 100644 index 0000000..33dbd92 --- /dev/null +++ b/Debug/Addin.mak @@ -0,0 +1,101 @@ +################################################ +# Make file for CASIO fx-9860G SDK Addin +# +############################ +# Directory defines +TCDIR = G:\Casio SDK\OS\SH +OSDIR = G:\Casio SDK\OS +APPDIR = G:\Casio SDK\Projekte\Snake +OUTDIR = G:\Casio SDK\Projekte\Snake\Debug + +################ +# Main Defines +SH_EXEDIR=$(TCDIR)\bin + +# Hitachi SH C/C++ Compiler02 phase +SHCC02_EXE=shc.exe +SHCC02_DEP="$(OSDIR)\FX\include\fxlib.h" + +# Hitachi SH Assembler03 phase +SHASM03_EXE=asmsh.exe + +# Hitachi OptLinker04 phase +SHLINK04_EXE=Optlnk.exe +SHLINK04_DEP="$(OSDIR)\FX\lib\fx9860G_library.lib" +SHLINK04_DEP2="$(OSDIR)\FX\lib\setup.obj" +EPSILON="$(OSDIR)\FX\lib\revolution.lib" +####################### +# Files to build +FILE0=Snake +FILESRC0="$(APPDIR)\$(FILE0).c" +FILEOBJ0="$(OUTDIR)\$(FILE0).obj" +RFILE=FXADDINror +USERALLOBJ=$(FILEOBJ0) + +####################### +# nmake "all" statement + +ALL: SH_ENV \ + $(USERALLOBJ) \ + $(OUTDIR)\$(RFILE).bin \ + +#################### +# Description blocks + +!MESSAGE %3#C$z`&'0? +!MESSAGE +!MESSAGE Executing Hitachi SH C/C++ Compiler/Assembler phase +!MESSAGE + +SH_ENV : + set SHC_INC=$(TCDIR)\include + set PATH=$(TCDIR)\bin + set SHC_LIB=$(TCDIR)\bin + set SHC_TMP=$(OUTDIR) + +$(FILEOBJ0) : $(FILESRC0) $(SHCC02_DEP) + "$(SH_EXEDIR)\$(SHCC02_EXE)" -subcommand=<< +-cpu=sh3 +-include="$(OSDIR)\FX\include","$(APPDIR)" +-objectfile=$(FILEOBJ0) +-show=source +-listfile="$(OUTDIR)\$(FILE0).lst" +-size +-noinline +-chgincpath +-errorpath +$(FILESRC0) +-lang=c +-nologo +-debug +<< + +!MESSAGE +!MESSAGE Executing Hitachi OptLinker04 phase +!MESSAGE + +"$(OUTDIR)\$(RFILE).bin" : $(USERALLOBJ) $(SHLINK04_DEP2) $(SHLINK04_DEP) + "$(SH_EXEDIR)\$(SHLINK04_EXE)" -subcommand=<< +noprelink +sdebug +rom D=R +nomessage +list "$(OUTDIR)\$(RFILE).map" +show symbol +nooptimize +start P_TOP,P,C,D,C$VTBL,C$INIT/0300200,B_BR_Size,B,R/08100000 +fsymbol P +nologo +input $(USERALLOBJ) +input $(SHLINK04_DEP2) +library $(SHLINK04_DEP) +library $(EPSILON) +output "$(OUTDIR)\$(RFILE).abs" +-nomessage=1100 +end +input "$(OUTDIR)\$(RFILE).abs" +form binary +output "$(OUTDIR)\$(RFILE).bin" +exit +<< + diff --git a/Debug/FXADDINror.abs b/Debug/FXADDINror.abs Binary files differnew file mode 100644 index 0000000..2e13e6e --- /dev/null +++ b/Debug/FXADDINror.abs diff --git a/Debug/FXADDINror.dbg b/Debug/FXADDINror.dbg Binary files differnew file mode 100644 index 0000000..64a4f6e --- /dev/null +++ b/Debug/FXADDINror.dbg diff --git a/Debug/FXADDINror.fsy b/Debug/FXADDINror.fsy new file mode 100644 index 0000000..538c1f8 --- /dev/null +++ b/Debug/FXADDINror.fsy @@ -0,0 +1,93 @@ +;HITACHI OPTIMIZING LINKAGE EDITOR GENERATED FILE 2012.08.06
+;fsymbol = P
+
+;SECTION NAME = P
+ .export _PRGM_GetKey
+_PRGM_GetKey: .equ h'0030020c
+ .export _rand
+_rand: .equ h'0030023e
+ .export _AddIn_main
+_AddIn_main: .equ h'00300258
+ .export ___LINK_PROTECT
+___LINK_PROTECT: .equ h'003007f0
+ .export _SetQuitHandler
+_SetQuitHandler: .equ h'003007f4
+ .export _OnAppCloseDefault
+_OnAppCloseDefault: .equ h'003007fa
+ .export __INITSCT_ADDIN
+__INITSCT_ADDIN: .equ h'0030084e
+ .export _INIT_ADDIN_APPLICATION
+_INIT_ADDIN_APPLICATION: .equ h'00300896
+ .export __modlu
+__modlu: .equ h'0030090c
+ .export _Bdel_cychdr
+_Bdel_cychdr: .equ h'003009c4
+ .export _Bdisp_AllClr_DDVRAM
+_Bdisp_AllClr_DDVRAM: .equ h'003009d4
+ .export _Bdisp_ClearLineVRAM
+_Bdisp_ClearLineVRAM: .equ h'003009e4
+ .export _Bdisp_PutDisp_DD
+_Bdisp_PutDisp_DD: .equ h'003009f4
+ .export _Bdisp_DrawLineVRAM
+_Bdisp_DrawLineVRAM: .equ h'00300a04
+ .export _BfileFLS_CloseFile
+_BfileFLS_CloseFile: .equ h'00300a14
+ .export _Bkey_Set_RepeatTime_Default
+_Bkey_Set_RepeatTime_Default: .equ h'00300a24
+ .export _CallbackAtQuitMainFunction
+_CallbackAtQuitMainFunction: .equ h'00300a34
+ .export _flsFindClose
+_flsFindClose: .equ h'00300a44
+ .export _GLibAddinAplExecutionCheck
+_GLibAddinAplExecutionCheck: .equ h'00300a54
+ .export _Hmem_SetMMU
+_Hmem_SetMMU: .equ h'00300a64
+ .export _Print
+_Print: .equ h'00300a74
+ .export _PrintMini
+_PrintMini: .equ h'00300a84
+ .export _locate
+_locate: .equ h'00300aa0
+ .export _Bdisp_ReadArea_DD
+_Bdisp_ReadArea_DD: .equ h'00300ac8
+ .export _GetSDKLibraryVersion
+_GetSDKLibraryVersion: .equ h'00300bfc
+ .export _SetTimer
+_SetTimer: .equ h'00300c02
+ .export _KillTimer
+_KillTimer: .equ h'00300c56
+ .export _Sleep
+_Sleep: .equ h'00300c9a
+ .export _DrawAll
+_DrawAll: .equ h'00300d30
+ .export _Change_Contrast
+_Change_Contrast: .equ h'00300d88
+ .export _FastKeyDown
+_FastKeyDown: .equ h'00300dd4
+ .export _Setup_Serial
+_Setup_Serial: .equ h'00300dac
+ .export _CopyVRAM
+_CopyVRAM: .equ h'00300cfc
+ .export _Reset_Calc
+_Reset_Calc: .equ h'00300da0
+ .export _FastGetKey
+_FastGetKey: .equ h'00300ec4
+ .export __divls
+__divls: .equ h'00300f10
+ .export __modls
+__modls: .equ h'00300fc4
+ .export _Bcre_cychdr
+_Bcre_cychdr: .equ h'0030108c
+ .export _BSrl_DummyWAIT
+_BSrl_DummyWAIT: .equ h'0030109c
+ .export _Bsta_cychdr
+_Bsta_cychdr: .equ h'003010ac
+ .export _Bstp_cychdr
+_Bstp_cychdr: .equ h'003010bc
+ .export _DD_GET
+_DD_GET: .equ h'003010cc
+ .export _locate_OS
+_locate_OS: .equ h'003010dc
+ .export _PrintMiniSd
+_PrintMiniSd: .equ h'003010ec
+ .end
diff --git a/Debug/FXADDINror.map b/Debug/FXADDINror.map new file mode 100644 index 0000000..9da4922 --- /dev/null +++ b/Debug/FXADDINror.map @@ -0,0 +1,393 @@ +Hitachi Optimizing Linkage Editor (Ver. 7.1.03.000)06-Aug-2012 11:55:41
+
+*** Options ***
+
+-subcommand=C:\Users\Timo\AppData\Local\Temp\hmkC34F.tmp
+noprelink
+sdebug
+rom D=R
+nomessage
+list "G:\Casio SDK\Projekte\Snake\Debug\FXADDINror.map"
+show symbol
+nooptimize
+start P_TOP,P,C,D,C$VTBL,C$INIT/0300200,B_BR_Size,B,R/08100000
+fsymbol P
+nologo
+input "G:\Casio SDK\Projekte\Snake\Debug\Snake.obj"
+input "G:\Casio SDK\OS\FX\lib\setup.obj"
+library "G:\Casio SDK\OS\FX\lib\fx9860G_library.lib"
+library "G:\Casio SDK\OS\FX\lib\revolution.lib"
+output "G:\Casio SDK\Projekte\Snake\Debug\FXADDINror.abs"
+-nomessage=1100
+end
+
+*** Error information ***
+
+*** Mapping List ***
+
+SECTION START END SIZE ALIGN
+
+P_TOP
+ 00300200 0030020b c 4
+P
+ 0030020c 003010fb ef0 4
+C
+ 003010fc 003011bf c4 4
+D
+ 003011c0 003011db 1c 4
+B_BR_Size
+ 08100000 08100003 4 4
+B
+ 08100004 08100007 4 4
+R
+ 08100008 08100023 1c 4
+
+*** Symbol List ***
+
+SECTION=
+FILE= START END SIZE
+ SYMBOL ADDR SIZE INFO COUNTS OPT
+
+SECTION=P_TOP
+FILE=G:\Casio SDK\Projekte\Snake\Debug\Snake.obj
+ 00300200 0030020b c
+ _InitializeSystem
+ 00300200 c func ,g *
+
+SECTION=P
+FILE=G:\Casio SDK\Projekte\Snake\Debug\Snake.obj
+ 0030020c 003007ef 5e4
+ _PRGM_GetKey
+ 0030020c 32 func ,g *
+ _rand
+ 0030023e 1a func ,g *
+ _AddIn_main
+ 00300258 598 func ,g *
+FILE=G:\Casio SDK\OS\FX\lib\setup.obj
+ 003007f0 0030090b 11c
+ ___LINK_PROTECT
+ 003007f0 4 func ,g *
+ _SetQuitHandler
+ 003007f4 6 func ,g *
+ _OnAppCloseDefault
+ 003007fa 54 func ,g *
+ __INITSCT_ADDIN
+ 0030084e 48 func ,g *
+ _INIT_ADDIN_APPLICATION
+ 00300896 76 func ,g *
+FILE=__modlu
+ 0030090c 003009c3 b8
+ __modlu
+ 0030090c 0 none ,g *
+ modlu_L
+ 003009a4 0 none ,l *
+ modlu_zero
+ 003009ac 0 none ,l *
+ A_errno
+ 003009bc 0 none ,l *
+ n_zerono
+ 003009c0 0 none ,l *
+FILE=_Bdel_cychdr
+ 003009c4 003009d3 10
+ _Bdel_cychdr
+ 003009c4 0 none ,g *
+FILE=_Bdisp_AllClr_DDVRAM
+ 003009d4 003009e3 10
+ _Bdisp_AllClr_DDVRAM
+ 003009d4 0 none ,g *
+FILE=_Bdisp_ClearLineVRAM
+ 003009e4 003009f3 10
+ _Bdisp_ClearLineVRAM
+ 003009e4 0 none ,g *
+FILE=_Bdisp_PutDisp_DD
+ 003009f4 00300a03 10
+ _Bdisp_PutDisp_DD
+ 003009f4 0 none ,g *
+FILE=_Bdisp_PutLineVRAM
+ 00300a04 00300a13 10
+ _Bdisp_DrawLineVRAM
+ 00300a04 0 none ,g *
+FILE=_BfileFLS_CloseFile
+ 00300a14 00300a23 10
+ _BfileFLS_CloseFile
+ 00300a14 0 none ,g *
+FILE=_Bkey_Set_RepeatTime_Default
+ 00300a24 00300a33 10
+ _Bkey_Set_RepeatTime_Default
+ 00300a24 0 none ,g *
+FILE=_CallbackAtQuitMainFunction
+ 00300a34 00300a43 10
+ _CallbackAtQuitMainFunction
+ 00300a34 0 none ,g *
+FILE=_flsFindClose
+ 00300a44 00300a53 10
+ _flsFindClose
+ 00300a44 0 none ,g *
+FILE=_GLibAddinAplExecutionCheck
+ 00300a54 00300a63 10
+ _GLibAddinAplExecutionCheck
+ 00300a54 0 none ,g *
+FILE=_Hmem_SetMMU
+ 00300a64 00300a73 10
+ _Hmem_SetMMU
+ 00300a64 0 none ,g *
+FILE=_Print
+ 00300a74 00300a83 10
+ _Print
+ 00300a74 0 none ,g *
+FILE=dispbios
+ 00300a84 00300bf9 176
+ _PrintMini
+ 00300a84 1c func ,g *
+ _locate
+ 00300aa0 28 func ,g *
+ _Bdisp_ReadArea_DD
+ 00300ac8 132 func ,g *
+FILE=timer
+ 00300bfc 00300cfb 100
+ _GetSDKLibraryVersion
+ 00300bfc 6 func ,g *
+ _SetTimer
+ 00300c02 54 func ,g *
+ _KillTimer
+ 00300c56 44 func ,g *
+ _Sleep
+ 00300c9a 62 func ,g *
+FILE=revolution_asm
+ 00300cfc 00300f0d 212
+ _CopyVRAM
+ 00300cfc 0 none ,g *
+ CopyByte
+ 00300d0c 0 none ,l *
+ _DrawAll
+ 00300d30 0 none ,g *
+ SelectLine
+ 00300d4e 0 none ,l *
+ WriteLine
+ 00300d60 0 none ,l *
+ _Change_Contrast
+ 00300d88 0 none ,g *
+ _Reset_Calc
+ 00300da0 0 none ,g *
+ _Setup_Serial
+ 00300dac 0 none ,g *
+ _FastKeyDown
+ 00300dd4 0 none ,g *
+ CodeCheck
+ 00300e0c 0 none ,l *
+ PortCheck
+ 00300e10 0 none ,l *
+ CheckFlag
+ 00300e40 0 none ,l *
+ KeyFinish
+ 00300e46 0 none ,l *
+ KeyExit
+ 00300e5c 0 none ,l *
+ KeyDatMov
+ 00300e74 0 none ,l *
+ KeyDatLoop
+ 00300e82 0 none ,l *
+ KeyDatFin
+ 00300ea4 0 none ,l *
+ KeyHelp
+ 00300eac 0 none ,l *
+ KeyAssist
+ 00300eb0 0 none ,l *
+ KeyDataSt
+ 00300eb4 0 none ,l *
+ _FastGetKey
+ 00300ec4 0 none ,g *
+ StartLoop
+ 00300edc 0 none ,l *
+ CheckKey
+ 00300ee0 0 none ,l *
+ LoopIncrement
+ 00300eec 0 none ,l *
+ LoopCheck
+ 00300ef8 0 none ,l *
+ FastGetKeyExit
+ 00300efe 0 none ,l *
+FILE=__divls
+ 00300f10 00300fc3 b4
+ __divls
+ 00300f10 0 none ,g *
+ divls_zero
+ 00300fae 0 none ,l *
+ A_errno
+ 00300fbc 0 none ,l *
+ n_zerono
+ 00300fc0 0 none ,l *
+FILE=__modls
+ 00300fc4 0030108b c8
+ __modls
+ 00300fc4 0 none ,g *
+ modls_L
+ 0030106a 0 none ,l *
+ modls_zero
+ 00301076 0 none ,l *
+ A_errno
+ 00301084 0 none ,l *
+ n_zerono
+ 00301088 0 none ,l *
+FILE=_Bcre_cychdr
+ 0030108c 0030109b 10
+ _Bcre_cychdr
+ 0030108c 0 none ,g *
+FILE=_BSrl_DummyWAIT
+ 0030109c 003010ab 10
+ _BSrl_DummyWAIT
+ 0030109c 0 none ,g *
+FILE=_Bsta_cychdr
+ 003010ac 003010bb 10
+ _Bsta_cychdr
+ 003010ac 0 none ,g *
+FILE=_Bstp_cychdr
+ 003010bc 003010cb 10
+ _Bstp_cychdr
+ 003010bc 0 none ,g *
+FILE=_DD_GET
+ 003010cc 003010db 10
+ _DD_GET
+ 003010cc 0 none ,g *
+FILE=_locate
+ 003010dc 003010eb 10
+ _locate_OS
+ 003010dc 0 none ,g *
+FILE=_PrintMiniSd
+ 003010ec 003010fb 10
+ _PrintMiniSd
+ 003010ec 0 none ,g *
+
+SECTION=C
+FILE=G:\Casio SDK\Projekte\Snake\Debug\Snake.obj
+ 003010fc 003011a9 ae
+ _sc06C4
+ 003010fc 10 data ,g *
+ _sc003B
+ 0030110c 10 data ,g *
+ _sc0541
+ 0030111c 10 data ,g *
+FILE=addin_sct
+ 003011ac 003011bf 14
+ _B_BGN
+ 003011ac 0 none ,g *
+ _B_END
+ 003011b0 0 none ,g *
+ _R_BGN
+ 003011b4 0 none ,g *
+ _R_END
+ 003011b8 0 none ,g *
+ _D_ROM
+ 003011bc 0 none ,g *
+
+SECTION=B_BR_Size
+FILE=G:\Casio SDK\Projekte\Snake\Debug\Snake.obj
+ 08100000 08100003 4
+ _BR_Size
+ 08100000 4 data ,g *
+
+SECTION=B
+FILE=_errno
+ 08100004 08100007 4
+ __errno
+ 08100004 4 data ,g *
+
+SECTION=R
+FILE=G:\Casio SDK\Projekte\Snake\Debug\Snake.obj
+ 08100008 0810001f 18
+ _SysCallCode
+ 08100008 c data ,g *
+ _SysCall
+ 08100014 4 data ,g *
+ _headloop
+ 08100018 4 data ,g *
+ _lastrandom
+ 0810001c 4 data ,l *
+FILE=G:\Casio SDK\OS\FX\lib\setup.obj
+ 08100020 08100023 4
+ _gb_OnAppClose
+ 08100020 4 data ,g *
+
+Absolute value symbols
+FILE=__modlu
+ zerodiv
+ 0000044e 0 none ,l *
+FILE=_Bdel_cychdr
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bdisp_AllClr_DDVRAM
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bdisp_ClearLineVRAM
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bdisp_PutDisp_DD
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bdisp_PutLineVRAM
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_BfileFLS_CloseFile
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bkey_Set_RepeatTime_Default
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_CallbackAtQuitMainFunction
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_flsFindClose
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_GLibAddinAplExecutionCheck
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Hmem_SetMMU
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Print
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=__divls
+ zerodiv
+ 0000044e 0 none ,l *
+FILE=__modls
+ zerodiv
+ 0000044e 0 none ,l *
+FILE=_Bcre_cychdr
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_BSrl_DummyWAIT
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bsta_cychdr
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_Bstp_cychdr
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_DD_GET
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_locate
+ __JumpTableTOP
+ 80010070 0 none ,l *
+FILE=_PrintMiniSd
+ __JumpTableTOP
+ 80010070 0 none ,l *
+
+*** Delete Symbols ***
+
+SYMBOL SIZE INFO
+
+*** Variable Accessible with Abs8 ***
+
+SYMBOL SIZE COUNTS OPTIMIZE
+
+*** Variable Accessible with Abs16 ***
+
+SYMBOL SIZE COUNTS OPTIMIZE
+
+*** Function Call ***
+
+SYMBOL COUNTS OPTIMIZE
diff --git a/Debug/Snake.lst b/Debug/Snake.lst new file mode 100644 index 0000000..e959e09 --- /dev/null +++ b/Debug/Snake.lst @@ -0,0 +1,71 @@ +SH SERIES C/C++ Compiler (Ver. 6.0C) 16-Oct-2012 18:06:54 PAGE 1
+
+
+******** STATISTICS INFORMATION ********
+
+
+********** ERROR INFORMATION ***********
+
+NUMBER OF ERRORS: 3
+NUMBER OF WARNINGS: 4
+
+
+
+
+******* SOURCE LINE INFORMATION ********
+
+COMPILED SOURCE LINE: 246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+*** COMMAND PARAMETER ***
+
+
+ -subcommand=C:\Users\Timo\AppData\Local\Temp\hmkAF24.tmp
+
diff --git a/FXSH_Build.bat b/FXSH_Build.bat new file mode 100644 index 0000000..2c5c147 --- /dev/null +++ b/FXSH_Build.bat @@ -0,0 +1,22 @@ +@echo off +rem Do not edit! This batch file is created by CASIO fx-9860G SDK. + + +if exist SNAKE.G1A del SNAKE.G1A + +cd debug +if exist FXADDINror.bin del FXADDINror.bin +"G:\Casio SDK\OS\SH\Bin\Hmake.exe" Addin.mak +cd .. +if not exist debug\FXADDINror.bin goto error + +"G:\Casio SDK\Tools\MakeAddinHeader363.exe" "G:\Casio SDK\Projekte\Snake" +if not exist SNAKE.G1A goto error +echo Build has completed. +goto end + +:error +echo Build was not successful. + +:end + diff --git a/INIT/CasioRAM.mem b/INIT/CasioRAM.mem Binary files differnew file mode 100644 index 0000000..5ee4a63 --- /dev/null +++ b/INIT/CasioRAM.mem diff --git a/INIT/CasioRAMCPU.mem b/INIT/CasioRAMCPU.mem Binary files differnew file mode 100644 index 0000000..fd09ac7 --- /dev/null +++ b/INIT/CasioRAMCPU.mem diff --git a/MainIcon.bmp b/MainIcon.bmp Binary files differnew file mode 100644 index 0000000..5322764 --- /dev/null +++ b/MainIcon.bmp diff --git a/README.md b/README.md new file mode 100644 index 0000000..98bd511 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Casio fx-9860 snake game @@ -0,0 +1,246 @@ +#include "fxlib.h" + +int headloop = 1; + +#define SCA 0xD201D002 +#define SCB 0x422B0009 +#define SCE 0x80010070 +typedef void(*sc_vpuc)(unsigned char*); +const unsigned int sc06C4[] = { SCA, SCB, SCE, 0x06C4 }; +#define KBD_PRGM_GetKey (*(sc_vpuc)sc06C4) + +int PRGM_GetKey(){ +unsigned char sysbuffer[12]; + KBD_PRGM_GetKey( sysbuffer ); + return ( sysbuffer[1] & 0x0F ) * 10 + ( ( sysbuffer[2] & 0xF0 ) >> 4 ); +} + +typedef int(*sc_iv)(void); +const unsigned int sc003B[] = { SCA, SCB, SCE, 0x003B }; +#define RTC_GetTicks (*(sc_iv)sc003B) +const unsigned int sc0541[] = { SCA, SCB, SCE, 0x0541 }; +#define itoa (*(sc_viuc)sc0541) + +static unsigned int lastrandom=0x12345678; +unsigned int rand(){ + int seed = 0; + if (seed) lastrandom=seed; + lastrandom = ( 0x41C64E6D*lastrandom ) + 0x3039; + return ( lastrandom >> 16 ); +} + +int AddIn_main(int isAppli, unsigned short OptionNum) +{ + while (headloop == 1){ + + int xpos [51]; //Arrays für die X/Y Position/ Richtung der schlange und des Futters + int ypos [51]; + int direct [51]; + int eatingx [11]; + int eatingy [11]; + + int sleep = 100; + + unsigned int key; //Variable für Tastenabfragen + + + char head = 6; //Kopfposition der Schlange + + int eatcount = 1; //Zahler für die Anzahl des Futters + + int count; //Zahler für for Schleifen + + int loop = 1; //Schleife aktivieren + + int points[5]; + + rand( RTC_GetTicks()); + + for (count = 0 ; count <= 7 ; count++) + { + direct [count] = 4; //Richtung Rechts an alle Schlangenteile + } + for (count = 0 ; count <= 6 ; count++) + { + xpos [count] = count - 1; //xposition festlegen (Startposition) + ypos [count] = 0; //yposition festlegen (Startposition) + } + + //Menu + Bdisp_AllClr_DDVRAM(); // Bildschirm loschen + + PrintMini(1,20,(unsigned char *)"Geschwindigkeit mit + und - ",MINI_OVER); + PrintMini(1,30,(unsigned char *)"regeln. Beenden mit EXIT , ",MINI_OVER); + PrintMini(1,40,(unsigned char *)"steuern mit den Pfeiltasten !",MINI_OVER); + Bdisp_PutDisp_DD(); + + GetKey(&key); + + Bdisp_AllClr_DDVRAM(); // Bildschirm loschen + + while (loop == 1) //endlosschleife, solange bis loop ungleich null + { + if (head > 25){ + Bdisp_AllClr_DDVRAM(); + locate(5,4); + Print("GEWONNEN!!!"); + locate(7,5); + Print("25 Punkte"); + Bdisp_PutDisp_DD(); + GetKey(&key); + loop = 2; + } + + itoa(head-6,points); + PrintMini( 1, 1, &points, MINI_REV); + Bdisp_PutDisp_DD(); + + if (eatcount < 10) // 10 mal Futter zufallig auf das Feld verteilen + { + eatingx [eatcount] = rand() % 60; + eatingy [eatcount] = rand() % 30; + + for (count = 0; count <= 2; count ++){ + Bdisp_DrawLineVRAM( eatingx [eatcount] * 2 , eatingy [eatcount] * 2 + count , eatingx [eatcount] * 2 - 2, eatingy [eatcount] * 2 + count); + } + Bdisp_PutDisp_DD(); + + eatcount ++; //Futterzähler erhöhen + } + for (count = 0; count <= 2; count ++){ + Bdisp_ClearLineVRAM( xpos [1] * 2 , ypos [1] * 2 + count , xpos [1] * 2 - 2 , ypos [1] * 2 + count); + } + Bdisp_PutDisp_DD(); + + for (count = 0; count != head + 1; count ++) //xpositionen aktualisieren und an die evtl veränderte Laufrichtung anpassen + {switch(direct [count]){ + + case 1 : + ypos [count] = ypos [count] + 1; + break; + + case 2 : + xpos [count] = xpos [count] - 1; + break; + + case 3 : + ypos [count] = ypos [count] - 1; + break; + + case 4 : + xpos [count] = xpos [count] + 1; + break;} + } + + if (xpos[head] > 60 || xpos [head] < 0 || ypos [head] < 0 || ypos [head] > 30){ + Bdisp_AllClr_DDVRAM(); + key = 0; + locate(7,4); + Print("Verloren."); + Bdisp_PutDisp_DD(); + GetKey(&key); + } + for (count = 0 ; count <= eatcount; count ++){ + if (eatingx [count] == xpos [head] && eatingy [count] == ypos [head]){ + head++; + eatcount--; + direct [head + 1] = direct [head]; + switch(direct [head]){ + case 1 : + ypos [head] = ypos [head - 1] + 1; + xpos [head] = xpos [head - 1]; + break; + + case 2 : + xpos [head] = xpos [head - 1] - 1; + ypos [head] = ypos [head - 1]; + break; + + case 3 : + ypos [head] = ypos [head - 1] - 1; + xpos [head] = xpos [head - 1]; + break; + + case 4 : + xpos [head] = xpos [head - 1] + 1; + ypos [head] = ypos [head - 1]; + break;} + for (count = 0; count <= 2; count ++){ + Bdisp_DrawLineVRAM( xpos [head] * 2 , ypos [head] * 2 + count , xpos [head] * 2 - 2 , ypos [head] * 2 + count); + } + Bdisp_PutDisp_DD(); + break; + }} + + for (count = 0; count <= 2; count ++){ + Bdisp_DrawLineVRAM( xpos [head] * 2 , ypos [head] * 2 + count , xpos [head] * 2 - 2 , ypos [head] * 2 + count); + } + Bdisp_PutDisp_DD(); + + for (count = 0 ; count != head + 1; count++)//Richtung ubertragen, von vorne nach hinten, + //d. h. Ist vorher der Kopf nach rechts und der 2. Teil nach oben gelaufen, + //lauft das 2. Teil jetzt nach oben und der 3. Teil nach rechts + {direct [count] = direct [count + 1];} + + key = PRGM_GetKey(); + Sleep(sleep); + + switch (key){ + case 28 : + if (direct[head+1] != 1){ + direct[head+1] = 3;//Kopflaufrichtung nach oben + } + break; + case 27 : + if (direct[head+1] != 2){ + direct[head+1] = 4; //Kopflaufrichtung rechts + } + break; + case 37 : + if (direct[head+1] != 3){ + direct[head+1] = 1;//runter + } + break; + case 38 : + if (direct[head+1] != 4){ + direct[head+1] = 2;//links + } + break; + case 47 : + headloop = 2; + loop = 2; + break; + case 42 : + if (sleep > 0){ + sleep = sleep - 5; + } + break; + case 32 : + sleep = sleep + 5; + break; + } + + } + + } +} + + + +//\/ WICHTIG !!!!!! \/ muss da bleiben \/ (warum auch immer) \/ + + +#pragma section _BR_Size +unsigned long BR_Size; +#pragma section + + +#pragma section _TOP + +int InitializeSystem(int isAppli, unsigned short OptionNum) +{ + return INIT_ADDIN_APPLICATION(isAppli, OptionNum); +} + +#pragma section + diff --git a/Snake.dlr b/Snake.dlr new file mode 100644 index 0000000..d375900 --- /dev/null +++ b/Snake.dlr @@ -0,0 +1,412 @@ +[DLSimRunSpace]
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=75
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=75
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=78
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=81
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=81
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=86
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=82
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=78
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=58
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=65
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=61
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=69
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=69
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=51
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=56
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=56
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=64
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=64
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=68
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=61
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=68
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=51
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=55
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=55
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=52
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=95
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=94
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=94
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=97
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=74
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=74
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=65
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=65
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=82
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=52
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=53
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=86
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=86
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=95
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=97
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=53
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=58
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=57
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=63
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=60
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=66
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=57
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=60
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=60
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=60
+Flags=00001012
+Sublevel=4
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=66
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=66
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=66
+Flags=00001012
+Sublevel=4
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=63
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=194
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=194
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=90
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=90
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=90
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=90
+Flags=00001012
+Sublevel=4
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=1
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=2
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=3
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=4
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=5
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=6
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=7
+
+[Breakpoint]
+File=D:\Casio SDK\Projekte\Snake\Snake.c
+Line=92
+Flags=00001012
+Sublevel=8
+
+[Watch]
+Name=eatingx[1]
diff --git a/Snake.dlw b/Snake.dlw new file mode 100644 index 0000000..ad1cfbb --- /dev/null +++ b/Snake.dlw @@ -0,0 +1,125 @@ +[DLSimWorkSpace]
+
+[_1]
+Type=5
+Order=7
+Top=15
+Left=2295
+Height=7365
+Width=4740
+State=0
+Flags=00000000
+Setting=247:1:Snake.c
+OptionA=0
+
+[_2]
+Type=1
+Order=5
+Top=-90
+Left=23100
+Height=4845
+Width=5610
+State=0
+Flags=00000001
+OptionA=15
+OptionB=15
+
+[_3]
+Type=6
+Order=4
+Top=4560
+Left=23175
+Height=6390
+Width=5535
+State=0
+Flags=00000001
+OptionA=0
+
+[_4]
+Type=7
+Order=3
+Top=10785
+Left=23235
+Height=3885
+Width=5565
+State=0
+Flags=00000000
+OptionA=0
+
+[_5]
+Type=8
+Order=6
+Top=7230
+Left=75
+Height=3150
+Width=6915
+State=0
+Flags=00000000
+OptionA=0
+
+[_6]
+Type=3
+Order=10
+Top=0
+Left=10788
+Height=6348
+Width=2232
+State=16
+Flags=00000000
+OptionA=0
+
+[_7]
+Type=2
+Order=9
+Top=6348
+Left=7800
+Height=3588
+Width=5220
+State=16
+Flags=00000000
+OptionA=0
+
+[_8]
+Type=17
+Order=2
+Top=15
+Left=105
+Height=7335
+Width=2235
+State=0
+Flags=00000000
+OptionA=0
+
+[_9]
+Type=15
+Order=0
+Top=10245
+Left=60
+Height=4425
+Width=6900
+State=0
+Flags=00000000
+OptionA=0
+
+[_10]
+Type=14
+Order=8
+Top=4500
+Left=4500
+Height=9795
+Width=23865
+State=16
+Flags=00000020
+OptionA=0
+
+[_32]
+Type=16
+Order=1
+Top=-15
+Left=6885
+Height=14685
+Width=16290
+State=0
+Flags=00000030
+Setting=22:1:Snake.c
+OptionA=0
diff --git a/Snake.g1w b/Snake.g1w new file mode 100644 index 0000000..7a796ae --- /dev/null +++ b/Snake.g1w @@ -0,0 +1,15 @@ +[DLSimProject]
+Name=Snake
+Version=1.00.0000
+Model=:fx-9860G.dlm
+SourcePath=SRC
+MemoryPath=INIT
+MemCardPath=SDCard
+
+[Program1]
+Program=SNAKE.G1A
+Debug=Debug\FXADDINror.dbg
+LoadAddress=80000000:90100000
+
+[Files]
+SourceFile=:Snake.c
diff --git a/eActivityIcon.bmp b/eActivityIcon.bmp Binary files differnew file mode 100644 index 0000000..104a2c6 --- /dev/null +++ b/eActivityIcon.bmp |
