~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
      Super Puzzle Bobble (Japan)
307
307
      Usagi
308
308
 
 
309
Type 3 (PCMCIA Compact Flash Adaptor + Compact Flash card, sealed together with the game?s label)
 
310
------
 
311
 
 
312
       The Compact Flash card is read protected, it is a custom Sandisk SDCFB-64 Card (64MByte)
 
313
 
 
314
       Confirmed usage on.... (not all games listed)
 
315
       Otenami Haiken Final
 
316
       Kollon
 
317
       Zooo
309
318
*/
310
319
 
311
320
#include "driver.h"
315
324
#include "machine/intelfsh.h"
316
325
#include "machine/znsec.h"
317
326
#include "machine/idectrl.h"
 
327
#include "machine/mb3773.h"
318
328
#include "sound/psx.h"
319
329
 
320
330
 
328
338
static void rf5c296_reg_w(ATTR_UNUSED running_machine *machine, UINT8 reg, UINT8 data)
329
339
{
330
340
        //  fprintf(stderr, "rf5c296_reg_w %02x, %02x (%s)\n", reg, data, cpuexec_describe_context(machine));
 
341
        switch (reg)
 
342
        {
 
343
                // Interrupt and General Control Register
 
344
                case 0x03:
 
345
                        // Check for card reset
 
346
                        if (!(data & 0x40))
 
347
                        {
 
348
                                devtag_reset(machine, "card");
 
349
                                locked = 0x1ff;
 
350
                                ide_set_gnet_readlock (devtag_get_device(machine, "card"), 1);
 
351
                        }
 
352
                break;
 
353
 
 
354
                default:
 
355
                break;
 
356
        }
331
357
}
332
358
 
333
359
static UINT8 rf5c296_reg_r(ATTR_UNUSED running_machine *machine, UINT8 reg)
397
423
                        pos++;
398
424
                } else
399
425
                        v = data;
400
 
                chd_get_metadata(get_disk_handle("card"), HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
 
426
                chd_get_metadata(get_disk_handle(space->machine, "card"), HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
401
427
                k = pos < 5 ? key[pos] : 0;
402
428
                if(v == k)
403
429
                        locked &= ~(1 << pos);
404
430
                else
405
431
                        locked |= 1 << pos;
 
432
                if (!locked) {
 
433
                        ide_set_gnet_readlock (devtag_get_device(space->machine, "card"), 0);
 
434
                }
406
435
        }
407
436
}
408
437
 
519
548
        // selection too, but they're always 0.
520
549
 
521
550
        UINT32 p = control;
 
551
        const device_config *mb3773 = devtag_get_device(space->machine, "mb3773");
 
552
 
522
553
        COMBINE_DATA(&control);
523
554
 
 
555
        mb3773_set_ck(mb3773, 0, (control & 0x20) >> 5);
 
556
 
524
557
#if 0
525
558
        if((p ^ control) & ~0x20)
526
559
                fprintf(stderr, "control = %c%c.%c %c%c%c%c (%s)\n",
551
584
static WRITE32_HANDLER(control3_w)
552
585
{
553
586
        COMBINE_DATA(&control3);
554
 
 
555
 
        // card reset, maybe
556
 
        if(control3 & 2) {
557
 
                devtag_reset(space->machine, "card");
558
 
                locked = 0x1ff;
559
 
        }
560
587
}
561
588
 
562
589
static READ32_HANDLER(gn_1fb70000_r)
807
834
        dip_timer = timer_alloc(machine,  dip_timer_fired, NULL );
808
835
 
809
836
        memset(cis, 0xff, 512);
810
 
        chd_get_metadata(get_disk_handle("card"), PCMCIA_CIS_METADATA_TAG, 0, cis, 512, 0, 0, 0);
 
837
        if (get_disk_handle(machine, "card") != NULL)
 
838
                chd_get_metadata(get_disk_handle(machine, "card"), PCMCIA_CIS_METADATA_TAG, 0, cis, 512, 0, 0, 0);
811
839
}
812
840
 
813
841
static DRIVER_INIT( coh3002t_mp )
824
852
        control = 0;
825
853
        psx_machine_init(machine);
826
854
        devtag_reset(machine, "card");
 
855
        ide_set_gnet_readlock(devtag_get_device(machine, "card"), 1);
827
856
}
828
857
 
829
858
static ADDRESS_MAP_START( zn_map, ADDRESS_SPACE_PROGRAM, 32 )
830
 
        AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_SHARE(1) AM_BASE(&g_p_n_psxram) AM_SIZE(&g_n_psxramsize) /*
831
 
 ram */
 
859
        AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_SHARE(1) AM_BASE(&g_p_n_psxram) AM_SIZE(&g_n_psxramsize) /* ram */
832
860
        AM_RANGE(0x00400000, 0x007fffff) AM_RAM AM_SHARE(1) /* ram mirror */
833
861
        AM_RANGE(0x1f000000, 0x1f1fffff) AM_READWRITE(flash_s1_r, flash_s1_w)
834
862
        AM_RANGE(0x1f200000, 0x1f3fffff) AM_READWRITE(flash_s2_r, flash_s2_w)
918
946
        MDRV_AT28C16_ADD( "at28c16", 0 )
919
947
        MDRV_IDE_CONTROLLER_ADD( "card", 0 )
920
948
        MDRV_NVRAM_HANDLER( coh3002t )
 
949
 
 
950
        MDRV_MB3773_ADD("mb3773")
921
951
MACHINE_DRIVER_END
922
952
 
923
953
static INPUT_PORTS_START( coh3002t )
1032
1062
INPUT_PORTS_END
1033
1063
 
1034
1064
 
1035
 
//    ROM_LOAD( "flashv2.u30",    0x000000, 0x200000, CRC(f624ebf8) SHA1(be84ef1b083f819f3ab13c983c52bca97bb908ef) )
 
1065
//
 
1066
 
 
1067
#define ROM_LOAD16_WORD_BIOS(bios,name,offset,length,hash) \
 
1068
                ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_BIOS(bios+1)) /* Note '+1' */
1036
1069
 
1037
1070
#define TAITOGNET_BIOS \
1038
1071
        ROM_REGION32_LE( 0x080000, "mainbios", 0 ) \
1039
1072
        ROM_LOAD( "coh-3002t.353", 0x000000, 0x080000, CRC(03967fa7) SHA1(0e17fec2286e4e25deb23d40e41ce0986f373d49) ) \
1040
 
\
1041
1073
        ROM_REGION16_LE( 0x200000, "subbios", 0 ) \
1042
 
    ROM_LOAD( "flash.u30",     0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \
 
1074
        ROM_SYSTEM_BIOS( 0, "v1",   "G-NET Bios v1" ) \
 
1075
        ROM_LOAD16_WORD_BIOS(0, "flash.u30", 0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \
 
1076
        ROM_SYSTEM_BIOS( 1, "v2",   "G-NET Bios v2" ) \
 
1077
        ROM_LOAD16_WORD_BIOS(1, "flashv2.u30", 0x000000, 0x200000, CRC(CAE462D3) SHA1(f1b10846a8423d9fe021191c5876190857c3d2a4) ) \
1043
1078
        ROM_REGION32_LE( 0x80000,  "soundcpu", 0) \
1044
1079
        ROM_FILL( 0, 0x80000, 0xff) \
1045
1080
        ROM_REGION32_LE( 0x600000, "samples", 0) \
1080
1115
        DISK_IMAGE( "chaosheat", 0, SHA1(c13b7d7025eee05f1f696d108801c7bafb3f1356))
1081
1116
ROM_END
1082
1117
 
1083
 
ROM_START(chaoshej)
 
1118
ROM_START(chaosheaj)
1084
1119
        TAITOGNET_BIOS
1085
1120
 
1086
1121
        DISK_REGION( "card" )
1103
1138
        DISK_IMAGE( "spuzbobl", 0, SHA1(1b1c72fb7e5656021485fefaef8f2ba48e2b4ea8))
1104
1139
ROM_END
1105
1140
 
1106
 
ROM_START(spuzbobj)
 
1141
ROM_START(spuzboblj)
1107
1142
        TAITOGNET_BIOS
1108
1143
 
1109
1144
        DISK_REGION( "card" )
1138
1173
        DISK_IMAGE( "kollon", 0, SHA1(d8ea5b5b0ee99004b16ef89883e23de6c7ddd7ce))
1139
1174
ROM_END
1140
1175
 
 
1176
ROM_START(kollonc)
 
1177
        TAITOGNET_BIOS
 
1178
        ROM_DEFAULT_BIOS( "v2" )
 
1179
 
 
1180
        DISK_REGION( "card" )
 
1181
        DISK_IMAGE( "kollonc", 0, SHA1(ce62181659701cfb8f7c564870ab902be4d8e060)) /* Original Taito Compact Flash version */
 
1182
ROM_END
 
1183
 
1141
1184
ROM_START(shikigam)
1142
1185
        TAITOGNET_BIOS
1143
1186
 
1184
1227
        DISK_IMAGE( "zokuoten", 0, SHA1(5ce13db00518f96af64935176c71ec68d2a51938))
1185
1228
ROM_END
1186
1229
 
 
1230
ROM_START(otenamhf)
 
1231
        TAITOGNET_BIOS
 
1232
        ROM_DEFAULT_BIOS( "v2" )
 
1233
 
 
1234
        DISK_REGION( "card" )
 
1235
        DISK_IMAGE( "otenamhf", 0, SHA1(5b15c33bf401e5546d78e905f538513d6ffcf562)) /* Original Taito Compact Flash version */
 
1236
ROM_END
1187
1237
 
1188
1238
 
1189
1239
 
1241
1291
/* A dummy driver, so that the bios can be debugged, and to serve as */
1242
1292
/* parent for the coh-3002t.353 file, so that we do not have to include */
1243
1293
/* it in every zip file */
1244
 
GAME( 1997, taitogn,  0, coh3002t, coh3002t, coh3002t, ROT0, "Sony/Taito", "Taito GNET", GAME_IS_BIOS_ROOT )
1245
 
 
1246
 
GAME( 1998, chaoshea, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Chaos Heat (V2.09O)", 0 )
1247
 
GAME( 1998, chaoshej, chaoshea, coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Chaos Heat (V2.08J)", 0 )
1248
 
GAME( 1998, raycris,  taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Ray Crisis (V2.03J)", 0 )
1249
 
GAME( 1999, spuzbobl, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.05O)", 0 )
1250
 
GAME( 1999, spuzbobj, spuzbobl, coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.04J)", 0 )
1251
 
GAME( 1999, gobyrc,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Go By RC (V2.03O)", GAME_NOT_WORKING ) // custom inputs need calibrating
1252
 
GAME( 1999, rcdego,   gobyrc,   coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "RC De Go (V2.03J)", GAME_NOT_WORKING ) // custom inputs need calibrating
1253
 
GAME( 1999, flipmaze, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito/Moss", "Flip Maze (V2.04J)", 0 )
1254
 
GAME( 2001, shikigam, taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito/Alfa System", "Shikigami no Shiro (V2.03J)", 0 )
1255
 
GAME( 2003, sianniv,  taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", GAME_NOT_WORKING ) // IRQ at the wrong time
1256
 
GAME( 2003, kollon,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Kollon (V2.04J)", 0 )
1257
 
 
1258
 
GAME( 1999, otenamih, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Otenami Haiken (V2.04J)", 0 )
1259
 
GAME( 2000, psyvaria, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J)", 0 )
1260
 
GAME( 2000, psyvarrv, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Revision- (V2.04J)", 0 )
1261
 
GAME( 2000, zokuoten, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zoku Otenamihaiken (V2.03J)", 0 )
1262
 
GAME( 2004, zooo,     taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zooo (V2.01J)", GAME_NOT_WORKING ) // missing most of the playfield
1263
 
 
1264
 
GAME( 1999, mahjngoh, taitogn, coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Mahjong Oh (V2.06J)", 0 )
1265
 
GAME( 2001, usagi,    taitogn, coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Usagi (V2.02J)", 0 )
1266
 
GAME( 2000, soutenry, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Soutenryu (V2.07J)", 0 )
1267
 
GAME( 2000, shanghss, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Shanghai Shoryu Sairin (V2.03J)", 0 )
1268
 
GAME( 2002, shangtou, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Warashi/Sunsoft/Taito", "Shanghai Sangokuhai Tougi (Ver 2.01J)", 0 )
1269
 
 
1270
 
GAME( 2001, nightrai, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Takumi", "Night Raid (V2.03J)", GAME_NOT_WORKING ) // no background / enemy sprites
1271
 
GAME( 2001, otenki,   taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Takumi", "Otenki Kororin (V2.01J)", 0 )
1272
 
 
1273
 
GAME( 2002, xiistag,  taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Triangle Service", "XII Stag (V2.01J)", 0 )
1274
 
 
1275
 
 
1276
 
 
 
1294
GAME( 1997, taitogn,  0,        coh3002t, coh3002t, coh3002t, ROT0,   "Sony/Taito", "Taito GNET", GAME_IS_BIOS_ROOT )
 
1295
 
 
1296
GAME( 1998, chaoshea, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Chaos Heat (V2.09O)", GAME_IMPERFECT_SOUND )
 
1297
GAME( 1998, chaosheaj,chaoshea, coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Chaos Heat (V2.08J)", GAME_IMPERFECT_SOUND )
 
1298
GAME( 1998, raycris,  taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Ray Crisis (V2.03J)", GAME_IMPERFECT_SOUND )
 
1299
GAME( 1999, spuzbobl, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.05O)", GAME_IMPERFECT_SOUND )
 
1300
GAME( 1999, spuzboblj,spuzbobl, coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.04J)", GAME_IMPERFECT_SOUND )
 
1301
GAME( 1999, gobyrc,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Go By RC (V2.03O)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // custom inputs need calibrating
 
1302
GAME( 1999, rcdego,   gobyrc,   coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "RC De Go (V2.03J)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // custom inputs need calibrating
 
1303
GAME( 1999, flipmaze, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito/Moss", "Flip Maze (V2.04J)", GAME_IMPERFECT_SOUND )
 
1304
GAME( 2001, shikigam, taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito/Alfa System", "Shikigami no Shiro (V2.03J)", GAME_IMPERFECT_SOUND )
 
1305
GAME( 2003, sianniv,  taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // IRQ at the wrong time
 
1306
GAME( 2003, kollon,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Kollon (V2.04J)", GAME_IMPERFECT_SOUND )
 
1307
GAME( 2003, kollonc,  kollon,   coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Kollon (V2.04JC)", GAME_IMPERFECT_SOUND )
 
1308
 
 
1309
GAME( 1999, otenamih, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Otenami Haiken (V2.04J)", GAME_IMPERFECT_SOUND )
 
1310
GAME( 2005, otenamhf, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Success/Warashi", "Otenami Haiken Final (V2.07JC)", GAME_IMPERFECT_SOUND )
 
1311
GAME( 2000, psyvaria, taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J)", GAME_IMPERFECT_SOUND )
 
1312
GAME( 2000, psyvarrv, taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Revision- (V2.04J)", GAME_IMPERFECT_SOUND )
 
1313
GAME( 2000, zokuoten, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zoku Otenamihaiken (V2.03J)", GAME_IMPERFECT_SOUND )
 
1314
GAME( 2004, zooo,     taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zooo (V2.01J)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // missing most of the playfield
 
1315
 
 
1316
GAME( 1999, mahjngoh, taitogn,  coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Mahjong Oh (V2.06J)", GAME_IMPERFECT_SOUND )
 
1317
GAME( 2001, usagi,    taitogn,  coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Usagi (V2.02J)", GAME_IMPERFECT_SOUND )
 
1318
GAME( 2000, soutenry, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Soutenryu (V2.07J)", GAME_IMPERFECT_SOUND )
 
1319
GAME( 2000, shanghss, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Shanghai Shoryu Sairin (V2.03J)", GAME_IMPERFECT_SOUND )
 
1320
GAME( 2002, shangtou, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Warashi/Sunsoft/Taito", "Shanghai Sangokuhai Tougi (Ver 2.01J)", GAME_IMPERFECT_SOUND )
 
1321
 
 
1322
GAME( 2001, nightrai, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Takumi", "Night Raid (V2.03J)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // no background / enemy sprites
 
1323
GAME( 2001, otenki,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Takumi", "Otenki Kororin (V2.01J)", GAME_IMPERFECT_SOUND )
 
1324
 
 
1325
GAME( 2002, xiistag,  taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Triangle Service", "XII Stag (V2.01J)", GAME_IMPERFECT_SOUND )