mirror of
https://github.com/a2stuff/IIcSystemClock.git
synced 2024-06-07 12:29:29 +00:00
disasm wip
This commit is contained in:
parent
4b770b7b16
commit
2304490978
|
@ -21,12 +21,15 @@
|
||||||
kRemoveWriteProtect = 11
|
kRemoveWriteProtect = 11
|
||||||
.endenum
|
.endenum
|
||||||
|
|
||||||
|
|
||||||
|
;;; Zero Page Locations
|
||||||
mach_type := $07 ; 0 = IIc, 1 = II+/IIe
|
mach_type := $07 ; 0 = IIc, 1 = II+/IIe
|
||||||
case_mask := $08 ; mask with chars before COUT
|
case_mask := $08 ; mask with chars before COUT
|
||||||
has_80col := $09 ; 1 = has 80 column card
|
has_80col := $09 ; 1 = has 80 column card
|
||||||
month := $0A ; month from current date
|
month := $0A ; month from current date
|
||||||
msg_num := $0B ; stashed message number
|
msg_num := $0B ; stashed message number
|
||||||
|
|
||||||
|
PRODOS_SYS_START := $2000
|
||||||
|
|
||||||
SLOT3_FIRMWARE := $C300
|
SLOT3_FIRMWARE := $C300
|
||||||
|
|
||||||
|
@ -43,13 +46,20 @@ MOUSE_BTN := $C063
|
||||||
|
|
||||||
kClockRoutineMaxLength = 125 ; Per ProDOS 8 TRM
|
kClockRoutineMaxLength = 125 ; Per ProDOS 8 TRM
|
||||||
|
|
||||||
|
kDefaultDriveSlot = 6
|
||||||
|
|
||||||
|
kIIcVersionByte = HI('L')
|
||||||
|
kDefaultVersionByte = HI(' ')
|
||||||
|
|
||||||
|
kDefaultYear = 1986
|
||||||
|
|
||||||
L2000:
|
L2000:
|
||||||
default_slot := * + 1
|
default_slot := * + 1
|
||||||
lda #$06 ; For easy patching???
|
lda #kDefaultDriveSlot ; For easy patching???
|
||||||
|
|
||||||
L2003 := * + 1 ; Patched location for ...?
|
version_test_byte := *+1
|
||||||
lda #$A0
|
lda #kDefaultVersionByte
|
||||||
cmp #$CC
|
cmp #kIIcVersionByte
|
||||||
bne L2013
|
bne L2013
|
||||||
|
|
||||||
sta L239E + (L1272 - L1000) ; In relocated code
|
sta L239E + (L1272 - L1000) ; In relocated code
|
||||||
|
@ -83,8 +93,8 @@ L2013:
|
||||||
|
|
||||||
: cmp #%10001000 ; IIc ?
|
: cmp #%10001000 ; IIc ?
|
||||||
beq is_iic
|
beq is_iic
|
||||||
lda L2003 ; Hack ???
|
lda version_test_byte ; Hack ???
|
||||||
cmp #$CC
|
cmp #kIIcVersionByte
|
||||||
beq is_iic
|
beq is_iic
|
||||||
iny ; Not a IIc
|
iny ; Not a IIc
|
||||||
is_iic: sty mach_type
|
is_iic: sty mach_type
|
||||||
|
@ -361,17 +371,19 @@ year_ok:
|
||||||
jsr year_from_bcd
|
jsr year_from_bcd
|
||||||
jsr InvokeDriver
|
jsr InvokeDriver
|
||||||
jsr L111A
|
jsr L111A
|
||||||
L21DF: lda RWRAM1
|
|
||||||
lda RWRAM1
|
L21DF: lda RWRAM1 ; Driver lives in LC Bank 1
|
||||||
lda DATETIME+1
|
lda RWRAM1 ; so bank that in
|
||||||
|
|
||||||
|
lda DATETIME+1 ; driver destination
|
||||||
sta install_ptr
|
sta install_ptr
|
||||||
clc
|
clc
|
||||||
adc #$76
|
adc #time_offset_table - Driver ; patch an internal reference (LSB)
|
||||||
sta L22B1
|
sta offset_table_addr
|
||||||
lda DATETIME+2
|
lda DATETIME+2 ; driver destination
|
||||||
sta install_ptr+1
|
sta install_ptr+1
|
||||||
adc #0
|
adc #0
|
||||||
sta L22B2
|
sta offset_table_addr+1 ; patch an internal reference (MSB)
|
||||||
|
|
||||||
;; Relocate clock driver
|
;; Relocate clock driver
|
||||||
ldy #kClockRoutineMaxLength - 1
|
ldy #kClockRoutineMaxLength - 1
|
||||||
|
@ -383,7 +395,7 @@ install_ptr := * + 1
|
||||||
|
|
||||||
;; Initialize the time (via driver)
|
;; Initialize the time (via driver)
|
||||||
jsr DATETIME
|
jsr DATETIME
|
||||||
lda ROMIN2
|
lda ROMIN2 ; Bank ROM back in
|
||||||
|
|
||||||
;; Chain
|
;; Chain
|
||||||
jmp L1000
|
jmp L1000
|
||||||
|
@ -521,19 +533,21 @@ L228A := * + 1
|
||||||
pla ; Restore command register
|
pla ; Restore command register
|
||||||
L229F := * + 1
|
L229F := * + 1
|
||||||
sta PORT2_ACIA_COMMAND
|
sta PORT2_ACIA_COMMAND
|
||||||
ldx #$06
|
|
||||||
|
|
||||||
|
;; Process digits
|
||||||
|
ldx #6
|
||||||
L22A3: lda $0201,x
|
L22A3: lda $0201,x
|
||||||
: dec $0200,x
|
|
||||||
bmi L22B0
|
: dec $0200,x ;
|
||||||
|
bmi :+
|
||||||
clc
|
clc
|
||||||
adc #10
|
adc #10
|
||||||
bcc :-
|
bcc :-
|
||||||
L22B0:
|
:
|
||||||
L22B1 := * + 1
|
|
||||||
L22B2 := * + 2
|
offset_table_addr := * + 1
|
||||||
ldy L22DB,x
|
ldy time_offset_table,x ; Offset table
|
||||||
sta $BF30,y ; Modifying DEVLST ???
|
sta DEVNUM,y ; y is offset from DEVNUM for some reason
|
||||||
dex
|
dex
|
||||||
dex
|
dex
|
||||||
bne L22A3
|
bne L22A3
|
||||||
|
@ -547,7 +561,7 @@ L22BA: lda $0200 ; top nibble is month
|
||||||
sta DATELO
|
sta DATELO
|
||||||
|
|
||||||
year := * + 1
|
year := * + 1
|
||||||
lda #86 ; default = 1986
|
lda #(kDefaultYear .mod 100)
|
||||||
rol a ; DATEHI = yyyyyyym, shift in month bit
|
rol a ; DATEHI = yyyyyyym, shift in month bit
|
||||||
sta DATELO+1
|
sta DATELO+1
|
||||||
;; --------------------------------------------------
|
;; --------------------------------------------------
|
||||||
|
@ -559,15 +573,16 @@ L22CE: lda $0208,y
|
||||||
dey
|
dey
|
||||||
bpl L22CE
|
bpl L22CE
|
||||||
dex
|
dex
|
||||||
L22DB := * + 1
|
|
||||||
bne L22BA
|
bne L22BA
|
||||||
plp
|
plp
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.byte $FF
|
time_offset_table := * - 3
|
||||||
.byte $63
|
|
||||||
.byte $FF
|
.byte $FF ; dummy
|
||||||
.byte $62
|
.byte TIMELO+1 - DEVNUM ; offset
|
||||||
|
.byte $FF ; dummy
|
||||||
|
.byte TIMELO - DEVNUM ; offset
|
||||||
|
|
||||||
;; End of relocated clock driver
|
;; End of relocated clock driver
|
||||||
|
|
||||||
|
@ -717,7 +732,6 @@ case_mask_table:
|
||||||
.byte %11011111 ; map lowercase to uppercase
|
.byte %11011111 ; map lowercase to uppercase
|
||||||
.byte %11111111 ; preserve case
|
.byte %11111111 ; preserve case
|
||||||
|
|
||||||
|
|
||||||
chain:
|
chain:
|
||||||
L239E:
|
L239E:
|
||||||
;; Relocated to $1000
|
;; Relocated to $1000
|
||||||
|
@ -806,7 +820,7 @@ L1077: lda ($00),y
|
||||||
jsr COUT
|
jsr COUT
|
||||||
lda #$8D
|
lda #$8D
|
||||||
jsr COUT
|
jsr COUT
|
||||||
L10A5: jmp L2000
|
L10A5: jmp PRODOS_SYS_START
|
||||||
|
|
||||||
L10A8: clc
|
L10A8: clc
|
||||||
lda $00
|
lda $00
|
||||||
|
@ -1017,20 +1031,20 @@ open_params_ref_num:
|
||||||
read_params:
|
read_params:
|
||||||
.byte 4 ; param_count
|
.byte 4 ; param_count
|
||||||
read_params_ref_num:
|
read_params_ref_num:
|
||||||
.byte 0 ; ref_num
|
.byte 0 ; ref_num
|
||||||
.addr $2000 ; data_buffer
|
.addr PRODOS_SYS_START ; data_buffer
|
||||||
.word $9F00 ; request_count
|
.word PRODOS-PRODOS_SYS_START ; request_count
|
||||||
.word 0 ; trans_count
|
.word 0 ; trans_count
|
||||||
|
|
||||||
close_params:
|
close_params:
|
||||||
.byte 1 ; param_count
|
.byte 1 ; param_count
|
||||||
.byte 0 ; ref_num
|
.byte 0 ; ref_num
|
||||||
|
|
||||||
file_info_params:
|
file_info_params:
|
||||||
.byte $A ; param_count
|
.byte $A ; param_count
|
||||||
.addr str_clock_system ; pathname
|
.addr str_clock_system ; pathname
|
||||||
.byte 0 ; access
|
.byte 0 ; access
|
||||||
.byte 0 ; file_type
|
.byte 0 ; file_type
|
||||||
;; ...
|
;; ...
|
||||||
|
|
||||||
;;; ------------------------------------------------------------
|
;;; ------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user