Merge branch 'master' into coniopeek

This commit is contained in:
mrdudz
2025-05-24 17:52:58 +02:00
604 changed files with 32401 additions and 8345 deletions

View File

@@ -10,10 +10,10 @@
.include "atari.inc"
.import __BSS_RUN__, __STARTADDRESS__, _cas_init
.import __INIT_RUN__, __STARTADDRESS__, _cas_init
.export _cas_hdr
.assert ((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette"
.assert ((__INIT_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette"
; for a description of the cassette header, see De Re Atari, appendix C
@@ -22,7 +22,7 @@
_cas_hdr:
.byte 0 ; ignored
.byte <((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) ; # of 128-byte records to read
.byte <((__INIT_RUN__ - __STARTADDRESS__ + 127) / 128) ; # of 128-byte records to read
.word __STARTADDRESS__ ; load address
.word _cas_init ; init address
@@ -31,6 +31,8 @@ _cas_hdr:
ldy #80
sta (SAVMSC),y
.endif
lda #$3c ; motor off
sta PACTL
clc
rts

View File

@@ -204,6 +204,10 @@ APPMHI_save: .res 2
; ------------------------------------------------------------------------
.segment "INIT" ; have at least one (empty) segment of INIT, exehdr.s needs its definition
; ------------------------------------------------------------------------
.segment "LOWCODE" ; have at least one (empty) segment of LOWCODE, so that the next line works even if the program doesn't make use of this segment
.assert (__LOWCODE_RUN__ + __LOWCODE_SIZE__ <= $4000 || __LOWCODE_RUN__ > $7FFF || __LOWCODE_SIZE__ = 0), warning, "'lowcode area' reaches into $4000..$7FFF bank memory window"
; check for LOWBSS_SIZE = 0 not needed since the only file which uses LOWBSS (irq.s) also uses LOWCODE

View File

@@ -1,11 +1,15 @@
; This file defines the EXE header and main chunk load header for Atari executables
.export __EXEHDR__: absolute = 1
.import __MAIN_START__, __BSS_LOAD__
.import __MAIN_START__, __INIT_LOAD__
.segment "EXEHDR"
.word $FFFF
.segment "MAINHDR"
.word __MAIN_START__
.word __BSS_LOAD__ - 1
.word __INIT_LOAD__ - 1
; Define the INIT segment so that __INIT_LOAD__ from above '.import' is always defined.
; The segment is normally present when linking a C program, but not necessarily when linking an assembler program.
.segment "INIT"

View File

@@ -50,7 +50,7 @@ check_device:
lda #SIO_STAT
sta DCOMND ; set command into DCB
lda #%01000000 ; direction value, "receive data"
sta DSTATS ; set data flow directon
sta DSTATS ; set data flow direction
lda #15
sta DTIMLO ; value got from DOS source
lda #4

View File

@@ -23,7 +23,7 @@
.code
; set new grapics mode
; set new graphics mode
; gets new mode in A
; returns handle or -1 on error
; uses tmp1, tmp2, tmp3, tmp4 (in subroutines)

View File

@@ -374,7 +374,7 @@ IRQ:
; The touch pad is read thru the paddle potentiometers. The possible
; values are 1..228. Since the maximum value is less than the X
; dimension we have to "stretch" this value. In order to use only
; divisions by powers of two, we use the following appoximation:
; divisions by powers of two, we use the following approximation:
; 320/227 = 1.4096
; 1+1/2-1/8+1/32 = 1.4062
; For Y we subtract 1/8 of it to get in the YMax ballpark.
@@ -385,7 +385,7 @@ IRQ:
; X
ldx PADDL0 ; get X postion
ldx PADDL0 ; get X position
dex ; decrement, since it's 1-based
stx XPos
txa
@@ -445,7 +445,7 @@ IRQ:
; Y
ldx PADDL1 ; get Y postion
ldx PADDL1 ; get Y position
dex ; decrement, since it's 1-based
stx YPos
lda #228

View File

@@ -19,7 +19,7 @@
.import findfreeiocb
.import incsp4
.import ldaxysp,addysp
.import ___oserror
.import ___oserror, returnFFFF
.ifdef UCASE_FILENAME
.import ucase_fn
.endif
@@ -39,9 +39,7 @@ parmok: jsr findfreeiocb
lda #<EMFILE ; "too many open files"
seterr: jsr ___directerrno
jsr incsp4 ; clean up stack
lda #$FF
tax
rts ; return -1
jmp returnFFFF
; process the mode argument

View File

@@ -33,7 +33,7 @@ done: lda ICBLL,x ; buf len lo
lda ICBLH,x ; get buf len hi
tax ; to X
okdone: lda #0
sta ___oserror ; clear system dependend error code
sta ___oserror ; clear system dependent error code
pla ; get buf len lo
rts
@@ -147,6 +147,7 @@ icbll_copy:
sta dataptr+1
lda ICBLL,x
sta copylen
beq copied ; length = 0 if EOF
pha ; remember for return value
ldy #0
ldx index
@@ -159,7 +160,7 @@ copy: lda linebuf,x
bne copy
pla ; length
pha ; save length to return at okdone
copied: pha ; save length to return at okdone
clc
adc index

View File

@@ -23,7 +23,7 @@
.proc __sio_call
sta DCOMND ; set command into DCB
stx DSTATS ; set data flow directon
stx DSTATS ; set data flow direction
jsr popax ; get buffer address
sta DBUFLO ; set buffer address into DCB
stx DBUFHI

View File

@@ -21,7 +21,7 @@ write9:
lda ICBLH,x ; buf len high
tax
lda #0
sta ___oserror ; clear system dependend error code
sta ___oserror ; clear system dependent error code
pla
rts