mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-02-24 21:29:34 +00:00
fix navigation through directory listings on C64
git-svn-id: http://svn.code.sf.net/p/netboot65/code@51 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
991381c393
commit
5bbfc52707
@ -4,7 +4,7 @@
|
||||
; requires
|
||||
; 1) a DHCP server, and
|
||||
; 2) a TFTP server that responds to requests on the broadcast address (255.255.255.255) and that will serve a file called 'BOOTC64.PRG'.
|
||||
; the prg file can be either BASIC or M/L, and up to 30K in length.
|
||||
; the prg file can be either BASIC or M/L, and up to 22K in length.
|
||||
;
|
||||
; jonno@jamtronix.com - January 2009
|
||||
;
|
||||
@ -13,6 +13,7 @@
|
||||
.include "../inc/commonprint.i"
|
||||
.include "../inc/net.i"
|
||||
.include "../inc/menu.i"
|
||||
.include "../inc/c64keycodes.i"
|
||||
.import cls
|
||||
.import get_key
|
||||
.import beep
|
||||
@ -108,6 +109,10 @@ init:
|
||||
jsr tftp_directory_listing
|
||||
bcs @dir_failed
|
||||
|
||||
lda tftp_dir_buffer ;get the first byte that was downloaded
|
||||
bne :+
|
||||
jmp @no_files_on_server
|
||||
:
|
||||
ldax #$0000 ;load address will be first 2 bytes of file we dowload (LO/HI order)
|
||||
stax tftp_load_address
|
||||
|
||||
@ -140,6 +145,12 @@ init:
|
||||
bcc @file_downloaded_ok
|
||||
jmp bad_boot
|
||||
|
||||
@no_files_on_server:
|
||||
ldax #no_files_on_server
|
||||
jsr print
|
||||
|
||||
jmp bad_boot
|
||||
|
||||
@file_downloaded_ok:
|
||||
;check whether the file we just downloaded was a BASIC prg
|
||||
lda tftp_load_address
|
||||
@ -217,5 +228,8 @@ tftp_dir_filemask:
|
||||
tftp_file:
|
||||
.asciiz "BOOTC64.PRG"
|
||||
|
||||
no_files_on_server:
|
||||
.byte "TFTP SERVER HAS NO MATCHING FILES",13,0
|
||||
|
||||
press_a_key_to_continue:
|
||||
.byte "PRESS A KEY TO CONTINUE",13,0
|
||||
|
@ -12,6 +12,7 @@
|
||||
.include "../inc/commonprint.i"
|
||||
.include "../inc/net.i"
|
||||
.include "../inc/menu.i"
|
||||
.include "../inc/a2keycodes.i"
|
||||
.import cls
|
||||
.import get_key
|
||||
.import beep
|
||||
|
5
client/inc/a2keycodes.i
Normal file
5
client/inc/a2keycodes.i
Normal file
@ -0,0 +1,5 @@
|
||||
KEYCODE_SLASH=('/'+$80)
|
||||
KEYCODE_DOWN=$8a
|
||||
KEYCODE_UP=$8b
|
||||
KEYCODE_LEFT=$88
|
||||
KEYCODE_RIGHT=$95
|
5
client/inc/c64keycodes.i
Normal file
5
client/inc/c64keycodes.i
Normal file
@ -0,0 +1,5 @@
|
||||
KEYCODE_SLASH=$2f
|
||||
KEYCODE_DOWN=$11
|
||||
KEYCODE_UP=$91
|
||||
KEYCODE_LEFT=$9d
|
||||
KEYCODE_RIGHT=$1d
|
@ -1,4 +1,7 @@
|
||||
|
||||
;REQUIRES KEYCODES TO BE DEFINED
|
||||
|
||||
|
||||
OPTIONS_PER_PAGE = $10
|
||||
.bss
|
||||
|
||||
@ -243,15 +246,15 @@ select_option_from_menu:
|
||||
; @fixme:
|
||||
; jmp @fixme
|
||||
|
||||
cmp #'/'+$80
|
||||
cmp #KEYCODE_SLASH
|
||||
beq @jump_to
|
||||
cmp #$95
|
||||
cmp #KEYCODE_RIGHT
|
||||
beq @forward_one_page
|
||||
cmp #$8a
|
||||
cmp #KEYCODE_DOWN
|
||||
beq @forward_one_page
|
||||
cmp #$8b
|
||||
cmp #KEYCODE_UP
|
||||
beq @back_one_page
|
||||
cmp #$88
|
||||
cmp #KEYCODE_LEFT
|
||||
beq @back_one_page
|
||||
|
||||
ora #$e0 ;make it a lower case letter with high bit set
|
||||
|
Loading…
x
Reference in New Issue
Block a user