Hi - I've got some raw binary data I want to load into Xroar, so I'd like to convert into a DECB .bin file (so I can simply say xroar -load stuff.bin). I've scoured the archive, and I can find almost every other type of conversion tool but this one - I'm guessing it's as simple as adding a few bytes of header info at the start? But I'm struggling to find a spec. I would be ever so grateful if someone could point me in the right direction!
Many thanks in advance, Tony
raw binary to DECB ...
Re: raw binary to DECB ...
Hi Tony,
it needs a 5 bytes header and a 5 bytes trailer at the end
The Header is:
- byte 0 -> always $00
- bytes 1-2 -> The Length of the file
- bytes 3-4 -> The Load address
And the trailer:
- byte 0 -> always $FF
- bytes 1-2 -> by now $0000 (maybe intended for Stack value before execution ...)
- bytes 3-4 -> execute address
cheers
pere
it needs a 5 bytes header and a 5 bytes trailer at the end
The Header is:
- byte 0 -> always $00
- bytes 1-2 -> The Length of the file
- bytes 3-4 -> The Load address
And the trailer:
- byte 0 -> always $FF
- bytes 1-2 -> by now $0000 (maybe intended for Stack value before execution ...)
- bytes 3-4 -> execute address
cheers
pere
Re: raw binary to DECB ...
Hello Tony,
I wrote the header and trailer that are the CoCo standard.
XRoar loads them into a Dragon emulation with no problems.
But if you wanted to add the Dragon std Header (no trailer)
It has this structure:
Byte 0 -> always $55
byte 1 -> $02 for Binary files
bytes 2-3 - Load Address
bytes 4-5 - Length of file
bytes 6-7 - Execute Address
byte 8 -> always $AA
cheers
pere
I wrote the header and trailer that are the CoCo standard.
XRoar loads them into a Dragon emulation with no problems.
But if you wanted to add the Dragon std Header (no trailer)
It has this structure:
Byte 0 -> always $55
byte 1 -> $02 for Binary files
bytes 2-3 - Load Address
bytes 4-5 - Length of file
bytes 6-7 - Execute Address
byte 8 -> always $AA
cheers
pere
Re: raw binary to DECB ...
Oh, just to let you know Pere, that worked perfectly! Thanks!
Re: raw binary to DECB ...
glad to know,
you are welcome!
cheers
pere
you are welcome!
cheers
pere
Re: raw binary to DECB ...
The best reference for these things are Graham's files at http://dragon32.info/info/