Add RNC compression and make cpp preprocess asm

This commit is contained in:
CrashOveride95
2021-01-25 22:21:15 -05:00
parent d0e19eaf23
commit 90371f0a8d
15 changed files with 3122 additions and 113 deletions

View File

@@ -58,10 +58,14 @@ else ifeq ($(SAVETYPE),sram)
endif
COMPRESS ?= yay0
$(eval $(call validate-option,COMPRESS,yay0 gzip))
$(eval $(call validate-option,COMPRESS,yay0 gzip rnc1 rnc2))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
SRC_DIRS += src/gzip
else ifeq ($(COMPRESS),rnc1)
DEFINES += RNC1=1
else ifeq ($(COMPRESS),rnc2)
DEFINES += RNC2=1
else ifeq ($(COMPRESS),yay0)
DEFINES += YAY0=1
endif
@@ -427,6 +431,7 @@ export LANG := C
# N64 tools
YAY0TOOL := $(TOOLS_DIR)/slienc
RNCPACK := $(TOOLS_DIR)/rncpack
ROMALIGN := $(TOOLS_DIR)/romalign
BFSIZE := $(TOOLS_DIR)/bfsize
FILESIZER := $(TOOLS_DIR)/filesizer
@@ -607,35 +612,13 @@ $(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
ifeq ($(COMPRESS),gzip)
# Compress binary file to gzip
$(BUILD_DIR)/%.gz: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
ifeq ($(GZIPVER),std)
$(V)$(GZIP) -c -9 -n $< > $@
include gziprules.mk
else ifeq ($(COMPRESS),rnc1)
include rnc1rules.mk
else ifeq ($(COMPRESS),rnc2)
include rnc2rules.mk
else
$(V)$(GZIP) -c -12 -n $< > $@
endif
# Strip gzip header
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.gz
$(call print,Converting:,$<,$@)
$(V)dd bs=10 skip=1 if=$< of=$@
$(V)$(FILESIZER) $(<:.gz=.bin) $@
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting GZIP to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
else
# Compress binary file
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
$(V)$(YAY0TOOL) $< $@
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting YAY0 to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
include yay0rules.mk
endif
#==============================================================================#
@@ -807,7 +790,7 @@ endif
# Assemble assembly code
$(BUILD_DIR)/%.o: %.s
$(call print,Assembling:,$<,$@)
$(V)$(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@ $<
$(V)$(CPP) $(CPPFLAGS) $< | $(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@
# Assemble RSP assembly code
$(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s

View File

@@ -23,7 +23,7 @@ I may attempt FlashRAM in the future.
The repository supports targeting the iQue Player in addition to the N64. The iQue libultra is ***NOT*** compatible with N64 in many ways, so it is currently NOT possible to have one build for both consoles.
To target iQue, run make with the ``CONSOLE=BB`` argument.
To target iQue, run make with the ``CONSOLE=bb`` argument.
## Compression
@@ -33,13 +33,19 @@ On average I'd estimate that the bottleneck on decompression is about 1-2 second
To switch to gzip, run make with the ``COMPRESS=gzip`` argument.
Additionally, the repo also supports compressing with ``libdeflate-gzip``. This compresses at a slightly better ratio than standard ``gzip``, with no real downside from a decompression standpoint.
The repo also supports gziping with ``libdeflate-gzip``. This compresses at a slightly better ratio than standard ``gzip``, with no real downside from a decompression standpoint.
To use ``libdeflate-gzip``, first clone the [repo](https://github.com/ebiggers/libdeflate), then make and make install it.
Then run make for sm64 with ``GZIPVER=libdef`` in addition to ``COMPRESS=gzip``
This argument makes the makefile use ``libdeflate`` with it's highest compression setting, ``-12``.
The repo also supports RNC (Rob Northen Compression). RNC has two methods.
Method 1 is designed to compress as small as possible, while method 2 is designed so that decompression is as fast as possible.
Both methods are fast. Method 1 has better compression than 2, so I suggest using method 1 if using RNC.
To switch to RNC, run make with either ``COMPRESS=rnc1`` or ``COMPRESS=rnc2``, depending on preferred method.
## FAQ

507
asm/rnc1.s Executable file

File diff suppressed because it is too large Load Diff

673
asm/rnc2.s Executable file

File diff suppressed because it is too large Load Diff

19
gziprules.mk Normal file
View File

@@ -0,0 +1,19 @@
# Compress binary file to gzip
$(BUILD_DIR)/%.gz: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
ifeq ($(GZIPVER),std)
$(V)$(GZIP) -c -9 -n $< > $@
else
$(V)$(GZIP) -c -12 -n $< > $@
endif
# Strip gzip header
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.gz
$(call print,Converting:,$<,$@)
$(V)dd bs=10 skip=1 if=$< of=$@
$(V)$(FILESIZER) $(<:.gz=.bin) $@
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting GZIP to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@

24
include/rnc.h Executable file
View File

@@ -0,0 +1,24 @@
#ifndef _IE_PACK_H
#define _IE_PACK_H
typedef struct s_Propack
{
u8 Id[3]; // MUST be RNC
u8 Method; // MUST be 0,1,2 (will have 0x80 added if indexed type)
u32 UnpackedSize;
u32 PackedSize; // Including size of ALL data
u16 BlockCount; // Indexed method block count
u8 BlockSize; // When method is indexed, this gives us the block size in KB.
u8 Reserved[3];
u8 Data[0];
} t_Propack;
/* Prototypes for unpack routines in assembly - Note: these just do the raw unpacking
everything else is done at a level above
*/
extern void Propack_UnpackM1(void *FilePtr, void *OutputBuffer);
extern void Propack_UnpackM2(void *FilePtr, void *OutputBuffer);
#endif // _IE_PACK_H

158
lib/rsp.s
View File

@@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
.set UCODE_SIZE, 0x800
.section .text
@@ -10,34 +10,34 @@ glabel rspbootTextStart
glabel rspbootTextEnd
.balign 16
.ifndef F3DEX_GBI_SHARED
.if SUPER3D_GBI == 1
#ifndef F3DEX_GBI_SHARED
#if SUPER3D_GBI == 1
glabel gspSuper3D_fifoTextStart
.incbin "lib/PR/super3d/Super3D.bin"
glabel gspSuper3D_fifoTextEnd
.else
#else
glabel gspFast3D_fifoTextStart /* Use regular Fast3D bins (default) */
.incbin "rsp/fast3d.bin"
glabel gspFast3D_fifoTextEnd
.endif
#endif
.else /* Use one of the Fast3DEX series grucodes. */
.ifndef F3DZEX_GBI_2
.if F3DEX_GBI_2 == 1
#else /* Use one of the Fast3DEX series grucodes. */
#ifndef F3DZEX_GBI_2
#if F3DEX_GBI_2 == 1
glabel gspF3DEX2_fifoTextStart
.incbin "lib/PR/f3dex2/F3DEX2.bin"
glabel gspF3DEX2_fifoTextEnd
.elseif F3DEX_GBI == 1
#elseif F3DEX_GBI == 1
glabel gspF3DEX_fifoTextStart
.incbin "lib/PR/f3dex/F3DEX.bin"
glabel gspF3DEX_fifoTextEnd
.endif
.else /* Fast3DZEX */
#endif
#else /* Fast3DZEX */
glabel gspF3DZEX2_PosLight_fifoTextStart
.incbin "lib/PR/f3dzex/F3DZEX.bin"
glabel gspF3DZEX2_PosLight_fifoTextEnd
.endif
.endif
#endif
#endif
/* Audio Bins */
@@ -48,11 +48,11 @@ glabel gspFast3D_fifoTextEnd
.balign 16
glabel aspMainTextStart
.if VERSION_SH == 1
#if VERSION_SH == 1
.incbin "rsp/audio.bin"
.else
#else
.incbin "lib/PR/audio/aspMain.bin"
.endif
#endif
glabel aspMainTextEnd
/*
@@ -61,145 +61,145 @@ glabel aspMainTextEnd
*/
/* Fast3DEX NoN Text */
.ifdef F3DEX_NON_GBI
#ifdef F3DEX_NON_GBI
glabel gspF3DEX_NoN_fifoTextStart
.balign 16
.incbin "lib/PR/f3dex/F3DEX_NoN.bin"
glabel gspF3DEX_NoN_fifoTextEnd
.endif
#endif
/* Fast3DLX Text */
.ifdef F3DLX_GBI
#ifdef F3DLX_GBI
glabel gspF3DLX_fifoTextStart
.incbin "lib/PR/f3dex/F3DLX.bin"
glabel gspF3DLX_fifoTextEnd
.endif
#endif
/* Fast3DLX NoN Text */
.ifdef F3DLX_NON_GBI
#ifdef F3DLX_NON_GBI
glabel gspF3DLX_NoN_fifoTextStart
.balign 16
.incbin "lib/PR/f3dex/F3DLX_NoN.bin"
glabel gspF3DLX_NoN_fifoTextEnd
.endif
#endif
/* Fast3DLX Rej Text */
.ifdef F3DLX_REJ_GBI
#ifdef F3DLX_REJ_GBI
glabel gspF3DLX_Rej_fifoTextStart
.balign 16
.incbin "lib/PR/f3dex/F3DLX_Rej.bin"
glabel gspF3DLX_Rej_fifoTextEnd
.endif
#endif
/* Line3DEX Text */
.ifdef L3DEX_GBI
#ifdef L3DEX_GBI
glabel gspL3DEX_fifoTextStart
.balign 16
.incbin "lib/PR/f3dex/L3DEX.bin"
glabel gspL3DEX_fifoTextEnd
.endif
#endif
/* S2DEX Text */
.ifdef S2DEX_GBI
#ifdef S2DEX_GBI
glabel gspS2DEX_fifoTextStart
.balign 16
.incbin "lib/PR/s2dex/S2DEX.bin"
glabel gspS2DEX_fifoTextEnd
.endif
#endif
/* Fast3DEX2 series */
/* Fast3DEX2 NoN Text */
.ifdef F3DEX2_NON_GBI
#ifdef F3DEX2_NON_GBI
.balign 16
glabel gspF3DEX2_NoN_fifoTextStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN.bin"
glabel gspF3DEX2_NoN_fifoTextEnd
.endif
#endif
/* Fast3DZEX NoN Text */
.ifdef F3DZEX_NON_GBI_2
#ifdef F3DZEX_NON_GBI_2
.balign 16
glabel gspF3DZEX2_NoN_PosLight_fifoTextStart
.incbin "lib/PR/f3dzex/F3DZEX_NoN.bin"
glabel gspF3DZEX2_NoN_PosLight_fifoTextEnd
.endif
#endif
/* Fast3DEX2 Rej Text */
.ifdef F3DEX2_REJ_GBI
#ifdef F3DEX2_REJ_GBI
.balign 16
glabel gspF3DEX2_Rej_fifoTextStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej.bin"
glabel gspF3DEX2_Rej_fifoTextEnd
.endif
#endif
/* Line3DEX2 Text */
.ifdef L3DEX2_GBI
#ifdef L3DEX2_GBI
.balign 16
glabel gspL3DEX2_fifoTextStart
.incbin "lib/PR/f3dex2/L3DEX2.bin"
glabel gspL3DEX2_fifoTextEnd
.endif
#endif
/* Line3DZEX Text */
.ifdef L3DZEX_GBI
#ifdef L3DZEX_GBI
.balign 16
glabel gspL3DZEX2_PosLight_fifoTextStart
.incbin "lib/PR/f3dzex/L3DZEX.bin"
glabel gspL3DZEX2_PosLight_fifoTextEnd
.endif
#endif
/* S2DEX2 Text */
.ifdef S2DEX_GBI_2
#ifdef S2DEX_GBI_2
.balign 16
glabel gspS2DEX2_fifoTextStart
.incbin "lib/PR/s2dex2/S2DEX2.bin"
glabel gspS2DEX2_fifoTextEnd
.endif
#endif
/* DATA SECTION START */
.section .rodata
.balign 16
.ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */
.if SUPER3D_GBI == 1
#ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */
#if SUPER3D_GBI == 1
glabel gspSuper3D_fifoDataStart
.incbin "lib/PR/super3d/Super3D_data.bin"
glabel gspSuper3D_fifoDataEnd
.else
#else
glabel gspFast3D_fifoDataStart
.incbin "rsp/fast3d_data.bin"
glabel gspFast3D_fifoDataEnd
.endif
#endif
.else /* Using one of the Fast3DEX series grucodes */
.ifndef F3DZEX_GBI_2
.if F3DEX_GBI_2 == 1
#else /* Using one of the Fast3DEX series grucodes */
#ifndef F3DZEX_GBI_2
#if F3DEX_GBI_2 == 1
glabel gspF3DEX2_fifoDataStart
.incbin "lib/PR/f3dex2/F3DEX2_data.bin"
glabel gspF3DEX2_fifoDataEnd
.elseif F3DEX_GBI == 1
#elseif F3DEX_GBI == 1
glabel gspF3DEX_fifoDataStart
.incbin "lib/PR/f3dex/F3DEX_data.bin"
glabel gspF3DEX_fifoDataEnd
.endif
.else /* Fast3DZEX */
#endif
#else /* Fast3DZEX */
glabel gspF3DZEX2_PosLight_fifoDataStart
.incbin "lib/PR/f3dzex/F3DZEX_data.bin"
glabel gspF3DZEX2_PosLight_fifoDataEnd
.endif
.endif
#endif
#endif
/* Audio Data */
.balign 16
glabel aspMainDataStart
.if VERSION_SH == 1
#if VERSION_SH == 1
.incbin "rsp/audio_data.bin"
.else
#else
.incbin "lib/PR/audio/aspMain_data.bin"
.endif
#endif
glabel aspMainDataEnd
/* LESS COMMON MICROCODES */
@@ -207,99 +207,99 @@ glabel aspMainDataEnd
/* Fast3DEX Series */
/* Fast3DEX NoN Data */
.ifdef F3DEX_NON_GBI
#ifdef F3DEX_NON_GBI
.balign 16
glabel gspF3DEX_NoN_fifoDataStart
.incbin "lib/PR/f3dex/F3DEX_NoN_data.bin"
glabel gspF3DEX_NoN_fifoDataEnd
.endif
#endif
/* Fast3DLX Data */
.ifdef F3DLX_GBI
#ifdef F3DLX_GBI
.balign 16
glabel gspF3DLX_fifoDataStart
.incbin "lib/PR/f3dex/F3DLX_data.bin"
glabel gspF3DLX_fifoDataEnd
.endif
#endif
/* Fast3DLX NoN Data */
.ifdef F3DLX_NON_GBI
#ifdef F3DLX_NON_GBI
.balign 16
glabel gspF3DLX_NoN_fifoDataStart
.incbin "lib/PR/f3dex/F3DLX_NoN_data.bin"
glabel gspF3DLX_NoN_fifoDataEnd
.endif
#endif
/* Fast3DLX Rej Data */
.ifdef F3DLX_REJ_GBI
#ifdef F3DLX_REJ_GBI
.balign 16
glabel gspF3DLX_Rej_fifoDataStart
.incbin "lib/PR/f3dex/F3DLX_Rej_data.bin"
glabel gspF3DLX_Rej_fifoDataEnd
.endif
#endif
/* Line3DEX Data */
.ifdef L3DEX_GBI
#ifdef L3DEX_GBI
.balign 16
glabel gspL3DEX_fifoDataStart
.incbin "lib/PR/f3dex/L3DEX_data.bin"
glabel gspL3DEX_fifoDataEnd
.endif
#endif
/* S2DEX Data */
.ifdef S2DEX_GBI
#ifdef S2DEX_GBI
.balign 16
glabel gspS2DEX_fifoDataStart
.incbin "lib/PR/s2dex/S2DEX_data.bin"
glabel gspS2DEX_fifoDataEnd
.endif
#endif
/* Fast3DEX2 Series */
/* Fast3DEX2 NoN Data */
.ifdef F3DEX2_NON_GBI
#ifdef F3DEX2_NON_GBI
.balign 16
glabel gspF3DEX2_NoN_fifoDataStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN_data.bin"
glabel gspF3DEX2_NoN_fifoDataEnd
.endif
#endif
/* Fast3DZEX NoN Data */
.ifdef F3DZEX_NON_GBI_2
#ifdef F3DZEX_NON_GBI_2
.balign 16
glabel gspF3DZEX2_NoN_PosLight_fifoDataStart
.incbin "lib/PR/f3dzex/F3DZEX_NoN_data.bin"
glabel gspF3DZEX2_NoN_PosLight_fifoDataEnd
.endif
#endif
/* Fast3DEX2 Rej Data */
.ifdef F3DEX2_REJ_GBI
#ifdef F3DEX2_REJ_GBI
.balign 16
glabel gspF3DEX2_Rej_fifoDataStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej_data.bin"
glabel gspF3DEX2_Rej_fifoDataEnd
.endif
#endif
/* Line3DEX2 Data */
.ifdef L3DEX2_GBI
#ifdef L3DEX2_GBI
.balign 16
glabel gspL3DEX2_fifoDataStart
.incbin "lib/PR/f3dex2/L3DEX2_data.bin"
glabel gspL3DEX2_fifoDataEnd
.endif
#endif
/* Line3DZEX Text */
.ifdef L3DZEX_GBI
#ifdef L3DZEX_GBI
.balign 16
glabel gspL3DZEX2_PosLight_fifoDataStart
.incbin "lib/PR/f3dzex/L3DZEX_data.bin"
glabel gspL3DZEX2_PosLight_fifoDataEnd
.endif
#endif
/* S2DEX2 Data */
.ifdef S2DEX_GBI_2
#ifdef S2DEX_GBI_2
.balign 16
glabel gspS2DEX2_fifoDataStart
.incbin "lib/PR/s2dex2/S2DEX2_data.bin"
glabel gspS2DEX2_fifoDataEnd
.endif
#endif

9
rnc1rules.mk Normal file
View File

@@ -0,0 +1,9 @@
# Compress binary file
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
$(V)$(RNCPACK) p $< $@ -m1
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting RNC to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@

9
rnc2rules.mk Normal file
View File

@@ -0,0 +1,9 @@
# Compress binary file
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
$(V)$(RNCPACK) p $< $@ -m2
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting RNC to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@

View File

@@ -122,6 +122,12 @@ SECTIONS
#endif
#ifdef YAY0
BUILD_DIR/asm/slidec.o(.text);
#endif
#ifdef RNC1
BUILD_DIR/asm/rnc1.o(.text);
#endif
#ifdef RNC2
BUILD_DIR/asm/rnc2.o(.text);
#endif
*/libultra_rom.a:*.o(.text);
*/libnustd.a:*.o(.text);
@@ -160,6 +166,9 @@ SECTIONS
#ifdef GZIP
BUILD_DIR/src/gzip*.o(.data*);
#endif
#ifdef RNC2
BUILD_DIR/asm/rnc2.o(.data*);
#endif
*/libultra_rom.a:*.o(.data*);
*/libultra_rom.a:*.o(.sdata*);

View File

@@ -14,6 +14,9 @@
#ifdef GZIP
#include "gzip/gzip.h"
#endif
#if defined(RNC1) || defined(RNC2)
#include <rnc.h>
#endif
// round up to the next multiple
@@ -345,6 +348,10 @@ void *load_segment_decompress(s32 segment, u8 *srcStart, u8 *srcEnd) {
if (dest != NULL) {
#ifdef GZIP
expand_gzip(compressed, dest, compSize, (u32)size);
#elif RNC1
Propack_UnpackM1(compressed, dest);
#elif RNC2
Propack_UnpackM2(compressed, dest);
#else
slidstart(compressed, dest);
#endif
@@ -374,6 +381,10 @@ void *load_segment_decompress_heap(u32 segment, u8 *srcStart, u8 *srcEnd) {
dma_read(compressed, srcStart, srcEnd);
#ifdef GZIP
expand_gzip(compressed, gDecompressionHeap, compSize, (u32)size);
#elif RNC1
Propack_UnpackM1(compressed, gDecompressionHeap);
#elif RNC2
Propack_UnpackM2(compressed, gDecompressionHeap);
#else
slidstart(compressed, gDecompressionHeap);
#endif

1
tools/.gitignore vendored
View File

@@ -9,6 +9,7 @@
/n64graphics
/n64graphics_ci
/patch_libultra_math
/rncpack
/skyconv
/tabledesign
/textconv

View File

@@ -7,7 +7,7 @@ CC := gcc
CXX := g++
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -O2 -s
LDFLAGS := -lm
ALL_PROGRAMS := armips bfsize filesizer n64graphics n64graphics_ci mio0 slienc n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
ALL_PROGRAMS := armips bfsize filesizer rncpack n64graphics n64graphics_ci mio0 slienc n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
LIBAUDIOFILE := audiofile/libaudiofile.a
# Only build armips from tools if it is not found on the system
@@ -23,6 +23,8 @@ bfsize_SOURCES := bfsize.c
filesizer_SOURCES := filesizer.c
rncpack_SOURCES := rncpack.c
n64graphics_SOURCES := n64graphics.c utils.c
n64graphics_CFLAGS := -DN64GRAPHICS_STANDALONE

1747
tools/rncpack.c Normal file

File diff suppressed because it is too large Load Diff

9
yay0rules.mk Normal file
View File

@@ -0,0 +1,9 @@
# Compress binary file
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
$(call print,Compressing:,$<,$@)
$(V)$(YAY0TOOL) $< $@
# convert binary szp to object file
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
$(call print,Converting YAY0 to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@