Hi, I am trying to get The Mill 6809 card going with the apple2 emulation, and not having any luck. It seems to me that the 6809 is not halted and is running even though the startup setting for the card has both reset and halt lines asserted.
There's some weirdness with MAME's startup order where it's actually very hard to halt an add-on card's CPU, but the 6502 telling the 6809 to reset should get it back in a known state well enough to run.
Also, the Mill could be configured (by switching a PAL) to two different memory maps: an original one, which most of the software uses (e.g. their test BASIC program), and an OS-9 optimized one that's incompatible with the other software but boots OS-9. I could never get OS-9 to boot, even with a known-good startup disk and my memory mapping verified by the guy who emulated the Mill for the Carte Blanche.
Currently this is switchable only by fiddling with the source; changing m_6809Mode to be initialized to true will enable the OS-9 mapping; as-is it defaults to the mapping the ProDOS demo disk wants.
I have played previously with the os9 map enabled, and was coming back to this again to try it. The os9 map needs to be corrected as its wrong in the current implementation.
What seems to be happening is that due to the 6809 still 'running' it interacts with the 6502 memory space and changes content. I added a workaround to the mill card to disable dma reads and write if the processor is halted and this works ok for the basic test program, but does not allow os9 to boot correctly when recompiled with the correct os9 map. I think that for os9, it must halt the 6809 for some I/O functions done by the 6502 and due to it not halting, it keeps running and this causes issues. I have been able to boot os9 on an older version of mess. I'll go fishing to see what version it did work with.
Halting the 6809 should work properly after startup, its only at startup that there's a problem (the core appears to reset the Mill card device, and then reset the 6809, which releases the halt). Halting the Z80 and 6502 with the SoftCard works perfectly, for instance - CP/M wouldn't boot if both processors didn't halt and resume properly.
If you could let me know what the correct map is for OS-9 I could probably fix the rest of the issues, since I was able to make the Softcard work.
This was found on a disk image with source code for making 6809 programs for the mill, here is the extract: ************************************************ * * APPLE II REMAPPING ROM, V1.0 (1/82) * * THE BELOW SYMBOLS MUST BE USED IN DRIVERS, ETC * TO ACCESS MEMORY WITHIN 6502 SPACE. * REMAP0 SET $C000 6502'S 0XXX = CXXX FOR 6809 REMAP1 SET $0000 6502'S 1XXX = 0XXX FOR 6809 REMAP2 SET REMAP1+$1000 REMAP3 SET REMAP2+$1000 REMAP4 SET REMAP3+$1000 REMAP5 SET REMAP4+$1000 REMAP6 SET REMAP5+$1000 REMAP7 SET REMAP6+$1000 REMAP8 SET REMAP7+$1000 REMAP9 SET $D000 START OF OS9 (TOP 12K OF 48K) REMAPA SET REMAP9+$1000 REMAPB SET REMAPA+$1000 REMAPC SET $B000 APPLE CARD SLOTS & I/O FIRMWARE REMAPD SET $8000 WITHIN OPTIONAL RAM CARD REMAPE SET REMAPD+$1000 ALSO RAM CARD REMAPF SET $A000 RAM CARD OR ROM