From 6faef87b49a7c310b8bb939f89b565ed28da7776 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 15 Dec 2017 23:51:39 +0100 Subject: [PATCH 1/3] Fixed Oric-1 compatibility #550 --- asminc/atmos.inc | 6 ++ doc/funcref.sgml | 172 +++++++++++++++++++++++++++++++++++++++++-- libsrc/atmos/atmos.s | 47 ++++++++++-- 3 files changed, 211 insertions(+), 14 deletions(-) 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/doc/funcref.sgml b/doc/funcref.sgml index f74630ae3..62413d6af 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -115,18 +115,16 @@ function.

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

@@ -674,6 +672,20 @@ communication. (incomplete) +

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

. @@ -1333,6 +1345,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

@@ -1353,6 +1389,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

@@ -1375,6 +1435,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 From 6452fbac89d85b538a80bf535674d15346cb92d7 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 16 Dec 2017 01:04:05 +0100 Subject: [PATCH 2/3] Added new config #551 --- cfg/c16-32k.cfg | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 cfg/c16-32k.cfg diff --git a/cfg/c16-32k.cfg b/cfg/c16-32k.cfg new file mode 100644 index 000000000..f2ce53d05 --- /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 = $7FF3 - __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__; +} From afb758bd6c7fff09386515e023dda16d76cf9d84 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 16 Dec 2017 02:35:00 +0100 Subject: [PATCH 3/3] Update c16-32k.cfg --- cfg/c16-32k.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/c16-32k.cfg b/cfg/c16-32k.cfg index f2ce53d05..b67c66b96 100644 --- a/cfg/c16-32k.cfg +++ b/cfg/c16-32k.cfg @@ -7,7 +7,7 @@ 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 = $7FF3 - __STACKSIZE__; + MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; } SEGMENTS { ZEROPAGE: load = ZP, type = zp;