diff --git a/sw/boot.s b/sw/boot.s index 67e7b15..8cb6a79 100644 --- a/sw/boot.s +++ b/sw/boot.s @@ -8,7 +8,7 @@ .import _main .export __STARTUP__ : absolute = 1 ; Mark as startup -.import __RAM_START__, __RAM_SIZE__ ; Linker generated +.import __SDRAM_START__, __SDRAM_SIZE__ ; Linker generated .import copydata, zerobss, initlib, donelib @@ -29,9 +29,9 @@ _init: LDX #$FF ; Initialize stack pointer to $01FF ; --------------------------------------------------------------------------- ; Set cc65 argument stack pointer - LDA #<(__RAM_START__ + __RAM_SIZE__) + LDA #<(__SDRAM_START__ + __SDRAM_SIZE__) STA sp - LDA #>(__RAM_START__ + __RAM_SIZE__) + LDA #>(__SDRAM_START__ + __SDRAM_SIZE__) STA sp+1 ; --------------------------------------------------------------------------- diff --git a/sw/link.ld b/sw/link.ld index 66eb486..0d2897b 100644 --- a/sw/link.ld +++ b/sw/link.ld @@ -2,15 +2,15 @@ MEMORY { ZP: start = $0, size = $100, type = rw, define = yes; RAM: start = $0200, size = $3D00, type = rw, define = yes; - SDRAM: start = $4000, size = $3ff00, type = rw, define = yes; + SDRAM: start = $4000, size = $3ff0, type = rw, define = yes; ROM: start = $8000, size = $8000, fill = yes, fillval = $ff, file = %O; } SEGMENTS { ZEROPAGE: load = ZP, type = zp, define = yes; - DATA: load = ROM, type = rw, define = yes, run = RAM; - BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; + DATA: load = ROM, type = rw, define = yes, run = SDRAM; + BSS: load = SDRAM, type = bss, define = yes; + HEAP: load = SDRAM, type = bss, optional = yes; STARTUP: load = ROM, type = ro; ONCE: load = ROM, type = ro, optional = yes; CODE: load = ROM, type = ro;