* * DLLD * Let's play Dragon's Lair :-) * * (c) 2024, Brutal Deluxe Software * mx %11 org $2000 lst off use 4/Int.Macs use 4/Misc.Macs use 4/Util.Macs *----------------------------------- * MACROS *----------------------------------- _sendSTRING mac ldx #>]1 ldy #<]1 jsr sendString eom *----------------------------------- * EQUATES *----------------------------------- frameIN = 323 frameOUT = 1359 SLOT = 2 N0 = SLOT*16 CN = SLOT!$C0 chrRETURN = $0d dpFROM = $fc dpTO = dpFROM+2 *---------- CH = $24 KBD = $c000 CLR80VID = $c00c KBDSTROBE = $c010 INIT = $FB2F TABV = $FB5B HOME = $FC58 WAIT = $FCA8 PRBYTE = $FDDA COUT = $FDED SETNORM = $FE84 SETKBD = $FE89 *----------------------------------- * CODE *----------------------------------- bra jumpME theFRAME ds 2 jumpME sta CLR80VID jsr INIT ; text screen jsr SETNORM ; set normal text mode jsr SETKBD ; reset input to keyboard jsr HOME ; home cursor and clear to end of page clc xce rep #$30 lda #frameIN sta theFRAME sec xce sep #$30 jsr initSERIAL ; set the serial addresses jsr initPORT ; init the serial port for LD support *---------- ldx #>strDS ; on veut la frame number ldy #strSA ; start the player ldy #strSE ; Move to frame and wait for R ldy #strPL ; Play and wait for R ldy #strPA ; Pause and return ldy #strRJ ; It's the end! ldy #responseBUF stx dpTO+1 ldy #0 receiveSTR1 phy ]lp jsr checkInputReady bcs receiveSTR9 ldx #CN ldy #N0 jsr doread cpx #0 bne receiveSTR9 ply sta (dpTO),y cmp #chrRETURN beq receiveSTR8 iny bne receiveSTR1 receiveSTR8 clc rts receiveSTR9 ply sec rts *----------------------------------- * DATA *----------------------------------- *---------- Serial data strED asc 01'ED'00 ; *Don't echo output strBE asc 01'BE'00 ; *Input buffering: on str12B asc 01'12B'00 ; *Baud rate: 4800 BPS str0D asc 01'0D'00 ; *Data/Stop bits: 8/1 str0P asc 01'0P'00 ; *Parity: none str0N asc 01'0N'00 ; Line length: 0 strAD asc 01'AD'00 ; *Do not implement basic tabs strCD asc 01'CD'00 ; *Disable line formatting strXD asc 01'XD'00 ; *Ignore XOFF strFD asc 01'FD'00 ; *Disable keyboard input strLD asc 01'LD'00 ; Do not add line feeds after CR strME asc 01'ME'00 ; Mask line feed in strZ asc 01'Z'00 ; *Suppress control characters *---------- Laserdisc ds \ responseBUF ds 256 ; LD player response *----------------------------------- * END OF CODE *-----------------------------------