Merge branch 'master' into coniopeek

This commit is contained in:
mrdudz
2023-07-08 15:23:42 +02:00
621 changed files with 17752 additions and 5798 deletions

View File

@@ -55,11 +55,12 @@ INSTALL:
lda VIA::PRA
and #%00100000
bne ijkPresent
lda #<JOY_ERR_NO_DEVICE
lda #JOY_ERR_NO_DEVICE
.byte $2C ; Skip next opcode
ijkPresent:
lda #<JOY_ERR_OK
ldx #>JOY_ERR_OK
lda #JOY_ERR_OK
.assert JOY_ERR_OK = 0, error
tax
; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------

View File

@@ -58,7 +58,8 @@ temp2: .byte $00
INSTALL:
lda #JOY_ERR_OK
ldx #0
.assert JOY_ERR_OK = 0, error
tax
; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------

View File

@@ -1,14 +1,14 @@
;
; Stefan Haubenthal, 2011-04-18
;
; int __fastcall__ _osmaperrno (unsigned char oserror);
; int __fastcall__ __osmaperrno (unsigned char oserror);
; /* Map a system specific error into a system independent code */
;
.include "errno.inc"
.export __osmaperrno
.export ___osmaperrno
.proc __osmaperrno
.proc ___osmaperrno
lda #<EUNKNOWN
ldx #>EUNKNOWN

View File

@@ -141,8 +141,9 @@ SER_CLOSE:
sta ACIA::CMD,x
; Done, return an error code
: lda #<SER_ERR_OK
tax ; A is zero
: lda #SER_ERR_OK
.assert SER_ERR_OK = 0, error
tax
stx Index ; Mark port as closed
rts
@@ -205,8 +206,9 @@ SER_OPEN:
; Done
stx Index ; Mark port as open
lda #<SER_ERR_OK
tax ; A is zero
lda #SER_ERR_OK
.assert SER_ERR_OK = 0, error
tax
rts
; Invalid parameter
@@ -235,8 +237,8 @@ SER_GET:
: lda RecvFreeCnt ; (25)
cmp #$FF
bne :+
lda #<SER_ERR_NO_DATA
ldx #>SER_ERR_NO_DATA
lda #SER_ERR_NO_DATA
ldx #0 ; return value is char
rts
; Check for flow stopped & enough free: release flow control
@@ -277,8 +279,8 @@ SER_PUT:
; Put byte into send buffer & send
: ldy SendFreeCnt
bne :+
lda #<SER_ERR_OVERFLOW
ldx #>SER_ERR_OVERFLOW
lda #SER_ERR_OVERFLOW
ldx #0 ; return value is char
rts
: ldy SendTail
@@ -287,7 +289,8 @@ SER_PUT:
dec SendFreeCnt
lda #$FF ; TryHard = true
jsr TryToSend
lda #<SER_ERR_OK
lda #SER_ERR_OK
.assert SER_ERR_OK = 0, error
tax
rts
@@ -299,7 +302,8 @@ SER_STATUS:
lda ACIA::STATUS
ldx #$00
sta (ptr1,x)
txa ; SER_ERR_OK
.assert SER_ERR_OK = 0, error
txa
rts
;----------------------------------------------------------------------------
@@ -308,8 +312,8 @@ SER_STATUS:
; Must return an SER_ERR_xx code in a/x.
SER_IOCTL:
lda #<SER_ERR_INV_IOCTL
ldx #>SER_ERR_INV_IOCTL
lda #SER_ERR_INV_IOCTL
ldx #0 ; return value is char
rts
;----------------------------------------------------------------------------

View File

@@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _atmos_acia_ser
.rodata
_ser_static_stddrv := _atmos_acia_ser

13
libsrc/atmos/ser_stddrv.s Normal file
View File

@@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "atmos-acia.ser"

View File

@@ -215,7 +215,8 @@ SETPALETTE:
jsr PAPER
ldy #1
jsr flipcolor
dey ; TGI_ERR_OK
.assert TGI_ERR_OK = 0, error
dey
sty ERROR
sty PARAM1+1
jmp INK