Code: Select all
$0240 E5 4E 54 49 54 4C 7E 31 20 20 20 10 00 3E 08 60 .NTITL~1 ..>.`
Neil
Code: Select all
$0240 E5 4E 54 49 54 4C 7E 31 20 20 20 10 00 3E 08 60 .NTITL~1 ..>.`
Code: Select all
Neolithic Compact Flash
ECU.C
[TEST]
EEPROM.C
GRAPHICS.C
I18N.C
MAIN.C
SERIAL.C
SSD1309.C
SYSMEM.C
FAT_FI~1.PDF
SLIDES~1.PDF
UNIT10~1.PDF
SLIDES~2.PDF
UNIT10~2.PDF
SRAM_B~1.PDF
CF_44_~1.PDF
CF_44_~2.PDF
6502_C~1.PDF
CF_BOA~1.PDF
6502AN~1.PDF
NEON65~1.ASM
IDE.PDF
FAT32F~1.PDF
F.PDF
HEXCON~1.PDF
1.PDF
6502_C~2.PDF
Z80-DO~1.PDF
W65C22.PDF
IS62C256.PDF
SYNERT~1.PDF
SN74HC~1.PDF
VIVALD~1.DEB
814049.PDF
APX823~1.PDF
BU48XX~1.PDF
DATASH~1.PDF
DATASH~2.PDF
6502-K~1.ZIP
101DSE~1.PDF
101D-T~1.PDF
FCI-10~1.PDF
101DSE~2.PDF
NEWSLE~1.PDF
ZG6502~1.PDF
HIROSE~1.PDF
693120~1.PDF
JAEIS0~1.PDF
MI20-2~1.PDF
TS2083.PDF
C20415~1.PDF
101D-T~2.PDF
CFS.PDF
Code: Select all
DATASH~1.PDF
DATASH~2.PDF
Code: Select all
LYA cluster_begin_lba
jsr u32_tolba
jsr fs_find_first
dir:
lda (fs_dir_ptr) ; check the first character of name
beq done ; quit if it's zero
; lda fs_dir_ptr
; sta put_ptr
; lda fs_dir_ptr+1
; sta put_ptr+1
; jsr putmemline ; show the first half of the record
LYA string
jsr fname_to_str
jsr crlf
jsr fs_find_next
bra dir ; until no more records
Code: Select all
;-----------------------------------------------------------------------
; fname_to_str
;
; convert the 8.3 filename at [fs_dir_ptr] to a zero terminated string
; at [Y:A]
; Enclose a directory entry with [ ]
fname_to_str:
sta put_ptr
sty put_ptr+1 ; borrow put_ptr
ldy #0
lda #'-'
fs_fts_00:
; is it a directory entry?
ldy #dir_attrib
lda (fs_dir_ptr),y
ldy #dir_name
and #attr_dir
beq fs_fts_01
lda #'['
sta (put_ptr); ; add [ to the string beginning
jsr inc_put_ptr
fs_fts_01:
lda (fs_dir_ptr),y
cmp #' ' ; is it a space?
beq fs_fts_03
sta (put_ptr) ; no, copy it to our string
jsr inc_put_ptr
fs_fts_02:
iny ; and the read pointer
cpy #8 ; have we done eight characters?
bne fs_fts_01
fs_fts_03:
; reset y to point to extension
ldy #8
lda (fs_dir_ptr),y
cmp #' ' ; does it start with a space? Then no ext.
beq fs_fts_10
lda #'.'
sta (put_ptr)
jsr inc_put_ptr
; now the same trick for the extension
fs_fts_05:
lda (fs_dir_ptr),y
cmp #' '
beq fs_fts_10 ; until we get to a space
sta (put_ptr)
jsr inc_put_ptr
fs_fts_06:
iny
cpy #11
bne fs_fts_05
fs_fts_10:
; was it a directory entry?
ldy #dir_attrib
lda (fs_dir_ptr),y
and #attr_dir
beq fs_fts_x
fs_fts_11:
lda #']'
sta (put_ptr)
jsr inc_put_ptr
fs_fts_x:
; terminate the string
lda #0
sta (put_ptr)
LYA string
jsr puts
rts
inc_put_ptr:
inc put_ptr
bne ipp_x
inc put_ptr+1
ipp_x:
rts
Code: Select all
LYA cluster_begin_lba
jsr u32_tolba
jsr fs_find_first
Code: Select all
file_char_out:
sta (put_ptr)
inc put_ptr
bne fcp1:
inc put_ptr+1
fcp1:
rts
Code: Select all
check_directory:
ldy #dir_attrib
lda (fs_dir_ptr),y
and #attr_dir
beq fcp1:
txa
file_char_out:
sta (put_ptr)
inc put_ptr
bne fcp1:
inc put_ptr+1
fcp1:
rts
Code: Select all
ldx #'['
jsr check_directory
ldy #dir_name
Code: Select all
ldx #']'
jsr check_directory
Code: Select all
bss
str_83: ds 11 ; eleven bytes in the finshed string
code
str_to_83:
sta put_ptr
sty put_ptr+1
; first, clear the string to spaces
ldy #0
lda #' '
str_t_01:
sta str_83,y
iny
cpy #11
bne str_t_01
; now start copying
ldy #0
str_t_02:
lda (put_ptr)
cmp #0 ; end of string?
beq str_t_x ; we're done
cmp #'.'
beq str_t_03 ; done with the name if we find a period
jsr toupper
sta str_83,y
jsr inc_put_ptr
iny
cpy #8 ; or if we get to eight characters
bne str_t_02
str_t_03:
; either we had eight chars copies, or we found a '.'
; in either case if the filename is legal, we're looking at a '.'
jsr inc_put_ptr ; so skip it (even if it isn't!)
ldy #8 ; just in case, point to ext part of 8.3
str_t_04:
lda (put_ptr)
cmp #0
beq str_t_x
jsr toupper
sta str_83,y
jsr inc_put_ptr
iny
cpy #11 ; finished?
bne str_t_04
str_t_x:
rts ; it's a data block, not a string, so no term.
Code: Select all
file_4: db "graphics.c",0
Code: Select all
LYA file_4
jsr str_to_83 ; convert the file string to 8.3 format
Code: Select all
LYA cluster_begin_lba
jsr u32_tolba
jsr fs_find_first ; so find the directory listing
find_1:
lda (fs_dir_ptr) ; check the first character of name
beq find_x ; quit if it's zero
jsr fs_match_83
beq find_2 ; found it!
jsr fs_find_next
bra find_1
find_2:
Code: Select all
ldy # dir_frstcllo
lda (fs_dir_ptr),y
sta lba
iny
lda (fs_dir_ptr),y
sta lba+1
ldy # dir_frstcluhi
lda (fs_dir_ptr),y
sta lba+2
iny
lda (fs_dir_ptr),y
sta lba+3
Code: Select all
jsr clus_to_1st_sec
jsr cf_set_lba
jsr cf_read ; see the file
SHOWTRANS
Code: Select all
0200 2F 2A 0A 20 2A 20 67 72 61 70 68 69 63 73 2E 63 /*. * graphics.c
0210 0A 20 2A 0A 20 2A 20 20 43 72 65 61 74 65 64 20 . *. * Created
0220 6F 6E 3A 20 44 65 63 20 32 30 2C 20 32 30 32 30 on: Dec 20, 2020
0230 0A 20 2A 20 20 20 20 20 20 41 75 74 68 6F 72 3A . * Author:
0240 20 62 61 72 6E 61 63 6C 65 0A 20 2A 0A 20 2A 20 barnacle. *. *
0250 43 6F 6E 74 61 69 6E 73 20 74 68 65 20 66 6F 75 Contains the fou
0260 72 20 73 74 61 72 74 2D 75 70 20 69 6D 61 67 65 r start-up image
0270 20 6D 61 70 73 20 61 6E 64 20 74 68 65 20 74 65 maps and the te
0280 78 74 20 66 6F 6E 74 0A 20 2A 2F 0A 0A 23 69 6E xt font. */..#in
0290 63 6C 75 64 65 20 3C 73 73 64 31 33 30 39 2E 68 clude <ssd1309.h
02A0 3E 0A 23 69 6E 63 6C 75 64 65 20 3C 69 31 38 6E >.#include <i18n
02B0 2E 68 3E 0A 23 69 6E 63 6C 75 64 65 20 3C 67 72 .h>.#include <gr
02C0 61 70 68 69 63 73 2E 68 3E 0A 23 69 6E 63 6C 75 aphics.h>.#inclu
02D0 64 65 20 3C 65 6E 75 6D 73 2E 68 3E 0A 23 69 6E de <enums.h>.#in
02E0 63 6C 75 64 65 20 3C 65 65 70 72 6F 6D 2E 68 3E clude <eeprom.h>
02F0 0A 23 69 6E 63 6C 75 64 65 20 3C 73 74 64 69 6F .#include <stdio
0300 2E 68 3E 0A 23 69 6E 63 6C 75 64 65 20 3C 73 74 .h>.#include <st
0310 64 62 6F 6F 6C 2E 68 3E 0A 23 69 6E 63 6C 75 64 dbool.h>.#includ
0320 65 20 3C 6D 61 69 6E 2E 68 3E 0A 0A 63 6F 6E 73 e <main.h>..cons
0330 74 20 75 69 6E 74 38 5F 74 20 69 6D 61 67 65 32 t uint8_t image2
0340 30 76 74 5B 34 38 30 5D 20 3D 20 7B 0A 0A 09 30 0vt[480] = {...0
0350 78 30 30 2C 20 30 78 30 30 2C 20 30 78 30 30 2C x00, 0x00, 0x00,
0360 20 30 78 30 30 2C 20 30 78 30 30 2C 20 30 78 30 0x00, 0x00, 0x0
0370 30 2C 20 30 78 30 30 2C 20 30 78 30 30 2C 20 30 0, 0x00, 0x00, 0
0380 78 30 30 2C 20 30 78 30 30 2C 20 30 78 30 30 2C x00, 0x00, 0x00,
0390 20 30 78 30 30 2C 20 30 78 30 30 2C 20 30 78 30 0x00, 0x00, 0x0
03A0 30 2C 20 30 78 30 30 2C 20 30 78 30 30 2C 0A 09 0, 0x00, 0x00,..
03B0 30 78 30 30 2C 20 30 78 30 30 2C 20 30 78 30 30 0x00, 0x00, 0x00
03C0 2C 20 30 78 30 30 2C 20 30 78 30 30 2C 20 30 78 , 0x00, 0x00, 0x
03D0 30 30 2C 20 30 78 30 30 2C 20 30 78 30 30 2C 20 00, 0x00, 0x00,
03E0 30 78 33 38 2C 20 30 78 30 30 2C 20 30 78 30 30 0x38, 0x00, 0x00
03F0 2C 20 30 78 30 30 2C 20 30 78 33 66 2C 20 30 78 , 0x00, 0x3f, 0x
Code: Select all
LYA file_4
jsr str_to_83 ; convert the file string to 8.3 formatCode: Select all
LYA macro value ; load a Y:A with 16-bit value
lda # lo value
ldy # hi value
endm