Some fixes (mostly typos) in loader.s
This commit is contained in:
parent
5c41b48664
commit
f81c0f7e65
1 changed files with 14 additions and 14 deletions
|
@ -1,11 +1,11 @@
|
||||||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||||
|
|
||||||
;;This program reads a data stream from the joystick port and saves it in memory.
|
;; This program reads a data stream from the joystick port and saves it in memory.
|
||||||
;;The datastream format is as sutch:
|
;; The datastream format is as sutch:
|
||||||
;;
|
;;
|
||||||
;;############################################
|
;; ############################################
|
||||||
;; 16-bit byte-length (big endian) | data
|
;; 16-bit byte-length (big endian) | data
|
||||||
;;############################################
|
;; ############################################
|
||||||
|
|
||||||
;; The data comes from CTRL2 bit 0 and the clock is at bit 1
|
;; The data comes from CTRL2 bit 0 and the clock is at bit 1
|
||||||
|
|
||||||
|
@ -21,19 +21,20 @@
|
||||||
;; More documentation on the Joystick port can be found here: https://www.c64-wiki.com/wiki/Joystick
|
;; More documentation on the Joystick port can be found here: https://www.c64-wiki.com/wiki/Joystick
|
||||||
|
|
||||||
|
|
||||||
CLKMASK = %00000010
|
progdest = $fe
|
||||||
CTRL2 = $DC00
|
CLKMASK = %00000010
|
||||||
|
CTRL2 = $DC00
|
||||||
|
|
||||||
.org $80d
|
.org $80d
|
||||||
coldstart: ;; Draw a dollar sign on screen to show that program has loaded
|
coldstart: ;; Draw an at sign on screen to show that program has loaded
|
||||||
lda #$0
|
lda #$0
|
||||||
sta $400
|
sta $400
|
||||||
waitstart: ;; Wait until joystick 1 has been pulled forwards to start this program
|
waitstart: ;; Wait until joystick 1 has been pulled forwards to start the program
|
||||||
lda $dc01
|
lda $dc01
|
||||||
and #$01
|
and #$01
|
||||||
bne waitstart
|
bne waitstart
|
||||||
|
|
||||||
;; Change boarder colour for debuging
|
;; Change border colour for debugging
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $d020
|
sta $d020
|
||||||
teststart:
|
teststart:
|
||||||
|
@ -55,7 +56,7 @@ check_for_load_start:
|
||||||
rts
|
rts
|
||||||
start:
|
start:
|
||||||
sei
|
sei
|
||||||
;; change boarder collor for debuging purposes
|
;; change border color for debugging purposes
|
||||||
ldx #$02
|
ldx #$02
|
||||||
stx $d020
|
stx $d020
|
||||||
ldy #$00
|
ldy #$00
|
||||||
|
@ -109,8 +110,8 @@ wait_for_bit_start:
|
||||||
jmp done
|
jmp done
|
||||||
@notdone:
|
@notdone:
|
||||||
new_byte:
|
new_byte:
|
||||||
;; BYTE is the byte beaing read from the stream. The bits are shifted from the left
|
;; BYTE is the byte being read from the stream. The bits are shifted from the left
|
||||||
;; When we shift out this 1 in BYTE bellow we save the BYTE to memory.
|
;; When we shift out this 1 in BYTE below we save the BYTE to memory.
|
||||||
lda #%10000000
|
lda #%10000000
|
||||||
sta BYTE
|
sta BYTE
|
||||||
wait_for_bit_end:
|
wait_for_bit_end:
|
||||||
|
@ -134,6 +135,5 @@ error:
|
||||||
|
|
||||||
BYTE = $400
|
BYTE = $400
|
||||||
LEN = $402
|
LEN = $402
|
||||||
progdest = $fe
|
|
||||||
stop: .word $0000
|
stop: .word $0000
|
||||||
loaded: .byte 0
|
loaded: .byte 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue