diff --git a/asminc/atmos.inc b/asminc/atmos.inc index 4c3c442fa..8edcf7dc2 100644 --- a/asminc/atmos.inc +++ b/asminc/atmos.inc @@ -104,8 +104,14 @@ PRINT := $F77C ; Sound Effects PING := $FA9F +PING1 := $FA85 SHOOT := $FAB5 +SHOOT1 := $FA9B EXPLODE := $FACB +EXPLODE1 := $FAB1 ZAP := $FAE1 +ZAP1 := $FAC7 TICK := $FB14 +TICK1 := $FAFA TOCK := $FB2A +TOCK1 := $FB10 diff --git a/cfg/c16-32k.cfg b/cfg/c16-32k.cfg new file mode 100644 index 000000000..b67c66b96 --- /dev/null +++ b/cfg/c16-32k.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $0FFF, size = $0002; + HEADER: file = %O, start = $1001, size = $000C; + MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = MAIN, type = ro; + LOWCODE: load = MAIN, type = ro, optional = yes; + ONCE: load = MAIN, type = ro, optional = yes; + CODE: load = MAIN, type = ro; + RODATA: load = MAIN, type = ro; + DATA: load = MAIN, type = rw; + INIT: load = MAIN, type = bss; + BSS: load = MAIN, type = bss, define = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = ONCE; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/doc/funcref.sgml b/doc/funcref.sgml index b198adcf8..15830b2a2 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -115,18 +115,16 @@ function.

+ + - - - - - - + + + + -(incomplete) -

@@ -679,6 +677,20 @@ communication. (incomplete) +

+ + + + + + + + + + +(incomplete) + +

. @@ -1338,6 +1350,30 @@ used in presence of a prototype. +atmos_explode

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + atmos_load

@@ -1358,6 +1394,30 @@ only in the presence of a prototype. +atmos_ping

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + atmos_save

@@ -1380,6 +1440,102 @@ atmos_save("hires", 0xa000, 0xc000); +atmos_shoot

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + +atmos_tick

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + +atmos_tock

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + +atmos_zap

+ + + +/ + +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. + +, +, +, +, + + + + + atoi

diff --git a/libsrc/atmos/atmos.s b/libsrc/atmos/atmos.s index 6b5a4a49c..c50204fa5 100644 --- a/libsrc/atmos/atmos.s +++ b/libsrc/atmos/atmos.s @@ -7,9 +7,44 @@ .include "atmos.inc" -_atmos_ping := PING -_atmos_shoot := SHOOT -_atmos_explode := EXPLODE -_atmos_zap := ZAP -_atmos_tick := TICK -_atmos_tock := TOCK +.proc _atmos_ping + bit $31 + bvs L1 ; Atmos? + jmp PING +L1: jmp PING1 +.endproc + +.proc _atmos_shoot + lda $31 + bvs L1 ; Atmos? + jmp SHOOT +L1: jmp SHOOT1 +.endproc + +.proc _atmos_explode + lda $31 + bvs L1 ; Atmos? + jmp EXPLODE +L1: jmp EXPLODE1 +.endproc + +.proc _atmos_zap + lda $31 + bvs L1 ; Atmos? + jmp ZAP +L1: jmp ZAP1 +.endproc + +.proc _atmos_tick + lda $31 + bvs L1 ; Atmos? + jmp TICK +L1: jmp TICK1 +.endproc + +.proc _atmos_tock + lda $31 + bvs L1 ; Atmos? + jmp TOCK +L1: jmp TOCK1 +.endproc