~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to src/mame/drivers/ksys573.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1258
1258
        return ret;
1259
1259
}
1260
1260
 
1261
 
static DRIVER_INIT( konami573 )
1262
 
{
1263
 
        ksys573_state *state = machine.driver_data<ksys573_state>();
1264
 
 
1265
 
        psx_driver_init(machine);
1266
 
        atapi_init(machine);
1267
 
 
1268
 
        state->save_item( NAME(state->m_n_security_control) );
1269
 
 
1270
 
        flash_init(machine);
1271
 
}
1272
 
 
1273
 
static MACHINE_RESET( konami573 )
1274
 
{
1275
 
        ksys573_state *state = machine.driver_data<ksys573_state>();
1276
 
 
1277
 
        if( state->machine().device<device_secure_serial_flash>("install_eeprom") )
1278
 
        {
1279
 
                /* security cart */
1280
 
                psx_sio_input( machine, 1, PSX_SIO_IN_DSR, PSX_SIO_IN_DSR );
1281
 
        }
1282
 
 
1283
 
        state->m_flash_bank = -1;
1284
 
}
1285
 
 
1286
 
static void spu_irq(device_t *device, UINT32 data)
1287
 
{
1288
 
        if (data)
1289
 
        {
1290
 
                psx_irq_set(device->machine(), 1<<9);
1291
 
        }
1292
 
}
1293
 
 
1294
1261
static void update_mode( running_machine &machine )
1295
1262
{
1296
1263
        ksys573_state *state = machine.driver_data<ksys573_state>();
1323
1290
        }
1324
1291
}
1325
1292
 
1326
 
static INTERRUPT_GEN( sys573_vblank )
1327
 
{
1328
 
        ksys573_state *state = device->machine().driver_data<ksys573_state>();
 
1293
static DRIVER_INIT( konami573 )
 
1294
{
 
1295
        ksys573_state *state = machine.driver_data<ksys573_state>();
 
1296
 
 
1297
        psx_driver_init(machine);
 
1298
        atapi_init(machine);
 
1299
 
 
1300
        state->save_item( NAME(state->m_n_security_control) );
 
1301
 
 
1302
        flash_init(machine);
 
1303
}
 
1304
 
 
1305
static MACHINE_RESET( konami573 )
 
1306
{
 
1307
        ksys573_state *state = machine.driver_data<ksys573_state>();
 
1308
 
 
1309
        if( state->machine().device<device_secure_serial_flash>("install_eeprom") )
 
1310
        {
 
1311
                /* security cart */
 
1312
                psx_sio_input( machine, 1, PSX_SIO_IN_DSR, PSX_SIO_IN_DSR );
 
1313
        }
 
1314
 
 
1315
        state->m_flash_bank = -1;
 
1316
 
 
1317
        update_mode(machine);
 
1318
}
 
1319
 
 
1320
static void spu_irq(device_t *device, UINT32 data)
 
1321
{
 
1322
        if (data)
 
1323
        {
 
1324
                psx_irq_set(device->machine(), 1<<9);
 
1325
        }
 
1326
}
 
1327
 
 
1328
void sys573_vblank(ksys573_state *state, screen_device &screen, bool vblank_state)
 
1329
{
1329
1330
        UINT32 *p_n_psxram = state->m_p_n_psxram;
1330
1331
 
1331
 
        update_mode(device->machine());
 
1332
        update_mode(state->machine());
1332
1333
 
1333
 
        if( strcmp( device->machine().system().name, "ddr2ml" ) == 0 )
 
1334
        if( strcmp( state->machine().system().name, "ddr2ml" ) == 0 )
1334
1335
        {
1335
1336
                /* patch out security-plate error */
1336
1337
 
1352
1353
                        p_n_psxram[ 0x1f850 / 4 ] = 0x08007e22;
1353
1354
                }
1354
1355
        }
1355
 
        else if( strcmp( device->machine().system().name, "ddr2mla" ) == 0 )
 
1356
        else if( strcmp( state->machine().system().name, "ddr2mla" ) == 0 )
1356
1357
        {
1357
1358
                /* patch out security-plate error */
1358
1359
 
1363
1364
                        p_n_psxram[ 0x1f850 / 4 ] = 0x08007e22;
1364
1365
                }
1365
1366
        }
1366
 
 
1367
 
        psx_vblank(device);
1368
1367
}
1369
1368
 
1370
1369
/*
2959
2958
        /* basic machine hardware */
2960
2959
        MCFG_CPU_ADD( "maincpu", CXD8530CQ, XTAL_67_7376MHz )
2961
2960
        MCFG_CPU_PROGRAM_MAP( konami573_map )
2962
 
        MCFG_CPU_VBLANK_INT("screen", sys573_vblank)
2963
2961
 
2964
2962
        MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( cdrom_dma_read ), (ksys573_state *) owner ) )
2965
2963
        MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( cdrom_dma_write ), (ksys573_state *) owner ) )
2977
2975
        MCFG_FUJITSU_29F016A_ADD("onboard.7")
2978
2976
 
2979
2977
        /* video hardware */
2980
 
        MCFG_SCREEN_ADD("screen", RASTER)
2981
 
        MCFG_SCREEN_REFRESH_RATE( 60 )
2982
 
        MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC( 0 ))
2983
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2984
 
        MCFG_SCREEN_SIZE( 1024, 1024 )
2985
 
        MCFG_SCREEN_VISIBLE_AREA( 0, 639, 0, 479 )
2986
 
        MCFG_SCREEN_UPDATE( psx )
2987
 
 
2988
 
        MCFG_PALETTE_LENGTH( 65536 )
2989
 
 
2990
 
        MCFG_PALETTE_INIT( psx )
2991
 
        MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8561Q, 0 )
 
2978
        MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8561Q, 0x200000, XTAL_53_693175MHz )
 
2979
        MCFG_PSXGPU_VBLANK_CALLBACK( vblank_state_delegate( FUNC( sys573_vblank ), (ksys573_state *) owner ) )
2992
2980
 
2993
2981
        /* sound hardware */
2994
2982
        MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
5338
5326
GAME( 2000, dsfdr,    sys573,   k573dxzi,     ddr,       ddrdigital, ROT0, "Konami", "Dancing Stage Featuring Disney's Rave (GCA37JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5339
5327
GAME( 2000, ddrusa,   sys573,   k573dx,       ddr,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution USA (G*A44 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5340
5328
GAME( 2000, ddr4mp,   sys573,   pccard2dxzi,  ddr,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus (G*A34 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5341
 
GAME( 2000, ddr4mps,  sys573,   pccard2dxzi,  ddrsolo,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus Solo (G*A34 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
 
5329
GAME( 2000, ddr4mps,  sys573,   pccard2dxzi,  ddrsolo,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus Solo (G*A34 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5342
5330
GAME( 2000, dmx2m,    sys573,   k573dzi,      dmx,       dmx,        ROT0, "Konami", "Dance Maniax 2nd Mix (G*A39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5343
5331
GAME( 2000, drmn4m,   sys573,   k573dzi,      drmn,      drmndigital,ROT0, "Konami", "DrumMania 4th Mix (G*A25 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5344
5332
GAME( 2001, gtrfrk5m, sys573,   pccard1dzi,   gtrfrks,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 5th Mix (G*A26 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */