Previous Thread
Next Thread
Print Thread
#102232 - 10/26/15 10:49 AM Apple II the Mill 6809 card  
Joined: Oct 2015
Posts: 8
robj Offline
Member
robj  Offline
Member

Joined: Oct 2015
Posts: 8
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.

Any one have any ideas why?

Thanks
Rob

#102233 - 10/26/15 12:22 PM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Mar 2001
Posts: 15,711
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,711
USA
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.

#102248 - 10/26/15 11:19 PM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Oct 2015
Posts: 8
robj Offline
Member
robj  Offline
Member

Joined: Oct 2015
Posts: 8
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.

#102249 - 10/27/15 01:24 AM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Mar 2001
Posts: 15,711
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,711
USA
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.

#102250 - 10/27/15 02:37 AM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Oct 2015
Posts: 8
robj Offline
Member
robj  Offline
Member

Joined: Oct 2015
Posts: 8
ok, no problems, that would be great. Maybe a adding second version of the card with the os9 map enabled would be easier than recompiling.

The correct map is:
6809 0x0000-0x7fff -> 6502 0x1000-0x8fff
6809 0x8000-0xafff -> 6502 0xd000-0xffff
6809 0xb000-0xbfff -> 6502 0xc000-0xcfff
6809 0xc000-0xcfff -> 6502 0x0000-0x0fff
6809 0xd000-0xffff -> 6502 0x9000-0xbfff

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


Thanks
Rob

#102263 - 10/27/15 02:21 PM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Mar 2001
Posts: 15,711
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,711
USA
Thanks for the correct info! With that and a fix for the 6809 running at startup, OS-9 boots fine on the apple2e driver.


#102286 - 10/28/15 10:37 AM Re: Apple II the Mill 6809 card [Re: robj]  
Joined: Oct 2015
Posts: 8
robj Offline
Member
robj  Offline
Member

Joined: Oct 2015
Posts: 8
Cool, Thank you for updating it!


Who's Online Now
3 registered members (Pernod, Edstrom, ICEknight), 23 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,413
Posts108,956
Members4,757
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.032s Queries: 14 (0.013s) Memory: 4.9774 MB (Peak: 5.1775 MB) Zlib enabled. Server Time: 2017-09-26 21:35:31 UTC