1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Merge pull request #552 from polluks/master

Added Oric-1 compatibility #550
This commit is contained in:
Oliver Schmidt 2017-12-16 18:26:34 +00:00 committed by GitHub
commit fb193933cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 250 additions and 14 deletions

View File

@ -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

39
cfg/c16-32k.cfg Normal file
View File

@ -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__;
}

View File

@ -115,18 +115,16 @@ function.
<sect1><tt/atmos.h/<label id="atmos.h"><p>
<itemize>
<item><ref id="atmos_explode" name="atmos_explode">
<item><ref id="atmos_load" name="atmos_load">
<item><ref id="atmos_ping" name="atmos_ping">
<item><ref id="atmos_save" name="atmos_save">
<!-- <item><ref id="atmos_explode" name="atmos_explode"> -->
<!-- <item><ref id="atmos_ping" name="atmos_ping"> -->
<!-- <item><ref id="atmos_shoot" name="atmos_shoot"> -->
<!-- <item><ref id="atmos_tick" name="atmos_tick"> -->
<!-- <item><ref id="atmos_tock" name="atmos_tock"> -->
<!-- <item><ref id="atmos_zap" name="atmos_zap"> -->
<item><ref id="atmos_shoot" name="atmos_shoot">
<item><ref id="atmos_tick" name="atmos_tick">
<item><ref id="atmos_tock" name="atmos_tock">
<item><ref id="atmos_zap" name="atmos_zap">
</itemize>
(incomplete)
<sect1><tt/c128.h/<label id="c128.h"><p>
@ -679,6 +677,20 @@ communication.
(incomplete)
<sect1><tt/telestrat.h/<label id="telestrat.h"><p>
<itemize>
<item><ref id="atmos_explode" name="explode">
<item><ref id="atmos_ping" name="ping">
<item><ref id="atmos_shoot" name="shoot">
<item><ref id="atmos_zap" name="zap">
<!-- <item><ref id="kbdclick1" name="kbdclick1"> -->
<!-- <item><ref id="oups" name="oups"> -->
</itemize>
(incomplete)
<sect1><tt/tgi.h/<label id="tgi.h"><p>
<url url="tgi.html" name="Tiny Graphics Interface">.
@ -1338,6 +1350,30 @@ used in presence of a prototype.
</quote>
<sect1>atmos_explode<label id="atmos_explode"><p>
<quote>
<descrip>
<tag/Function/Bomb sound effect.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_explode(void);/
<tag/Description/<tt/atmos_explode/ plays the BASIC sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_ping" name="atmos_ping">,
<ref id="atmos_shoot" name="atmos_shoot">,
<ref id="atmos_tick" name="atmos_tick">,
<ref id="atmos_tock" name="atmos_tock">,
<ref id="atmos_zap" name="atmos_zap">
<tag/Example/None.
</descrip>
</quote>
<sect1>atmos_load<label id="atmos_load"><p>
<quote>
@ -1358,6 +1394,30 @@ only in the presence of a prototype.
</quote>
<sect1>atmos_ping<label id="atmos_ping"><p>
<quote>
<descrip>
<tag/Function/Bell or ricochet sound effect.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_ping(void);/
<tag/Description/<tt/atmos_ping/ plays the BASIC sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_explode" name="atmos_explode">,
<ref id="atmos_shoot" name="atmos_shoot">,
<ref id="atmos_tick" name="atmos_tick">,
<ref id="atmos_tock" name="atmos_tock">,
<ref id="atmos_zap" name="atmos_zap">
<tag/Example/None.
</descrip>
</quote>
<sect1>atmos_save<label id="atmos_save"><p>
<quote>
@ -1380,6 +1440,102 @@ atmos_save("hires", 0xa000, 0xc000);
</quote>
<sect1>atmos_shoot<label id="atmos_shoot"><p>
<quote>
<descrip>
<tag/Function/Pistol sound effect.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_shoot(void);/
<tag/Description/<tt/atmos_shoot/ plays the BASIC sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_explode" name="atmos_explode">,
<ref id="atmos_ping" name="atmos_ping">,
<ref id="atmos_tick" name="atmos_tick">,
<ref id="atmos_tock" name="atmos_tock">,
<ref id="atmos_zap" name="atmos_zap">
<tag/Example/None.
</descrip>
</quote>
<sect1>atmos_tick<label id="atmos_tick"><p>
<quote>
<descrip>
<tag/Function/High-pitch click.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_tick(void);/
<tag/Description/<tt/atmos_tick/ plays the system sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_explode" name="atmos_explode">,
<ref id="atmos_ping" name="atmos_ping">,
<ref id="atmos_shoot" name="atmos_shoot">,
<ref id="atmos_tock" name="atmos_tock">,
<ref id="atmos_zap" name="atmos_zap">
<tag/Example/None.
</descrip>
</quote>
<sect1>atmos_tock<label id="atmos_tock"><p>
<quote>
<descrip>
<tag/Function/Low-pitch click.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_tock(void);/
<tag/Description/<tt/atmos_tock/ plays the system sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_explode" name="atmos_explode">,
<ref id="atmos_ping" name="atmos_ping">,
<ref id="atmos_shoot" name="atmos_shoot">,
<ref id="atmos_tick" name="atmos_tick">,
<ref id="atmos_zap" name="atmos_zap">
<tag/Example/None.
</descrip>
</quote>
<sect1>atmos_zap<label id="atmos_zap"><p>
<quote>
<descrip>
<tag/Function/Raygun sound effect.
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
<tag/Declaration/<tt/void __fastcall__ atmos_zap(void);/
<tag/Description/<tt/atmos_zap/ plays the BASIC sound.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="atmos_explode" name="atmos_explode">,
<ref id="atmos_ping" name="atmos_ping">,
<ref id="atmos_shoot" name="atmos_shoot">,
<ref id="atmos_tick" name="atmos_tick">,
<ref id="atmos_tock" name="atmos_tock">
<tag/Example/None.
</descrip>
</quote>
<sect1>atoi<label id="atoi"><p>
<quote>

View File

@ -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