Skip to content

Commit

Permalink
Merge pull request #26 from jhhoward/layout-refactor
Browse files Browse the repository at this point in the history
General refactor of several systems
  • Loading branch information
jhhoward authored Apr 17, 2024
2 parents 308b9ad + fc9841c commit b7f68d8
Show file tree
Hide file tree
Showing 242 changed files with 18,570 additions and 11,298 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ project/Windows/x64/
project/x64/
project/DOS/capture/
.vscode
MICROWEB.SWP
Binary file added CGA.dat
Binary file not shown.
Binary file added Default.dat
Binary file not shown.
Binary file added EGA.dat
Binary file not shown.
Binary file added LowRes.dat
Binary file not shown.
81 changes: 81 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
bin = MicroWeb.exe
SRC_PATH = src
OBJDIR=obj
objects = MicroWeb.obj App.obj Parser.obj Render.obj Tags.obj Platform.obj CGA.obj EGA.obj Hercules.obj TextMode.obj Font.obj Interfac.obj DOSInput.obj DOSNet.obj Page.obj
memory_model = -ml
CC = wpp
CFLAGS = -zq -0 -ot -bt=DOS -w2 $(memory_model)
LD = wlink

# begin mTCP stuff
tcp_h_dir = lib\mTCP\TCPINC\
tcp_c_dir = lib\mTCP\TCPLIB\

tcpobjs = packet.obj arp.obj eth.obj ip.obj tcp.obj tcpsockm.obj udp.obj utils.obj dns.obj timer.obj ipasm.obj trace.obj

tcp_compile_options = -0 $(memory_model) -DCFG_H="tcp.cfg" -oh -ok -ot -s -oa -ei -zp2 -zpw -we -ob -ol+ -oi+
tcp_compile_options += -i=$(tcp_h_dir)

.cpp : $(tcp_c_dir)

.asm : $(tcp_c_dir)

.asm.obj :
wasm -0 $(memory_model) $[*

.cpp.obj :
wpp $[* $(tcp_compile_options)
# end mTCP stuff

$(bin): $(objects) $(tcpobjs)
$(LD) system dos name $@ file { $(objects) $(tcpobjs) }


MicroWeb.obj: $(SRC_PATH)\MicroWeb.cpp
$(CC) -fo=$@ $(CFLAGS) $<

App.obj: $(SRC_PATH)\App.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Parser.obj: $(SRC_PATH)\Parser.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Render.obj: $(SRC_PATH)\Render.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Tags.obj: $(SRC_PATH)\Tags.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Page.obj: $(SRC_PATH)\Page.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Platform.obj: $(SRC_PATH)\DOS\Platform.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Font.obj: $(SRC_PATH)\Font.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Interfac.obj: $(SRC_PATH)\Interfac.cpp
$(CC) -fo=$@ $(CFLAGS) $<

CGA.obj: $(SRC_PATH)\DOS\CGA.cpp
$(CC) -fo=$@ $(CFLAGS) $<

Hercules.obj: $(SRC_PATH)\DOS\Hercules.cpp
$(CC) -fo=$@ $(CFLAGS) $<

EGA.obj: $(SRC_PATH)\DOS\EGA.cpp
$(CC) -fo=$@ $(CFLAGS) $<

TextMode.obj: $(SRC_PATH)\DOS\TextMode.cpp
$(CC) -fo=$@ $(CFLAGS) $<

DOSInput.obj: $(SRC_PATH)\DOS\DOSInput.cpp
$(CC) -fo=$@ $(CFLAGS) $<

DOSNet.obj: $(SRC_PATH)\DOS\DOSNet.cpp
$(CC) -fo=$@ $(CFLAGS) -i=$(tcp_h_dir) -DCFG_H="tcp.cfg" $<

clean: .symbolic
del *.obj
del $(bin)
72 changes: 44 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,79 @@
# MicroWeb DOS web browser
![Screenshot](screenshot.png)
MicroWeb is a web browser for DOS that runs as a 16-bit real mode application and is designed to run on minimal hardware.

MicroWeb is a web browser for DOS! It is a 16-bit real mode application, designed to run on minimal hardware.
![Screenshot](screenshot.gif)

## Minimum requirements
To run you will need:
* Intel 8088 or compatible CPU
* CGA, EGA, VGA or Hercules compatible graphics card
* A network interface (it is possible to use your machine's serial port with the EtherSLIP driver)
* A mouse is desirable but not 100% required
* 640k RAM is desirable. EMS/XMS are not required
* 640K RAM is desirable but can run with less
* EMS can be used if available and is recommended for loading heavier web pages and images

## Limitations
* Text only (this may change in a later release)
* HTTP only (no HTTPS support)
* HTTP only (See HTTPS limitations below)
* Only GIF images are rendered, although PNG and JPEG dimensions are loaded for layout purposes
* No CSS or Javascript
* Very long pages may be truncated if there is not enough RAM available
* Mouse cursor is currently not visible in Hercules mode

## Keyboard shortcuts
* Escape : Exit
* F2 : Invert screen (useful for LCD displays)
* F6 / Ctrl+L : Select address bar
* Tab / Shift+Tab : Cycle through selectable page elements
* Enter : Follow link / press button
* Backspace : Back in history
| Key | Shortcut |
|-------------------|-------------------------------------------------|
| Escape | Exit |
| F2 | Invert screen (useful for old LCD displays) |
| F3 | Toggle title bar / status bar visibility |
| F5 | Reload page |
| F6 / Ctrl+L | Focus address bar |
| Tab / Shift+Tab | Cycle through selectable page elements |
| Enter | Follow link / press button |
| Cursor up/down | Scroll page |
| Page up/down | Scroll page in large increments |
| Home | Jump to start of page |
| End | Jump to end of page |

The page position can be scrolled with cursor keys, Page up, Page down, Home and End
## Supported video modes
MicroWeb supports a wide range of different video modes. You will be asked on startup to select a mode and one will be suggested based on your detected hardware.
* 640x200 monochrome (CGA)
* 640x200 inverse monochrome (Palmtop CGA)
* 320x200 4 colours (CGA)
* 320x200 16 colours (Composite CGA)
* 640x200 16 colours (EGA)
* 640x350 monochrome (EGA)
* 640x350 16 colours (EGA)
* 640x480 monochrome (VGA)
* 640x480 16 colours (VGA)
* 320x200 256 colours (VGA)
* 720x348 monochrome (Hercules)
* 640x400 monochrome (Olivetti M24)
* 640x400 monochrome (Toshiba T3100)
* 240x128 monochrome (HP 95LX)

## Command line options
You can use a URL as an argument to load a specific page on startup. This can also be a path to a local html file.

MicroWeb will try to automatically choose the most appropriate display mode on startup, but it is possible to manually select a video mode by using a command line switch

Option | Effect
------- |-------
-c | Force to run in 640x200 CGA mode
-h | Force to run in 720x348 Hercules mode
-e | Force to run in 640x350 EGA mode
-v | Force to run in 640x480 VGA mode
-o | Run in 640x400 Olivetti M24 mode
-t3100 | Run in 640x400 Toshiba T3100 mode
-i | Start with inverted screen colours (useful for some LCD monitors)
| Option | Effect
|-----------|-------
| -i | Start with inverted screen colours (useful for some LCD monitors)
| -noems | Disable EMS memory usage
| -noimages | Disables image decoders - useful for very low memory setups

For example `MICROWEB -c http://68k.news` will start in CGA 640x200 mode and load the 68k.news website
For example `MICROWEB -noems http://68k.news` will load the 68k.news website on startup but disable the EMS routines

## HTTPS limitations
Unfortunately older machines just don't have the processing power to handle HTTPS but there are a few options available:
* Browse sites that still allow HTTP
TLS encryption is currently not supported which means that only HTTP servers can be accessed directly. There are some options for HTTPS sites:
* Use a proxy server such as [retro-proxy](https://github.com/DrKylstein/retro-proxy) which converts HTTPS to HTTP. You can configure a proxy server by setting the HTTP_PROXY environment variable before running MicroWeb. e.g. `SET HTTP_PROXY=192.168.0.50:8000`
* Use the [FrogFind!](http://www.frogfind.com) web service to view a stripped down version of a site. If MicroWeb is redirected to an HTTPS site then it will generate a FrogFind link for your convenience.

## Getting started
Check out the [releases page](https://github.com/jhhoward/MicroWeb/releases) which will include a pre-built binary. Also available are FreeDOS boot disk images for 360K and 720K floppies, which are configured to work with a NE2000 network adapter. These boot images can be used in an emulator such as [PCem](https://pcem-emulator.co.uk/).

## Network setup
MicroWeb uses Michael Brutman's [mTCP networking library](http://www.brutman.com/mTCP/) for the network stack. You will need a DOS packet driver relevant to your network interface. You can read more about configuring DOS networking [here](http://www.brutman.com/Dos_Networking/dos_networking.html)
MicroWeb uses Michael Brutman's [mTCP networking library](http://www.brutmanlabs.org/mTCP/) for the network stack. You will need a DOS packet driver relevant to your network interface. You can read more about configuring DOS networking [here](http://brutmanlabs.org/Dos_Networking/dos_networking.html)

## Build instructions
To build you will need the [OpenWatcom 1.9 C++ compiler](https://sourceforge.net/projects/openwatcom/files/open-watcom-1.9/).
Use OpenWatcom's wmake to build the makefile in the project/DOS folder
Use OpenWatcom's wmake to build the makefile in the project/DOS folder. Currently only builds in a Windows environment.

Binary file added assets/CGA/Cour1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/Cour2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/Cour3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/Helv1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/Helv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/Helv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/broken-image-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/checkbox-ticked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/down-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/CGA/mouse-link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/CGA/mouse-select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/CGA/mouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/radio-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CGA/radio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Cour1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Cour2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Cour3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Helv1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Helv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/Helv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/broken-image-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/checkbox-ticked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Default/down-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/Default/mouse-link.png
Binary file modified assets/Default/mouse-select.png
Binary file modified assets/Default/mouse.png
Binary file added assets/Default/radio-selected.png
Binary file added assets/Default/radio.png
Binary file added assets/EGA/Cour1.png
Binary file added assets/EGA/Cour2.png
Binary file added assets/EGA/Cour3.png
Binary file added assets/EGA/Helv1.png
Binary file added assets/EGA/Helv2.png
Binary file added assets/EGA/Helv3.png
Binary file added assets/EGA/broken-image-icon.png
Binary file added assets/EGA/bullet.png
Binary file added assets/EGA/checkbox-ticked.png
Binary file added assets/EGA/checkbox.png
Binary file added assets/EGA/down-icon.png
Binary file added assets/EGA/font-large.png
Binary file added assets/EGA/font-mono-large.png
Binary file added assets/EGA/font-mono-small.png
Binary file added assets/EGA/font-mono.png
Binary file added assets/EGA/font-small.png
Binary file added assets/EGA/font.png
Binary file added assets/EGA/image-icon.png
Binary file added assets/EGA/mouse-link.png
Binary file added assets/EGA/mouse-select.png
Binary file added assets/EGA/mouse.png
Binary file added assets/EGA/radio-selected.png
Binary file added assets/EGA/radio.png
Binary file added assets/Fonts/COURA.FON
Binary file not shown.
Binary file added assets/Fonts/COURB.FON
Binary file not shown.
Binary file added assets/Fonts/COURC.FON
Binary file not shown.
Binary file added assets/Fonts/COURD.FON
Binary file not shown.
Binary file added assets/Fonts/COURE.FON
Binary file not shown.
Binary file added assets/Fonts/HELVA.FON
Binary file not shown.
Binary file added assets/Fonts/HELVB.FON
Binary file not shown.
Binary file added assets/Fonts/HELVC.FON
Binary file not shown.
Binary file added assets/Fonts/HELVD.FON
Binary file not shown.
Binary file added assets/Fonts/HELVE.FON
Binary file not shown.
15 changes: 15 additions & 0 deletions assets/Fonts/fonts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Fonts are ISO 8859-1 (Latin-1)

HELVA.FON, Helv 8,10,12,14,18,24 (CGA resolution)
HELVB.FON, Helv 8,10,12,14,18,24 (EGA resolution)
HELVC.FON, Helv 8,10,12,14,18,24 (60 dpi)
HELVD.FON, Helv 8,10,12,14,18,24 (120 dpi)
HELVE.FON, Helv 8,10,12,14,18,24 (VGA resolution)
HELVF.FON, Helv 8,10,12,14,18,24 (8514/a resolution)

COURA.FON, Courier 10,12,15 (CGA resolution)
COURB.FON, Courier 10,12,15 (EGA resolution)
COURC.FON, Courier 10,12,15 (60 dpi)
COURD.FON, Courier 10,12,15 (120 dpi)
COURE.FON, Courier 10,12,15 (VGA resolution)
COURF.FON, Courier 10,12,15 (8514/a resolution)
Binary file added assets/LowRes/Cour1.png
Binary file added assets/LowRes/Cour2.png
Binary file added assets/LowRes/Cour3.png
Binary file added assets/LowRes/Helv1.png
Binary file added assets/LowRes/Helv2.png
Binary file added assets/LowRes/Helv3.png
Binary file added assets/LowRes/broken-image-icon.png
Binary file added assets/LowRes/bullet.png
Binary file added assets/LowRes/checkbox-ticked.png
Binary file added assets/LowRes/checkbox.png
Binary file added assets/LowRes/down-icon.png
Binary file added assets/LowRes/image-icon.png
Binary file added assets/LowRes/mouse-link.png
Binary file added assets/LowRes/mouse-select.png
Binary file added assets/LowRes/mouse.png
Binary file added assets/LowRes/radio-selected.png
Binary file added assets/LowRes/radio.png
Loading

0 comments on commit b7f68d8

Please sign in to comment.