mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-12-25 13:29:59 +00:00
MAke some fixes for real hardware (STA LCRWEN+BNK2) doesn't work
This commit is contained in:
parent
2c9986fd25
commit
c43dba71b1
@ -4,7 +4,6 @@ const memmap = $BF58
|
||||
const sysfile = $0280
|
||||
byte syshalt[] = "SYSTEM HALTED..."
|
||||
byte perr
|
||||
|
||||
;
|
||||
; Utility functions
|
||||
;
|
||||
@ -77,57 +76,6 @@ SETMLP DEC ESTKL,X
|
||||
++ INX
|
||||
RTS
|
||||
end
|
||||
;
|
||||
; COPY MEMORY
|
||||
; MEMCPY(DSTADDR, SRCADDR, SIZE)
|
||||
;
|
||||
asm memcpy
|
||||
LDY #$00
|
||||
LDA ESTKL,X
|
||||
BNE +
|
||||
LDA ESTKH,X
|
||||
BEQ MEMEXIT
|
||||
+ LDA ESTKL+2,X
|
||||
STA DSTL
|
||||
LDA ESTKH+2,X
|
||||
STA DSTH
|
||||
LDA ESTKL+1,X
|
||||
STA SRCL
|
||||
LDA ESTKH+1,X
|
||||
STA SRCH
|
||||
INC ESTKH,X
|
||||
CPYLP LDA (SRC),Y
|
||||
STA (DST),Y
|
||||
INC DSTL
|
||||
BNE +
|
||||
INC DSTH
|
||||
+ INC SRCL
|
||||
BNE +
|
||||
INC SRCH
|
||||
+ DEC ESTKL,X
|
||||
BNE CPYLP
|
||||
DEC ESTKH,X
|
||||
BNE CPYLP
|
||||
MEMEXIT INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
;
|
||||
; CHAR OUT
|
||||
; COUT(CHAR)
|
||||
;
|
||||
asm cout
|
||||
LDA ESTKL,X
|
||||
ORA #$80
|
||||
BIT ROMEN
|
||||
JSR $FDED
|
||||
BIT LCRDEN+LCBNK2
|
||||
RTS
|
||||
end
|
||||
;
|
||||
; CHAR IN
|
||||
; RDKEY()
|
||||
;
|
||||
asm cin
|
||||
BIT ROMEN
|
||||
STX ESP
|
||||
@ -164,9 +112,6 @@ asm prstr
|
||||
+ BIT LCRDEN+LCBNK2
|
||||
RTS
|
||||
end
|
||||
def crout
|
||||
cout($0D)
|
||||
end
|
||||
;
|
||||
; ProDOS routines
|
||||
;
|
||||
|
@ -137,29 +137,26 @@ RAMDONE CLI
|
||||
JSR PRODOS ; OPEN AUTORUN
|
||||
!BYTE $C8
|
||||
!WORD OPENPARMS
|
||||
BCC +
|
||||
JMP NOAUTO
|
||||
+ LDA REFNUM
|
||||
BNE NOAUTO
|
||||
LDA REFNUM
|
||||
STA NLPARMS+1
|
||||
JSR PRODOS
|
||||
!BYTE $C9
|
||||
!WORD NLPARMS
|
||||
BCC +
|
||||
JMP NOAUTO
|
||||
+ LDA REFNUM
|
||||
BNE NOAUTO
|
||||
LDA REFNUM
|
||||
STA READPARMS+1
|
||||
JSR PRODOS
|
||||
!BYTE $CA
|
||||
!WORD READPARMS
|
||||
BCC +
|
||||
JMP NOAUTO
|
||||
+ LDX READPARMS+6
|
||||
BNE NOAUTO
|
||||
LDX READPARMS+6
|
||||
STX $0280
|
||||
JSR PRODOS
|
||||
!BYTE $CC
|
||||
!WORD CLOSEPARMS
|
||||
JMP CMDEXEC ; CALL CM
|
||||
NOAUTO JMP BYE
|
||||
JMP CMDEXEC
|
||||
NOAUTO JMP BYE ; LOAD DEFAULT
|
||||
AUTORUN !BYTE 7
|
||||
!TEXT "AUTORUN"
|
||||
OPENPARMS !BYTE 3
|
||||
@ -226,6 +223,9 @@ BYE LDY DEFCMD
|
||||
STA $0280,Y
|
||||
DEY
|
||||
BNE -
|
||||
BEQ CMDEXEC
|
||||
DEFCMD !BYTE 3
|
||||
!TEXT "CMD"
|
||||
;*
|
||||
;* MOVE REST OF CMD FROM LANGUAGE CARD
|
||||
;*
|
||||
@ -240,17 +240,20 @@ CMDEXEC STY SRCL
|
||||
STA (DST),Y
|
||||
INY
|
||||
BNE -
|
||||
INC SRCL
|
||||
INC DSTL
|
||||
LDA SRCL
|
||||
CMP #$E0
|
||||
INC SRCH
|
||||
INC DSTH
|
||||
LDA SRCH
|
||||
CMP #$D4 ; #$E0
|
||||
BNE -
|
||||
;*
|
||||
;* DEACTIVATE 80 COL CARDS
|
||||
;*
|
||||
LDX #$FE
|
||||
TXS
|
||||
BIT ROMEN
|
||||
LDY #4
|
||||
- LDA DISABLE80,Y
|
||||
ORA #$80
|
||||
JSR $FDED
|
||||
DEY
|
||||
BPL -
|
||||
@ -258,10 +261,6 @@ CMDEXEC STY SRCL
|
||||
BIT $C051
|
||||
BIT $C058
|
||||
JSR $FC58 ; HOME
|
||||
JMP START
|
||||
DISABLE80 !BYTE 21, 13, '1', 26, 13
|
||||
DEFCMD !BYTE 3
|
||||
!TEXT "CMD"
|
||||
;*
|
||||
;* JUMP TO INTERPRETER
|
||||
;*
|
||||
@ -269,24 +268,23 @@ START LDA #$00
|
||||
STA IFPL
|
||||
LDA #$BF
|
||||
STA IFPH
|
||||
LDX #$FF
|
||||
TXS
|
||||
LDX #ESTKSZ/2
|
||||
!SOURCE "cmdexec.a"
|
||||
DISABLE80 !BYTE 21, 13, '1', 26, 13
|
||||
}
|
||||
;*
|
||||
;* ENTER INTO BYTECODE INTERPRETER
|
||||
;*
|
||||
INTERP STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
INTERP BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
PLA
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
LDY #$01
|
||||
BNE FETCHOP
|
||||
IINTRP STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
IINTRP BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
PLA
|
||||
STA TMPL
|
||||
PLA
|
||||
@ -299,8 +297,8 @@ IINTRP STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA IPL
|
||||
DEY
|
||||
BEQ FETCHOP
|
||||
IINTRPX STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
IINTRPX BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
PLA
|
||||
STA TMPL
|
||||
PLA
|
||||
@ -1284,7 +1282,7 @@ DLW +INC_IP
|
||||
DLBX +INC_IP
|
||||
LDA (IP),Y
|
||||
STY IPY
|
||||
STA ALTRDOFF
|
||||
STA ALTRDOFF
|
||||
TAY
|
||||
LDA ESTKL,X
|
||||
STA (IFP),Y
|
||||
@ -1774,8 +1772,8 @@ CALL +INC_IP
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
JMP NEXTOP
|
||||
;
|
||||
CALLX +INC_IP
|
||||
@ -1801,8 +1799,8 @@ CALLX +INC_IP
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
JMP NEXTOPX
|
||||
;*
|
||||
;* INDIRECT CALL TO ADDRESS (NATIVE CODE)
|
||||
@ -1825,8 +1823,8 @@ ICAL LDA ESTKL,X
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
JMP NEXTOP
|
||||
;
|
||||
ICALX LDA ESTKL,X
|
||||
@ -1849,8 +1847,8 @@ ICALX LDA ESTKL,X
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
STA LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
STA LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2 ; WRITE ENABLE LANGUAGE CARD
|
||||
BIT LCRWEN+LCBNK2
|
||||
JMP NEXTOPX
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
|
Loading…
Reference in New Issue
Block a user