genesis svp

This commit is contained in:
alyosha-tas 2017-04-16 16:14:32 -04:00 committed by GitHub
parent b92f6d5aca
commit e1ea3e622b
2 changed files with 17 additions and 5 deletions

View File

@ -3,7 +3,7 @@
* Main 68k bus handlers
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -416,7 +416,19 @@ unsigned int ctrl_io_read_byte(unsigned int address)
case 0x44: /* RADICA */
case 0x50: /* SVP */
{
return m68k_read_bus_8(address);
if ((address & 0xFC) == 0x00)
{
unsigned int data = svp->ssp1601.gr[SSP_XST].byte.h;
return (address & 1) ? (data & 0xFF) : (data >> 8);
}
if ((address & 0xFE) == 0x04)
{
unsigned int data = svp->ssp1601.gr[SSP_PM0].byte.h;
svp->ssp1601.gr[SSP_PM0].byte.h &= ~1;
return (address & 1) ? (data & 0xFF) : (data >> 8);
}
return m68k_read_bus_8(address);
}
default: /* Invalid address */
@ -532,12 +544,12 @@ unsigned int ctrl_io_read_word(unsigned int address)
case 0x50: /* SVP */
{
if ((address & 0xFD) == 0)
if ((address & 0xFC) == 0x00)
{
return svp->ssp1601.gr[SSP_XST].byte.h;
}
if ((address & 0xFF) == 4)
if ((address & 0xFE) == 0x04)
{
unsigned int data = svp->ssp1601.gr[SSP_PM0].byte.h;
svp->ssp1601.gr[SSP_PM0].byte.h &= ~1;

View File

@ -3,7 +3,7 @@
* Main 68k bus handlers
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: