diff --git a/build-distro.sh b/build-distro.sh index 5d02395..31fe6ff 100755 --- a/build-distro.sh +++ b/build-distro.sh @@ -23,6 +23,14 @@ # +# +# NOTE: This script depends on "Toolchains" bein installed in a parallel +# directory to the directory that contains this script. +# +# https://skunkworks.kangaroopunch.com/skunkworks/toolchains +# + + ROOT=$(pwd) INSTALL=${ROOT}/llvm-mos @@ -40,6 +48,8 @@ function buildOverlayTool() { pushd tools/overlay ${CC} overlay.c ../shared/util.o -o ${TARGET} -lm popd + + rm tools/shared/util.o } @@ -68,6 +78,10 @@ pushd distro cp -Rf ${ROOT}/f256lib . cp -Rf ${ROOT}/include . cp -f ${ROOT}/f256lib.h . + cp -f ${ROOT}/pgz-thunk.py . + + cp -f ../f256build.bat . + cp -f ../f256run.bat . buildOverlayTool linux x86_64 $(pwd)/overlay.linux buildOverlayTool macos aarch64 $(pwd)/overlay.macos diff --git a/build-f256lib.sh b/build-f256lib.sh index 129f3b5..a588226 100755 --- a/build-f256lib.sh +++ b/build-f256lib.sh @@ -26,7 +26,8 @@ TARGET=f256lib.h -cat f256lib/stddclmr.h > ${TARGET} +cat f256lib/docs.h > ${TARGET} +cat f256lib/stddclmr.h >> ${TARGET} echo "#ifndef F256LIB_AMALGAMATED_BUILD" >> ${TARGET} echo "#define F256LIB_AMALGAMATED_BUILD" >> ${TARGET} diff --git a/distro/f256-install-windows.bat b/distro/f256-install-windows.bat index 36908c5..39ee9af 100644 --- a/distro/f256-install-windows.bat +++ b/distro/f256-install-windows.bat @@ -37,12 +37,37 @@ set LOCAL2=llvm-mos-f256.7z set REMOTE3=https://aka.ms/vs/16/release/vc_redist.x64.exe set LOCAL3=vc_redist.x64.exe +set REMOTE4=https://github.com/pweingar/FoenixMgr/archive/refs/heads/master.zip +set LOCAL4=master.zip + if exist llvm-mos\ ( echo You already have an llvm-mos directory. Exiting. exit /B ) +if exist "%ProgramFiles%\7-Zip\7z.exe" ( + set UNPACK="%ProgramFiles%\7-Zip\7z.exe" +) else ( + if exist "%ProgramFiles%\WinRAR\WinRAR.exe" ( + set UNPACK="%ProgramFiles%\WinRAR\WinRAR.exe" + ) else ( + echo Unable to find 7-Zip or WinRAR. Exiting. + exit /B + ) +) + +where /q python.exe +if errorlevel 1 ( + echo Unable to find Python. Exiting. + exit /B +) +where /q pip.exe +if errorlevel 1 ( + echo Unable to find Python. Exiting. + exit /B +) + where /q curl.exe if errorlevel 1 ( where /q bitsadmin.exe @@ -53,39 +78,38 @@ if errorlevel 1 ( bitsadmin.exe /transfer GoGoWindows /download /priority normal %REMOTE1% "%~dp0%LOCAL1%" bitsadmin.exe /transfer GoGoWindows /download /priority normal %REMOTE2% "%~dp0%LOCAL2%" bitsadmin.exe /transfer GoGoWindows /download /priority normal %REMOTE3% "%~dp0%LOCAL3%" + bitsadmin.exe /transfer GoGoWindows /download /priority normal %REMOTE4% "%~dp0%LOCAL4%" ) ) else ( curl.exe -L %REMOTE1% > %LOCAL1% curl.exe -L %REMOTE2% > %LOCAL2% curl.exe -L %REMOTE3% > %LOCAL3% + curl.exe -L %REMOTE4% > %LOCAL4% ) %LOCAL3% /install /passive -if exist "%ProgramFiles%\7-Zip\7z.exe" ( - "%ProgramFiles%\7-Zip\7z.exe" x %LOCAL1% - "%ProgramFiles%\7-Zip\7z.exe" x %LOCAL2% -) else ( - if exist "%ProgramFiles%\WinRAR\WinRAR.exe" ( - "%ProgramFiles%\WinRAR\WinRAR.exe" x %LOCAL1% - "%ProgramFiles%\WinRAR\WinRAR.exe" x %LOCAL2% - ) else ( - echo Unable to find 7-Zip or WinRAR. Exiting. - del %LOCAL1% - del %LOCAL2% - del %LOCAL3% - exit /B - ) -) +%UNPACK% x -y %LOCAL1% +%UNPACK% x -y %LOCAL2% +%UNPACK% x -y %LOCAL4% del %LOCAL1% del %LOCAL2% del %LOCAL3% +del %LOCAL4% del overlay.linux del overlay.macos ren overlay.windows overlay.exe +if exist *.sh del *.sh > NUL + +ren FoenixMgr-master FoenixMgr +copy FoenixMgr\foenixmgr.ini . > NUL +pushd FoenixMgr + pip.exe install -r requirements.txt +popd + echo @"%%~dp0mos-clang++.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang++.bat echo @"%%~dp0mos-clang-cpp.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang-cpp.bat echo @"%%~dp0mos-clang.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang.bat @@ -100,6 +124,9 @@ echo. echo ----------------------------------------------------------------------------- echo Installation complete! echo. +echo Please visit https://github.com/pweingar/FoenixMgr to learn how to configure +echo FoenixMgr for your machine. Edit the foenixmgr.ini file in this directory. +echo. echo NOTE: The following has been added to your PATH: echo %~dp0llvm-mos\bin echo ----------------------------------------------------------------------------- diff --git a/distro/f256build.bat b/distro/f256build.bat new file mode 100644 index 0000000..7c8faa2 --- /dev/null +++ b/distro/f256build.bat @@ -0,0 +1,62 @@ +@echo off +goto top + + +# +# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + + +:top +set ROOT=%cd% + +if "%~1%" neq "" goto checkSrc +echo. +echo No project folder provided. +exit /b + +:checkSrc +if exist "%1%\src\*.c" goto foundSrc +echo. +echo No src folder containing C files found. +exit /b + +:foundSrc +set PROJECT=%ROOT%\%1% +set SOURCE=%PROJECT%\src +set BUILD=%PROJECT%\.builddir +if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%" +for %%f in ("%PROJECT%") do set "NAME=%%~nxf" +pushd "%PROJECT%" + if exist .builddir rd /s /q .builddir + mkdir .builddir + cd .builddir + "%ROOT%\overlay.exe" 5 "%BUILD%" "%SOURCE%" + if not exist "%PROJECT%\f256.ld" copy /y "%ROOT%\llvm-mos\mos-platform\f256\lib\link.ld" "%PROJECT%\f256.ld" > NUL + call mos-f256-clang -T ..\f256.ld -Wl,-Map=%NAME%.map -o %NAME% -I"%ROOT%" -Wall -lm *.c + if errorlevel 1 goto failed + ren %NAME% %NAME%.pgz + llvm-nm %NAME%.elf > %NAME%.sym + llvm-objdump --syms -d --print-imm-hex %NAME%.elf > %NAME%.lst + python %ROOT%\pgz-thunk.py %NAME%.pgz + move %NAME%.pgz ..\. > NUL + :failed +popd diff --git a/distro/f256run.bat b/distro/f256run.bat new file mode 100644 index 0000000..f17f141 --- /dev/null +++ b/distro/f256run.bat @@ -0,0 +1,46 @@ +@echo off +goto top + + +# +# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + + +:top +set ROOT=%cd% + +if "%~1%" neq "" goto checkPgz +echo. +echo No project folder provided. +exit /b + +:checkPgz +set PROJECT=%ROOT%\%1% +if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%" +for %%f in ("%PROJECT%") do set "NAME=%%~nxf" +if exist "%PROJECT%\%NAME%.pgz" goto foundPgz +echo. +echo No PGZ found. +exit /b + +:foundPgz +python.exe "%ROOT%/FoenixMgr/FoenixMgr/fnxmgr.py --run-pgz "%PROJECT%\%NAME%.pgz" diff --git a/examples/cube/CMakeLists.txt b/examples/cube/CMakeLists.txt deleted file mode 100644 index da75b7d..0000000 --- a/examples/cube/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -# This is only to make my IDE happy. -# We can't actually build with it until I get llvm-mos integrated into -# toolchains. -- SCD - - -cmake_minimum_required(VERSION 3.22) -set(CMAKE_C_STANDARD 17) -project(cube) - -set(DEFINES ${CMAKE_SOURCE_DIR}/../../include) -set(F256LIB ${CMAKE_SOURCE_DIR}/../../f256lib) - -set(CUBE_SOURCE - ${F256LIB}/f256.h - ${F256LIB}/f256.c - cube.c -) - -add_executable(${CMAKE_PROJECT_NAME} - ${CUBE_SOURCE} -) - -target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC - ${CMAKE_SOURCE_DIR} - ${DEFINES} - ${F256LIB} -) diff --git a/examples/cube/build.sh b/examples/cube/build.sh deleted file mode 100755 index b3573b0..0000000 --- a/examples/cube/build.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -ex - -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -PROJECT=cube -START=0x200 - - -F256=$(pwd)/../.. -LLVM=${F256}/llvm-mos -SETTINGS=${LLVM}/mos-platform/f256k/lib/settings.ld -PATH=${LLVM}/bin:${PATH} - -echo "__f256_start = ${START};" > ${SETTINGS} - -CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -O3" - -${CLANG} -c ${F256}/f256lib/f256.c -${CLANG} -c ${PROJECT}.c -${CLANG} -o ${PROJECT} ${PROJECT}.o f256.o - -mv -f ${PROJECT} ${PROJECT}.bin - -${F256}/header \ - pgz 24 \ - ${PROJECT}.pgz \ - ${START} \ - ${PROJECT}.bin ${START} - -#llvm-nm ${PROJECT}.elf > ${PROJECT}.lst -llvm-objdump -d --print-imm-hex ${PROJECT}.elf > ${PROJECT}.lst -hexdump -C ${PROJECT}.pgz > ${PROJECT}.hex diff --git a/examples/cube/run.sh b/examples/cube/run.sh deleted file mode 100755 index 97bc536..0000000 --- a/examples/cube/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -python ../../FoenixMgr/FoenixMgr/fnxmgr.py --run-pgz cube.pgz diff --git a/examples/cube/cube.c b/examples/cube/src/cube.c similarity index 96% rename from examples/cube/cube.c rename to examples/cube/src/cube.c index 48b6924..03ac459 100644 --- a/examples/cube/cube.c +++ b/examples/cube/src/cube.c @@ -24,7 +24,8 @@ // Ported from https://github.com/root42/doscube -#include "f256.h" +#define F256LIB_IMPLEMENTATION +#include "f256lib.h" #define FIX_PREC 9 @@ -172,12 +173,13 @@ void draw_cube(byte p, int16_t t) { } -int main(void) { +int main(int argc, char *argv[]) { byte i; int16_t t = 0; byte p = 0; - f256Init(); + (void)argc; + (void)argv; textSetCursor(0); // No cursor. diff --git a/examples/cube-pre/sin.c b/examples/cube/tools/sin.c similarity index 100% rename from examples/cube-pre/sin.c rename to examples/cube/tools/sin.c diff --git a/examples/lines/CMakeLists.txt b/examples/lines/CMakeLists.txt deleted file mode 100644 index 1654f9d..0000000 --- a/examples/lines/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -# This is only to make my IDE happy. -# We can't actually build with it until I get llvm-mos integrated into -# toolchains. -- SCD - - -cmake_minimum_required(VERSION 3.22) -set(CMAKE_C_STANDARD 17) -project(lines) - -set(DEFINES ${CMAKE_SOURCE_DIR}/../../include) -set(F256LIB ${CMAKE_SOURCE_DIR}/../../f256lib) - -set(LINES_SOURCE - ${F256LIB}/f256.h - ${F256LIB}/f256.c - lines.c -) - -add_executable(${CMAKE_PROJECT_NAME} - ${LINES_SOURCE} -) - -target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC - ${CMAKE_SOURCE_DIR} - ${DEFINES} - ${F256LIB} -) diff --git a/examples/lines/build.sh b/examples/lines/build.sh deleted file mode 100755 index ae81392..0000000 --- a/examples/lines/build.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -ex - -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -PROJECT=lines -START=0x200 - -F256=$(pwd)/../.. -LLVM=${F256}/llvm-mos -SETTINGS=${LLVM}/mos-platform/f256k/lib/settings.ld -PATH=${LLVM}/bin:${PATH} - -echo "__f256_start = ${START};" > ${SETTINGS} - -CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -O3" - -${CLANG} -c ${F256}/f256lib/f256.c -${CLANG} -c ${PROJECT}.c -${CLANG} -o ${PROJECT} ${PROJECT}.o f256.o - -mv -f ${PROJECT} ${PROJECT}.bin - -${F256}/header \ - pgz 24 \ - ${PROJECT}.pgz \ - ${START} \ - ${PROJECT}.bin ${START} - -#llvm-nm ${PROJECT}.elf > ${PROJECT}.lst -llvm-objdump -d --print-imm-hex ${PROJECT}.elf > ${PROJECT}.lst -hexdump -C ${PROJECT}.pgz > ${PROJECT}.hex diff --git a/examples/lines/run.sh b/examples/lines/run.sh deleted file mode 100755 index ec7cdc8..0000000 --- a/examples/lines/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -python ../../FoenixMgr/FoenixMgr/fnxmgr.py --run-pgz lines.pgz diff --git a/examples/lines/lines.c b/examples/lines/src/lines.c similarity index 93% rename from examples/lines/lines.c rename to examples/lines/src/lines.c index a4bd54f..6ef89cd 100644 --- a/examples/lines/lines.c +++ b/examples/lines/src/lines.c @@ -21,10 +21,11 @@ */ -#include "f256.h" +#define F256LIB_IMPLEMENTATION +#include "f256lib.h" -int main(void) { +int main(int argc, char *argv[]) { uint16_t x; uint16_t y; uint16_t x2; @@ -34,7 +35,8 @@ int main(void) { byte l; byte c = 0; - f256Init(); + (void)argc; + (void)argv; for (l=0; l ${PROJECT}.sym -llvm-objdump -d --print-imm-hex ${PROJECT}.elf > ${PROJECT}.lst -hexdump -C ${PROJECT}.pgz > ${PROJECT}.hex -python ${F256}/pgz-thunk.py ${PROJECT}.pgz - -mv ${PROJECT}.pgz ../. -popd diff --git a/examples/overlay/f256.ld b/examples/overlay/f256.ld deleted file mode 100644 index 0dc74ee..0000000 --- a/examples/overlay/f256.ld +++ /dev/null @@ -1,96 +0,0 @@ -/* fake C Stack */ -PROVIDE(__stack = 0xA000); -/* entry point to my program */ -PROVIDE(__f256_start = 0x300); -/* page size of a block of memory */ -PROVIDE(__BLOCK_SIZE = 0x2000); -/* swappable block address */ -PROVIDE(__SLOT_ADDR = 0xA000); - -/* f256k uses first 16 bytes of ZP for mmu control? */ -__rc0 = 0x10; -INCLUDE imag-regs.ld -ASSERT(__rc0 == 0x10, "Inconsistent zero page map.") -ASSERT(__rc31 == 0x2f, "Inconsistent zero page map.") - -MEMORY { - /* kernel uses 0xf0-0xff for parameter passing */ - zp : ORIGIN = __rc31 + 1, LENGTH = 0xF0 - (__rc31 + 1) - ram (rw) : ORIGIN = __f256_start, LENGTH = 0xA000-__f256_start -} - -/* LMAs */ -__block8_lma = ( 8<<24)|__SLOT_ADDR; -__block9_lma = ( 9<<24)|__SLOT_ADDR; -__block10_lma = (10<<24)|__SLOT_ADDR; -__block11_lma = (11<<24)|__SLOT_ADDR; -__block12_lma = (12<<24)|__SLOT_ADDR; -__block13_lma = (13<<24)|__SLOT_ADDR; -__block14_lma = (14<<24)|__SLOT_ADDR; -__block15_lma = (15<<24)|__SLOT_ADDR; -__block16_lma = (16<<24)|__SLOT_ADDR; -__block17_lma = (17<<24)|__SLOT_ADDR; -__block18_lma = (18<<24)|__SLOT_ADDR; -__block19_lma = (19<<24)|__SLOT_ADDR; -__block20_lma = (20<<24)|__SLOT_ADDR; -__block21_lma = (21<<24)|__SLOT_ADDR; -__block22_lma = (22<<24)|__SLOT_ADDR; -__block23_lma = (23<<24)|__SLOT_ADDR; - -MEMORY { - block8 : ORIGIN = __block8_lma, LENGTH = __BLOCK_SIZE - block9 : ORIGIN = __block9_lma, LENGTH = __BLOCK_SIZE - block10 : ORIGIN = __block10_lma, LENGTH = __BLOCK_SIZE - block11 : ORIGIN = __block11_lma, LENGTH = __BLOCK_SIZE - block12 : ORIGIN = __block12_lma, LENGTH = __BLOCK_SIZE - block13 : ORIGIN = __block13_lma, LENGTH = __BLOCK_SIZE - block14 : ORIGIN = __block14_lma, LENGTH = __BLOCK_SIZE - block15 : ORIGIN = __block15_lma, LENGTH = __BLOCK_SIZE - block16 : ORIGIN = __block16_lma, LENGTH = __BLOCK_SIZE - block17 : ORIGIN = __block17_lma, LENGTH = __BLOCK_SIZE - block18 : ORIGIN = __block18_lma, LENGTH = __BLOCK_SIZE - block19 : ORIGIN = __block19_lma, LENGTH = __BLOCK_SIZE - block20 : ORIGIN = __block20_lma, LENGTH = __BLOCK_SIZE - block21 : ORIGIN = __block21_lma, LENGTH = __BLOCK_SIZE - block22 : ORIGIN = __block22_lma, LENGTH = __BLOCK_SIZE - block23 : ORIGIN = __block23_lma, LENGTH = __BLOCK_SIZE -} - -REGION_ALIAS("c_writeable", ram) -REGION_ALIAS("c_readonly", ram) - -SECTIONS { - INCLUDE c.ld - .block8 : { *(.block8 .block8.*) } >block8 end_block8 = .; - .block9 : { *(.block9 .block9.*) } >block9 end_block9 = .; - .block10 : { *(.block10 .block10.*) } >block10 end_block10 = .; - .block11 : { *(.block11 .block11.*) } >block11 end_block11 = .; - .block12 : { *(.block12 .block12.*) } >block12 end_block12 = .; - .block13 : { *(.block13 .block13.*) } >block13 end_block13 = .; - .block14 : { *(.block14 .block14.*) } >block14 end_block14 = .; - .block15 : { *(.block15 .block15.*) } >block15 end_block15 = .; - .block16 : { *(.block16 .block16.*) } >block16 end_block16 = .; - .block17 : { *(.block17 .block17.*) } >block17 end_block17 = .; - .block18 : { *(.block18 .block18.*) } >block18 end_block18 = .; - .block19 : { *(.block19 .block19.*) } >block19 end_block19 = .; - .block20 : { *(.block20 .block20.*) } >block20 end_block20 = .; - .block21 : { *(.block21 .block21.*) } >block21 end_block21 = .; - .block22 : { *(.block22 .block22.*) } >block22 end_block22 = .; - .block23 : { *(.block23 .block23.*) } >block23 end_block23 = .; -} - -OUTPUT_FORMAT { - BYTE(0x5A) /* pgZ */ - /* ram segment */ - SHORT(ORIGIN(ram)) /* where to load it, 24 bits */ - BYTE(0x00) - SHORT(__bss_start-ORIGIN(ram)) /* size to load */ - BYTE(0x00) - TRIM(ram) - - INCLUDE output.ld - - /* Launch the program, at _start */ - SHORT(_start) - LONG(0) -} diff --git a/examples/overlay/overlay.c b/examples/overlay/overlay.c deleted file mode 100644 index ce6810c..0000000 --- a/examples/overlay/overlay.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include "f256.h" -#include "f256.c" - - -void firstSegment(int arg1, int arg2); -void secondSegment(int arg1, int arg2); -void moreFirstSegment(int arg1, int arg2); - - -// This is the first segment we've defined. The linker will place this code in -// the first available far memory slot (default 0x10000). -#define SEGMENT_FIRST - -void firstSegment(int arg1, int arg2) { - printf("firstSegment = %d\n", arg1 + arg2); - secondSegment(arg1, arg2); -} - -// This is the second segment we've defined. The linker will place this code in -// the next available far memory slot (default 0x12000). -#define SEGMENT_SECOND - -void secondSegment(int arg1, int arg2) { - printf("secondSegment = %d\n", arg1 + arg2); - moreFirstSegment(arg1, arg2); -} - -// Back to the first segment. The linker will place this code immediately -// after the previous first segment code. -#define SEGMENT_FIRST - -void moreFirstSegment(int arg1, int arg2) { - printf("moreFirstSegment = %d\n", arg1 + arg2); -} - -// Back to near memory, the 64k visible to the processor. By default, this -// segment begins at 0x300. -#define SEGMENT_MAIN - -int main(int argc, char *argv[]) { - // The overlay tool will generate trampoline macros for each function - // that is located in a far segment so no code changes are required. - firstSegment(1, 2); - - // Spin. - for (;;); - - return 0; -} diff --git a/examples/overlay/run.sh b/examples/overlay/run.sh deleted file mode 100755 index bfd9a2d..0000000 --- a/examples/overlay/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -python ../../FoenixMgr/FoenixMgr/fnxmgr.py --run-pgz overlay.pgz diff --git a/examples/sprites/assets/apache.xcf b/examples/sprites/assets/apache.xcf deleted file mode 100644 index 8844ea3..0000000 Binary files a/examples/sprites/assets/apache.xcf and /dev/null differ diff --git a/f256lib/docs.h b/f256lib/docs.h new file mode 100644 index 0000000..10c89a5 --- /dev/null +++ b/f256lib/docs.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +/* + * Configuration DEFINEs + * + * Before including this file, you may define one or more of the following + * to customize the library for your application: + * + * SWAP_RESTORE + * + * When using functions such as FAR_PEEK or bitmap features, return the + * swap slot back to it's original memory location before returning. By + * default, the swap slot is left in whatever state the last function that + * used it switched it to. + * + * WITHOUT_GRAPHICS + * + * Shortcut for WITHOUT_BITMAP, WITHOUT_TILE, and WITHOUT_SPRITE. + * + * WITHOUT_BITMAP + * + * Disables bitmap functions. + * + * WITHOUT_TILE + * + * Disables tilemap functions. + * + * WITHOUT_SPRITE + * + * Disables sprite functions. + * + * WITHOUT_FILE + * + * Disables file handling support. + * + * WITHOUT_KERNEL + * + * Disables microkernel support. Also disables FILE, PLATFORM, and MAIN. + * + * WITHOUT_TEXT + * + * Disables text functions. Also disables PLATFORM. + * + * WITHOUT_MATH + * + * Disables math coprocessor support. Also disables TEXT, PLATFORM and + * BITMAP. + * + * WITHOUT_MAIN + * + * Removes support for the standardized "int main(int argc, char *argv[])" + * function and replaces it with "int main(void)". You must also manually + * call "f256Init()" at the start of your program. + * + * WITHOUT_PLATFORM + * + * Removes basic C library I/O support for "getchar()" and "__putchar()". + * This removes printf(). + * + * WITHOUT_DMA + * + * Removes DMA support. In the future, will also disable BITMAP. + * + */ + + +/* + * Usage Example: + * + * #define WITHOUT_FILE + * #define WITHOUT_SPRITE + * #define WITHOUT_TILE + * #define F256LIB_IMPLEMENTATION + * #include "f256lib.h" + * + * int main(int argc, char *argv[]) { + * return 0; + * } + * + */ + + +/* + * Library documentation at this point is basically "Use the Source, Luke!" + * Each section of the library has it's own header file in the non-amalgamated + * build. Look through the headers in the "include/" and "f256lib/" + * directories. + * + * Examples of using the various features of the library are in the "examples/" + * directory. Source code for helpful utilities and tools that run on the + * host computer can be found in "tools/". + * + */ + + +#define END_OF_DOCS__BEYOND_LIE_DRAGONS diff --git a/f256lib/f256.h b/f256lib/f256.h index 8ed628d..8f487a8 100644 --- a/f256lib/f256.h +++ b/f256lib/f256.h @@ -21,70 +21,6 @@ */ -/* - * Configuration DEFINEs - * - * Before including this file, you may define one or more of the following - * to customize the library for your application: - * - * SWAP_RESTORE - * - * When using functions such as FAR_PEEK or bitmap features, return the - * swap slot back to it's original memory location before returning. By - * default, the swap slot is left in whatever state the last function that - * used it switched it to. - * - * WITHOUT_GRAPHICS - * - * Shortcut for WITHOUT_BITMAP, WITHOUT_TILE, and WITHOUT_SPRITE. - * - * WITHOUT_BITMAP - * - * Disables bitmap functions. - * - * WITHOUT_TILE - * - * Disables tilemap functions. - * - * WITHOUT_SPRITE - * - * Disables sprite functions. - * - * WITHOUT_FILE - * - * Disables file handling support. - * - * WITHOUT_KERNEL - * - * Disables microkernel support. Also disables FILE, PLATFORM, and MAIN. - * - * WITHOUT_TEXT - * - * Disables text functions. Also disables PLATFORM. - * - * WITHOUT_MATH - * - * Disables math coprocessor support. Also disables TEXT, PLATFORM and - * BITMAP. - * - * WITHOUT_MAIN - * - * Removes support for the standardized "int main(int argc, char *argv[])" - * function and replaces it with "int main(void)". You must also manually - * call "f256Init()" at the start of your program. - * - * WITHOUT_PLATFORM - * - * Removes basic C library I/O support for "getchar()" and "__putchar()". - * This removes printf(). - * - * WITHOUT_DMA - * - * Removes DMA support. In the future, will also disable BITMAP. - * - */ - - #ifndef F256_H #define F256_H @@ -100,6 +36,7 @@ extern "C" #ifndef F256LIB_AMALGAMATED_BUILD +#include "docs.h" #include "stddclmr.h" #include "f_api.h" #include "f256_dma.h" diff --git a/tools/overlay/overlay.c b/tools/overlay/overlay.c index dc55563..d079e5d 100644 --- a/tools/overlay/overlay.c +++ b/tools/overlay/overlay.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "../shared/util.h" @@ -323,6 +324,7 @@ void trimEnd(char *string) { int main(int argc, char *argv[]) { FILE *out; int x; + int r; int nearSlot; char *targetDir; char *sourceDir; @@ -335,7 +337,7 @@ int main(int argc, char *argv[]) { int thisOffset; DIR *dir; struct dirent *dirent; - struct stat sb; + struct stat fileStat; /* * Command line: @@ -414,15 +416,17 @@ int main(int argc, char *argv[]) { } for (;;) { if ((dirent = readdir(dir)) == NULL) break; - stat(dirent->d_name, &sb); + cFile = utilCreateString("%s%s", sourceDir, dirent->d_name); // May not be a C file. We check later. + r = stat(cFile, &fileStat); + if (r < 0) printf("stat() failed with %d! %s\n", r, strerror(errno)); #ifdef _WIN32 - if (S_ISREG(sb.st_mode)) { + //printf("%s = %d\n", dirent->d_name, S_ISREG(fileStat.st_mode)); + if (S_ISREG(fileStat.st_mode)) { #else - if (S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) { + if (S_ISREG(fileStat.st_mode) || S_ISLNK(fileStat.st_mode)) { #endif // Is this a C file? if ((dirent->d_name[strlen(dirent->d_name) - 2] == '.') && (dirent->d_name[strlen(dirent->d_name) - 1] == 'c')) { - cFile = utilCreateString("%s%s", sourceDir, dirent->d_name); targetFile = utilCreateString("%s%s%s", targetDir, &sourceDir[sourceDirOffset], dirent->d_name); thisDir = utilGetUpToLastPathComponent(targetFile); utilFixPathSeparators(&thisDir, false); @@ -439,10 +443,10 @@ int main(int argc, char *argv[]) { free(thisDir); parseCFile(cFile, targetFile, out, trampolineFile, nearSlot + 8); //printf("%s --> %s\n", cFile, targetFile); - free(cFile); free(targetFile); } } + free(cFile); } closedir(dir); free(sourceDir); diff --git a/examples/.gitattributes b/work/.gitattributes similarity index 100% rename from examples/.gitattributes rename to work/.gitattributes diff --git a/examples/a23d2/a2-3d/A2-3D2#066000 b/work/a23d2/a2-3d/A2-3D2#066000 similarity index 100% rename from examples/a23d2/a2-3d/A2-3D2#066000 rename to work/a23d2/a2-3d/A2-3D2#066000 diff --git a/examples/a23d2/build.sh b/work/a23d2/build.sh similarity index 100% rename from examples/a23d2/build.sh rename to work/a23d2/build.sh diff --git a/examples/a23d2/f256.ld b/work/a23d2/f256.ld similarity index 100% rename from examples/a23d2/f256.ld rename to work/a23d2/f256.ld diff --git a/examples/a23d2/run.sh b/work/a23d2/run.sh similarity index 100% rename from examples/a23d2/run.sh rename to work/a23d2/run.sh diff --git a/examples/a23d2/src/a23d2.c b/work/a23d2/src/a23d2.c similarity index 100% rename from examples/a23d2/src/a23d2.c rename to work/a23d2/src/a23d2.c diff --git a/examples/a23d2/src/a23d2.h b/work/a23d2/src/a23d2.h similarity index 100% rename from examples/a23d2/src/a23d2.h rename to work/a23d2/src/a23d2.h diff --git a/examples/a23d2/src/main.c b/work/a23d2/src/main.c similarity index 100% rename from examples/a23d2/src/main.c rename to work/a23d2/src/main.c diff --git a/examples/a23d2/tools/scene.c b/work/a23d2/tools/scene.c similarity index 100% rename from examples/a23d2/tools/scene.c rename to work/a23d2/tools/scene.c diff --git a/examples/cube-pre/CMakeLists.txt b/work/cube-pre/CMakeLists.txt similarity index 100% rename from examples/cube-pre/CMakeLists.txt rename to work/cube-pre/CMakeLists.txt diff --git a/examples/cube-pre/build.sh b/work/cube-pre/build.sh similarity index 100% rename from examples/cube-pre/build.sh rename to work/cube-pre/build.sh diff --git a/examples/cube-pre/cube-pre.c b/work/cube-pre/cube-pre.c similarity index 100% rename from examples/cube-pre/cube-pre.c rename to work/cube-pre/cube-pre.c diff --git a/examples/cube-pre/run.sh b/work/cube-pre/run.sh similarity index 100% rename from examples/cube-pre/run.sh rename to work/cube-pre/run.sh diff --git a/examples/cube/sin.c b/work/cube-pre/sin.c similarity index 100% rename from examples/cube/sin.c rename to work/cube-pre/sin.c diff --git a/examples/kuptest/build.sh b/work/kuptest/build.sh similarity index 100% rename from examples/kuptest/build.sh rename to work/kuptest/build.sh diff --git a/examples/kuptest/kuptest.c b/work/kuptest/kuptest.c similarity index 100% rename from examples/kuptest/kuptest.c rename to work/kuptest/kuptest.c diff --git a/examples/pgztest/CMakeLists.txt b/work/pgztest/CMakeLists.txt similarity index 100% rename from examples/pgztest/CMakeLists.txt rename to work/pgztest/CMakeLists.txt diff --git a/examples/pgztest/build.sh b/work/pgztest/build.sh similarity index 100% rename from examples/pgztest/build.sh rename to work/pgztest/build.sh diff --git a/examples/pgztest/copy.sh b/work/pgztest/copy.sh similarity index 100% rename from examples/pgztest/copy.sh rename to work/pgztest/copy.sh diff --git a/examples/pgztest/dump.sh b/work/pgztest/dump.sh similarity index 100% rename from examples/pgztest/dump.sh rename to work/pgztest/dump.sh diff --git a/examples/pgztest/pgztest.c b/work/pgztest/pgztest.c similarity index 100% rename from examples/pgztest/pgztest.c rename to work/pgztest/pgztest.c diff --git a/examples/pgztest/run.sh b/work/pgztest/run.sh similarity index 100% rename from examples/pgztest/run.sh rename to work/pgztest/run.sh diff --git a/examples/pgztest/start.sh b/work/pgztest/start.sh similarity index 100% rename from examples/pgztest/start.sh rename to work/pgztest/start.sh diff --git a/examples/pgztest/stop.sh b/work/pgztest/stop.sh similarity index 100% rename from examples/pgztest/stop.sh rename to work/pgztest/stop.sh diff --git a/examples/sprites/CMakeLists.txt b/work/sprites/CMakeLists.txt similarity index 100% rename from examples/sprites/CMakeLists.txt rename to work/sprites/CMakeLists.txt diff --git a/examples/sprites/assets/apache-left-front.png b/work/sprites/assets/apache-left-front.png similarity index 100% rename from examples/sprites/assets/apache-left-front.png rename to work/sprites/assets/apache-left-front.png diff --git a/examples/sprites/assets/apache-left.png b/work/sprites/assets/apache-left.png similarity index 100% rename from examples/sprites/assets/apache-left.png rename to work/sprites/assets/apache-left.png diff --git a/examples/sprites/assets/apache-right-front.png b/work/sprites/assets/apache-right-front.png similarity index 100% rename from examples/sprites/assets/apache-right-front.png rename to work/sprites/assets/apache-right-front.png diff --git a/examples/sprites/assets/apache-right.png b/work/sprites/assets/apache-right.png similarity index 100% rename from examples/sprites/assets/apache-right.png rename to work/sprites/assets/apache-right.png diff --git a/examples/sprites/assets/apache.png b/work/sprites/assets/apache.png similarity index 100% rename from examples/sprites/assets/apache.png rename to work/sprites/assets/apache.png diff --git a/work/sprites/assets/apache.xcf b/work/sprites/assets/apache.xcf new file mode 100644 index 0000000..76370ac --- /dev/null +++ b/work/sprites/assets/apache.xcf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce6dae67c3b0388c27505acbaf8fd35f78632c01a65cc23366d1c4cc2b27ae5d +size 33840 diff --git a/examples/sprites/build.sh b/work/sprites/build.sh similarity index 100% rename from examples/sprites/build.sh rename to work/sprites/build.sh diff --git a/examples/sprites/helicopter.c b/work/sprites/helicopter.c similarity index 100% rename from examples/sprites/helicopter.c rename to work/sprites/helicopter.c diff --git a/examples/sprites/make-sprites.sh b/work/sprites/make-sprites.sh similarity index 100% rename from examples/sprites/make-sprites.sh rename to work/sprites/make-sprites.sh diff --git a/examples/sprites/run.sh b/work/sprites/run.sh similarity index 100% rename from examples/sprites/run.sh rename to work/sprites/run.sh diff --git a/examples/tilemap/CMakeLists.txt b/work/tilemap/CMakeLists.txt similarity index 100% rename from examples/tilemap/CMakeLists.txt rename to work/tilemap/CMakeLists.txt diff --git a/examples/tilemap/brita.tiles b/work/tilemap/brita.tiles similarity index 100% rename from examples/tilemap/brita.tiles rename to work/tilemap/brita.tiles diff --git a/examples/tilemap/build.sh b/work/tilemap/build.sh similarity index 100% rename from examples/tilemap/build.sh rename to work/tilemap/build.sh diff --git a/examples/tilemap/makemap.c b/work/tilemap/makemap.c similarity index 100% rename from examples/tilemap/makemap.c rename to work/tilemap/makemap.c diff --git a/examples/tilemap/rawdata/Ultima Map Explorer.txt b/work/tilemap/rawdata/Ultima Map Explorer.txt similarity index 100% rename from examples/tilemap/rawdata/Ultima Map Explorer.txt rename to work/tilemap/rawdata/Ultima Map Explorer.txt diff --git a/examples/tilemap/rawdata/brita.map b/work/tilemap/rawdata/brita.map similarity index 100% rename from examples/tilemap/rawdata/brita.map rename to work/tilemap/rawdata/brita.map diff --git a/examples/tilemap/rawdata/makeBinMaps.js b/work/tilemap/rawdata/makeBinMaps.js similarity index 100% rename from examples/tilemap/rawdata/makeBinMaps.js rename to work/tilemap/rawdata/makeBinMaps.js diff --git a/examples/tilemap/rawdata/u5tiles.png b/work/tilemap/rawdata/u5tiles.png similarity index 100% rename from examples/tilemap/rawdata/u5tiles.png rename to work/tilemap/rawdata/u5tiles.png diff --git a/examples/tilemap/rawdata/u5underworld.js b/work/tilemap/rawdata/u5underworld.js similarity index 100% rename from examples/tilemap/rawdata/u5underworld.js rename to work/tilemap/rawdata/u5underworld.js diff --git a/examples/tilemap/rawdata/u5world.js b/work/tilemap/rawdata/u5world.js similarity index 100% rename from examples/tilemap/rawdata/u5world.js rename to work/tilemap/rawdata/u5world.js diff --git a/examples/tilemap/rawdata/under.map b/work/tilemap/rawdata/under.map similarity index 100% rename from examples/tilemap/rawdata/under.map rename to work/tilemap/rawdata/under.map diff --git a/examples/tilemap/run.sh b/work/tilemap/run.sh similarity index 100% rename from examples/tilemap/run.sh rename to work/tilemap/run.sh diff --git a/examples/tilemap/u5map.c b/work/tilemap/u5map.c similarity index 100% rename from examples/tilemap/u5map.c rename to work/tilemap/u5map.c diff --git a/examples/tilemap/u5tiles.clut b/work/tilemap/u5tiles.clut similarity index 100% rename from examples/tilemap/u5tiles.clut rename to work/tilemap/u5tiles.clut diff --git a/examples/tilemap/u5tiles.indexed b/work/tilemap/u5tiles.indexed similarity index 100% rename from examples/tilemap/u5tiles.indexed rename to work/tilemap/u5tiles.indexed diff --git a/examples/tilemap/under.tiles b/work/tilemap/under.tiles similarity index 100% rename from examples/tilemap/under.tiles rename to work/tilemap/under.tiles