diff --git a/Source/HBIOS/Build.sh b/Source/HBIOS/Build.sh index 5ca3562e..48f21bc4 100755 --- a/Source/HBIOS/Build.sh +++ b/Source/HBIOS/Build.sh @@ -65,15 +65,7 @@ ROMSIZE .EQU $romsize EOF cp ../Forth/camel80.bin camel80.bin - -echo "Build font files ..." - -for file in $(ls -1 ../Fonts/*.bin | sort -V) ; do - font=$(basename -- "$file") - fontname="${font%.*}.asm" - echo " " $fontname - ../../Tools/Linux/bin2asm $file > ../HBIOS/$fontname -done +cp ../Fonts/font*.asm . make dbgmon.bin prefix.bin romldr.bin eastaegg.bin nascom.bin \ tastybasic.bin game.bin usrrom.bin imgpad.bin imgpad0.bin diff --git a/Tools/Linux/bin2asm b/Tools/Linux/bin2asm deleted file mode 100755 index 674c174a..00000000 Binary files a/Tools/Linux/bin2asm and /dev/null differ diff --git a/Tools/unix/bin2asm/LICENSE b/Tools/unix/bin2asm/LICENSE deleted file mode 100644 index b6df5b30..00000000 --- a/Tools/unix/bin2asm/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 ipatix - -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. diff --git a/Tools/unix/bin2asm/Makefile b/Tools/unix/bin2asm/Makefile deleted file mode 100755 index 9063175f..00000000 --- a/Tools/unix/bin2asm/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CC = gcc -STRIP = strip -CFLAGS = -Werror -Wall -Wextra -Wconversion -O2 -D NDEBUG -BINARY = bin2asm - -SRC_FILES = $(wildcard *.c) -OBJ_FILES = $(SRC_FILES:.c=.o) - -all: $(BINARY) - -.PHONY: clean -clean: - rm -f $(OBJ_FILES) - -$(BINARY): $(OBJ_FILES) - $(CC) -o $@ $^ $(LIBS) - $(STRIP) -s $@ - -%.o: %.c - $(CC) -c -o $@ $< $(CFLAGS) $(IMPORT) diff --git a/Tools/unix/bin2asm/README.md b/Tools/unix/bin2asm/README.md deleted file mode 100644 index cc666ba1..00000000 --- a/Tools/unix/bin2asm/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# bin2asm -Converts binary files to ASM compatible assembly files - -Usage: -$ bin2asm hello.bin > hello.asm diff --git a/Tools/unix/bin2asm/bin2asm.c b/Tools/unix/bin2asm/bin2asm.c deleted file mode 100644 index 75b4d61d..00000000 --- a/Tools/unix/bin2asm/bin2asm.c +++ /dev/null @@ -1,100 +0,0 @@ -//bin2asm from Michael Panzlaff https://github.com/ipatix/bin2asm Thanks Mike. -//Modified by Phil Summers difficultylevelhigh@gmail.com for ROMWBW - -#include -#include -#include -#include - -void die(const char msg[]) { - perror(msg); - exit(EXIT_FAILURE); -} - -int main(int argc, char *argv[]) { - for (int i = 1; i < argc; i++) { - // determine file size - FILE *input_file = fopen(argv[i], "rb"); - if (!input_file) { - fprintf(stderr, "fail %s\n", argv[i]); - die("Couldn't open input file"); - } - if (fseek(input_file, 0, SEEK_END) == -1) { - die("Error determining file size"); - } - long file_size = ftell(input_file); - if (file_size == -1) { - die("Error determining file size (2)"); - } - if (fseek(input_file, 0, SEEK_SET) == -1) { - die("Error determining file size (3)"); - } - // get file name - char *name = basename(argv[i]); - char *dot = strrchr(name, '.'); - if (dot) { - *dot = '\0'; - } - - // write lines - while (file_size > 0) { - size_t bytes_read = (file_size > 8) ? 8 : (size_t)file_size; - unsigned char data_buf[8]; - size_t actual_read = fread(data_buf, 1, bytes_read, input_file); - if (actual_read != bytes_read) { - fprintf(stderr, "Error while reading file, only %d read instead of %d\n", (int)actual_read, (int)bytes_read); - if (feof(input_file)) - fprintf(stderr, "Reached end of file\n"); - if (ferror(input_file)) - fprintf(stderr, "An unknown error occured while reading the file\n"); - perror("ERROR"); - exit(EXIT_FAILURE); - } - switch (bytes_read) { - case 1: - printf(" .db $%02X\r\n", - data_buf[0]); - break; - case 2: - printf(" .db $%02X, $%02X\r\n", - data_buf[0], data_buf[1]); - break; - case 3: - printf(" .db $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2]); - break; - case 4: - printf(" .db $%02X, $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2], data_buf[3]); - break; - case 5: - printf(" .db $%02X, $%02X, $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2], data_buf[3], data_buf[4]); - break; - case 6: - printf(" .db $%02X, $%02X, $%02X, $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2], data_buf[3], data_buf[4], data_buf[5]); - break; - case 7: - printf(" .db $%02X, $%02X, $%02X, $%02X, $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2], data_buf[3], data_buf[4], data_buf[5], data_buf[6]); - break; - case 8: - printf(" .db $%02X, $%02X, $%02X, $%02X, $%02X, $%02X, $%02X, $%02X\r\n", - data_buf[0], data_buf[1], data_buf[2], data_buf[3], data_buf[4], data_buf[5], data_buf[6], data_buf[7]); - break; - default: - fprintf(stderr, "Invalid program state\n"); - exit(EXIT_FAILURE); - } - file_size -= (long)bytes_read; - } - - printf("\r\n"); - - if (fclose(input_file)) { - die("Error while closing file"); - } - } - return 0; -}