From 367bfbc5219c9d703e9c88a820f84e925a70f861 Mon Sep 17 00:00:00 2001 From: jede Date: Sun, 7 Jan 2024 00:10:49 +0100 Subject: [PATCH] fix reloc --- .gitignore | 1 + Makefile | 10 +++++++--- README.md | 23 ++++++++++++++++------- VERSION | 2 +- docs/file.md | 2 +- package/file/DEBIAN/control | 9 +++++++++ src/file.c | 16 +++++++--------- 7 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 package/file/DEBIAN/control diff --git a/.gitignore b/.gitignore index 8fce603..95d5715 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ data/ +build/ \ No newline at end of file diff --git a/Makefile b/Makefile index f20ae4d..b8a90c2 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,14 @@ endif $(PROGRAM): $(SOURCE) mkdir build/bin -p mkdir build/usr/share/man -p - $(CC) -o 1000 $(CFLAGS) $(LDFILES) $(SOURCE) --start-addr \$800 - $(CC) -o 1256 $(CFLAGS) $(LDFILES) $(SOURCE) --start-addr \$900 + + + $(CC) -o 1000 $(CFLAGS) $(LDFILES) $(SOURCE) --start-addr 2048 + $(CC) -o 1256 $(CFLAGS) $(LDFILES) $(SOURCE) --start-addr 2304 # Reloc chmod +x deps/orix-sdk/bin/relocbin.py3 deps/orix-sdk/bin/relocbin.py3 -o build/bin/file -2 1000 1256 cd docs && ../../md2hlp/src/md2hlp.py3 --file file.md --output ../build/usr/share/man/file.hlp && cd .. - +package: + cp build/* package/ -adpR + cd package/file && dpkg-deb --build file \ No newline at end of file diff --git a/README.md b/README.md index f18cb41..0ceb039 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,31 @@ +# file binary source code + [![build](https://github.com/orix-software/file/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/orix-software/file/actions/workflows/main.yml) File tool for Orix : http://orix.oric.org manage raw file, orix binary file. -Changelog : +## Changelog + +### 07/01/2024 : 2024.1 + +-* fix reloc + +### 20/11/2017 : 1.0.4 -20/11/2017 : 1.0.4 * -v management and -h -18/11/2017 : 1.0.3 +### 18/11/2017 : 1.0.3 + * gzip format detection -22/09/2017 +### 22/09/2017 + * wav file management -31/08/2017 -* VHI files management +### 31/08/2017 + +* VHI files management display number of frames the size of the frame - \ No newline at end of file diff --git a/VERSION b/VERSION index 9ea7918..2cf03e5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2022.4 \ No newline at end of file +2024.1 \ No newline at end of file diff --git a/docs/file.md b/docs/file.md index cf81676..0b661bf 100644 --- a/docs/file.md +++ b/docs/file.md @@ -14,4 +14,4 @@ Detects file : orix, wav, gz, lz77, tape, vhi ## SOURCE -Src code : https://github.com/orix-software/file.git (Assembly and C) +Src code : https://github.com/orix-software/file (Assembly and C) diff --git a/package/file/DEBIAN/control b/package/file/DEBIAN/control new file mode 100644 index 0000000..28d42fb --- /dev/null +++ b/package/file/DEBIAN/control @@ -0,0 +1,9 @@ +Package: file +Version: 2024.1 +Section: base +Priority: optional +Architecture: 6502 +#Depends: +Maintainer: jede +Description: file binary for checking file type +Homepage: https://orix.oric.org diff --git a/src/file.c b/src/file.c index dd7ad5d..e0d6d96 100644 --- a/src/file.c +++ b/src/file.c @@ -13,12 +13,12 @@ void version() { } void script_file() { - printf("Script file\n"); + printf("Script file\n"); return; } void tap_file() { - printf("TAP file\n"); + printf("TAP file\n"); printf("Starting adress : $%02hhX%02hhX\n",chars[10],chars[11]); printf("End of loading adress : $%02hhX%02hhX\n",chars[8],chars[9]); return; @@ -53,8 +53,8 @@ void wav_file() { break; default : printf(" Unknown %d\n",temp); - } - + } + temp=chars[20]+chars[21]*256; printf(" Nbrchannel :"); switch(temp) { @@ -66,7 +66,7 @@ void wav_file() { break; case 3 : printf(" left, right et center \n"); - break; + break; case 4 : printf(" left front, right front, back left, back right \n"); break; @@ -75,7 +75,7 @@ void wav_file() { break; case 6 : printf(" left center, left, centee, right center, right, surround (ambiant) \n"); - break; + break; default : printf(" Unknown \n"); } @@ -84,7 +84,7 @@ void wav_file() { printf(" BytePerBloc : %d\n",chars[30]+chars[31]*256); printf(" BitsPerSample : %d\n",chars[32]+chars[33]*256); return; - + /* [Bloc de déclaration d'un fichier au format WAVE] FileTypeBlocID (4 octets) : Constante «RIFF» (0x52,0x49,0x46,0x46) @@ -120,8 +120,6 @@ NOTES IMPORTANTES : Les octets des mots sont stockés sous la forme (c.-à-d., */ } - - void vhi_file() { printf("VHI file\n"); printf("Format : ");