Page 1 of 2

Autoboot file

Posted: Fri Sep 05, 2014 7:50 pm
by jltursan
Is there a way from DragonDOS to autoboot a BASIC program?

I've only found how to autostart a BASIC program after CLOADing it; but none about an AUTOEXEC.BAS file or something like the OS9 startup file :(

Re: Autoboot file

Posted: Mon Sep 08, 2014 4:34 pm
by admin
No - there is nothing in the DragonDOS rom that looks for any sort of boot file.

Re: Autoboot file

Posted: Mon Sep 08, 2014 11:00 pm
by zephyr
It is possible to do this by writing a small machine code routine (boot code) to a freshly formatted floppy disk. Try the attached program and demo disk.

Code: Select all

EDIT: Version 1.0 code deleted.
To make your own autoboot disks:

(1) Load the "DOSABOOT" program from cassette or floppy disk.
(2) Insert a floppy disk, and format it (DSKINIT)
(3) Enter RUN to start the DOSABOOT program
(4) Press the spacebar to write boot code to the floppy disk (Pressing Q exits to the command prompt)

After the boot code has been written to a floppy disk, entering BOOT (or simply powering on when using DragonDOS 4.x) loads and runs the AUTOEXEC.BAS file (if present on the disk).

EDIT: Attachment removed.

Re: Autoboot file

Posted: Wed Sep 10, 2014 10:57 am
by jltursan
Wow, thanks zephyr!, looks like an extremely useful tool!

I must explain that I need it to finish a development toolchain. I've plans to cross-develop some programs from Windows, inject the files into a disk image and boot the emulator with it. Using the autoboot feature I can run any program without interaction.

Re: Autoboot file

Posted: Fri Sep 12, 2014 12:16 pm
by zephyr
Version 1.1 boot code is shorter and works with all currently available DragonDOS compatible ROMs (excluding DOSPlus 4.8 which fails to boot ANY DragonDOS bootable disk).

Code: Select all

10 ' DRAGONDOS AUTOBOOT V1.1
20 ' BY STEVE EVANS (ZEPHYR)
30 ' 12TH SEPTEMBER, 2014
40 '
50 FOR I=&H200 TO &H239:READ A$:X=VAL("&H"+A$):CH=CH+X:POKE I,X:NEXT
60 IF CH<>5212 THEN PRINT"ERROR IN DATA LINES.":END
70 CLS:PRINT@225,"HIT 'SPACE' TO WRITE BOOT CODE"
80 A$=INKEY$:IF A$="" THEN 80
90 IF A$=" "THEN CLS:PRINT"WRITING BOOT CODE...":EXEC&H200:GOTO70
100 IF A$="Q"THEN CLS:END ELSE 80
110 DATA 8E,0,3,9F,EC,30,8D,0,16,9F,EE,34,10,BD,C1,1,35,10,30,89,1,0,C,ED,96,ED,81,1B,25,EB
120 DATA 39,4F,53,8E,26,9,9F,A6,7E,83,7D,52,55,4E,22,41,55,54,4F,45,58,45,43,2E,42,41,53,22

Re: Autoboot file

Posted: Sat Sep 13, 2014 7:03 pm
by tormod
jltursan wrote:I must explain that I need it to finish a development toolchain. I've plans to cross-develop some programs from Windows, inject the files into a disk image and boot the emulator with it. Using the autoboot feature I can run any program without interaction.
XRoar can load and run a variety of files with the -run option. I use it for cross-developing together with lwasm. Although not a Dragon format, the DECB format is very handy here. lwasm can write a .bin file in DECB format with lwasm --format=decb and then this can be loaded (and run) directly by XRoar.

Re: Autoboot file

Posted: Fri Sep 26, 2014 10:55 pm
by jltursan
I'm trying to load the attached DEMODISK.VDK into XRoar and I'm having some strange problems.

Using the following command line:

Code: Select all

xroar -machine dragon64 -extbas d64_1.rom -altbas d64_2.rom -machine-cart dragondos -cart-rom ddos40.rom -force-crc-match -joy-left 0,0:1:0 -kbd-translate -load demodisk.vdk
Xroar doesn't boot the disk and I'm not able to do a DIR (it must display 2 files, I've already tested that the disk image works), it always throwns an "?IV ERROR".
I'm very confused with the use of Xroar's "-load" and "-run" commands, the first one has worked for me only with one disk image from at least, four of them tested. For example, the ones created with DragonTools always thrown the above error :(

Re: Autoboot file

Posted: Sat Sep 27, 2014 11:40 am
by pser1
Hello José Luis,
pleased to talk to you here too.
I have copied you sentence in a bat file and it works for me, it simply starts XRoar and then loads the requested VDK image.
This way when I enter a DIR commnad I can see all of the files in this VDK.
Of course the VDK file has to be placed in the same folder where Xroar is ...
Maybe you could upload here the image you are testing with, so that we could have a look and test it too.

saludos
pere

Re: Autoboot file

Posted: Sat Sep 27, 2014 11:59 am
by jltursan
Hi Pere!

DEMODISK.VDK is included in the attachment a couple of post ago.
The command worked for me with only one VDK image so I guess it's correct; but I don't now why it refuses to read the other images. All of them work if I insert them using CTRL+1 once Xroar is already running.

I'm specially interested in DEMODISK.VDK as it has the autoboot code already written, this way I can clone it to create other autoboot disk without using the BASIC program to generate the boot code.

Re: Autoboot file

Posted: Sat Sep 27, 2014 12:30 pm
by pser1
back again José Luis,

this is the bat file I am using and it works flawlessly ... the game begins automatically on opening XRoar (double clicking on the bat file, I mean):

Code: Select all

cd..
copy ..\XRoar\DOS-ROMs\ddos11c.rom ddos40.rom
copy ..\XRoar\ROMs\d64rom1V31.rom d64_1.rom
copy ..\XRoar\ROMs\d64rom2V31.rom d64_2.rom
xroar -machine dragon64 -extbas d64_1.rom -altbas d64_2.rom -machine-cart dragondos -cart-rom ddos40.rom -force-crc-match -disk-write-back -joy-left 0,0:1:0 -kbd-translate -run demodisk.vdk
del *.rom
I have copied the file DEMODISK.VDK in the same folder where XRoar.exe is.
If I use -load instead of -run, then I can see the contents of the disk (2 files) with the DIR command.
By the way, I use XRoar version 0.32 snapshot 36030 for w64, the last one at:
http://www.6809.org.uk/tmp/xroar/

cheers
pere