import asm library, written in merlin32
This commit is contained in:
parent
e0056e1f59
commit
5296a2e9d6
7 changed files with 41 additions and 22 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -9,3 +9,7 @@ bin/blockgen/.vs/
|
||||||
*.user
|
*.user
|
||||||
bin/blockgen/vcxproj/.vs/
|
bin/blockgen/vcxproj/.vs/
|
||||||
bin/blockgen/vcxproj/x64/
|
bin/blockgen/vcxproj/x64/
|
||||||
|
*.pdb
|
||||||
|
bin/overlayhelper/.vs/
|
||||||
|
bin/overlayhelper/vcxproj/.vs/
|
||||||
|
bin/overlayhelper/vcxproj/x64/
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -29,7 +29,8 @@ F256 = $(HOME)/code/f256
|
||||||
#SYSLIBDIR = $(SYSTEM)/lib
|
#SYSLIBDIR = $(SYSTEM)/lib
|
||||||
#SYSINCDIR = $(SYSTEM)/include
|
#SYSINCDIR = $(SYSTEM)/include
|
||||||
|
|
||||||
TMPFLAGS = -D F256=1 -include src/mapper.h -include blocks.h -Wno-unknown-pragmas
|
#TMPFLAGS = -D F256=1 -include src/mapper.h -include blocks.h -Wno-unknown-pragmas
|
||||||
|
TMPFLAGS = -D F256=1 -include src/mapper.h -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
|
||||||
INCCMD = -I$(SYSINCDIR)
|
INCCMD = -I$(SYSINCDIR)
|
||||||
|
|
BIN
lib/i256.flib
Normal file
BIN
lib/i256.flib
Normal file
Binary file not shown.
44
rickjr.ld
44
rickjr.ld
|
@ -34,22 +34,22 @@ MEMORY {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LMAs */
|
/* LMAs */
|
||||||
__block8_lma = 0x08000000|__SLOT_ADDR;
|
__block8_lma = ( 8<<24)|__SLOT_ADDR;
|
||||||
__block9_lma = 0x09000000|__SLOT_ADDR;
|
__block9_lma = ( 9<<24)|__SLOT_ADDR;
|
||||||
__block10_lma = 0x0A000000|__SLOT_ADDR;
|
__block10_lma = (10<<24)|__SLOT_ADDR;
|
||||||
__block11_lma = 0x0B000000|__SLOT_ADDR;
|
__block11_lma = (11<<24)|__SLOT_ADDR;
|
||||||
__block12_lma = 0x0C000000|__SLOT_ADDR;
|
__block12_lma = (12<<24)|__SLOT_ADDR;
|
||||||
__block13_lma = 0x0D000000|__SLOT_ADDR;
|
__block13_lma = (13<<24)|__SLOT_ADDR;
|
||||||
__block14_lma = 0x0E000000|__SLOT_ADDR;
|
__block14_lma = (14<<24)|__SLOT_ADDR;
|
||||||
__block15_lma = 0x0F000000|__SLOT_ADDR;
|
__block15_lma = (15<<24)|__SLOT_ADDR;
|
||||||
__block16_lma = 0x10000000|__SLOT_ADDR;
|
__block16_lma = (16<<24)|__SLOT_ADDR;
|
||||||
__block17_lma = 0x11000000|__SLOT_ADDR;
|
__block17_lma = (17<<24)|__SLOT_ADDR;
|
||||||
__block18_lma = 0x12000000|__SLOT_ADDR;
|
__block18_lma = (18<<24)|__SLOT_ADDR;
|
||||||
__block19_lma = 0x13000000|__SLOT_ADDR;
|
__block19_lma = (19<<24)|__SLOT_ADDR;
|
||||||
__block20_lma = 0x14000000|__SLOT_ADDR;
|
__block20_lma = (20<<24)|__SLOT_ADDR;
|
||||||
__block21_lma = 0x15000000|__SLOT_ADDR;
|
__block21_lma = (21<<24)|__SLOT_ADDR;
|
||||||
__block22_lma = 0x16000000|__SLOT_ADDR;
|
__block22_lma = (22<<24)|__SLOT_ADDR;
|
||||||
__block23_lma = 0x17000000|__SLOT_ADDR;
|
__block23_lma = (23<<24)|__SLOT_ADDR;
|
||||||
|
|
||||||
/* Stash preloaded binary data */
|
/* Stash preloaded binary data */
|
||||||
__binarydata_lma = 0x70000; /* At least now, its less than 64k */
|
__binarydata_lma = 0x70000; /* At least now, its less than 64k */
|
||||||
|
@ -107,6 +107,9 @@ SECTIONS {
|
||||||
.block23 : { *(.block23 .block23.*) } >block23 end_block23 = .;
|
.block23 : { *(.block23 .block23.*) } >block23 end_block23 = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Trick linker into exposing symbols with values larger than 16 bits */
|
||||||
|
INCLUDE overlay.ld
|
||||||
|
|
||||||
/* OUTPUT_FORMAT { FULL(cart_rom) } */
|
/* OUTPUT_FORMAT { FULL(cart_rom) } */
|
||||||
OUTPUT_FORMAT {
|
OUTPUT_FORMAT {
|
||||||
BYTE(0x5A) /* pgZ */
|
BYTE(0x5A) /* pgZ */
|
||||||
|
@ -140,10 +143,17 @@ OUTPUT_FORMAT {
|
||||||
BYTE(0x00)
|
BYTE(0x00)
|
||||||
TRIM(block10)
|
TRIM(block10)
|
||||||
|
|
||||||
|
/* block11 */
|
||||||
|
SHORT(11*0x2000)
|
||||||
|
BYTE(11/8) /* block#/8 = the actual system high byte */
|
||||||
|
SHORT(end_block11 - __block11_lma)
|
||||||
|
BYTE(0x00)
|
||||||
|
TRIM(block11)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Empty Blocks are not allowed, bring these in as you use them
|
Empty Blocks are not allowed, bring these in as you use them
|
||||||
|
|
||||||
TRIM(block11)
|
|
||||||
TRIM(block12)
|
TRIM(block12)
|
||||||
TRIM(block13)
|
TRIM(block13)
|
||||||
TRIM(block14)
|
TRIM(block14)
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#ifdef GFXF256
|
#ifdef GFXF256
|
||||||
|
|
||||||
|
// $$TODO - move this macro into it's own header
|
||||||
#define STR2(x) #x
|
#define STR2(x) #x
|
||||||
#define STR(x) STR2(x)
|
#define STR(x) STR2(x)
|
||||||
|
|
||||||
|
@ -48,6 +49,8 @@ INCBIN(".binarydata.haf", haf_256, "data/haf.256");
|
||||||
// Congrats
|
// Congrats
|
||||||
INCBIN(".binarydata.haf", congrats_256, "data/congrats.256");
|
INCBIN(".binarydata.haf", congrats_256, "data/congrats.256");
|
||||||
|
|
||||||
|
INCBIN(".block11.i256", i256lib, "lib/i256.flib");
|
||||||
|
|
||||||
#endif /* GFXF256 */
|
#endif /* GFXF256 */
|
||||||
|
|
||||||
/* eof */
|
/* eof */
|
||||||
|
|
|
@ -24,6 +24,6 @@ $$JGA TODO, sort out how to mark an entire file
|
||||||
#define CODE_BLOCK(index)
|
#define CODE_BLOCK(index)
|
||||||
#define DATA_BLOCK(index)
|
#define DATA_BLOCK(index)
|
||||||
|
|
||||||
#define PAGEIN(_function_)
|
#define PAGEIN(_function_BLOCK)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,10 +14,11 @@ segment "screen";
|
||||||
|
|
||||||
extern char credits_lz4;
|
extern char credits_lz4;
|
||||||
extern char incbin_sprites_256_start[];
|
extern char incbin_sprites_256_start[];
|
||||||
|
extern char incbin_sprites_256_start_high[];
|
||||||
extern char incbin_tiles_256_start[];
|
extern char incbin_tiles_256_start[];
|
||||||
extern char incbin_splash_256_start[];
|
extern char incbin_splash_256_start[];
|
||||||
extern char __block23_lma_high[];
|
extern char __block23_lma_high[];
|
||||||
|
extern char scr_credit_BLOCK[];
|
||||||
|
|
||||||
CODE_BLOCK(8) void scr_credit()
|
CODE_BLOCK(8) void scr_credit()
|
||||||
{
|
{
|
||||||
|
@ -25,8 +26,8 @@ CODE_BLOCK(8) void scr_credit()
|
||||||
//$$JGA TODO - fix this
|
//$$JGA TODO - fix this
|
||||||
*((char*)0x200) = (char)(((long)(&incbin_sprites_256_start)));
|
*((char*)0x200) = (char)(((long)(&incbin_sprites_256_start)));
|
||||||
*((char*)0x201) = (char)(((long)(&incbin_sprites_256_start))>>8);
|
*((char*)0x201) = (char)(((long)(&incbin_sprites_256_start))>>8);
|
||||||
*((char*)0x202) = incbin_sprites_256_start_high;
|
*((char*)0x202) = (char)(((long)(&incbin_sprites_256_start_high)));
|
||||||
*((char*)0x203) = scr_credit_BLOCK;
|
*((char*)0x203) = (char)(((long)(&scr_credit_BLOCK)));
|
||||||
// *((char*)0x203) = (char)(((long)(__block23_lma_high))>>8);
|
// *((char*)0x203) = (char)(((long)(__block23_lma_high))>>8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue