Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

DWLOAD server implemented in Python

License

NotificationsYou must be signed in to change notification settings

6809/DwLoadServer

Repository files navigation

DWLOAD server implemented in Python (OpenSource, GPL v3 or above).

Connect your Dragon 32 into your PC and LOAD/SAVE basic listings.

Dragon32DriveWire1small.jpeg

Quickstart

~$ git clone https://github.com/6809/DwLoadServer.git~$cd DwLoadServer~/DwLoadServer$ ./devshell.py run serial

features

  • load/save files via DWLOAD
  • on-the-fly converting ASCII BASIC listing (see below)
  • dynamic "AUTOLOAD.DWL" (see below)
  • backup all files on save
  • SupportUSB Adapter andBecker TCP/IP Interface.

current state

Tested DWEEBS:

DWEEBexampleDescription
DLOADDLOADLoadAUTOLOAD.DWL (Used on Dragon startup)
SAVEDLOAD"SAVE""MYFILE.BAS"Save BASIC listing
RESAVEDLOAD"RESAVE""MYFILE.BAS"Save BASIC listing

Implemented DriveWire Transactions:

hexdezDW nameDescription
$000OP_NOPNOP Transaction -> ignored
$011OP_NAMEOBJ_MOUNTMount a file to a virtual drive number
$022OP_NAMEOBJ_CREATE(Does in this implementation the same as OP_NAMEOBJ_MOUNT)
$d2210OP_READEXSend 256 bytes sector from the DWLOAD server to the client
$5787OP_WRITEWrite 256 bytes sector of data from the client into a file on the server

TODO

pyscripts

There is a general machanism to generate DLOAD responses via Python:

  • Store in server root a python script, e.g.: "FOO.BAR.py"
  • DLOAD the file (without .py extension) on client, e.g.:DLOAD"FOO.BAR"

The script will be called via subprocess and it must write the Dragon DOS binary data back to stdout.

Currently, there is only onepyscript file:AUTOLOAD.DWL.py (see below)

dynamic "AUTOLOAD.DWL"

There exist a way to generate a dynamic DWLOAD menu.Just copy the file/dwload-demo-files/AUTOLOAD.DWL.py into your server root.

Thepyscript reads the server root directory and list all files into the DLOAD menu.e.g. the server root looks like this:

/HOME/FOO/DWLOAD-FILES  +--- AUTOLOAD.DWL.py  +--- HEXVIEW.BAS  +--- TEST.BAS  \--- SAVE

The generated listing looks like this:

10 CLS20 PRINT" *** DYNAMIC MENU ***  14:11:18"30 PRINT"/HOME/FOO/DWLOAD-FILES"40 PRINT" 0 - HEXVIEW.BAS"50 PRINT" 1 - TEST.BAS"60 PRINT" 2 - SAVE"70 PRINT"PLEASE SELECT (X FOR RELOAD) !"80 A$=INKEY$:IF A$="" GOTO 8090 IF A$="X" THEN DLOAD100 IF A$="0" THEN DLOAD"HEXVIEW.BAS"110 IF A$="1" THEN DLOAD"TEST.BAS"120 IF A$="2" THEN DLOAD"SAVE"130 GOTO 10

s.:http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=5&t=4977

You must only callDLOAD on you Dragon to get this menu. Because aDLOAD will requestAUTOLOAD.DWL and the Python server will all.py and callAUTOLOAD.DWL.py if exist.

This feature make the following file:

|/dwload_server/hooks/dynamic_dwl.py | general API to 'pyscript' files ||/dwload_server/pyscripts/autoload_dwl.py | generates the DWLOAD menu |

on-the-fly converting ASCII BASIC listing

The server read/save ASCII BASIC listing and send/store them to the DWLOAD client on-the-fly.So you can edit listings on your PC and try them on your Dragon without any external conventions!

e.g.: save

10 PRINT"HELLO WORLD!"DLOAD"SAVE""HELLO.BAS"DWLOAD!OK

The server will create two files:

filenameformatdescription
HELLO.DWLraw tokenized binaryDragon DOS Binary Format data from the Dragon (256 Bytes padded)
HELLO.BASASCII listingon-the-fly converted ASCII BASIC listing

e.g. load (and execute):

DLOAD"HELLO.BAS"!HELLO WORLD!OK

(Note: the first! is from DWLOAD ROM routine)

The server will read theHELLO.BAS ASCII listing and convert is on-the-fly to the needed Dragon DOS Binary Formatand send this back to the Dragon.

This feature make the following files:

|/dwload_server/hooks/read_ascii.py | read ASCII listing and send as binary to client ||/dwload_server/hooks/save_ascii.py | save binary from client as ASCII on server |

installation

Clone sources and bootstrap viadev-shell, e.g.:

~$ git clone https://github.com/6809/DwLoadServer.git~$cd DwLoadServer~/DwLoadServer$ ./devshell.py...Developer shell - DWLOAD Server - v0.4.0Documented commands (use'help -v'for verbose/'help <topic>'for details):dev-shell commands==================fix_code_style      poetry   pytest     toxlist_venv_packages  publish  pyupgrade  updateDWLOAD Server Commands======================runUncategorized=============aliashelphistory  macro  quitset  shortcuts(dwload_server) run --helpUsage: run [-h] [--root-dir ROOT_DIR] [--log-level {0, 10, 20, 30, 30, 40, 50, 50, 99, 100}] {becker, serial} ...optional arguments:  -h, --help            show thishelp message andexit  --root-dir ROOT_DIR  --log-level {0, 10, 20, 30, 30, 40, 50, 50, 99, 100}                        Logging level: 10=DEBUG, 20=INFO, 30=WARNING, 40=ERROR, 50=CRITICAL/FATAL (default: 20)Interface:  {becker, serial}    becker              Use the Becker interface    serial              Use the serial interface(dwload_server) run serial

You can also run as cli, e.g.: Start serial DWLOAD server:

~/DwLoadServer$ ./devshell.py run serial

History

Links

Forum Thread (en)worldofdragon.org
Forum Thread (de)forum.classic-computing.de
PyPihttps://pypi.python.org/pypi/dwload_server/
Githubhttps://github.com/6809/DwLoadServer

some project related links:

About

DWLOAD server implemented in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp