From 8536240e75097e62c56cdfbc61b2a5e4b0f747f2 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Mon, 29 Apr 2024 20:03:36 -0500 Subject: [PATCH] Windows installer in beta! --- build-distro.sh | 14 +++ build-f256lib.sh | 3 +- distro/f256-install-windows.bat | 57 ++++++--- distro/f256build.bat | 62 ++++++++++ distro/f256run.bat | 46 +++++++ examples/cube/CMakeLists.txt | 50 -------- examples/cube/build.sh | 53 -------- examples/cube/run.sh | 26 ---- examples/cube/{ => src}/cube.c | 8 +- examples/{cube-pre => cube/tools}/sin.c | 0 examples/lines/CMakeLists.txt | 50 -------- examples/lines/build.sh | 52 -------- examples/lines/run.sh | 26 ---- examples/lines/{ => src}/lines.c | 8 +- examples/overlay/CMakeLists.txt | 54 -------- examples/overlay/build.sh | 60 --------- examples/overlay/f256.ld | 96 -------------- examples/overlay/overlay.c | 72 ----------- examples/overlay/run.sh | 26 ---- examples/sprites/assets/apache.xcf | Bin 33840 -> 0 bytes f256lib/docs.h | 117 ++++++++++++++++++ f256lib/f256.h | 65 +--------- tools/overlay/overlay.c | 16 ++- {examples => work}/.gitattributes | 0 {examples => work}/a23d2/a2-3d/A2-3D2#066000 | 0 {examples => work}/a23d2/build.sh | 0 {examples => work}/a23d2/f256.ld | 0 {examples => work}/a23d2/run.sh | 0 {examples => work}/a23d2/src/a23d2.c | 0 {examples => work}/a23d2/src/a23d2.h | 0 {examples => work}/a23d2/src/main.c | 0 {examples => work}/a23d2/tools/scene.c | 0 {examples => work}/cube-pre/CMakeLists.txt | 0 {examples => work}/cube-pre/build.sh | 0 {examples => work}/cube-pre/cube-pre.c | 0 {examples => work}/cube-pre/run.sh | 0 {examples/cube => work/cube-pre}/sin.c | 0 {examples => work}/kuptest/build.sh | 0 {examples => work}/kuptest/kuptest.c | 0 {examples => work}/pgztest/CMakeLists.txt | 0 {examples => work}/pgztest/build.sh | 0 {examples => work}/pgztest/copy.sh | 0 {examples => work}/pgztest/dump.sh | 0 {examples => work}/pgztest/pgztest.c | 0 {examples => work}/pgztest/run.sh | 0 {examples => work}/pgztest/start.sh | 0 {examples => work}/pgztest/stop.sh | 0 {examples => work}/sprites/CMakeLists.txt | 0 .../sprites/assets/apache-left-front.png | 0 .../sprites/assets/apache-left.png | 0 .../sprites/assets/apache-right-front.png | 0 .../sprites/assets/apache-right.png | 0 {examples => work}/sprites/assets/apache.png | 0 work/sprites/assets/apache.xcf | 3 + {examples => work}/sprites/build.sh | 0 {examples => work}/sprites/helicopter.c | 0 {examples => work}/sprites/make-sprites.sh | 0 {examples => work}/sprites/run.sh | 0 {examples => work}/tilemap/CMakeLists.txt | 0 {examples => work}/tilemap/brita.tiles | 0 {examples => work}/tilemap/build.sh | 0 {examples => work}/tilemap/makemap.c | 0 .../tilemap/rawdata/Ultima Map Explorer.txt | 0 {examples => work}/tilemap/rawdata/brita.map | 0 .../tilemap/rawdata/makeBinMaps.js | 0 .../tilemap/rawdata/u5tiles.png | 0 .../tilemap/rawdata/u5underworld.js | 0 {examples => work}/tilemap/rawdata/u5world.js | 0 {examples => work}/tilemap/rawdata/under.map | 0 {examples => work}/tilemap/run.sh | 0 {examples => work}/tilemap/u5map.c | 0 {examples => work}/tilemap/u5tiles.clut | 0 {examples => work}/tilemap/u5tiles.indexed | 0 {examples => work}/tilemap/under.tiles | 0 74 files changed, 307 insertions(+), 657 deletions(-) create mode 100644 distro/f256build.bat create mode 100644 distro/f256run.bat delete mode 100644 examples/cube/CMakeLists.txt delete mode 100755 examples/cube/build.sh delete mode 100755 examples/cube/run.sh rename examples/cube/{ => src}/cube.c (96%) rename examples/{cube-pre => cube/tools}/sin.c (100%) delete mode 100644 examples/lines/CMakeLists.txt delete mode 100755 examples/lines/build.sh delete mode 100755 examples/lines/run.sh rename examples/lines/{ => src}/lines.c (93%) delete mode 100644 examples/overlay/CMakeLists.txt delete mode 100755 examples/overlay/build.sh delete mode 100644 examples/overlay/f256.ld delete mode 100644 examples/overlay/overlay.c delete mode 100755 examples/overlay/run.sh delete mode 100644 examples/sprites/assets/apache.xcf create mode 100644 f256lib/docs.h rename {examples => work}/.gitattributes (100%) rename {examples => work}/a23d2/a2-3d/A2-3D2#066000 (100%) rename {examples => work}/a23d2/build.sh (100%) rename {examples => work}/a23d2/f256.ld (100%) rename {examples => work}/a23d2/run.sh (100%) rename {examples => work}/a23d2/src/a23d2.c (100%) rename {examples => work}/a23d2/src/a23d2.h (100%) rename {examples => work}/a23d2/src/main.c (100%) rename {examples => work}/a23d2/tools/scene.c (100%) rename {examples => work}/cube-pre/CMakeLists.txt (100%) rename {examples => work}/cube-pre/build.sh (100%) rename {examples => work}/cube-pre/cube-pre.c (100%) rename {examples => work}/cube-pre/run.sh (100%) rename {examples/cube => work/cube-pre}/sin.c (100%) rename {examples => work}/kuptest/build.sh (100%) rename {examples => work}/kuptest/kuptest.c (100%) rename {examples => work}/pgztest/CMakeLists.txt (100%) rename {examples => work}/pgztest/build.sh (100%) rename {examples => work}/pgztest/copy.sh (100%) rename {examples => work}/pgztest/dump.sh (100%) rename {examples => work}/pgztest/pgztest.c (100%) rename {examples => work}/pgztest/run.sh (100%) rename {examples => work}/pgztest/start.sh (100%) rename {examples => work}/pgztest/stop.sh (100%) rename {examples => work}/sprites/CMakeLists.txt (100%) rename {examples => work}/sprites/assets/apache-left-front.png (100%) rename {examples => work}/sprites/assets/apache-left.png (100%) rename {examples => work}/sprites/assets/apache-right-front.png (100%) rename {examples => work}/sprites/assets/apache-right.png (100%) rename {examples => work}/sprites/assets/apache.png (100%) create mode 100644 work/sprites/assets/apache.xcf rename {examples => work}/sprites/build.sh (100%) rename {examples => work}/sprites/helicopter.c (100%) rename {examples => work}/sprites/make-sprites.sh (100%) rename {examples => work}/sprites/run.sh (100%) rename {examples => work}/tilemap/CMakeLists.txt (100%) rename {examples => work}/tilemap/brita.tiles (100%) rename {examples => work}/tilemap/build.sh (100%) rename {examples => work}/tilemap/makemap.c (100%) rename {examples => work}/tilemap/rawdata/Ultima Map Explorer.txt (100%) rename {examples => work}/tilemap/rawdata/brita.map (100%) rename {examples => work}/tilemap/rawdata/makeBinMaps.js (100%) rename {examples => work}/tilemap/rawdata/u5tiles.png (100%) rename {examples => work}/tilemap/rawdata/u5underworld.js (100%) rename {examples => work}/tilemap/rawdata/u5world.js (100%) rename {examples => work}/tilemap/rawdata/under.map (100%) rename {examples => work}/tilemap/run.sh (100%) rename {examples => work}/tilemap/u5map.c (100%) rename {examples => work}/tilemap/u5tiles.clut (100%) rename {examples => work}/tilemap/u5tiles.indexed (100%) rename {examples => work}/tilemap/under.tiles (100%) 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 8844ea3ee578382db634086af0476eeab3c19a21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33840 zcmds=-;WzvcHb|nip5{e?k2m{s%~{_THoh5F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&1)oary)qqa7Ucet~ov&71X`}Q~$+c;&NG0Ogsr3Iag-lks8(XiYq8O z`H~rDN~%fPk&auED;8I$aIqHnfh+1;Nf)J5PR<9gN+urFqvrJGr3Aix!G_YgD+aqk z(Iy_g)0Fm@c#1ahpquk`nEh_K;D@;r(jsqU{QFn!E~~cCP!j^1dR_^Qq>HjImSv=#d&@8}s(nm*ykOde|CWRT+G{|_upWk3Qi&`PZlRf9~ zEyvnuVKfn1-dY$V@z6~|NJ?sIv2CXysRIp_b+?Tcd;|E7sDVe(%_Fc!@BPg8bNf9$ zOA0`rC>6rLw9GdX4cv-Wb*xG2*7tlrS8wqNMgaO8qY$32R`uCMAi=F{w5(RcTZYnV848pB zt-unsR#$y4t5pG*byu^|QVmxbEmV)u!mM0V?U;yZQ#M+x=CfTB6h$XSOD`lJqUbZWT6R9qpg`g|Mx~D6` z!lp~d7|StJ#~jN!vw}5laxC&My9-D7y2I_rk8@elzi;_Z@>8D0bd@qL%KvbiYf}OK LkeAsb!QcM@=AIgt 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