CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: rpalmer on 09:39, 23 March 14

Title: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 09:39, 23 March 14
Hello everyone,

I have now managed to get pictures into the browser which are compatible between modes 1 and 2 using a single file.
Attached are the screen shots of the welcome screen with the CPCB logo in the top left corner (for both mode 1 and mode 2).

I have also got nearer to completing the connection handler so that the CPC can connect to a web-server. However a lot of development and testing will need to take place for that to continue.

There is a bigger issue at hand and that is hardware. I am going to have put more effort to developing the memory expansion to 2Mb and for the proposed inclusion of SD and Ethernet all on the same PCB.

For the time being I will continue to develop the browser to include more sample pictures as well as a CPC based program get these via a load and save type of procedure (all yet to be developed).

Attached if the source files and ROM image for those who wish to put the browser to work. The dsk image to test what has been developed is also included, but I have yet to get the apps to be rebuilt for the new browser, so please bear with me on that. I have developed a COLOURS app which allows a user to change the colours and does work, it has a save option so that the start up can use new settings, but have not gone through a thorough test to see if all is okay.

As I have said before there is a great deal of effort to be done with the manuals but they are going along as expected.

Included as well is an excel 2010 spreadsheet (requires macros enabled) which has the capability for user to create there own pictures for either mode 1 or mode 2. The color scheme is not particularly good, but is sufficient to get by for now.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 10:11, 23 March 14
For those who have not used the browser, extract the ROM image and make sure it is in slot #4
A future version will auto detect the ROM in slot 1 to 6 or 8 to 15.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 00:06, 24 March 14
Great work, Ray!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 22:07, 13 April 14
hello everyone,

I have now incorporated more configuration of the frames and borders to further customize the browser.

I have also sped up a few areas of the browser and made room for more code.

I am still working on getting my cpc to connect to a network, but I am also looking at getting animations (or even movie like) objects to be handled by the browser.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Gryzor on 11:05, 14 April 14
Sci-fi!!!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 21:29, 02 May 14
hello everyone,

I have now implemented a proportional font, however there are a few issues with it (namely missing letters).
I hope it will not take to long to get the font handling all fixed.

Attached is a sample of the font implementation.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: robcfg on 22:04, 02 May 14
It looks super cool! Great work!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Gryzor on 17:57, 05 May 14
Oh, nice font!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 03:47, 07 May 14
I have now fixed the font handling to show proportional spaced fonts!

I will post soon the source and DSK images for people to test.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Munchausen on 06:34, 07 May 14
Wow, it looks great. It's come a long way!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Bryce on 08:13, 07 May 14
Looking great, it can do a lot more than I would have ever expected. At this stage if you turn around and say you've implemented Flash it wouldn't suprise me any more :D

Bryce.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 10:35, 07 May 14
bryce,

if i were able to get some sort of flash going (and that would be a miracle!), then you can call me "Jumping Jack flash"!

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Bryce on 10:36, 07 May 14
If you get Flash running on a CPC I'll be calling you God! :D

Bryce.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Optimus on 13:08, 07 May 14
Wow, so you also develop a hardware for the whole task!


This is awesome. I really want to see this, CPC connected to the outside world.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 12:31, 09 May 14
hello people,

You can now find attached the DSK file to text the browser.

The application 'colours' has been verified to work and allows a selection of defined color schemes or the user can define its own.
The save option does work, but more testing is underway.
To access an application the user uses the keyboard as follows:

O M A (in that order) and then cursor left/right for scrolling a pane of data. Then the user selects the option with space.

As i said before the source is also attached for those who wish to look at the inner workings of the browser.

Rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 14:14, 09 May 14
Thanks a lot for sharing!
Is it possible to test it in WinApe? Do I need additional Roms? When I run "Disc" or "CPCB" it ends up with the browser header and goes to Basic 1.1.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: TFM on 18:32, 09 May 14
Hi Prodatron. IIRC Symbos already has drivers for networking. Do you think it's possible to implement Rays solution? CPC and Ethernet would really open new ranges.  :)
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 20:45, 09 May 14
I forgot to mention you need to put the HTML.ROM into slot 4.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 00:28, 10 May 14
I have just updated the DSK with code to auto detect the HTML ROM

The previous HTML ROM was incorrectly identified as not being initialized, this has now been fixed.

If prompted to insert the ROM then do so in a valid slot (i.e 1-6 for 464 or 1-6/8-15 for 6128). For any invalid slot the start up script needs to specify the slot it is inserted into.

See attached file for items in question.

Also the driver support for network connectivity will also require the TCP/IP ROMs (yes two) which I also have got available (FREE).

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 20:06, 11 May 14
hello everyone,

Here is the latest updates DSK/ROM for changes made to the browser.
There is still a few rendering problems to overcome, but hopefully as always wont take long to overcome.

I found out if you attempt to load a HTML which does not exist the browser seems to go to LA LA land, but if the files exists all seems okay.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 22:58, 12 May 14
Wow cool, it works! :)
Does it render the HTML for each screen update? (currently it's very slow)

Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Ygdrazil on 08:07, 13 May 14

Yes wow... :o


However does Winape support emulation of Palmers networking device?!?


/Ygdrazil

Quote from: Prodatron on 22:58, 12 May 14
Wow cool, it works! :)
Does it render the HTML for each screen update? (currently it's very slow)
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 09:29, 13 May 14
It displays the local "welcome.htm" together with the local "cpcblogo.csb", so no network service is required.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 11:21, 13 May 14
Unfortunately, the screen refresh of the HTML is required for each cursor movement of the screen via the icons on the frame. This all due to having to refreshing from the start of the HTML until all of the HTML has been processed, which may mean that the screen of very large HTML may take quite some time after the screen has been refreshed with the displayable content while the remainder if not shown but is processed. Also screen refresh of the HTML may use frames and is refreshed in the same way. I can investigate further to get refresh faster, but for now i am just getting the whole lot working.

I have also previously create a set of sample HTML files which tests other areas of HTML and these can be found within the forums, but if this proves difficult for user to find I can upload another copy.

Just look at this way, I have to:

1. Get browser to work with HTML V4.01 spec as best as possible.
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.
3. Get the 2Mb memory expansion on a real CPC to work.
4. Get a new ethernet device to work on a real CPC.
5. Get the HDOS interface to work with all of the above.
6. Get a simple Web-server setup to put all of the above to test.
7. Finally, test the real-deal with an actual ADSL modem to access real world web-sites.

HDOS is required to allow for things to be done, since 180k floppies is to now getting to small to have all this required in one location. The reason for HDOS is so that directories are available and this will make some functions easier to manage. For now I just sticking with AMSDOS.

As for network capability, I have only one ethernet device which appears to work. This device uses the CS-8900 ethernet on a chip IC. This chip is currently difficult to get on 5V lines, but have seen them for 3.3V (but 3.3V versions are not tolerant for 5V lines). My next version with use the ENC28J60 via the SPI interface. I can look at the moment at creating an adapter board for the existing IDE8255 where the port is connected to two SD interfaces and 1 ethernet.

If I can get the hardware working all on one board, it maybe possible to convert this board to the Mother X4 interface.

rpalmer
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: TotO on 12:31, 13 May 14

Quote from: rpalmerAs for network capability, I have only one ethernet device which appears to work. This device uses the CS-8900 ethernet on a chip IC. This chip is currently difficult to get on 5V lines, but have seen them for 3.3V (but 3.3V versions are not tolerant for 5V lines). My next version with use the ENC28J60 via the SPI interface.
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]
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 14:03, 13 May 14
@Ray: Did you already have a look at the W5100 ethernet controller? This is used on the Denyonet Ethernet Catridge for the MSX computers.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 20:26, 13 May 14
@Prodatron (http://www.cpcwiki.eu/forum/index.php?action=profile;u=13), 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 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=290), 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.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: TFM on 20:45, 13 May 14
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  ;)
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: 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
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 22:19, 13 May 14
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
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: TotO on 22:22, 13 May 14
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?

Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Executioner on 01:00, 14 May 14
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?
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 01:12, 14 May 14
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!
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: TFM on 15:52, 14 May 14
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]
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Executioner on 01:55, 15 May 14
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

Title: Re: CPC Web Browser update 23-Mar-2014
Post by: 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
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: 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 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
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Alcoholics Anonymous on 20:01, 15 May 14
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:
(http://www.mojontwins.com/mojoniaplus/styles/avalon/theme/images/spacer.gif)
Spectranet - Spectrum Hardware Docs (http://spectrum.alioth.net/doc/index.php/Spectranet)

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 (http://z88dk.cvs.sourceforge.net/viewvc/z88dk/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 (http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/_DEVELOPMENT/string/z80/)

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 (http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/_DEVELOPMENT/l/z80/imath/small/)

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 (http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/_DEVELOPMENT/l/z80/ascii/)

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/ (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/ (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.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Prodatron on 22:27, 15 May 14
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 (http://www.konamiman.com/msx/msx-e.html#denyonet)

Title: Re: CPC Web Browser update 23-Mar-2014
Post by: Executioner on 04:32, 25 May 14
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.
Title: Re: CPC Web Browser update 23-Mar-2014
Post by: rpalmer on 10:28, 25 May 14
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