All Projects → frank-deng → retro-works

frank-deng / retro-works

Licence: MIT license
Works of retro programming, including some BASIC programs, a simple website designed for IE 3.0 under Windows 3.x written with PHP, a simple telnet server written with Python3

Programming Languages

c
50402 projects - #5 most used programming language
basic
69 projects
python
139335 projects - #7 most used programming language
PHP
23972 projects - #3 most used programming language
GLSL
2045 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to retro-works

BelalHashmi-Assembly-Exercise-Solutions
💻 This repository provides solutions to most of the programming questions in the exercise given at the back of chapters for Bao Ji's Book (text book for course "Comp. Organization & Assembly Lang. EE213" at FAST). Sharing these with you, so that they might help you in understanding the concepts.
Stars: ✭ 30 (+114.29%)
Mutual labels:  dosbox
DOSee
DOSee is a DOSBox based, MS-DOS emulator for the web
Stars: ✭ 24 (+71.43%)
Mutual labels:  dosbox
retrogardens
16bit retro programming in DosBox with Borland C++ 3.1, Turbo Pascal 7 and TASM
Stars: ✭ 49 (+250%)
Mutual labels:  dosbox
V8Power
Putting the power of an 8-cylinder engine under the hood of DOS batch files.
Stars: ✭ 30 (+114.29%)
Mutual labels:  dosbox
dos-game
A Dockerfile for running Docker based DosBox games streamed to a browser client.
Stars: ✭ 49 (+250%)
Mutual labels:  dosbox
masm-tasm
run and debug TASM/MASM code in VSCode via JSDos, DOSBox and msdos-player
Stars: ✭ 115 (+721.43%)
Mutual labels:  dosbox
AmpShell
A WinForms-based, lean and fast DOSBox frontend, for Windows (Linux and Mac coming soon !)
Stars: ✭ 29 (+107.14%)
Mutual labels:  dosbox
basicdos
A new 8086-based reimagining of PC DOS and BASIC
Stars: ✭ 72 (+414.29%)
Mutual labels:  retro-programming
raster-master
Raster Master Sprite/Icon/Map editor for Windows 10/11 that generates RayLib code / Put image and map code for Open Watcom, gcc, AmigaBASIC, Amiga C, Amiga Pascal ,QuickBasic, QB64, Quick C, Turbo Pascal, freepascal, Turbo C, Turbo Basic, Power Basic, FreeBASIC, GWBASIC, BASICA, PC-BASIC,, DOS XLIB LBM/PBM
Stars: ✭ 40 (+185.71%)
Mutual labels:  qbasic
wine-launcher
Wine Launcher - Running Windows games under Linux
Stars: ✭ 249 (+1678.57%)
Mutual labels:  dosbox
costa
The Costa Graphical User Interface for MS-DOS and compatible systems
Stars: ✭ 27 (+92.86%)
Mutual labels:  qbasic

Retro Programming Works 怀旧编程作品

一些古董平台上的编程作品。仅供娱乐。
Some retro programming works for some vintage platforms. For entertainment use only.

BASIC

一些基于DOS下QBASIC上的作品。
Some works based on QBASIC under DOS.

因其支持结构化编程,使得程序的开发、维护更加方便。
Thanks to QBASIC's support of structured programming, development and maintenance is much easier.

部分程序需要DOS方式下的中文系统(如UCDOS),以正确显示汉字。
Some programs require DOS-based Chinese system (e.g. UCDOS) to display Chinese characters properly.

部分程序需要UCDOS下自带的特显程序TX.COM和UCDOS的轮廓字库,以实现UCDOS下的绘图操作,并以正确的字形显示大尺寸字符。
Some programs require UCDOS's special display utility TX.COM and outline fonts for UCDOS, so as to enable graphic drawing under UCDOS, as well as displaying large-sized characters in correct glyph.

截图欣赏 Screenshots

2048游戏 2048 Game
2048

猜数字游戏 Bulls and Cows
Bulls and Cows

九九乘法表 9x9 Multiplication Table
Multiplication Table

求1000以内的质数 Get prime numbers under 1000
Prime Numbers

显示杨辉三角 Display Yanghui Triangle
Yanghui Triangle

条形图 Bar Chart
Bar Chart

饼图 Pie Chart
Pie Chart

俄罗斯方块 Tetris
Tetris

绘制几何形状 Drawing Geometric Shapes
Shapes

屏保 Screensaver
Screensaver

谢尔宾斯基地毯 Sierpinski Carpet
Sierpinski Carpet

数独求解程序 Sudoku Solver
Sudoku Solver

显示古诗 Poem Showing
Poem

显示古诗(使用BSAVE图像数据) Poem Showing (Using BSAVE Image Data)
Poem 2

新年快乐 Happy New Year
Happy New Year

显示古诗(使用UCDOS特显程序) Poem Showing (Using UCDOS Special Display Tool)
Poem for UCDOS

显示带插图的古诗(使用UCDOS特显程序) Poem With Picture (Using UCDOS Special Display Tool)
Poem for UCDOS

新年快乐(使用UCDOS特显程序) Happy New Year (Using UCDOS Special Display Tool)
Happy New Year for UCDOS

2048游戏(使用UCDOS特显程序) 2048 Game (Using UCDOS Special Display Tool)
Happy New Year

UCDOS特显程序256色列表 256-Color Table of UCDOS Special Display Tool
Color Table

UCDOS特显程序可用字体 Fonts available for UCDOS Special Display Tool
Fonts

PPP服务器和Telnet服务器

IE3浏览器可通过PPP协议访问部署在服务端的HTML站点,并配有类似Jekyll的静态博客网站生成器。
IE3 browser can access the HTML site deployed at server side via PPP protocol. A Jekyll-like static blog site generator is also available.

Telnet服务器可使用类似Telix、HyperTerminal的终端仿真程序通过拨号方式连接。
Use terminal emulators like Telix, HyperTerminal to dial to the Telnet server.

PPP服务器、Telnet服务器和静态博客网站生成器需要在Linux环境(如Debian、Ubuntu)中运行。
PPP server, Telnet server and static blog site generator require running under Linux environments like Debian, Ubuntu.

严禁将PPP服务器或Telnet服务器部署到生产环境或含有敏感数据的环境!!!
DO NOT deploy PPP server or Telnet server to production environment or environment with sensitive data!!!

Linux PPP服务器和Telnet服务器配置 Linux PPP Server Configuration

执行以下命令安装所需软件:
Execute the following commands to install softwares required:

sudo apt-get install python3 ppp nginx-light php-fpm php-mbstring php-apcu
cd telnet-ppp-server
sudo python3 setup.py install

/etc/crontab中加入以下命令,实现开机时自动启动PPP服务器和Telnet服务器:
Add the following command to /etc/crontab, so as to start PPP server on boot:

@reboot root /usr/local/bin/pppd.py -P 2333 multilink enable-session defaultroute ipcp-accept-remote mtu 576 10.0.2.15: noauth
@reboot user /usr/local/bin/telnetd.py -P 2345 -c path/to/telnetd.conf

其中10.0.2.15是主机或目标站点的IP。
10.0.2.15 is the IP address of the host machine or the target site.

对于VIM用户,需要在/etc/vim/vimrc中添加以下配置以保证全角双引号和制表符能在终端中正常显示:
For VIM users, it's necessary to add the following configuration to /etc/vim/vimrc for properly displaying fullwidth quote marks and line drawing characters in terminal:

set ambiwidth=double

DOSBox串口配置 Configure DOSBox's Serial Interface

dosbox-x.conf所在目录中添加phonebook.txt,内容如下:
Create phonebook.txt at the same directory of dosbox-x.conf:

12345 127.0.0.1:2333
16666 127.0.0.1:2345

将DOSBox配置中[serial]小节下的配置项做如下修改:
Change DOSBox configuration under seciton [serial]:

serial1 = modem
phonebookfile = phonebook.txt

VirtualBox NAT配置端口转发 Configure NAT Port Forwarding for VirtualBox

如果PPP服务器和Telnet服务器是部署在VirtualBox虚拟机里的Linux系统上,且虚拟机网卡连接的是NAT网络,则需要在虚拟机网卡的端口转发设置中为虚拟机里的PPP服务器和Telnet服务器分别添加2条端口转发规则,以使得主机上的DOSBox-X能访问虚拟机里的服务。
If PPP server and Telnet server are deployed on the VirtualBox Linux guest, and guest network adapter is attacted to NAT. Then you must add port forwarding rules for PPP server and Telnet server inside guest machine, so as to enable host DOSBox-x accessing them.

转发规则各个字段意义如下:
Meanings of port forwarding rule columns:

  • 名称 Name
    可任意指定,也可以留空。
    Any value is acceptable, including blank value.
  • 协议 Protocol
    此处固定选择TCP(此处UDP没有使用)。
    Always select TCP here (UDP is unused here).
  • 主机IP Host IP
    可以不指定,也可以指定127.0.0.1以限制只有在主机上运行的程序可以访问对应的服务。
    Leave it blank, or specify 127.0.0.1 to limit only programs running on the host machine can access the service.
  • 主机端口 Host Port
    可任意指定一个主机上未使用的端口。
    Any port number not used on the host machine are acceptable.
  • 子系统IP Guest IP
    在虚拟机的Linux里使用ip address命令查看虚拟机网卡对应的IP地址,一般是10.0.2.15
    Use command ip address inside Linux guest to get the IP address of the guest network card, in most cases it's 10.0.2.15.
  • 子系统端口 Guest Port
    PPP服务器和Telnet服务器在虚拟机中使用的端口
    Port numbers of PPP server and Telnet server inside virtual machine.

虚拟机里的程序可以通过虚拟路由器IP+主机上的服务对应的端口号来访问主机上的服务。虚拟路由器IP可通过以下步骤获得:
Programs inside virtual machine can access host services via Virtual Router IP + port of the host service. You can get the virtual router IP via the following steps:

  1. 在虚拟机的Linux终端中输入ip route show命令。
    Execute command ip route show in the guest Linux terminal.
  2. 在上一步的命令输出中找到default via后面的IP地址,该地址即为客户机的虚拟路由器IP,VirtualBox客户机中一般为10.0.2.2
    Find out the IP address after default via from the output of the step above, this is the virtual router IP for the guest machine. For VirtualBox guests it's 10.0.2.2 in most cases.

Windows 3.x客户端使用方法 Windows 3.x Client Usage

设置新的PPP连接时需要将电话号码设置成12345,IP地址设置成192.168.7.2,用户名和密码为空。
When setting up new PPP connection, set phone number with 12345, set IP address with 192.168.7.2, leave username and password blank.

如果您有多部虚拟机连接相同的PPP服务器,则需要在每部虚拟机内的系统中分别配置不同的IP地址。比如配置Windows 3.2的IP地址为192.168.7.2,Windows 95的IP地址为192.168.7.3
If you have multiple virtual machines connecting to the same PPP server, then you have to set different IP addresses for each virtual machine. For example, set Windows 3.2's IP address as 192.168.7.2, and set Windows 95's IP addresss as 192.168.7.3.

检查“使用远程网上的默认网关”选项是否被选中,否则将无法连接目标服务器。
Check whether "Use default gateway on remote network" box is checked, or you'll be unable to connect to the target server.

当连接成功时,打开浏览器,使用URLhttp://目标站点IP访问目标站点。
When connection established, open browser and use URL http://Target IP to access the target site.

配置博客生成器 Configure Blog Maker

执行以下命令安装所需的软件:
Execute the following commands to install the softwares required:

sudo apt-get install nodejs imagemagick librsvg2-bin

然后进入blog-maker目录运行npm install安装所需的NodeJS包。
Then enter blog-maker directory and run npm install to install NodeJS packages required.

之后运行npm start即可生成博客站点内容,生成结果在dist目录中。
After that, run npm start to generate the blog site, generated files can be found at dist directory.

截图欣赏 Screenshots

天气预报 Weather Forecast
Weather Forecast

我的博客 My Blog
My Blog

带数学公式的文章 Article with Equation
Math

被模拟的PC Emulated PCs

1992's PC

配置 Configuration

  • V30 (80186 Compatible) CPU
  • 640k RAM
  • 5.25" 1.2M High Density Floppy Drive
  • 5.25" 360k Double Side Floppy Drive
  • CGA Display Adapter with green monochrome monitor

主要用途 Main Usage

  • BASIC编程 BASIC Programming
  • 中英文文字处理 Chinese & English text processing
  • 俄罗斯方块游戏 Tetris game
  • 2048游戏 2048 Game
  • 英文打字练习 English typing training
  • 五笔打字练习 Wubi input training

1997's PC

配置 Configuration

  • CPU 80486DX2 66MHz
  • 8M RAM
  • 512M HDD
  • S3 864 Graphics Adapter with 384k VRAM, capable of handling 640x480 256-color video mode.
  • CD-ROM
  • Sound Blaster 16
  • Mouse
  • 56k Modem

主要用途 Main Usage

  • BASIC编程 BASIC Programming
  • 英语学习 English learning
  • 英汉字典 English-Chinese dictionary
  • 英文打字练习 English typing training
  • 中英文文字处理 Chinese & English text processing
  • 电子表格和图表处理 Spreadsheet and chart processing
  • 多媒体光盘浏览 Viewing multimedia CDs
  • 图片浏览 Image viewing
  • 音乐和视频播放 Music & video playback
  • 拨号上网 Surfing online via dial-up network
  • 拨号连接远程服务器 Connecting to remote server via dial-up network
  • (禁止游戏 NO GAMING)

实用命令 Useful Commands

将原始硬盘镜像转换成VDI格式硬盘镜像
Convert raw disk image into VDI format image

VBoxManage convertdd source.img destination.vdi --format VDI

将VDI格式硬盘镜像转换成原始硬盘镜像
Convert VDI format HDD image into raw HDD image

VBoxManage clonehd source.vdi destination.img --format RAW

Linux下挂载虚拟软盘(使用GB2312编码的文件名)
Mount floppy image under Linux (Use GB2312 for filename encoding)

sudo mount -o loop,codepage=936,iocharset=utf8 floppy.img /mnt

使用ffmpeg制作可在Windows 3.1下播放的视频
Convert video into format accepted by Windows 3.1

ffmpeg -i input.mp4 -c:v cinepak|msvideo1 -c:a pcm_s16le|pcm_u8|adpcm_ima_wav\
	-vf "scale=320:240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2"\
	-r 12 -ac 1 -ar 22050 -y output.avi

DOSBox使用的Autoexec命令,用于挂载原始硬盘镜像和软盘镜像
DOSBox autoexec command for mounting raw harddisk image and floppy image

@imgmount 0 /home/frank/.dosbox/floppy.img -fs none
@imgmount 2 /home/frank/.dosbox/hdd.img -fs none -t hdd -size 512,63,16,X

对于一些BIN/CUE,MDF/MDS等非ISO格式的光盘映像文件,可以尝试在Linux下使用iat命令转换成ISO文件
For CD-ROM image files in non-ISO format like BIN/CUE, MDF/MDS, etc., try to use iat command under Linux to convert them into ISO file.

减少CPU占用 Reduce CPU Usage

如何在使用模拟器运行DOS、Windows 3.x、Windows 9x时减少CPU占用:
How to reduce CPU usage when running DOS, Windows 3.x, Windows 9x with emulators:

MS-DOS 6.22自带POWER.EXE,在CONFIG.SYS里添加以下配置即可:
MS-DOS 6.22 already has POWER.EXE installed, you can add the following configuration into CONFIG.SYS:

DEVICEHIGH=C:\DOS\POWER.EXE ADV:MAX

其它版本的MS-DOS需要将IDLE.COM复制到C:\,然后从AUTOEXEC.BAT运行该命令。
For other versions of MS-DOS, copy IDLE.COM to C:\, then run it from AUTOEXEC.BAT

  • IDLE.COM可以在Microsoft Virtual PC 2007中找到。
    IDLE.COM can be found from Microsoft Virtual PC 2007.

Windows 3.x需要将WQGHLT.386复制到C:\WINDOWS\SYSTEM\,然后打开C:\WINDOWS\SYSTEM.INI并在[386enh]小节中添加以下配置:
For Windows 3.x, copy WQGHLT.386 to C:\WINDOWS\SYSTEM\, then open C:\WINDOWS\SYSTEM.INI and add the following configuration into [386enh] section:

device=wqghlt.386

Windows 9x需要安装AmnHLTAmn Refrigerator
Windows 9x requires installing AmnHLT or Amn Refrigerator.

DOS下启用UMB Activate UMB for DOS

CONFIG.SYS中找到内容为DEVICE=C:\DOS\EMM386.EXE的行,然后在其后面加上NOEMS参数。
Open CONFIG.SYS and find the line with DEVICE=C:\DOS\EMM386.EXE, then append NOEMS parameter to it.

DOS下添加CD-ROM支持 Add CD-ROM support for MS-DOS

OAKCDROM.SYS复制到C:\OAKCDROM.SYS可在Windows 9x的安装光盘中找到)。
Copy OAKCDROM.SYS to C:\ (OAKCDROM.SYS can be found from Windows 9x installation CD-ROMs).

如果MSCDEX没有安装,需要将MSCDEX.EXE复制到C:\
Copy MSCDEX.EXE to C:\ if MSCDEX is not installed.

CONFIG.SYS中添加以下配置:
Add the following configuration into CONFIG.SYS:

DEVICEHIGH=C:\OAKCDROM.SYS /D:CD1
LASTDRIVE=Z

AUTOEXEC.BAT中添加以下命令:
Add the following command into AUTOEXEC.BAT:

LH MSCDEX.EXE /D:CD1 /L:Z

/L:Z用来指定CD-ROM对应的盘符。
/L:Z specifies the drive letter for CD-ROM.

如何在Windows 3.x下安装S3显卡驱动 How to install S3 video driver for Windows 3.x

安装Windows 3.x时使用标准VGA显示驱动,安装完成后在“Windows 设置程序”中更改显卡驱动。
Use the basic VGA driver for the initial install, then change the video driver using Windows Setup in the Main program group.

安装显卡驱动时如果提示插入S3 Trio 64V Flat Mode Driver软盘,则此时需要将路径填写成C:\WINDOWS\SYSTEM\以完成显卡驱动的安装。
When the driver spouted up a prompt to Insert the Trio 64V Flat Mode Driver disk, redirect the installer to C:\WINDOWS\SYSTEM\ to complete the graphics driver install.

Linux下安装字体

  1. 将字体文件复制到/usr/share/fonts中,并将字体文件的权限改为644
    Copy font files to /usr/share/fonts and change the permission of the font files into 644.
  2. 运行sudo fc-cache -v使得新添加的字体生效。
    Run sudo fc-cache -v to activate newly added fonts.
  3. 运行fc-list查看新添加的字体是否生效。
    Run fc-list to check whether the newly-added fonts are useable.

X11禁止Ctrl+Alt+Fn键切换终端 Disable Switching TTY Via Ctrl+Alt+Fn Under X11

将以下内容添加到/etc/xorg.conf
Add the following code to /etc/xorg.conf:

Section "ServerFlags"
    Option "DontVTSwitch" "true"
EndSection

启用Linux的串口终端 Enable serial console under Linux

临时为/dev/ttyS0启用串口登录(重启后失效):
Temporarily enable serial console on /dev/ttyS0 (Disabled after reboot):

systemctl start [email protected]

永久为/dev/ttyS0启用串口登录:
Permanently enable serial console on /dev/ttyS0:

systemctl enable [email protected]

查看/dev/ttyS0的串口登录功能是否启用:
Check whether serial console is enabled on /dev/ttyS0:

systemctl status [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].