Re: First thought on an interface (to use Paleolithic DROM)
Posted: Mon Jun 23, 2025 6:31 am
I would think you can get away with a lot less than 50Hz, but it's true that if you go too low it will be a bit disturbing.
The 6502 Microprocessor Resource
http://forum.6502.org/
Code: Select all
; C D E F
; putcommands
; showreg showstk showapp
;
; 8 9 A B
; nextrow nextqtr next_4K next_16K
;
; 4 5 6 7
; brkrtn prevpg homepg nextpg
;
; 1 2 3 +
; gosub ad_hi ad_hi function
;
; GO 0 CR -
; exec goto CR bspace
FCOMMAND: ; +16
dw goto ; "0+", "exec memptr"
dw gosub ; "1+", "gosub at memptr & return"
dw ad_hi ; "2+", "put byte in hi address"
dw ad_lo ; "3+", "put byte in lo address"
dw brkrtn ; "4+", "return from BRK"
dw prevpg ; "5+", "decrement addr high byte"
dw homepg ; "6+", "zero addr low byte"
dw nextpg ; "7+" "increment addr high byte"
dw nextrow ; "8+", "next 16byte boundary"
dw nextqtr ; "9+", "next 64byte boundary"
; * nextrow & nextqutr wrap on page
dw next_4K ; "A+", "next 4KB boundary"
dw next_16K ; "B+", "next 16KB boundary"
dw putcommands ; "C+", "install commands at memptr"
dw showreg ; "D+", "show reg storage"
; * nextrow & nextqtr leverages this into
; general inspection of the zero page
dw showstk ; "E+", "show top of stack"
; * nextrow & nextqtr leverages this into
; general inspection of the stack page
dw showapp ; "F+", "show addr0" Code: Select all
; When entered byte is function data
; restore original byte
; Used by FN, ADLO & ADHI
getbyte: ; +8
lda (memptr)
tax
lda data
sta (memptr)
rts Code: Select all
nextboundary:
; index into memptr:memptr+1 in x
; bit mask in a, %11000000 or %11110000
; inverse of bitmask +1 is increment
sta dispatch ; dispatch is transient
eor #$ff
sec
adc memptr,x
and dispatch
sta memptr,x
bra loop_90 Code: Select all
next_4K: ; +31
ldx #1
bra nr1
next_row:
ldx #0
nr1: lda #$F0
; fall through Code: Select all
next_qtr:
ldx #0
nq1: lda #$C0
bra nextboundary
next_16K:
ldx #1
bra nq1 Code: Select all
loop_hex: ; +14
; else shuffle key value into (memptr)
; In this version, d7=/Press
; d7 clear if hex key
pha
lda (memptr)
asl a
asl a
asl a
asl a
sta (memptr)
pla
ora (memptr)
sta (memptr)Code: Select all
loop_hex: ; +12
; else shuffle key value into (memptr)
; In this version, d7=/Press
; d7 clear if hex key
sta temp
lda (memptr)
asl a
asl a
asl a
asl a
ora temp
sta (memptr)