diff --git a/Makefile b/Makefile index fce8edc..32b042e 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ F256 = $(HOME)/code/f256 #SYSLIBDIR = $(SYSTEM)/lib #SYSINCDIR = $(SYSTEM)/include -TMPFLAGS = -D F256=1 -include src/mapper.h -Wno-unknown-pragmas +TMPFLAGS = -D F256=1 -include src/mapper.h -include blocks.h -Wno-unknown-pragmas INCCMD = -I$(SYSINCDIR) diff --git a/data/credits.256 b/data/credits.256 new file mode 100644 index 0000000..0e77fc3 Binary files /dev/null and b/data/credits.256 differ diff --git a/data/credits.png b/data/credits.png new file mode 100644 index 0000000..2a3e28d Binary files /dev/null and b/data/credits.png differ diff --git a/src/dat_spritesJR.c b/src/dat_spritesJR.c index 2a2781c..b4aef5b 100644 --- a/src/dat_spritesJR.c +++ b/src/dat_spritesJR.c @@ -18,12 +18,6 @@ #define STR2(x) #x #define STR(x) STR2(x) -//#ifdef _WIN32 -//#define INCBIN_SECTION ".rdata, \"dr\"" -//#else -//#define INCBIN_SECTION ".rodata" -//#endif - // this aligns start address to 16 and terminates byte array with explict 0 // which is not really needed, feel free to change it to whatever you want/need #define INCBIN(INCBIN_SECTION, name, file) \ @@ -41,9 +35,18 @@ extern __attribute__((aligned(16))) const char incbin_ ## name ## _start[]; \ extern const char incbin_ ## name ## _end[] +// Credits/Jr Title +INCBIN(".binarydata.credits", credits_256, "data/credits.256"); +// Title Page INCBIN(".binarydata.splash", splash_256, "data/splash.256"); +// Map Tiles INCBIN(".binarydata.tiles", tiles_256, "data/tiles_data.256"); +// Sprite Frames (32x32 sprites) INCBIN(".binarydata.sprites", sprites_256, "data/sprites_data.256"); +// Hall of Fame +INCBIN(".binarydata.haf", haf_256, "data/haf.256"); +// Congrats +INCBIN(".binarydata.haf", congrats_256, "data/congrats.256"); #endif /* GFXF256 */ diff --git a/src/mapper.h b/src/mapper.h index 400b983..afcfd7c 100644 --- a/src/mapper.h +++ b/src/mapper.h @@ -17,9 +17,13 @@ $$JGA TODO, sort out how to mark an entire file #define CODE_BLOCK(index) __attribute__((noinline, section(".block"#index))) #define DATA_BLOCK(index) __attribute__((section(".block"#index))) +#define PAGEIN(_function_BLOCK) POKE(SWAP_SLOT, _function_BLOCK) + #else #define CODE_BLOCK(index) #define DATA_BLOCK(index) +#define PAGEIN(_function_) + #endif diff --git a/src/scr_credit.c b/src/scr_credit.c index 87bc625..4fa4c07 100644 --- a/src/scr_credit.c +++ b/src/scr_credit.c @@ -25,7 +25,7 @@ CODE_BLOCK(8) void scr_credit() //$$JGA TODO - fix this *((char*)0x200) = (char)(((long)(&incbin_sprites_256_start))); *((char*)0x201) = (char)(((long)(&incbin_sprites_256_start))>>8); -// *((char*)0x202) = (char)(((long)(&incbin_sprites_256_start_high))>>16); + *((char*)0x202) = incbin_sprites_256_start_high; *((char*)0x203) = scr_credit_BLOCK; // *((char*)0x203) = (char)(((long)(__block23_lma_high))>>8); #endif