1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 17:30:50 +00:00

Merge pull request #54 from groessler/something_to_pull

some cleanups for 'atarixl'
This commit is contained in:
Oliver Schmidt 2013-10-16 12:56:46 -07:00
commit 648e6d79f1
8 changed files with 22 additions and 21 deletions

View File

@ -33,10 +33,10 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + RAM: file = %O, define = yes, start = %S +
__LOWDATA_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
%S - %S -
__LOWDATA_SIZE__; __LOWBSS_SIZE__;
# defines entry point into program # defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
@ -56,7 +56,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro; SRPREPHDR: load = SRPREPHDR, type = ro;
LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes; SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes; SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes; SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;

View File

@ -30,11 +30,11 @@ MEMORY {
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + RAM: file = %O, define = yes, start = %S +
__OVERLAYSIZE__ + __OVERLAYSIZE__ +
__LOWDATA_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
%S - %S -
__OVERLAYSIZE__ - __OVERLAYSIZE__ -
__LOWDATA_SIZE__; __LOWBSS_SIZE__;
# defines entry point into program # defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
@ -68,7 +68,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro; SRPREPHDR: load = SRPREPHDR, type = ro;
LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes; SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes; SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes; SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;

View File

@ -28,10 +28,10 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + RAM: file = %O, define = yes, start = %S +
__LOWDATA_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
%S - %S -
__LOWDATA_SIZE__; __LOWBSS_SIZE__;
# defines entry point into program # defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
@ -54,7 +54,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro; SRPREPHDR: load = SRPREPHDR, type = ro;
LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes; SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes; SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes; SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;

View File

@ -28,7 +28,7 @@
sta CHBASE sta CHBASE
.endmacro .endmacro
.else .else ; above CHARGEN_RELOC, below not
.macro set_chbase val .macro set_chbase val
.endmacro .endmacro
@ -42,7 +42,7 @@
sta WSYNC sta WSYNC
.endmacro .endmacro
.else ; above .else ; above USEWSYNC, below not
.macro wsync .macro wsync
.endmacro .endmacro

View File

@ -14,7 +14,7 @@
.export RAMTOP_save .export RAMTOP_save
.export PORTB_save .export PORTB_save
.segment "LOWDATA" .segment "LOWBSS"
SAVMSC_save: .res 2 SAVMSC_save: .res 2
MEMTOP_save: .res 2 MEMTOP_save: .res 2

View File

@ -68,7 +68,7 @@ sram_init:
zpptr1: .res 2 zpptr1: .res 2
.segment "LOWDATA" .segment "LOWBSS"
; bounce buffers for CIO and SIO calls ; bounce buffers for CIO and SIO calls
bounce_buffer: .res BUFSZ_SIO bounce_buffer: .res BUFSZ_SIO

View File

@ -55,6 +55,8 @@ cont: ldx #0 ; channel 0
.segment "SRPREP" .segment "SRPREP"
; ***** entry point *****
sramprep: sramprep:
.ifdef DEBUG .ifdef DEBUG
print_string "entering stage #2" print_string "entering stage #2"
@ -115,7 +117,7 @@ sramprep:
iocbok: iocbok:
.endif .endif
; Reopen it in Graphics 0 ; reopen it in Graphics 0
lda #OPEN lda #OPEN
sta ICCOM,x sta ICCOM,x
lda #OPNIN | OPNOT lda #OPNIN | OPNOT
@ -212,8 +214,8 @@ cg_addr_ok2:
; switch to temporary chargen ; switch to temporary chargen
sta CHBASE sta CHBASE
sta CHBAS sta CHBAS
; copy shadow RAM contents to their destination (segment SHADOW_RAM) ; copy shadow RAM contents to their destination (segment SHADOW_RAM)
@ -245,7 +247,7 @@ no_copy:
lda #<__SHADOW_RAM2_SIZE__ lda #<__SHADOW_RAM2_SIZE__
bne do_copy2 bne do_copy2
lda #>__SHADOW_RAM2_SIZE__ lda #>__SHADOW_RAM2_SIZE__
beq no_copy2 ; we have no shadow RAM contents beq no_copy2 ; we have no shadow RAM #2 contents
; ptr1 - src; ptr2 - dest; tmp1, tmp2 - len ; ptr1 - src; ptr2 - dest; tmp1, tmp2 - len
do_copy2: do_copy2:

View File

@ -7,8 +7,8 @@
; and that enough memory is installed (which isn't the case for a 600XL). ; and that enough memory is installed (which isn't the case for a 600XL).
; For the non-XL target it checks whether there is enough memory ; For the non-XL target it checks whether there is enough memory
; installed to run the program. ; installed to run the program.
; For both target it checks that the program won't load below MEMLO. ; For both targets it checks that the program won't load below MEMLO.
; If one of the checks fails the loading of the main program ; If one of the checks fails, the loading of the main program
; is aborted by jumping to DOSVEC. ; is aborted by jumping to DOSVEC.
; ;
; Christian Groessler, chris@groessler.org, 2013 ; Christian Groessler, chris@groessler.org, 2013
@ -46,8 +46,8 @@ cont: ldx #0 ; channel 0
sta ICCOM,x sta ICCOM,x
jsr CIOV_org jsr CIOV_org
.endmacro .endmacro
.macro print_string2 addr, len
.macro print_string2 addr, len
ldx #0 ; channel 0 ldx #0 ; channel 0
lda #<addr lda #<addr
sta ICBAL,x ; address sta ICBAL,x ; address
@ -60,7 +60,6 @@ cont: ldx #0 ; channel 0
lda #PUTCHR lda #PUTCHR
sta ICCOM,x sta ICCOM,x
jsr CIOV_org jsr CIOV_org
.endmacro .endmacro