moved RAMTAS to Mega65 extra ROM, as a proof of concept
This commit is contained in:
1 parent
73f05a13c8
commit
435ff6bbc2
6 files changed
+27
-32
No files matched your search
@@ -61,9 +61,7 @@ STD_TARGET_LIST_CUSTOM = build/kernal_custom.rom build/basic_custom.rom
|
|||||||
STD_TARGET_LIST_GENERIC = build/kernal_generic.rom build/basic_generic.rom
|
STD_TARGET_LIST_GENERIC = build/kernal_generic.rom build/basic_generic.rom
|
||||||
STD_TARGET_LIST_TESTING = build/kernal_testing.rom build/basic_testing.rom
|
STD_TARGET_LIST_TESTING = build/kernal_testing.rom build/basic_testing.rom
|
||||||
STD_TARGET_LIST_ULTIMATE64 = build/kernal_ultimate64.rom build/basic_ultimate64.rom
|
STD_TARGET_LIST_ULTIMATE64 = build/kernal_ultimate64.rom build/basic_ultimate64.rom
|
||||||
STD_TARGET_LIST_MEGA65 = build/kernal_mega65.rom_0 \
|
STD_TARGET_LIST_MEGA65 = build/mega65.rom
|
||||||
build/kernal_mega65.rom_1 \
|
|
||||||
build/basic_mega65.rom_0
|
|
||||||
|
|
||||||
STD_TARGET_LIST = build/chargen.rom \
|
STD_TARGET_LIST = build/chargen.rom \
|
||||||
$(STD_TARGET_LIST_CUSTOM) \
|
$(STD_TARGET_LIST_CUSTOM) \
|
||||||
@@ -161,10 +159,6 @@ build/target_mega65/OUTK_0.BIN build/target_mega65/KERNAL_0_combined.vs bu
|
|||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||||
c64/,,config_mega65.s \
|
c64/,,config_mega65.s \
|
||||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
||||||
build/target_mega65/OUTK_1.BIN build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym: \
|
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
|
||||||
c64/,,config_mega65.s \
|
|
||||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
|
||||||
build/target_ultimate64/OUTK.BIN build/target_ultimate64/KERNAL_combined.vs build/target_ultimate64/KERNAL_combined.sym: \
|
build/target_ultimate64/OUTK.BIN build/target_ultimate64/KERNAL_combined.vs build/target_ultimate64/KERNAL_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||||
c64/,,config_ultimate64.s \
|
c64/,,config_ultimate64.s \
|
||||||
@@ -222,11 +216,10 @@ build/target_mega65/OUTK_0.BIN build/target_mega65/KERNAL_0_combined.vs build/ta
|
|||||||
@rm -f $@* build/target_mega65/KERNAL_0*
|
@rm -f $@* build/target_mega65/KERNAL_0*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d build/target_mega65 -l e4d3 -h ffff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d build/target_mega65 -l e4d3 -h ffff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
build/kernal_mega65.rom_1 build/target_mega65/OUTK_1.BIN build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym: $(TOOL_BUILD_SEGMENT)
|
build/target_mega65/kernal.seg_1 build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym: $(TOOL_BUILD_SEGMENT)
|
||||||
@mkdir -p build/target_mega65
|
@mkdir -p build/target_mega65
|
||||||
@rm -f $@* build/kernal_mega65.rom_1 build/target_mega65/KERNAL_1*
|
@rm -f $@* build/target_mega65/kernal.seg_1 build/target_mega65/KERNAL_1*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o OUTK_1.BIN -d build/target_mega65 -l 4000 -h 5fff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o kernal.seg_1 -d build/target_mega65 -l 4000 -h 5fff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
@cp build/target_mega65/OUTK_1.BIN build/kernal_mega65.rom_1
|
|
||||||
|
|
||||||
.PRECIOUS: build/target_%/newrom
|
.PRECIOUS: build/target_%/newrom
|
||||||
build/target_%/newrom:
|
build/target_%/newrom:
|
||||||
@@ -267,12 +260,12 @@ build/symbols_hybrid.vs: build/target_generic/KERNAL_combined.vs
|
|||||||
|
|
||||||
# Rules - platform 'Mega 65' specific
|
# Rules - platform 'Mega 65' specific
|
||||||
|
|
||||||
build/mega65.rom: build/kernal_mega65.rom_0 build/kernal_mega65.rom_1 build/basic_mega65.rom_0 build/chargen.rom
|
build/mega65.rom: build/kernal_mega65.rom_0 build/target_mega65/kernal.seg_1 build/basic_mega65.rom_0 build/chargen.rom
|
||||||
dd if=/dev/zero bs=8192 count=1 of=build/padding_8k
|
dd if=/dev/zero bs=8192 count=1 of=build/padding_8k
|
||||||
dd if=/dev/zero bs=8192 count=8 of=build/padding_64k
|
dd if=/dev/zero bs=8192 count=8 of=build/padding_64k
|
||||||
cat build/padding_8k > build/mega65.rom
|
cat build/padding_8k > build/mega65.rom
|
||||||
cat build/padding_8k >> build/mega65.rom
|
cat build/padding_8k >> build/mega65.rom
|
||||||
cat build/kernal_mega65.rom_1 >> build/mega65.rom
|
cat build/target_mega65/kernal.seg_1 >> build/mega65.rom
|
||||||
cat build/padding_8k >> build/mega65.rom
|
cat build/padding_8k >> build/mega65.rom
|
||||||
cat build/padding_8k >> build/mega65.rom
|
cat build/padding_8k >> build/mega65.rom
|
||||||
cat build/basic_mega65.rom_0 >> build/mega65.rom
|
cat build/basic_mega65.rom_0 >> build/mega65.rom
|
||||||
|
|||||||
+3
-8
@@ -12,20 +12,15 @@
|
|||||||
// Labels for jumps
|
// Labels for jumps
|
||||||
|
|
||||||
|
|
||||||
.label KERNAL_1__TESTROUTINE = $4000
|
.label KERNAL_1__RAMTAS = $4000
|
||||||
|
|
||||||
|
|
||||||
#elif
|
#else
|
||||||
|
|
||||||
// Jumptable (OpenROMs private!)
|
// Jumptable (OpenROMs private!)
|
||||||
|
|
||||||
|
|
||||||
jmp TESTROUTINE
|
jmp RAMTAS
|
||||||
|
|
||||||
|
|
||||||
TESTROUTINE:
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
map_NORMAL:
|
map_NORMAL:
|
||||||
|
|
||||||
|
php
|
||||||
pha
|
pha
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
@@ -33,12 +34,14 @@ map_end:
|
|||||||
ply
|
ply
|
||||||
plx
|
plx
|
||||||
pla
|
pla
|
||||||
|
plp
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
map_KERNAL_1:
|
map_KERNAL_1:
|
||||||
|
|
||||||
|
php
|
||||||
pha
|
pha
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
// #LAYOUT# STD * #TAKE
|
||||||
|
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
// #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
|
||||||
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
//
|
//
|
||||||
// Official Kernal routine, described in:
|
// Official Kernal routine, described in:
|
||||||
@@ -11,6 +14,14 @@
|
|||||||
|
|
||||||
RAMTAS:
|
RAMTAS:
|
||||||
|
|
||||||
|
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||||
|
|
||||||
|
jsr map_KERNAL_1
|
||||||
|
jsr KERNAL_1__RAMTAS
|
||||||
|
jmp map_NORMAL
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
// C64 Programmers Reference guide p291:
|
// C64 Programmers Reference guide p291:
|
||||||
// Clear $0000-$0101, $0200-$03ff
|
// Clear $0000-$0101, $0200-$03ff
|
||||||
// PGS: $0000, $0001 are CPU IO ports, so should not get written to
|
// PGS: $0000, $0001 are CPU IO ports, so should not get written to
|
||||||
@@ -83,5 +94,4 @@ ramtas_32k:
|
|||||||
ldy #$80
|
ldy #$80
|
||||||
bne !- // branch always
|
bne !- // branch always
|
||||||
|
|
||||||
|
|
||||||
#endif // ROM layout
|
#endif // ROM layout
|
||||||
@@ -12,12 +12,6 @@
|
|||||||
|
|
||||||
IOINIT:
|
IOINIT:
|
||||||
|
|
||||||
// XXX make something useful with this
|
|
||||||
//
|
|
||||||
// jsr map_KERNAL_1
|
|
||||||
// jsr KERNAL_1__TESTROUTINE
|
|
||||||
// jsr map_NORMAL
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// First initialize the CPU port, to make sure we have correct memory map
|
// First initialize the CPU port, to make sure we have correct memory map
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -673,12 +673,12 @@ bool SourceFile::preprocessLine(const std::string &line)
|
|||||||
|
|
||||||
// Check if segment name and rom layout match
|
// Check if segment name and rom layout match
|
||||||
|
|
||||||
if (iter == tokens.end()) ERROR("syntax error, missing segment name in '#LAYOUT#'");
|
|
||||||
if (!nameMatch(*(iter++), CMD_segName)) return true;
|
|
||||||
|
|
||||||
if (iter == tokens.end()) ERROR("syntax error, missing rom layout in '#LAYOUT#'");
|
if (iter == tokens.end()) ERROR("syntax error, missing rom layout in '#LAYOUT#'");
|
||||||
if (!nameMatch(*(iter++), CMD_romLayout)) return true;
|
if (!nameMatch(*(iter++), CMD_romLayout)) return true;
|
||||||
|
|
||||||
|
if (iter == tokens.end()) ERROR("syntax error, missing segment name in '#LAYOUT#'");
|
||||||
|
if (!nameMatch(*(iter++), CMD_segName)) return true;
|
||||||
|
|
||||||
// Retrieve and apply action
|
// Retrieve and apply action
|
||||||
|
|
||||||
if (iter == tokens.end()) ERROR("syntax error, missing action in '#LAYOUT#'");
|
if (iter == tokens.end()) ERROR("syntax error, missing action in '#LAYOUT#'");
|
||||||
|
|||||||
Reference in new issue
Block a user