Page 1 of 1

Loading files into Xroar....

Posted: Fri Jul 19, 2019 11:21 pm
by prime
Hi All,

Is there a way of loading files that have a DragonDos header into Xroar....not here I don't mean from a disk image! Files in theis format are what the DragonMMC uses for files saved direct to the FAT filesystem with MLOAD / MSAVE. The format of the header is :

Byte(s) Purpose
$00 Start marker ($55)
$01 File type, $01=Basic, $02=Binary
$02-$03 Load address
$04-$05 Length
$06-$07 Exec address
$08 End marker ($AA)

MAME / MESS can't load these files natively, but a version with the debugger enabled I can drop to the debugger console and use the load command to load the file at load address - header len with something like :

load rgbtest.dgn, 6ff7,400

In this case the load address was $7000 with the second number being the maximum number of bytes to load.

Is there a way of doing this in XRoar?

Cheers.

Phill.

Re: Loading files into Xroar....

Posted: Sat Jul 20, 2019 2:18 am
by Pernod70
prime wrote: Fri Jul 19, 2019 11:21 pm MAME / MESS can't load these files natively, but a version with the debugger enabled I can drop to the debugger console and use the load command to load the file at load address - header len with something like :
I could easily add native support for these using the Quickload option. Can you post a couple of sample files?

Re: Loading files into Xroar....

Posted: Sat Jul 20, 2019 8:47 am
by sixxie
Just use File->Load or File->Run. XRoar recognises initial $55 (in a file with ".bin" extension) as DragonDOS and parses the header. You should then find it in memory...

(FWIW, if it sees an initial $00, it tries it as a CoCo RS-DOS binary instead)

Oh, and BASIC files not supported yet... Should probably look into that!

Re: Loading files into Xroar....

Posted: Sat Jul 20, 2019 7:21 pm
by prime
Pernod70 wrote: Sat Jul 20, 2019 2:18 am
prime wrote: Fri Jul 19, 2019 11:21 pm MAME / MESS can't load these files natively, but a version with the debugger enabled I can drop to the debugger console and use the load command to load the file at load address - header len with something like :
I could easily add native support for these using the Quickload option. Can you post a couple of sample files?
Sure here you go :
DGNFiles.zip
Test files
(11.71 KiB) Downloaded 353 times
ROMMELS.DGN is the Game "Rommel's Revenge"
RGBTEST.DGN is my graphics mode tester.

Both are filetype binary.

Cheers.

Phill.

Re: Loading files into Xroar....

Posted: Sat Jul 20, 2019 7:22 pm
by prime
sixxie wrote: Sat Jul 20, 2019 8:47 am Just use File->Load or File->Run. XRoar recognises initial $55 (in a file with ".bin" extension) as DragonDOS and parses the header. You should then find it in memory...

(FWIW, if it sees an initial $00, it tries it as a CoCo RS-DOS binary instead)

Oh, and BASIC files not supported yet... Should probably look into that!
Yeah that worked when I renamed them to bin. Would it be possible to add the extensions .DGN and .CCO so this format is recognized in files with those extensions, as that is what DragonMMC uses by default.

Would make testing things on emulators easier...... :)

Cheers.

Phill.

Re: Loading files into Xroar....

Posted: Sun Jul 21, 2019 8:49 am
by sixxie
prime wrote: Sat Jul 20, 2019 7:22 pm Yeah that worked when I renamed them to bin. Would it be possible to add the extensions .DGN and .CCO so this format is recognized in files with those extensions, as that is what DragonMMC uses by default.
Possibly... .dgn is searched for when looking for system ROMs (in case someone only has the headered versions required by PC-Dragon/T3), but it's actually not registered as normal file format to "load", so nothing stopping it having different meanings in the different contexts.

Straw poll though: does anyone actually rely on .dgn files for their system ROMs? Has anyone ever relied on them?

..ciaran

Re: Loading files into Xroar....

Posted: Sun Jul 21, 2019 2:55 pm
by Sarah
Yes all my ROM files are that format. :lol:

Re: Loading files into Xroar....

Posted: Sun Jul 21, 2019 3:18 pm
by sixxie
Haha :)

But presumably even you keep headerless versions around for MAME - which I don't think ever respected your authoritah in that regard...

Re: Loading files into Xroar....

Posted: Sun Jul 21, 2019 3:54 pm
by Sarah
I've never used it; to be honest I'm not following recent emulators & don't know what they support.

Re: Loading files into Xroar....

Posted: Sun Jul 21, 2019 5:09 pm
by sixxie
Well, no reason to get rid of the search for .dgn when finding ROMs (or the header skipping).

But also I guess no reason to stop .dgn and .cco being handled the same as .bin.

Snapshots here...

..ciaran