************************************************
*                                              *
*          Flex & BASIC 51 col on rom          *
*                                              *
*    for emulation or real DRAGON 32 64KRAM    *
*                                              *
*        menu with "DK" auto-start cart        *
*               or EXEC&HFB00                  *         
* **********************************************
* read_me.txt file


********* Thanks to ...
* Steve Orchard who created this solution for flex with Drive Wire
https://gitlab.com/sorchard001/flex-os

* Ciaran Anscomb for the keybord and extra clear keys
* Tormod Volden for DLOAD on basic rom
* Darren Atkinson and others over_sea coco-cousins for DW solution and files

* ******** What is it for ?
* for real Dragon 32 with 64K ram (or Dragon 64) connected to a DriveWire server on PC or Pi
* this code to launch BOTH flex & BASIC 51 columns with printer to file, flex commands & DLOAD possibilities
* can work without flex disk, also with disks 0-3 of the DW server  

********** This rom contains
* DLOAD pieces to integrate in the D32 basic rom (not for a D64, but it is possible to change the code)
* hooks and patches to get BASIC in 51 col mode
* flex 9.1 + disk drivers + console drivers + printer driver
* DWRead & DWWrite files used by DLOAD and flex (those files are different for emulation)

********** Possibilities
* from flex, go to BASIC with the +++MON local command
* from BASIC, return to flex with clear+right_arrow key (or clearF) 
* if printing to file is possible with the DW version
*    print from flex with the P, command of the flex disk 
*    print from BASIC with LLIST
* the key clearF or clear right arrow also flushes the DW buffer
*    if the printer has been used, else returns to flex +++
* ....

********* Memory map in 64 k ram
* 0000-7FFF Ram used by Basic and flex, possible conflicts !
* 8000-BFFF Basic pached with DLOAD in 64 ram mode

* C080-DDFF  Flex 9.1 cor   including 
*	C100-C6FF : Utility Command Area, can also be loaded by DLOAD
*	C710-C83F : no spooler, used for data
*	CCC0-CCF7 : printer driver for DW, added to cor
* 	CD00-CD56 : System call jump table
*	D370-D3E4 : flex free, used for drivers vars 
*	D3E5-D3FC : I/O table
* 	CC12-CC13 : User command Table Address

* DE00-E5FF drivers disk & console 51c & keyboard
* 	+ patch & hooks

* E600-FDFF flex screen, with temporary code
* 	F800 DLOAD for basic rom part 1 
* 	F900 DLOAD for basic rom part 2
* 	FA00 DLOAD for basic rom part 3
* 	FB00 this booter : Start Menu & subs, EXEC &HFB00 to launch
* 	FD00 go 64KRam and install DLOAD, independant sub EXEC&HFD00

* FE00-FEFF flex free, permanent subs : DWRead, DWWrite, FLUSH

*****************************************************************
STEP by STEP

It is easy to test the solution in emulation
start xroar -machine dragon32 -ram 64 -cart-rom COR91V1emu.rom -cart-becker

menu 2 : you get your Dragon 32 in 64K ram with DLOAD installed
DLOAD : if the Dragon is connected to a DriveWire server, 
the AUTOLOAD.DWL is loaded, use LIST, NEW
use DLOAD(N)"xxx to load and save files and DWEEBS


menu 1 :you boot FLEX 9.1 without disk (flex.sys is in the rom)
if the Dragon is connected to a DriveWire server, the date will be loaded 
and you can use the flex commands existing on the disks (0 to 3) presents on the server
for example 
+++CAT,0 lists the files of the disk 0
+++DIR,0
+++INFOS local command of information
+++P,CAT prints to DW
clear right_arow to flush the printer buffer to a file from flex or from basic


Even if your PC is not connected to a driveWire server, your can go to basic
+++MON
 	then use LIST, LLIST, DLOAD, CLEAR
	return to flex with clear right_arrow key
	disassemble with DISM, use SAVE, GET, ...

shift clear clears the screen

All is not possible, 
	for example some flex commands like DISM use the low ram of basic
	no graphics with the 51 colums screen of basic		
	etc.
+++MEMFILL,0,BFFF,0 clears all ram $0000-$BFFF, flex can yet be used
+++DISM,CD00,CD20



