Autoboot file

A place to discuss everything Dragon related that doesn't fall into the other categories.
User avatar
jltursan
Posts: 15
Joined: Thu Jun 06, 2013 7:04 pm

Autoboot file

Post 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 :(
admin
Site Admin
Posts: 410
Joined: Thu Jul 17, 2008 10:22 pm

Re: Autoboot file

Post by admin »

No - there is nothing in the DragonDOS rom that looks for any sort of boot file.
Simon Hardy
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Autoboot file

Post 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.
Last edited by zephyr on Fri Sep 12, 2014 12:19 pm, edited 4 times in total.
User avatar
jltursan
Posts: 15
Joined: Thu Jun 06, 2013 7:04 pm

Re: Autoboot file

Post 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.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Autoboot file

Post 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
Attachments
DOSABOOT_1-1.zip
(6.16 KiB) Downloaded 223 times
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Autoboot file

Post 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.
User avatar
jltursan
Posts: 15
Joined: Thu Jun 06, 2013 7:04 pm

Re: Autoboot file

Post 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 :(
pser1
Posts: 1668
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Autoboot file

Post 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
User avatar
jltursan
Posts: 15
Joined: Thu Jun 06, 2013 7:04 pm

Re: Autoboot file

Post 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.
pser1
Posts: 1668
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Autoboot file

Post 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
Post Reply