Reconfig memory

This commit is contained in:
Gregor Riepl 2022-08-20 17:37:42 +02:00
parent 523c4c6dea
commit c5a211a8f0
3 changed files with 5 additions and 18 deletions

View file

@ -1,5 +1,6 @@
MACHINE := pet
MEMCFG := mem.cfg
.PHONY: all clean
@ -9,11 +10,11 @@ clean:
rm -f rs232.bin *.o *.lst *.map
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
@# the start address shouldn't be hardcoded here...
da65 -o $@ -S 0x7000 $<
%.o: %.a65
ca65 -v -t ${MACHINE} -o $@ $<
ca65 -v -l $(patsubst %.o,%.lst,$@) -t ${MACHINE} -o $@ $<

View file

@ -2,13 +2,6 @@
; 6502 mode
.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
.include "pet.inc"
@ -46,9 +39,6 @@ BAUD_RATE = 300
.export rs_status
rs_status: .byte 0
; specify the load address, so code and data will be located there
;.org __LOADADDR__
; entry points
.code
; these are convenience entry points right at the beginning of the page,
@ -68,7 +58,7 @@ BAUD_RATE = 300
jmp write
; driver state data
.data
.bss
; 1=driver initialized
initialized: .byte 0
; saved IRQ vector

View file

@ -1,12 +1,8 @@
SYMBOLS {
__LOADADDR__: type = import;
__DATAADDR__: type = import;
}
MEMORY {
# $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;
# 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
ROM: file = %O, start = $9000, size = $2000;
}