mirror of
https://github.com/cc65/cc65.git
synced 2025-02-06 12:31:12 +00:00
build a bogus "ROM image" that can be disassembled, fix the makefile, remove generated files
This commit is contained in:
parent
7a453d1f90
commit
f34644186f
@ -31,15 +31,17 @@ else
|
|||||||
DA := $(if $(wildcard ../../../bin/da65*),../../../bin/da65,da65)
|
DA := $(if $(wildcard ../../../bin/da65*),../../../bin/da65,da65)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CPP = env LANG=C cpp
|
CPP = cpp
|
||||||
CPPFLAGS = # -DTEST_ERROR
|
#CPPFLAGS = -DTEST_ERROR
|
||||||
|
|
||||||
ASMS = fixed.s bank0.s bank1.s
|
ASMS = fixed.s bank0.s bank1.s
|
||||||
DAIS = fixed.dai bank0.dai bank1.dai
|
DAIS = fixed.dai bank0.dai bank1.dai
|
||||||
|
|
||||||
.SUFFIXES: .da .dai .s
|
.SUFFIXES: .da .dai .s
|
||||||
.PHONY: all clean maintainer-clean
|
|
||||||
.SECONDARY: $(DAIS)
|
all: image.bin $(ASMS)
|
||||||
|
|
||||||
|
$(DAIS): fixed.da
|
||||||
|
|
||||||
.da.dai:
|
.da.dai:
|
||||||
$(CPP) -o $@ $(CPPFLAGS) $<
|
$(CPP) -o $@ $(CPPFLAGS) $<
|
||||||
@ -47,12 +49,11 @@ DAIS = fixed.dai bank0.dai bank1.dai
|
|||||||
.dai.s:
|
.dai.s:
|
||||||
$(DA) --sync-lines -o $@ -i $< image.bin
|
$(DA) --sync-lines -o $@ -i $< image.bin
|
||||||
|
|
||||||
all: $(ASMS)
|
image.bin: image.s image.cfg
|
||||||
|
$(CL) -t none -C image.cfg -o image.bin image.s
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(ASMS)
|
$(RM) $(ASMS)
|
||||||
|
|
||||||
maintainer-clean: clean
|
|
||||||
$(RM) $(DAIS)
|
$(RM) $(DAIS)
|
||||||
|
$(RM) image.bin
|
||||||
|
|
||||||
$(DAIS): fixed.da
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
# 1 "bank0.da"
|
|
||||||
# 1 "<built-in>"
|
|
||||||
# 1 "<command-line>"
|
|
||||||
# 1 "bank0.da"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
global {
|
|
||||||
inputoffs $00010;
|
|
||||||
inputsize $4000;
|
|
||||||
startaddr $8000;
|
|
||||||
cpu "6502";
|
|
||||||
};
|
|
||||||
|
|
||||||
# 1 "fixed.da" 1
|
|
||||||
# 18 "fixed.da"
|
|
||||||
label { addr $00; name "VariableA"; };
|
|
||||||
label { addr $01; name "VariableB"; };
|
|
||||||
label { addr $0100; name "Stack"; size $0100; };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label { addr $C000; name "CommonProcA"; };
|
|
||||||
label { addr $C123; name "CommonProcB"; };
|
|
||||||
range { start $E123; end $FFFF; name "CommonData"; type ByteTable; };
|
|
||||||
# 13 "bank0.da" 2
|
|
||||||
|
|
||||||
label { addr $8000; name "Bank0ProcA"; };
|
|
||||||
label { addr $8123; name "Bank0ProcB"; };
|
|
||||||
range { start $A000; end $BFFF; name "Bank0Data"; type ByteTable; };
|
|
@ -1,33 +0,0 @@
|
|||||||
# 1 "bank1.da"
|
|
||||||
# 1 "<built-in>"
|
|
||||||
# 1 "<command-line>"
|
|
||||||
# 1 "bank1.da"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
global {
|
|
||||||
inputoffs $04010;
|
|
||||||
inputsize $4000;
|
|
||||||
startaddr $8000;
|
|
||||||
cpu "6502";
|
|
||||||
};
|
|
||||||
|
|
||||||
# 1 "fixed.da" 1
|
|
||||||
# 18 "fixed.da"
|
|
||||||
label { addr $00; name "VariableA"; };
|
|
||||||
label { addr $01; name "VariableB"; };
|
|
||||||
label { addr $0100; name "Stack"; size $0100; };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label { addr $C000; name "CommonProcA"; };
|
|
||||||
label { addr $C123; name "CommonProcB"; };
|
|
||||||
range { start $E123; end $FFFF; name "CommonData"; type ByteTable; };
|
|
||||||
# 13 "bank1.da" 2
|
|
||||||
|
|
||||||
range { start $8000; end $AFFF; name "Bank1Data"; type ByteTable; };
|
|
||||||
label { addr $B000; name "Bank1ProcA"; };
|
|
||||||
label { addr $B123; name "Bank1ProcB"; };
|
|
@ -7,7 +7,7 @@
|
|||||||
#ifndef TARGET_BANK
|
#ifndef TARGET_BANK
|
||||||
#define TARGET_BANK -1
|
#define TARGET_BANK -1
|
||||||
global {
|
global {
|
||||||
inputoffs $1C010;
|
inputoffs $0C010;
|
||||||
inputsize $4000;
|
inputsize $4000;
|
||||||
startaddr $C000;
|
startaddr $C000;
|
||||||
cpu "6502";
|
cpu "6502";
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# 1 "fixed.da"
|
|
||||||
# 1 "<built-in>"
|
|
||||||
# 1 "<command-line>"
|
|
||||||
# 1 "fixed.da"
|
|
||||||
# 9 "fixed.da"
|
|
||||||
global {
|
|
||||||
inputoffs $1C010;
|
|
||||||
inputsize $4000;
|
|
||||||
startaddr $C000;
|
|
||||||
cpu "6502";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label { addr $00; name "VariableA"; };
|
|
||||||
label { addr $01; name "VariableB"; };
|
|
||||||
label { addr $0100; name "Stack"; size $0100; };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label { addr $C000; name "CommonProcA"; };
|
|
||||||
label { addr $C123; name "CommonProcB"; };
|
|
||||||
range { start $E123; end $FFFF; name "CommonData"; type ByteTable; };
|
|
15
testcode/disasm/image.cfg
Normal file
15
testcode/disasm/image.cfg
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
MEMORY {
|
||||||
|
HEADER: file = %O, start = $0000, size = $0010, fill = yes;
|
||||||
|
BANK00: file = %O, start = $8000, size = $4000, fill = yes;
|
||||||
|
BANK01: file = %O, start = $8000, size = $4000, fill = yes;
|
||||||
|
BANK02: file = %O, start = $8000, size = $4000, fill = yes;
|
||||||
|
FIXED: file = %O, start = $c000, size = $4000, fill = yes;
|
||||||
|
}
|
||||||
|
SEGMENTS {
|
||||||
|
HDR: load = HEADER, type = rw, optional = yes, define = yes;
|
||||||
|
BANK0: load = BANK00, type = rw, optional = yes, define = yes;
|
||||||
|
BANK1: load = BANK01, type = rw, optional = yes, define = yes;
|
||||||
|
BANK2: load = BANK02, type = rw, optional = yes, define = yes;
|
||||||
|
FIX: load = FIXED, type = rw, optional = yes, define = yes;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user