Here's a batch script that converts *.dat files to *.bin for use in CPCtelera projects. The *.dat files should be in the same folder as exomizer.exe and exoopt.exe.
@echo off
echo Exomizer Batch File Processor
echo =============================
echo.
echo .dat files must be in same folder
echo as exomizer.exe and exoopt.exe
echo creates .bin files
echo.
set out=.out
set bin=.bin
echo Exomizing...
echo.
for %%f in (*.dat) do (
exomizer raw %%f -o %%~nf%out% -q
)
echo Optimizing...
echo.
for %%f in (*.out) do (
exoopt %%f %%~nf%bin%
)
echo Cleaning Up...
del *.out
echo.
echo Finished!
echo.
pause
Nice.
I use a Shellskript ("convert.sh").
It needs exomizer in your bin path, and you can give it a list of files that
are "C-Data-Files" in your Project-Source.
like "maze1.c"
// srsmaze (c) Juni 2016 by SRS
// Beispielmaze in Binaerform 1 = Wand 2 = leer (begehbar)
#include <types.h>
const u8 maze[]
= {
0b10111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
0b10000000,0b00001000,0b0000...
#!/bin/bash
## Paths and files required for this script to work
FILES2CONVERT=( maze1 )
SDCC=${CPCT_PATH}/tools/sdcc-3.5.5/bin/sdcc
HEX2BIN=${CPCT_PATH}/tools/hex2bin-2.0/bin/hex2bin
##EXOMIZER=${CPCT_PATH}/tools/exomizer/exomizer
EXOMIZER=exomizer
## Function
function compileC {
$SDCC -mz80 -c "${1}.c"
}
## Function that converts and exomizes 1 REL file
function convertAndExomize {
$SDCC "${1}.rel" --no-std-crt0
$HEX2BIN "${1}.ihx"
$EXOMIZER raw "${1}.bin" -o "${1}.exo"
cpct_bin2c "${1}.exo" > "${1}.txt"
}
## Enter obj/ folder and convert to binary and exomize all desired files one by one
cd obj/
for F in ${FILES2CONVERT[@]}; do
convertAndExomize "$F"
done
cd -