From: Christian Groessler Date: Tue, 1 Oct 2013 09:32:08 +0000 (+0200) Subject: Some formatting and style fixes. X-Git-Tag: V2.15~223^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F45%2Fhead;p=cc65 Some formatting and style fixes. --- diff --git a/asminc/atari.inc b/asminc/atari.inc index 864b59808..c60f6642d 100644 --- a/asminc/atari.inc +++ b/asminc/atari.inc @@ -1002,16 +1002,16 @@ CASETV = $E440 ;cassette handler vector table DISKIV = $E450 ;vector to initialize DIO DSKINV = $E453 ;vector to DIO -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .ifndef SHRAM_HANDLERS .import CIO_handler, SIO_handler, SETVBV_handler .endif .define CIOV CIO_handler .define SIOV SIO_handler .define SETVBV SETVBV_handler -CIOV_org = $E456 ;vector to CIO -SIOV_org = $E459 ;vector to SIO -SETVBV_org = $E45C ;vector to set VBLANK parameters +CIOV_org = $E456 ;vector to CIO +SIOV_org = $E459 ;vector to SIO +SETVBV_org = $E45C ;vector to set VBLANK parameters .else CIOV = $E456 ;vector to CIO SIOV = $E459 ;vector to SIO diff --git a/cfg/atarixl-largehimem.cfg b/cfg/atarixl-largehimem.cfg index 511ec4645..d34494772 100644 --- a/cfg/atarixl-largehimem.cfg +++ b/cfg/atarixl-largehimem.cfg @@ -49,30 +49,30 @@ MEMORY { } SEGMENTS { - EXEHDR: load = HEADER, type = ro; + EXEHDR: load = HEADER, type = ro; - SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; - SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; - SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; + SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; + SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; + SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; - SRPREPHDR: load = SRPREPHDR, type = ro; - LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM - SRPREP: load = SRPREPCHNK, type = rw, define = yes; + SRPREPHDR: load = SRPREPHDR, type = ro; + LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM + SRPREP: load = SRPREPCHNK, type = rw, define = 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; - SRPREPTRL: load = SRPREPTRL, type = ro; + SRPREPTRL: load = SRPREPTRL, type = ro; - MAINHDR: load = MAINHDR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - AUTOSTRT: load = TRAILER, type = ro; + MAINHDR: load = MAINHDR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + AUTOSTRT: load = TRAILER, type = ro; } FEATURES { CONDES: type = constructor, diff --git a/cfg/atarixl-overlay.cfg b/cfg/atarixl-overlay.cfg index 446b334c3..a07d8b27a 100644 --- a/cfg/atarixl-overlay.cfg +++ b/cfg/atarixl-overlay.cfg @@ -61,40 +61,40 @@ MEMORY { } SEGMENTS { - EXEHDR: load = HEADER, type = ro; + EXEHDR: load = HEADER, type = ro; - SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; - SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; - SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; + SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; + SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; + SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; - SRPREPHDR: load = SRPREPHDR, type = ro; - LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM - SRPREP: load = SRPREPCHNK, type = rw, define = yes; + SRPREPHDR: load = SRPREPHDR, type = ro; + LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM + SRPREP: load = SRPREPCHNK, type = rw, define = 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; - SRPREPTRL: load = SRPREPTRL, type = ro; - - MAINHDR: load = MAINHDR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - AUTOSTRT: load = TRAILER, type = ro; - - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; + SRPREPTRL: load = SRPREPTRL, type = ro; + + MAINHDR: load = MAINHDR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + AUTOSTRT: load = TRAILER, type = ro; + + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; } FEATURES { CONDES: type = constructor, diff --git a/cfg/atarixl.cfg b/cfg/atarixl.cfg index 6a7cd2873..55a14a5e0 100644 --- a/cfg/atarixl.cfg +++ b/cfg/atarixl.cfg @@ -47,30 +47,30 @@ MEMORY { } SEGMENTS { - EXEHDR: load = HEADER, type = ro; + EXEHDR: load = HEADER, type = ro; - SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; - SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; - SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; + SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; + SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; + SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; - SRPREPHDR: load = SRPREPHDR, type = ro; - LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM - SRPREP: load = SRPREPCHNK, type = rw, define = yes; + SRPREPHDR: load = SRPREPHDR, type = ro; + LOWDATA: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREP and RAM + SRPREP: load = SRPREPCHNK, type = rw, define = 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; - SRPREPTRL: load = SRPREPTRL, type = ro; + SRPREPTRL: load = SRPREPTRL, type = ro; - MAINHDR: load = MAINHDR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - AUTOSTRT: load = TRAILER, type = ro; + MAINHDR: load = MAINHDR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + AUTOSTRT: load = TRAILER, type = ro; } FEATURES { CONDES: type = constructor, diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index f1cadd992..72a0c3198 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -100,23 +100,6 @@ start: jsr initlib -.if 0 -.ifdef __ATARIXL__ - .import __heapadd - .import pushax - .import __RAM_BELOW_ROM_START__ - .import __RAM_BELOW_ROM_SIZE__ - .import __RAM_BELOW_ROM_LAST__ - - lda #<__RAM_BELOW_ROM_LAST__ - ldx #>__RAM_BELOW_ROM_LAST__ - jsr pushax - lda #<(__RAM_BELOW_ROM_SIZE__ - (__RAM_BELOW_ROM_LAST__ - __RAM_BELOW_ROM_START__)) - ldx #>(__RAM_BELOW_ROM_SIZE__ - (__RAM_BELOW_ROM_LAST__ - __RAM_BELOW_ROM_START__)) - jsr __heapadd -.endif -.endif - ; Set left margin to 0 lda LMARGN @@ -179,7 +162,9 @@ _exit: jsr donelib ; Run module destructors sta MEMTOP+1 -; ... issue a GRAPHICS 0 call (copied'n'pasted from TGI drivers) +; Issue a GRAPHICS 0 call (copied'n'pasted from TGI drivers) in +; order to restore screen memory to its defailt location just +; before the ROM. jsr findfreeiocb @@ -199,7 +184,9 @@ _exit: jsr donelib ; Run module destructors lda #0 sta ICBLH,x jsr CIOV_org -; add error checking here... +; No error checking here, shouldn't happen(tm), and no way to +; recover anyway. + lda #CLOSE sta ICCOM,x jsr CIOV_org diff --git a/libsrc/atari/irq.s b/libsrc/atari/irq.s index 4a266630c..8ec1b12df 100644 --- a/libsrc/atari/irq.s +++ b/libsrc/atari/irq.s @@ -51,7 +51,7 @@ IRQStub: .endif lda PORTB pha - and #$fe + and #$FE sta PORTB ; disable ROM set_chbase >__CHARGEN_START__ .endif diff --git a/libsrc/atari/shadow_ram_handlers.s b/libsrc/atari/shadow_ram_handlers.s index 78709c38c..a01363318 100644 --- a/libsrc/atari/shadow_ram_handlers.s +++ b/libsrc/atari/shadow_ram_handlers.s @@ -4,12 +4,12 @@ ; Christian Groessler, chris@groessler.org, 2013 ; -;DEBUG = 1 -CHKBUF = 1 ; check if bounce buffering is needed (bounce buffering is always done if set to 0) +;DEBUG = 1 +CHKBUF = 1 ; check if bounce buffering is needed (bounce buffering is always done if set to 0) .ifdef __ATARIXL__ - SHRAM_HANDLERS = 1 +SHRAM_HANDLERS = 1 .include "atari.inc" .include "save_area.inc" .include "zeropage.inc" @@ -23,7 +23,7 @@ CHKBUF = 1 ; check if bounce buffering is needed (bounce buffering .export SIO_handler .export SETVBV_handler -BUFSZ = 128 ; bounce buffer size +BUFSZ = 128 ; bounce buffer size BUFSZ_SIO = 256 .segment "INIT" diff --git a/libsrc/atari/tgi/atari_tgi_common.inc b/libsrc/atari/tgi/atari_tgi_common.inc index 7151d2d1e..0d7972d34 100644 --- a/libsrc/atari/tgi/atari_tgi_common.inc +++ b/libsrc/atari/tgi/atari_tgi_common.inc @@ -4,7 +4,7 @@ .macpack longbranch -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ CIO_vec := my_CIOV .else CIO_vec := CIOV @@ -117,7 +117,7 @@ libref: .addr $0000 ; Library reference text_dir: .byte 0 ; Text direction, -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ my_CIOV: .byte $4C, 0, 0 .endif @@ -171,7 +171,7 @@ screen_device_length := * - screen_device stx mask -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ ; setup pointer to CIO