Previous 15994 Revisions Next

r879 Sunday 26th August, 2007 at 16:42:24 UTC by Dirk Best
[AMIGA] Made battery backed-up RTC support configurable.
[docs]messnew.txt
[src/mess/drivers]amiga.c

src/mess/drivers/amiga.c
r878r879
4646   AM_RANGE(0xbfd000, 0xbfefff) AM_READWRITE(amiga_cia_r, amiga_cia_w)
4747   AM_RANGE(0xc00000, 0xc7ffff) AM_RAM /* slow-mem */
4848   AM_RANGE(0xc80000, 0xcfffff) AM_READWRITE(amiga_custom_r, amiga_custom_w)   /* see Note 1 above */
49   AM_RANGE(0xdc0000, 0xdc003f) AM_READWRITE(amiga_clock_r, amiga_clock_w);
5049   AM_RANGE(0xdf0000, 0xdfffff) AM_READWRITE(amiga_custom_r, amiga_custom_w) AM_BASE(&amiga_custom_regs)   /* Custom Chips */
5150   AM_RANGE(0xe80000, 0xe8ffff) AM_READWRITE(amiga_autoconfig_r, amiga_autoconfig_w)
5251#if AMIGA_ACTION_REPLAY_1
r878r879
9796   AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0xc0000) AM_RAMBANK(1) AM_BASE(&amiga_chip_ram) AM_SIZE(&amiga_chip_ram_size)
9897   AM_RANGE(0xbfd000, 0xbfefff) AM_READWRITE(amiga_cia_r, amiga_cia_w)
9998   AM_RANGE(0xc00000, 0xc3ffff) AM_READWRITE(amiga_custom_r, amiga_custom_w) /* See Note 1 above */
100   AM_RANGE(0xdc0000, 0xdc003f) AM_READWRITE(amiga_clock_r, amiga_clock_w);
10199   AM_RANGE(0xdf0000, 0xdfffff) AM_READWRITE(amiga_custom_r, amiga_custom_w) AM_BASE(&amiga_custom_regs)   /* Custom Chips */
102100   AM_RANGE(0xe80000, 0xe8ffff) AM_READWRITE(amiga_autoconfig_r, amiga_autoconfig_w)
103101   AM_RANGE(0xf80000, 0xfbffff) AM_ROM AM_REGION(REGION_USER1, 0)   /* Bootstrap ROM */
104102   AM_RANGE(0xfc0000, 0xffffff) AM_RAMBANK(2)   /* Writable Control Store RAM */
105103ADDRESS_MAP_END
106104
105
107106/***************************************************************************
108107  Inputs
109108***************************************************************************/
110109
111INPUT_PORTS_START( amiga )
112   PORT_START_TAG("config")
110
111INPUT_PORTS_START( amiga_common )
112   PORT_START_TAG("input")
113113   PORT_CONFNAME( 0x20, 0x00, "Input Port 0 Device")
114114   PORT_CONFSETTING( 0x00, "Mouse" )
115115   PORT_CONFSETTING( 0x20, DEF_STR(Joystick) )
116116   PORT_CONFNAME( 0x10, 0x10, "Input Port 1 Device")
117117   PORT_CONFSETTING( 0x00, "Mouse" )
118118   PORT_CONFSETTING( 0x10, DEF_STR(Joystick) )
119   
119
120120   PORT_START_TAG("CIA0PORTA")
121121   PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_SPECIAL )
122122   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
r878r879
165165     
166166INPUT_PORTS_END
167167
168
169INPUT_PORTS_START( amiga )
170   PORT_START_TAG("hardware")
171   PORT_CONFNAME( 0x08, 0x08, "Battery backed-up RTC")
172   PORT_CONFSETTING( 0x00, "Not Installed" )
173   PORT_CONFSETTING( 0x08, "Installed" )
174   
175   PORT_INCLUDE( amiga_common )
176INPUT_PORTS_END
177
178
179/* TODO: Support for the CDTV remote control */
180INPUT_PORTS_START( cdtv )
181   PORT_INCLUDE( amiga_common )
182INPUT_PORTS_END
183
184
185
168186/***************************************************************************
169187  Machine drivers
170188***************************************************************************/
r878r879
282300
283301static UINT16 amiga_read_joy0dat(void)
284302{
285   if ( readinputportbytag("config") & 0x20 ) {
303   if ( readinputportbytag("input") & 0x20 ) {
286304      /* Joystick */
287305      return readinputportbytag_safe("JOY0DAT", 0xffff);
288306   } else {
r878r879
296314
297315static UINT16 amiga_read_joy1dat(void)
298316{
299   if ( readinputportbytag("config") & 0x10 ) {
317   if ( readinputportbytag("input") & 0x10 ) {
300318      /* Joystick */
301319      return readinputportbytag_safe("JOY1DAT", 0xffff);
302320   } else {
r878r879
321339   }
322340}
323341
342static void amiga_reset(void)
343{
344   if (readinputportbytag("hardware") & 0x08)
345   {
346      /* Install RTC */
347      memory_install_readwrite16_handler(0, ADDRESS_SPACE_PROGRAM, 0xdc0000, 0xdc003f, 0, 0, amiga_clock_r, amiga_clock_w);
348   }
349   else
350   {
351      /* No RTC support */
352      memory_install_readwrite16_handler(0, ADDRESS_SPACE_PROGRAM, 0xdc0000, 0xdc003f, 0, 0, MRA16_UNMAP, MWA16_UNMAP);
353   }
354}
355
324356static DRIVER_INIT( amiga )
325357{
326358   static const amiga_machine_interface amiga_intf =
r878r879
335367      amiga_read_dskbytr,   amiga_write_dsklen,  /* dskbytr_r & dsklen_w */
336368      NULL,                                    /* serdat_w */
337369      NULL,                                    /* scanline0_callback */
338      NULL                                     /* reset_callback */
370      amiga_reset                              /* reset_callback */
339371   };
340372
341373   amiga_machine_config(&amiga_intf);
r878r879
451483COMP(  1985, a1000p,   a1000n,           0,       a1000p,  amiga,   amiga,   amiga,   "Commodore Business Machines Co.",  "Commodore Amiga 1000 (PAL-OCS)", GAME_COMPUTER | GAME_IMPERFECT_GRAPHICS )
452484COMPB( 1987, a500n,    0,       amiga,   0,       ntsc,    amiga,   amiga,   amiga,   "Commodore Business Machines Co.",  "Commodore Amiga 500 (NTSC-OCS)", GAME_COMPUTER | GAME_IMPERFECT_GRAPHICS )
453485COMPB( 1987, a500p,    a500n,   amiga,   0,       pal,     amiga,   amiga,   amiga,   "Commodore Business Machines Co.",  "Commodore Amiga 500 (PAL-OCS)", GAME_COMPUTER | GAME_IMPERFECT_GRAPHICS )
454COMP(  1991, cdtv,     0,                0,       cdtv,    amiga,   cdtv,    cdtv,    "Commodore Business Machines Co.",  "Commodore Amiga CDTV 1.0 (NTSC)", GAME_COMPUTER | GAME_IMPERFECT_GRAPHICS )
486COMP(  1991, cdtv,     0,                0,       cdtv,    cdtv,    cdtv,    cdtv,    "Commodore Business Machines Co.",  "Commodore Amiga CDTV 1.0 (NTSC)", GAME_COMPUTER | GAME_IMPERFECT_GRAPHICS )
docs/messnew.txt
r878r879
1313
1414- [AMIGA] Added cdrom support, marked as working but with imperfect graphics,
1515  added CDDA audio.  Bug fix to FDC.  [Ernesto Corvi]
16 
16
17- [AMIGA] Made battery backed-up RTC support configurable.  [Dirk Best]
18
1719- [MK1] Fixed interrupt issues and re-enabled driver.  [Wilbert Pol]
1820
1921- [X68000] Supported more BIOSes, sprite fixes, made SRAM executable and added

Previous 15994 Revisions Next


© 1998-2018 The MESS Team