mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
apple2: fixed OS-9 mapping mode for "The Mill" 6809 card; OS-9 boots now. (nw, will WNSS later)]
This commit is contained in:
parent
1899788b97
commit
cface963e2
@ -7,21 +7,18 @@
|
||||
Implementation of the Stellation Two The Mill 6809 card
|
||||
|
||||
The OS9 add-on changes the address mapping as follows:
|
||||
6809 0x0000-0xafff -> 6502 0x1000-0xbfff
|
||||
6809 0xb000-0xdfff -> 6502 0xd000-0xffff
|
||||
6809 0xe000-0xefff -> 6502 0xc000-0xcfff
|
||||
6809 0xf000-0xffff -> 6502 0x0000-0x0fff
|
||||
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
|
||||
|
||||
(reference: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mill.6809 )
|
||||
(reference: "6809.txt" on one of the disks for The Mill)
|
||||
|
||||
ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
|
||||
the disc and type "-DEMO1" and press Enter to launch the simple demo.
|
||||
|
||||
The OS9 disk image available around the internet seems to be bad - the
|
||||
6809 boot vector is 0x4144 which maps to 6502 0x5144 and there's all
|
||||
zeros from 6502 1000-8fff. There is valid 6809 code from 9000-BFFF
|
||||
at the point where it wants to boot the 6809, but I don't know what
|
||||
is supposed to be the entry point.
|
||||
TODO: Add DIP switch to select standard and OS-9 modes.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
@ -103,7 +100,7 @@ void a2bus_themill_device::device_reset()
|
||||
{
|
||||
m_bEnabled = false;
|
||||
m_flipAddrSpace = false;
|
||||
m_6809Mode = false;
|
||||
m_6809Mode = true;
|
||||
m_status = 0xc0; // OS9 loader relies on this
|
||||
m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
@ -238,31 +235,33 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8
|
||||
|
||||
READ8_MEMBER( a2bus_themill_device::dma_r )
|
||||
{
|
||||
// MAME startup ordering has the 6809 free-running at boot, which is undesirable
|
||||
if (!m_bEnabled)
|
||||
{
|
||||
m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if (m_6809Mode)
|
||||
{
|
||||
if (offset <= 0xafff)
|
||||
if (offset <= 0x7fff)
|
||||
{
|
||||
return slot_dma_read(space, offset+0x1000);
|
||||
}
|
||||
else if (offset <= 0xafff)
|
||||
{
|
||||
return slot_dma_read(space, (offset&0x3fff) + 0xd000);
|
||||
}
|
||||
else if (offset <= 0xbfff)
|
||||
{
|
||||
return slot_dma_read(space, (offset&0xfff) + 0xd000);
|
||||
}
|
||||
else if (offset <= 0xcfff)
|
||||
{
|
||||
return slot_dma_read(space, (offset&0xfff) + 0xe000);
|
||||
}
|
||||
else if (offset <= 0xdfff)
|
||||
{
|
||||
return slot_dma_read(space, (offset&0xfff) + 0xf000);
|
||||
}
|
||||
else if (offset <= 0xefff)
|
||||
{
|
||||
return slot_dma_read(space, (offset&0xfff) + 0xc000);
|
||||
}
|
||||
else // 6809 Fxxx -> 6502 ZP
|
||||
else if (offset <= 0xcfff) // 6809 Cxxx -> 6502 ZP
|
||||
{
|
||||
return slot_dma_read(space, offset&0xfff);
|
||||
return slot_dma_read(space, (offset&0xfff));
|
||||
}
|
||||
else // 6809 Dxxx -> 6502 9000
|
||||
{
|
||||
return slot_dma_read(space, (offset-0xd000)+0x9000);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -289,29 +288,25 @@ WRITE8_MEMBER( a2bus_themill_device::dma_w )
|
||||
{
|
||||
if (m_6809Mode)
|
||||
{
|
||||
if (offset <= 0xafff)
|
||||
if (offset <= 0x7fff)
|
||||
{
|
||||
slot_dma_write(space, offset+0x1000, data);
|
||||
}
|
||||
else if (offset <= 0xafff)
|
||||
{
|
||||
slot_dma_write(space, (offset&0x3fff) + 0xd000, data);
|
||||
}
|
||||
else if (offset <= 0xbfff)
|
||||
{
|
||||
slot_dma_write(space, (offset&0xfff) + 0xd000, data);
|
||||
}
|
||||
else if (offset <= 0xcfff)
|
||||
{
|
||||
slot_dma_write(space, (offset&0xfff) + 0xe000, data);
|
||||
}
|
||||
else if (offset <= 0xdfff)
|
||||
{
|
||||
slot_dma_write(space, (offset&0xfff) + 0xf000, data);
|
||||
}
|
||||
else if (offset <= 0xefff)
|
||||
{
|
||||
slot_dma_write(space, (offset&0xfff) + 0xc000, data);
|
||||
}
|
||||
else // 6809 Fxxx -> 6502 ZP
|
||||
else if (offset <= 0xcfff)
|
||||
{
|
||||
slot_dma_write(space, offset&0xfff, data);
|
||||
slot_dma_write(space, (offset&0xfff), data);
|
||||
}
|
||||
else // 6809 Dxxx -> 6502 9000
|
||||
{
|
||||
slot_dma_write(space, (offset-0xd000)+0x9000, data);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user