News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPC Web Browser update 23-Mar-2014

Started by rpalmer, 09:39, 23 March 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Prodatron

@Ray: Did you already have a look at the W5100 ethernet controller? This is used on the Denyonet Ethernet Catridge for the MSX computers.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

rpalmer

@Prodatron, yes I have considered this chip and may do something similar. however the ENC28J60 has far fewer pins to deal with and can be got as non-SMD variants.

@TotO, the use of bluetooth would require a lot more programming on the CPC side to handle the unexpected faster traffic. Also the ethernet version allows me to control the traffic better than the bluetooth. If the CPCbooster/Minibooter can have bluetooth then surely I would only need to create a driver to use it and I have yet to see any documentation on the booster at all.

I would say that once the ethernet version is working in the real world, then developments by others to use other devices (e.g bluetooth) would be possible and only a matter of time.

TFM

Quote from: TotO on 12:31, 13 May 14
Why using an Ethernet device on the CPC, when today all laptops and smartphones are able to access and share Internet through a simple Bluetooth connexion?

Expansions already exist on our computer and many peoples already own a CPCBooster or a MiniBooster[nb]MiniBooster own an SPI port, for adding extra features[/nb]


Well, the idea is not to be forced to buy another computer for access to internet. Point is to do it with the CPC. Else I just use a CPC-Booster RS485 network  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

TotO

#28
Forcing peoples to pay for a PC or a smartphone today?  :laugh:

I just speak to avoid to reinvent the wheel, because as you said you can use RS485 networks too.
Make that popular to everyone with existing expansions, instead of "forcing peoples to pay" for an Ethernet board. :D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

rpalmer

TotO,

I have developed TCP/IP to use drivers in the same manner as HDOS, so it is theoretically possible to write new drivers for other devices. So if people want to use CPCBooster/Minibooster then they too can be used once the driver are developed.

The point of a web-server was just for testing a simulated internet only. On the one hand it should be noted the the graphics from existing internet sites are completely incompatible with the browser so it would show actual web-pages without them, since the types can be easily handled by the browser without significant processing delays to show a web-page.

rpalmer

TotO

#30
OK.

Quote from: rpalmerOn the one hand it should be noted the the graphics from existing internet sites are completely incompatible with the browser so it would show actual web-pages without them, since the types can be easily handled by the browser without significant processing delays to show a web-page.
May be using the wap2 option make more easy to handle a website content on CPC by seeing it like a mobile device?

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Executioner

Quote from: rpalmer on 11:21, 13 May 14
2. Get TCP/IP to work as expected. I have had it working on WinAPE via data injection with data captured on a real PC for things like DHCP, ARP, etc using WireShark.

What would be the easiest solution here? An API to allow you to create a socket, receive and send data over that socket, or a simple API to allow GET/PUT/POST etc? Or possibly both?

Prodatron

Quote from: Executioner on 01:00, 14 May 14
An API to allow you to create a socket, receive and send data over that socket, or a simple API to allow GET/PUT/POST etc? Or possibly both?
The first one would be already fantastic, if it would also allow to open several sockets at the same time...
The second one is a little bit too high level, isn't it?

Anyway would love to see these features in WinApe!

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

TFM

Quote from: TotO on 21:24, 13 May 14
Forcing peoples to pay for a PC or a smartphone today?  :laugh:

I just speak to avoid to reinvent the wheel, because as you said you can use RS485 networks too.
Make that popular to everyone with existing expansions, instead of "forcing peoples to pay" for an Ethernet board. :D


You can of course laugh about this. But the only hardware I have are several Z80 computers, but no PC at home (I do use a laptop at work though, for some programs which are not yet available for FutureOS).


I don't have a smartphone either. If you would check out the NCBI Medline then you would know why.[nb]I don't need to go into detail. Smartphone users get their cancer pretty soon. And then the laughing stops.[/nb]
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Executioner

Quote from: Prodatron on 01:12, 14 May 14
The first one would be already fantastic, if it would also allow to open several sockets at the same time...

I'd like to specify something that may be possible to implement in hardware later (even if it's got to be built using an FPGA or similar)...

Perhaps something along the following lines:

Port xxx0 - Socket ID low (read/write)
Port xxx1 - Socket ID high (read/write)
Port xxx2 - Command read/write
Port xxx3 - Data read/write

Then the commands could be stuff like (a write to xxx0/1 will clear the command buffer).

OPEN (this creates a new socket and puts ID in xxx0/1) after having type/host/port specified as required (eg. for binding TCP)
CLOSE
STATUS (the OPEN would be designed to keep the connection alive for TCP).
AVAILABLE (get number of bytes available)

Then you could do stuff like (assuming port #FEF0/1/2/3):


OPEN EQU #01
CLOSE EQU #02
STATUS EQU #03
AVAILABLE EQU #04


ld hl,open_cmd
call send_command
call wait_ready

ld hl,buffer
ld bc,1024
call read_socket

ld hl,buffer
.prlp
ld a,(hl)
inc hl
or a
ret z
call #bb5a
jr prlp

.init_socket
ld bc,#FEF0
out (c),e
inc c
out (c),d
inc c
ret

.send_command
ld bc,#FEF1
out (c),c    ; Clear the command buffer
inc c

ld d,(hl)      ; Count of command bytes
inc hl

.cmd_loop
ld a,(hl)
inc hl
out (c),a
dec d
jr nz,cmd_loop

ld c,#F0
in e,(c)
inc c
in d,(c)
ret

.wait_ready
call init_socket
ld a,STATUS
out (c),a

.loop_ready
in a,(c)
rra
jr nc,loop_ready
ret

.read_socket
push de
push bc              ; Push socket length
call init_socket
ld a,AVAILABLE
out (c),a

in e,(c)               ; Read available bytes
in d,(c)

pop bc

;Compare available and buffer length, get min in DE
ld a,b
cp d
jr c,usebc
ld a,c
cp e
jr nc,usede
.usebc
ld e,c
ld d,b
.usede

ld bc,#FEF3
.read_loop
ld a,d
or e
jr z,end_read
in a,(c)
ld (hl),a
inc hl
dec de
jr read_loop

.end_read
pop de
ret

.open_cmd
db 18,OPEN,"localhost",0,"telnet",0

.buffer
ds 1024


Prodatron

@Richard, that would be great! I will have a look at the SYMBiFACE 3 protocol. IIRC it's quite similiar to your suggestion. Then we would already have a FTP client and a Telnet client :P

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

rpalmer

The TCP/IP software that I have adapted has the API interface all done. This API provides calls open, connect, accept, bind, etc from the IEEE standard. What this means is that any software which uses this standard should be convertible to run on a CPC.

I have also uploaded the current browser and for those who are eager to do some coding, you can try and get some form a network connectivity going. The directory 'file1' contains the routine to access networks, so if anyone is up to a challenge you can start there.

I have also posted previously the TCP/IP code, but if anyone want me post it here again, I am more than willing to do so.

There is a similar piece of TCP/IP S/W called cpcip, but this software only allowed to run from RS-232 and was only loaded into RAM meaning any other programs like my browser are just impossible. Also here in OZ, there no ISPs which now support dial-up with any significant customer support, since broadband has made ISP connection so easy.

rpalmer

Alcoholics Anonymous

Quote from: rpalmer on 11:12, 15 May 14
The TCP/IP software that I have adapted has the API interface all done. This API provides calls open, connect, accept, bind, etc from the IEEE standard. What this means is that any software which uses this standard should be convertible to run on a CPC.

I'm following your project with lots of interest.  I'm glad to hear you're doing the posix interface as that is the right way to go :)

There are a lot of related projects in the spectrum world which may help with the code side and implementation decisions.  We do have things like ftp, irc, etc, but I don't think anyone (except perhaps the russians) have tried to do a web browser.

Spectranet is a W5100 based ethernet interface.  A complete posix api is available open source:

Spectranet - Spectrum Hardware Docs

I also looked at some of your code -- you may find what we have in z88dk useful to you.  We have a nearing C11 compliant code base written in assembler which you can find rooted here:

SourceForge.net Repository - [z88dk] Index of /z88dk/libsrc/_DEVELOPMENT

In particular, many string related functions are there which you may want to compare to what you have:
SourceForge.net Repository - [z88dk] Index of

I also saw your math routines are the simple variety probably because you had more interesting things to do :D
SourceForge.net Repository - [z88dk] Index of

We have two different versions of integer math -- one is small and one is fast.  The above is the small version.


Specific code to convert between octal, hex, decimal, binary and strings can be found here, again there are two versions:
SourceForge.net Repository - [z88dk] Index of

General conversion code that can do any base conversion can be found in atoi, atou, atol, atoul, strtoi, strtou, etc:
http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/


We also have a full implementation of printf and scanf.  You could printf to your socket or scanf integers and strings from your socket.  A non-standard %I converter does IPv4 addresses.

http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/_DEVELOPMENT/stdio/z80/


It's not generally know but there are a couple of large open source z80 repositories about and z88dk is one of them, as is spectranet.

Prodatron

Wow, that's lot of stuff!
As mentioned before the MSX scene (Konamiman, Dennis, Yobi) did a similair job with the W5100 as well.
Have a look here for Z80 source codes:
Konamiman's MSX Page


GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Executioner

Quote from: Prodatron on 08:59, 15 May 14
@Richard, that would be great! I will have a look at the SYMBiFACE 3 protocol. IIRC it's quite similiar to your suggestion. Then we would already have a FTP client and a Telnet client :P

Hi Prodatron, do you have any documentation on the SF3 protocol/port usage etc? That would be a good thing for WinAPE to emulate.

rpalmer

hello everyone,

This update is for expansion of the user interface with cursor selection within the main menu area. So users can now select main menu and sub-menu text items via the cursor. cursor speed may be an issue, but it does work.  Testing to date shows that there is a minor issue where the background under the cursor upon selection is returned once the sub-menu line is cleared and the cursor is then moved.

Also this update can record upto 85 historical URLs selected rather than the 8 previously.

There is also a record of which device URLs were acting on, so if the next object was on floppy B was accessed and if the user went back one history item and it was on floppy A then it will be loaded properly.

I have also made substantial updates to the manuals, that these to will soon be in a draft form for user to see more about the browser.

Note: I have not re-built all of the applications, but the version app still works (as it does not access any CPCB variables).

rpalmer

Powered by SMFPacks Menu Editor Mod