I just toyed a bit more
Build 6801 Disassembler - My choice was dasmfw (Seems to be a newer version of f9dasm)
https://github.com/Arakula/dasmfwDisassembling the provided ROM Binary , using dasmfw
-
#Convenience macros off , and comment = '*' * makes as01 happy
./dasmfw -dasm 6801 -noaddr -nohex -noasc -cchar '*' -conv off -cref on -info S00060G.nfo -out S00060G.asm -offset E000 S00060G.bin
Now code is in : S00060G.asm
Fixup a few disassembly quirks ... I have no idea why the below 4 Labels are referred to , but not created.
Add the below labels somewhere in the S00060G.asm , i chose just before "Program's Code areas"
It will look like this when you are done
MAABA EQU $AABA
*
* Disassembler Missing labels to add to the source before assembling
*
MF0FF EQU $F0FF
MF61D EQU $F61D
MFB1E EQU $FB1E
MFFFF EQU $FFFF
*
* Disassembler Missing labels end
*
*****************************************************
* Program's Code Areas
*****************************************************
Clean a lot of the FCB $00 lines , near the end of the program.
No worries , the aseembler will fill the area with $00's when creating the binary. And it is neded for a "MC6809 trick comming in a while"
Near the "Label MFD43" , you will see the last line that contains anything but $00 - The line containing : FCB $02,$00,$0F,$00 .......
Delete all Lines , until the first line containing : FDB M0000
Just above the line containing : FDB M0000
Insert an : ORG $FFF0 - To put the vectors back in place
It will look like this when you are done
MFD43 FCB $FF,$00,$00,$01
FCC ":"
FCB $00,$C0,$03,$C0,$03,$C0
FCC "D"
FCB $0F,$FF,$FF,$FF,$FF,$FF,$FF,$FF
FCC "A"
FCB $02,$00,$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
* Delete a "kazilion" FCB $00 lines here
ORG $FFF0
FDB M0000
FDB M0000
FDB M0000
FDB M0000
FDB vec_IRQ_EXT
FDB vec_RST
FDB vec_IRQ_EXT
FDB vec_RST
Now the soure should be ready for the assembler
I tried the below first , works fine for mc6801 & mc6809 , but can't generate mc6809 code from mc6801 source , the Aracula A09 can do that.
https://github.com/JimInCA/motorola-6800-assemblerBuild the Arakula A09 68xx assembler
https://github.com/Arakula/A09Copy your "modified" disassembler source code (S00060G.asm) to the Aracule "Binary dir"
Build both MC6801 & MC6809 binaries from the source
M6801
s:~/tmp/6802-bin/assemblers/a09/A09-master$ ./a09 -oM01 S00060G.asm -lS00060G-01.asm.lst -bS00060G-01.bin
M6809
s:~/tmp/6802-bin/assemblers/a09/A09-master$ ./a09 -oM09 S00060G.asm -lS00060G-09.asm.lst -bS00060G-09.bin
Verify that the MC6801 binary is equal to the original binary , diff in "-b" binary mode will only output something if the files are different
diff -b S00060G.bin S00060G-01.bin
Now you should have both a MC6801 bin and a MC6809 bin , built from an "Available source code"
For the MC6809 - You might want to correct the FIRQ Vector at the end , or make it Reset the beast...
Read up on FIRQ, if you ever use it. It won't save any registers for you , in IRQ entry or restore on exit.
That ought to be the only thing to observe on the MC6809.
The attached A09-Sources , is not A09 related (that's on github)
It is the disassembled source , and the listings + bins from the A09 assembler.
Edit: Added the missing disassembler "definition nfo file" - copy to the dasmfw dir
Edit2: I hope you use linux
/Bingo