[File] [PATCH] Recognize Varvara Uxn ROMs with metadata
Christos Zoulas
christos at zoulas.com
Tue Jul 30 22:25:48 UTC 2024
Committed, thanks!
christos
> On Jul 10, 2024, at 4:03 PM, Samuel Dionne-Riel <samuel at dionne-riel.com> wrote:
>
> It might be possible with heuristics to recognize ROMs without
> metadata, but I suppose it would be hard, as it's pretty much raw binary
> data without common structure, other than things like JSRs paired with
> JMP2r.
>
> Verified with:
>
> ```
> $ file -m $repo/magic/Magdir .../*.rom
> .../uxndis.rom: Varvara Uxn ROM with metadata at 0x3bd (Uxndis)
> .../meta.rom: Varvara Uxn ROM with metadata at 0x139 (Meta)
> .../notepad.rom: Varvara Uxn ROM with metadata at 0x14b (Note Pad)
> ```
>
> Signed-off-by: Samuel Dionne-Riel <samuel at dionne-riel.com>
> ---
> magic/Magdir/uxn | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
> create mode 100644 magic/Magdir/uxn
>
> diff --git a/magic/Magdir/uxn b/magic/Magdir/uxn
> new file mode 100644
> index 00000000..3f2522e7
> --- /dev/null
> +++ b/magic/Magdir/uxn
> @@ -0,0 +1,16 @@
> +#------------------------------------------------------------------------------
> +# uxn: file(1) magic for Uxn ROM files
> +#
> +# https://100r.co/site/uxn.html
> +# https://wiki.xxiivv.com/site/uxn.html
> +#
> +# Created by Samuel Dionne-Riel <samuel at dionne-riel.com>
> +
> +# https://wiki.xxiivv.com/site/metadata.html
> +0x00 byte =0xa0
> +>0x01 ubeshort x
> +>>0x03 byte =0x80
> +>>>0x04 byte =0x06
> +>>>>0x05 byte =0x37 Varvara Uxn ROM
> +>>>>>0x01 ubeshort x with metadata at 0x%x
> +>>>>>>(0x01.S-0x0ff) string x (%s)
> --
> 2.44.1
>
> --
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
More information about the File
mailing list