14mhz mode and screen viewing

This commit is contained in:
nihirash 2019-07-15 20:08:10 +00:00
parent 4439858361
commit 24fdfeaa47
6 changed files with 57 additions and 18 deletions

View File

@ -1,6 +1,10 @@
iWelcome to uGophy v.0.2 fake (NULL) 0
iWelcome to uGophy v.0.3 fake (NULL) 0
i(c) 2019 Alexander Sharikhin aka Nihirash fake (NULL) 0
iVersion 0.2 - turbo mode version fake (NULL) 0
iVersion 0.3 - Showing screens version fake (NULL) 0
iThis version works on 14MHz turbo mode fake (NULL) 0
iIf you using old core - please update. fake (NULL) 0
i fake (NULL) 0
iSCR files just showing on screen, no downloads for it now fake (NULL) 0
i fake (NULL) 0
iNavigation keys: fake (NULL) 0
iQ - Up fake (NULL) 0

View File

@ -4,7 +4,6 @@ Start:
call renderHeader
ld hl, connecting_wifi
call printZ64
call setNoTurboMode
call initWifi
jp showPage
wSec: ld b, 50
@ -38,4 +37,4 @@ page_buffer
db 0
eop equ $
display $
SAVEBIN "ugoph.bin", Start, eop-Start
SAVEBIN "ugoph.bin", Start, eop-Start

View File

@ -1,5 +1,4 @@
showPage:
call setTurbo8Mode
xor a
ld (show_offset), a
ld a, 1
@ -36,7 +35,6 @@ controls:
ret
historyBack:
call setNoTurboMode
ld hl, server
ld de, path
ld bc, port
@ -122,7 +120,6 @@ selectItem:
downPg:
push af
call setNoTurboMode
call extractInfo
ld hl, hist
@ -146,14 +143,18 @@ downPg:
downFl:
call extractInfo
call setNoTurboMode
call cleanIBuff
ld hl, file_buffer
call findFnme
jp isImage
dfl:
ld hl, file_buffer
call findFnme
ld de, iBuff
ld bc, 65
ldir
call input
ld hl, server_buffer
ld de, file_buffer
@ -165,6 +166,41 @@ downFl:
call showCursor
ret
isImage:
ld a, (hl)
and a
jr z, checkImg
push hl
call pushRing
call putC
pop hl
inc hl
jr isImage
imgExt db ".scr", 0
imgExt2 db ".SCR", 0
checkImg:
ld hl, imgExt
call searchRing
cp 1
jr z, loadImage
ld hl, imgExt2
call searchRing
cp 1
jr z, loadImage
jp dfl
loadImage:
ld hl, server_buffer
ld de, file_buffer
ld bc, port_buffer
call makeRequest
ld hl, #4000
call loadData
wKey: call inkey
or a
jr z, wKey
jp showPage
findFnme:
push hl
pop de
@ -433,7 +469,7 @@ show_offset db 0
display $
cursor_pos db 1
head db " UGophy - ZX-UNO Gopher client v. 0.2 (c) Alexander Sharikhin ",0
head db " UGophy - ZX-UNO Gopher client v. 0.3 (c) Alexander Sharikhin ",0
cleanLine db " ",0
@ -452,4 +488,4 @@ port_buffer defs 7 ; Port
end_inf_buff equ $

View File

@ -1,5 +1,4 @@
showText:
call setTurbo8Mode
xor a
ld (show_offset), a
call renderTextScreen
@ -76,4 +75,4 @@ renderTextLine:
ret z
call printL64
call mvCR
ret
ret

View File

@ -19,7 +19,7 @@ setNoTurboMode:
pop af
ret
setTurbo8Mode:
setTurbo4Mode:
push af
push bc
ld a, SCANDBLCTRL_REG
@ -29,7 +29,7 @@ setTurbo8Mode:
ld bc, ZXUNO_REG
in a, (c)
and #3f
or #C0
or #80
out (c), a
pop bc
@ -175,4 +175,4 @@ AppendB2D:
B2DINV: DS 8 ; space for 64-bit input value (LSB first)
B2DBUF: DS 20 ; space for 20 decimal digits
B2DEND: DB 0 ; space for terminating 0
B2DEND: DB 0 ; space for terminating 0

View File

@ -1,5 +1,6 @@
; Initialize WiFi chip and connect to WiFi
initWifi:
call setNoTurboMode
call loadWiFiConfig
call uartBegin
ld hl, cmd_plus
@ -11,7 +12,7 @@ wlp:
djnz $
pop bc
djnz wlp
ld hl, cmd_rst
call uartWriteStringZ
rstLp:
@ -57,7 +58,7 @@ rstLp:
ld hl, log_ok
call putStringZ
call setTurbo4Mode
ret
errInit
ld hl, log_err
@ -255,4 +256,4 @@ send_prompt defb ">",0
output_buffer defs 2048 ; buffer for downloading data
; WiFi configuration
conf_file defb "/sys/config/iw.cfg",0
conf_file defb "/sys/config/iw.cfg",0