Reconfig memory
This commit is contained in:
parent
523c4c6dea
commit
c5a211a8f0
3 changed files with 5 additions and 18 deletions
5
Makefile
5
Makefile
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
MACHINE := pet
|
MACHINE := pet
|
||||||
|
MEMCFG := mem.cfg
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
@ -9,11 +10,11 @@ clean:
|
||||||
rm -f rs232.bin *.o *.lst *.map
|
rm -f rs232.bin *.o *.lst *.map
|
||||||
|
|
||||||
rs232.bin: driver.o
|
rs232.bin: driver.o
|
||||||
cl65 -v -C mem.cfg -l rs232.lst -m rs232.map -o $@ $^
|
cl65 -v -C ${MEMCFG} -m rs232.map -o $@ $^
|
||||||
|
|
||||||
%.lst: %.bin
|
%.lst: %.bin
|
||||||
@# the start address shouldn't be hardcoded here...
|
@# the start address shouldn't be hardcoded here...
|
||||||
da65 -o $@ -S 0x7000 $<
|
da65 -o $@ -S 0x7000 $<
|
||||||
|
|
||||||
%.o: %.a65
|
%.o: %.a65
|
||||||
ca65 -v -t ${MACHINE} -o $@ $<
|
ca65 -v -l $(patsubst %.o,%.lst,$@) -t ${MACHINE} -o $@ $<
|
||||||
|
|
12
driver.a65
12
driver.a65
|
@ -2,13 +2,6 @@
|
||||||
; 6502 mode
|
; 6502 mode
|
||||||
.p02
|
.p02
|
||||||
|
|
||||||
; define where we want to be loaded
|
|
||||||
.global __LOADADDR__
|
|
||||||
__LOADADDR__ = $7000
|
|
||||||
; and where data should reside
|
|
||||||
.global __DATAADDR__
|
|
||||||
__DATAADDR__ = $7200
|
|
||||||
|
|
||||||
; load useful register/memory locations
|
; load useful register/memory locations
|
||||||
.include "pet.inc"
|
.include "pet.inc"
|
||||||
|
|
||||||
|
@ -46,9 +39,6 @@ BAUD_RATE = 300
|
||||||
.export rs_status
|
.export rs_status
|
||||||
rs_status: .byte 0
|
rs_status: .byte 0
|
||||||
|
|
||||||
; specify the load address, so code and data will be located there
|
|
||||||
;.org __LOADADDR__
|
|
||||||
|
|
||||||
; entry points
|
; entry points
|
||||||
.code
|
.code
|
||||||
; these are convenience entry points right at the beginning of the page,
|
; these are convenience entry points right at the beginning of the page,
|
||||||
|
@ -68,7 +58,7 @@ BAUD_RATE = 300
|
||||||
jmp write
|
jmp write
|
||||||
|
|
||||||
; driver state data
|
; driver state data
|
||||||
.data
|
.bss
|
||||||
; 1=driver initialized
|
; 1=driver initialized
|
||||||
initialized: .byte 0
|
initialized: .byte 0
|
||||||
; saved IRQ vector
|
; saved IRQ vector
|
||||||
|
|
6
mem.cfg
6
mem.cfg
|
@ -1,12 +1,8 @@
|
||||||
SYMBOLS {
|
|
||||||
__LOADADDR__: type = import;
|
|
||||||
__DATAADDR__: type = import;
|
|
||||||
}
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
# $ED-$F7 seems to be an unused area in the zero page according to the BASIC 2.0/4.0 memory map
|
# $ED-$F7 seems to be an unused area in the zero page according to the BASIC 2.0/4.0 memory map
|
||||||
ZP: file = "", define = yes, start = $00ED, size = $000A;
|
ZP: file = "", define = yes, start = $00ED, size = $000A;
|
||||||
# we're loading at $7000, max code size $800 bytes
|
# we're loading at $7000, max code size $800 bytes
|
||||||
RAM: file = %O, start = __LOADADDR__, size = $0800;
|
RAM: file = %O, start = $7000, size = $0800;
|
||||||
# if we reside in ROM instead, we should have more space available
|
# if we reside in ROM instead, we should have more space available
|
||||||
ROM: file = %O, start = $9000, size = $2000;
|
ROM: file = %O, start = $9000, size = $2000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue