📄 updatesc.asm
字号:
DW 0BC4H
DW 0CB4H
DW 0DA4H
DW 0E94H
DW 0F34H
DW 09A8H
DW 0F98H
DW 0980H
DW 0980H
DW 0980H
DW 0980H
DW 0AE8H
DW 0F5CH
; ***************************************************************************
y_col_address_tab_5x10_bug: ;;5x10
DW 0980H+19,0994H+19,09A8H+19,09BCH+19,09D0H+19,09E4H+19,09F8H+19,0A0CH+19,0A20H+19,0A34H+19
DW 0A48H+19,0A5CH+19,0A70H+19,0A84H+19,0A98H+19,0AACH+19,0AC0H+19,0AD4H+19,0AE8H+19,0AFCH+19
DW 0B10H+19,0B24H+19,0B38H+19,0B4CH+19,0B60H+19,0B74H+19,0B88H+19,0B9CH+19,0BB0H+19,0BC4H+19
DW 0BD8H+19,0BECH+19,0C00H+19,0C14H+19,0C28H+19,0C3CH+19,0C50H+19,0C64H+19,0C78H+19,0C8CH+19
DW 0CA0H+19,0CB4H+19,0CC8H+19,0CDCH+19,0CF0H+19,0D04H+19,0D18H+19,0D2CH+19,0D40H+19,0D54H+19
DW 0D68H+19,0D7CH+19,0D90H+19,0DA4H+19,0DB8H+19,0DCCH+19,0DE0H+19,0DF4H+19,0E08H+19,0E1CH+19
DW 0E30H+19,0E44H+19,0E58H+19,0E6CH+19,0E80H+19,0E94H+19,0EA8H+19,0EBCH+19,0ED0H+19,0EE4H+19
DW 0EF8H+19,0F0CH+19,0F20H+19,0F34H+19,0F48H+19,0F5CH+19,0F70H+19,0F84H+19,0F98H+19,0FACH+19
lcd_col_tab_on_in_speed_bug:
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
db 01h,02h,04h,08h,10h,20h,40h,80h,01h,02h,04h,08h,10h,20h,40h,80h
lcd_col_tab_off_in_speed_bug:
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
db 0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh,0feh,0fdh,0fbh,0f7h,efh,dfh,bfh,7fh
;;==================================================
inv_in_position_0_bug: ; OK
db 000h,001h,003h,007h,00Fh,01Fh,03Fh,07Fh,0FFh
db 000h,002h,006h,00Eh,01Eh,03Eh,07Eh,0FEh,000h
db 000h,004h,00Ch,01Ch,03Ch,07Ch,0FCh,000h,000h
db 000h,008h,018h,038h,078h,0F8h,000h,000h,000h
db 000h,010h,030h,070h,0F0h,000h,000h,000h,000h
db 000h,020h,060h,0E0h,000h,000h,000h,000h,000h
db 000h,040h,0C0h,000h,000h,000h,000h,000h,000h
db 000h,080h,000h,000h,000h,000h,000h,000h,000h
trowtab_bug:
db 00h,20,40,60,80,100,120,140,160,180,200
UpDate16_bug:
phx
lda TextBuffor,x
cmp #0a1h
bcs ud16c_bug
tax
jsr DrawFont_bug ;; Draw out a (X,Y)font block.
ud166_bug: plx ;; Columm counter.
ud167_bug: inx
txa
ldy #9
ud162_bug:
cmp trowtab_bug,y
beq ud161_bug
dey
bpl ud162_bug
bra update16_bug
ud161_bug:
rts
ud16c_bug:
pha ;; Store high byte of font code.
lda TextBuffor+1,x ;; Nonequal ! update low byte of font code.
ud16c6_bug: tay ;; Set low byte of font code.
plx ;; Get high byte of font code.
jsr DrawFont_bug ;; Draw English (or Chinese) font.
ud16c7_bug: plx
inx
bra ud167_bug
UpDate8_bug:
ud81_bug: phx
lda TextBuffor,x
tax
jsr DrawFont8_bug ;; Draw out a (X,Y) 8X8 font block.
bra ud86_bug
ud85_bug: ldx #8 ;; OX += 8 , if OX >= 112 then OY+=1 , OX=0.
ldy #8
jsr DrawNxLoc_bug
ud86_bug: plx ; Columm counter.
inx
txa
ldy #10
ud862_bug:
cmp trowtab_bug,y
beq ud861_bug
dey
bpl ud862_bug
bra ud81_bug
ud861_bug:
rts
DrawNxLoc_bug:
clc
txa
adc <OX ;; OX += width.
cmp #LCD_SEG
bcc draw95_bug ;; Branch if OX < 112
tya ;; Get height.
clc
adc <OY ;; OY += height.
cmp #LCD_COM ;; OY >= 6 ?
bcc draw92_bug ;; Branch if OY < 6 (0..5)
lda tab_oytab_bug,y
draw92_bug: sta <OY
lda #0 ;; Clear OX.
draw95_bug: sta <OX
rts
next_coordinate_bug:
clc
lda <ox
adc #8
cmp #160
bcc ?3
lda #16-1
adc <oy
sta <oy
lda #0
?3:
sta <ox
rts
tab_oytab_bug:
db 72,72,72,72,72,72,72,72,64,64,64,64,64,64,64,64
process_IconAlarm_bug:
bbs5 <ScanFState,?1
bbs6 <Sf0,?1
loff_lcd_icon IconAlarm
rts
?1:
Llight_lcd_icon IconAlarm
rts
update_draw_line_bug:
lda <ScreenMode
asl
tax
lda line_tab_in_update_bug+1,x
pha
lda line_tab_in_update_bug,x
pha
rts
line_tab_in_update_bug:
dw mode0_drawline_bug-1
dw mode1_drawline_bug-1
dw mode2_drawline_bug-1
dw mode3_drawline_bug-1
dw mode4_drawline_bug-1
dw mode5_drawline_bug-1
dw mode6_drawline_bug-1
dw mode7_drawline_bug-1
dw mode8_drawline_bug-1
dw mode9_drawline_bug-1
dw mode10_drawline_bug-1
dw mode11_drawline_bug-1
dw mode12_drawline_bug-1
dw mode13_drawline_bug-1
dw mode14_drawline_bug-1
dw mode15_drawline_bug-1
dw mode16_drawline_bug-1
dw mode17_drawline_bug-1
dw mode18_drawline_bug-1
dw mode19_drawline_bug-1
dw mode20_drawline_bug-1
dw mode21_drawline_bug-1
dw mode22_drawline_bug-1
mode0_drawline_bug:
mode1_drawline_bug:
mode2_drawline_bug:
mode4_drawline_bug:
mode5_drawline_bug:
mode6_drawline_bug:
mode7_drawline_bug:
mode8_drawline_bug:
mode9_drawline_bug:
mode10_drawline_bug:
mode11_drawline_bug:
mode12_drawline_bug:
mode13_drawline_bug:
mode14_drawline_bug:
mode15_drawline_bug:
mode16_drawline_bug:
mode17_drawline_bug:
mode18_drawline_bug:
mode19_drawline_bug:
mode20_drawline_bug:
mode21_drawline_bug:
mode22_drawline_bug:
rts
mode3_drawline_bug:
ldy #screen_width_num
lda #0ffh
?1:
STA 0A98H+20,Y
dey
bpl ?1
RTS
;block_invert_bit_tab_bug:
; db 00000000b
; db 00000001b
; db 00000011b
; db 00000111b
; db 00001111b
; db 00011111b
; db 00111111b
; db 01111111b
; db 11111111b
cnt_lcd_address_in_speed_PrintDot_bug:
lda <lcd_oy
asl
tax
lda <lcd_ox
lsr
lsr
lsr
sta <curx
lda y_col_address_tab_5x10_bug,x
sec
sbc <curx
sta <curx
lda y_col_address_tab_5x10_bug+1,x
sbc #0
sta <curx+1
rts
cnt_lcd_address_speed1_bug:
lda <lcd_oy
asl
tax
lda <lcd_ox
lsr
lsr
lsr
sta <image_width_temp
lda y_col_address_tab_5x10_bug,x
sec
sbc <image_width_temp
sta <image_width_temp
lda y_col_address_tab_5x10_bug+1,x
sbc #0
sta <image_width_temp+1
rts
speed_printimagetolcd_bug:
printimagetolcd_bug:
lda <lcd_ox
sta <ox
lda <lcd_oy
sta <oy
game_printimagetolcd_bug:
lda #>DS0Bank
sta <drrh
lda #DS0Bank
sta <DRR
jgame_printimagetolcd_bug:
lda (<image_addr)
sta <image_width
jsr add_image_addr_bug
lda (<image_addr)
sta <image_hight_temp
jsr add_image_addr_bug
print_block_at_anywhere_bug:
lda #10000000b
sta <image_dot
lda <oy
sta <lcd_oy
?_1:
lda <ox
sta <lcd_ox
lda <image_width
sta <image_width_temp
?_2:
lda (<image_addr) ;;第N个字节数据
and <image_dot
beq ?_3
jsr speed_PrintDot_bug
bra ?_4
?_3:
jsr speed_ClrDot_bug
?_4:
jsr shift_r_image_dot_bug
inc <lcd_ox
dec <image_width_temp
bne ?_2
inc <lcd_oy
dec <image_hight_temp
bne ?_1
?skip_write_any_data:
rts
speed_print_16_x_16_bug:
lda <ox
clc ;dk
adc #8 ;dk
sta <lcd_ox
lda <oy
sta <lcd_oy
jsr cnt_lcd_address_speed1_bug
ldx #16-1
?16_x_16_loop2:
lda (image_addr)
sta (image_width_temp)
ldy #01h
lda (image_addr),y
sta (image_width_temp),y
lda <image_addrl
clc
adc #2
sta <image_addrl
bne ?dfdsf
inc <image_addrh
?dfdsf:
dex
bmi ?exit
lda <image_width_temp
clc ; INVERTED
adc #screen_width_num+1 ; INVERTED
sta <image_width_temp
bcc ?16_x_16_loop2 ; INVERTED
inc <image_width_temp+1 ; INVERTED
bra ?16_x_16_loop2
?exit:
rts
A2FontAddr_bug:
cpx #0a1h
bcs A2CFontAddr_bug
phx
lda #>FontBank ;; Select english font bank.
sta <DRRh
lda #<FontBank ;; Select english font bank.
sta <DRR
lda <screenmode
cmp #2
bne ?not_cal_font
ldx #>ASC816Fontd
ldy #<ASC816Fontd
bra A2FontA_xx_bug
?not_cal_font:
cmp #14
bne ?not_alarm_font
ldx #>ASC816Font
ldy #<ASC816Font
bra A2FontA_xx_bug
?not_alarm_font:
ldx #>ASC816Font_yh
ldy #<ASC816Font_yh
pla
pha
cmp #8ah
bne A2FontA_xx_bug
pla
lda #>ds0bank
sta <drrh
lda #<ds0bank
sta <drrl
ldx #>font_n_8ah
ldy #<font_n_8ah
rts
A2FontA_xx_bug:
pla
A2FontA_bug:
stx <INSH
sty <INSL
stz <INDH
asl
rol <INDH
asl
rol <INDH
asl
rol <INDH
asl
rol <INDH
adc <INSL
tay
lda <INDH
adc <INSH
tax
rts
;;--------------------------------------------------------------
;; Chinese font address = (chinese code and 1fffh) * 30 or 8000h
;;--------------------------------------------------------------
A2CFontAddr_bug:
cpx #0aeh
bcs ?1111
bra ?2222_next_rom
?1111:
tya
sec
sbc #0a1h
tay
txa
sec
sbc #0aeh ;;#0b0h
sta <INSL
stz <INSH
stz <INDL
stz <INDH
ldx #0
?1Multi_94:
clc
lda <INSL
adc <INDL
sta <INDL
lda <INDH
adc #0
sta <INDH
inx
cpx #94
bne ?1Multi_94
clc
tya
adc <INDL
sta <INDL
lda <INDH
adc #0
sta <INDH
stz <DRR
stz <drrh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -