Previous 15994 Revisions Next

r14400 Thursday 9th February, 2012 at 10:36:13 UTC by Miodrag Milanović
Sync with MAME r15344 (no whatsnew)
[src/emu]emu.mak
[src/emu/drivers]xtal.h
[src/emu/machine]idectrl.c idectrl.h nscsi_bus.c* nscsi_bus.h* nscsi_cd.c* nscsi_cd.h* nscsi_hd.c* nscsi_hd.h*
[src/mame]mame.lst mame.mak
[src/mame/drivers]30test.c 8080bw.c calchase.c chihiro.c cobra.c djmain.c funkball.c gamecstl.c jaguar.c kinst.c kungfur.c mediagx.c midqslvr.c midvunit.c qdrmfgp.c queen.c savquest.c seattle.c taitogn.c taitowlf.c twinkle.c vegas.c viper.c xtom3d.c zn.c
[src/mame/layout]30test.lay kungfur.lay*
[src/mess/drivers]apple2.c bebox.c
[src/mess/machine]isa_ide.c
[src/mess/machine/ti99]tn_ide.c

src/mame/mame.lst
r14399r14400
13441344blueshrk      // 742 [1978]
13451345invad2ct      // 851 (c) 1980 Midway
13461346invadpt2      // 852 [1980] Taito
1347invadpt2br      // Taito do Brasil
13471348invaddlx      // 852 [1980] Midway
13481349vortex         // 852 [1980] Zilec Electronics Ltd.
13491350moonbase      // Taito
src/mame/mame.mak
r14399r14400
19971997
19981998$(DRIVERS)/kingdrby.o:   $(LAYOUT)/kingdrby.lh
19991999
2000$(DRIVERS)/kungfur.o:   $(LAYOUT)/kungfur.lh
2001
20002002$(DRIVERS)/lazercmd.o:   $(LAYOUT)/lazercmd.lh
20012003
20022004$(DRIVERS)/luckgrln.o:   $(LAYOUT)/luckgrln.lh
src/mame/layout/30test.lay
r14399r14400
1616   </element>
1717
1818   <view name="Simple LEDs">
19      <screen index="0">
20         <bounds left="0" top="0" right="3.2" bottom="4.3" />
21      </screen>
19      <bounds left="0" top="0" right="3.4" bottom="4.3" />
2220
2321
22<!-- the grid -->
23
2424      <bezel name="digit0" element="digit">
2525         <bounds x="0.0" y="1.3" width="0.2" height="0.3" />
2626      </bezel>
r14399r14400
299299      </bezel>
300300
301301
302<!-- time -->
302303
303
304304      <bezel name="digit60" element="digit">
305305         <bounds x="0.0" y="0.9" width="0.2" height="0.2" />
306306      </bezel>
r14399r14400
318318      </bezel>
319319
320320
321<!-- today's highscores -->
321322
322323      <bezel name="digit64" element="digit">
323324         <bounds x="0.9" y="0.3" width="0.2" height="0.2" />
r14399r14400
346347      </bezel>
347348
348349
350<!-- score -->
351
349352      <bezel name="digit70" element="digit">
350353         <bounds x="0.0" y="0.3" width="0.4" height="0.4" />
351354      </bezel>
r14399r14400
354357         <bounds x="0.4" y="0.3" width="0.4" height="0.4" />
355358      </bezel>
356359
360
361<!-- ranking -->
362
357363      <bezel name="lamp0" element="rank">
358364         <bounds x="1.5" y="0.3" width="0.1" height="0.1" />
359365      </bezel>
src/mame/layout/kungfur.lay
r0r14400
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="digit" defstate="0">
4      <led7seg>
5         <color red="1.0" green="0.0" blue="0.0" />
6      </led7seg>
7   </element>
8
9   <view name="Simple LEDs">
10   <screen index="0">
11      <bounds left="0" right="200" top="0" bottom="200" />
12   </screen>
13
14
15   </view>
16</mamelayout>
src/mame/drivers/mediagx.c
r14399r14400
11471147
11481148   MCFG_PIC8259_ADD( "pic8259_slave", mediagx_pic8259_2_config )
11491149
1150   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
1150   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
11511151
11521152   MCFG_TIMER_ADD("sound_timer", sound_timer_callback)
11531153
r14399r14400
13261326   ROM_REGION(0x08100, "gfx1", 0)
13271327   ROM_LOAD("cga.chr",     0x00000, 0x01000, CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd))
13281328
1329   DISK_REGION( "ide" )
1329   DISK_REGION( "drive_0" )
13301330   DISK_IMAGE( "a51site4", 0, SHA1(48496666d1613700ae9274f9a5361ea5bbaebea0) )
13311331ROM_END
13321332
src/mame/drivers/zn.c
r14399r14400
14761476static MACHINE_CONFIG_DERIVED( coh1000w, zn1_2mb_vram )
14771477   MCFG_MACHINE_RESET( coh1000w )
14781478
1479   MCFG_IDE_CONTROLLER_ADD("ide", atpsx_interrupt)
1479   MCFG_IDE_CONTROLLER_ADD("ide", atpsx_interrupt, ide_devices, "hdd", NULL)
14801480   MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( atpsx_dma_read ), (zn_state *) owner ) )
14811481   MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( atpsx_dma_write ), (zn_state *) owner ) )
14821482MACHINE_CONFIG_END
r14399r14400
21602160
21612161   MCFG_MACHINE_RESET( coh1000a )
21622162
2163   MCFG_IDE_CONTROLLER_ADD("ide", jdredd_ide_interrupt)
2163   MCFG_IDE_CONTROLLER_ADD("ide", jdredd_ide_interrupt, ide_devices, "hdd", NULL)
21642164MACHINE_CONFIG_END
21652165
21662166/*
r14399r14400
44784478
44794479   ROM_REGION32_LE( 0x0400000, "user3", ROMREGION_ERASE00 )
44804480
4481   DISK_REGION( "ide" )
4481   DISK_REGION( "drive_0" )
44824482   DISK_IMAGE("bam2", 0, SHA1(634d9a745a82c567fc4d7ce48e3570d88326c5f9) )
44834483ROM_END
44844484
r14399r14400
45024502   ROM_LOAD16_BYTE( "pr2_036.u17",  0x100001, 0x080000, CRC(3681516c) SHA1(714f73ea4ac190c36a6eb2308616a4aecabc4e69) )
45034503   ROM_LOAD16_BYTE( "pr2_036.u15",  0x100000, 0x080000, CRC(4b24bd54) SHA1(7f27cd524d10e5869aab6d4dc6a4217d049c475d) )
45044504
4505   DISK_REGION( "ide" )
4505   DISK_REGION( "drive_0" )
45064506   DISK_IMAGE( "primrag2", 0, SHA1(bc615068ddf4fd967f770ee01c02f285c052c4c5) )
45074507ROM_END
45084508
r14399r14400
45544554   ROM_LOAD16_BYTE( "j-dread.u36",  0x000001, 0x020000, CRC(37addbf9) SHA1(a4061a1ba9e230f080f0bfea69bf77efe9264a92) )
45554555   ROM_LOAD16_BYTE( "j-dread.u35",  0x000000, 0x020000, CRC(c1e17191) SHA1(82901439b1a51b9aadb4df4b9d944f26697a1460) )
45564556
4557   DISK_REGION( "ide" )
4557   DISK_REGION( "drive_0" )
45584558   DISK_IMAGE( "jdreddc", 0, SHA1(eee205f83e5f590f8baf36452c873d7063156bd0) )
45594559ROM_END
45604560
r14399r14400
45654565   ROM_LOAD16_BYTE( "j-dread.u36",  0x000001, 0x020000, CRC(37addbf9) SHA1(a4061a1ba9e230f080f0bfea69bf77efe9264a92) )
45664566   ROM_LOAD16_BYTE( "j-dread.u35",  0x000000, 0x020000, CRC(c1e17191) SHA1(82901439b1a51b9aadb4df4b9d944f26697a1460) )
45674567
4568   DISK_REGION( "ide" )
4568   DISK_REGION( "drive_0" )
45694569   DISK_IMAGE( "jdreddb", 0, SHA1(20f696fa6e1fbf97793bac2a794631c5dd4fb39a) )
45704570ROM_END
45714571
src/mame/drivers/kungfur.c
r14399r14400
2525Information:
2626http://www.wshin.com/games/review/ka/kung-fu-roushi.htm
2727http://www.youtube.com/watch?v=ssEfw-RbSjs
28http://www.youtube.com/watch?v=1YacVjpUG8g
2829
2930
3031----------------------------------------------------------------
r14399r14400
3637#include "sound/msm5205.h"
3738#include "machine/8255ppi.h"
3839
40#include "kungfur.lh"
3941
42
4043class kungfur_state : public driver_device
4144{
4245public:
r14399r14400
406409   ROM_LOAD( "kr6.bin",   0x00000, 0x10000, CRC(9ea75d4a) SHA1(57445ccb961acb11a25cdac81f2e543d92bcb7f9) )
407410ROM_END
408411
409GAME( 1987, kungfur,  0,       kungfur,  kungfur,  0, ROT0, "Namco", "Kung Fu Roushi", GAME_NOT_WORKING | GAME_MECHANICAL)
412GAMEL(1987, kungfur,  0,       kungfur,  kungfur,  0, ROT0, "Namco", "Kung-Fu Roshi", GAME_NOT_WORKING, layout_kungfur)
src/mame/drivers/viper.c
r14399r14400
20042004   MCFG_PCI_BUS_DEVICE(0, "mpc8240", mpc8240_pci_r, mpc8240_pci_w)
20052005   MCFG_PCI_BUS_DEVICE(12, "voodoo", voodoo3_pci_r, voodoo3_pci_w)
20062006
2007   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
2007   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
20082008   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, 8, "screen")
20092009   MCFG_3DFX_VOODOO_CPU("maincpu")
20102010   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank)
r14399r14400
20712071
20722072   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
20732073
2074   DISK_REGION( "ide" )
2074   DISK_REGION( "drive_0" )
20752075   DISK_IMAGE( "ppp2nd", 0, SHA1(b8b90483d515c83eac05ffa617af19612ea990b0))
20762076ROM_END
20772077
r14399r14400
20822082   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
20832083   ROM_LOAD("a45jaa_nvram.u39", 0x00000, 0x2000, CRC(c24e29fc) SHA1(efb6ecaf25cbdf9d8dfcafa85e38a195fa5ff6c4))
20842084
2085   DISK_REGION( "ide" )
2085   DISK_REGION( "drive_0" )
20862086   DISK_IMAGE( "a45a02", 0, SHA1(9af2481f53de705ae48fad08d8dd26553667c2d0) )
20872087ROM_END
20882088
r14399r14400
20922092   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
20932093   ROM_LOAD("nvram.u39", 0x00000, 0x2000, NO_DUMP )
20942094
2095   DISK_REGION( "ide" )
2095   DISK_REGION( "drive_0" )
20962096   DISK_IMAGE( "922d02", 0, SHA1(01f35e324c9e8567da0f51b3e68fff1562c32116) )
20972097ROM_END
20982098
r14399r14400
21022102   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21032103   ROM_LOAD("nvram.u39", 0x00000, 0x2000, NO_DUMP )
21042104
2105   DISK_REGION( "ide" )
2105   DISK_REGION( "drive_0" )
21062106   DISK_IMAGE( "922b02", 0, SHA1(4d288b5dcfab3678af662783e7083a358eee99ce) )
21072107ROM_END
21082108
r14399r14400
21132113   ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(d0604e84) SHA1(18d1183f1331af3e655a56692eb7ab877b4bc239)) //old dump, probably has non-default settings.
21142114   ROM_LOAD("941jab_nvram.u39", 0x00000, 0x2000, CRC(6c4a852f) SHA1(2753dda42cdd81af22dc6780678f1ddeb3c62013))
21152115
2116   DISK_REGION( "ide" )
2116   DISK_REGION( "drive_0" )
21172117   DISK_IMAGE( "941b02", 0,  SHA1(943bc9b1ea7273a8382b94c8a75010dfe296df14) )
21182118ROM_END
21192119
r14399r14400
21232123   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21242124   ROM_LOAD("941eaa_nvram.u39", 0x00000, 0x2000, CRC(5ee7004d) SHA1(92e0ce01049308f459985d466fbfcfac82f34a47))
21252125
2126   DISK_REGION( "ide" )
2126   DISK_REGION( "drive_0" )
21272127   DISK_IMAGE( "941a02", 0,  NO_DUMP )
21282128ROM_END
21292129
r14399r14400
21332133   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21342134   ROM_LOAD("b41ebc_nvram.u39", 0x00000, 0x2000, CRC(55d1681d) SHA1(26868cf0d14f23f06b81f2df0b4186924439bb43))
21352135
2136   DISK_REGION( "ide" )
2136   DISK_REGION( "drive_0" )
21372137   DISK_IMAGE( "b41c02", 0, SHA1(fb6b0b43a6f818041d644bcd711f6a727348d3aa) )
21382138ROM_END
21392139
r14399r14400
21442144   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21452145   ROM_LOAD("b33uaa_nvram.u39", 0x00000, 0x1ff8, BAD_DUMP CRC(0f0ba988) SHA1(5618c03b21fc2ba14b2e159cee3aab7f53c2c34d)) //data looks plain bad (compared to the other games)
21462146
2147   DISK_REGION( "ide" )
2147   DISK_REGION( "drive_0" )
21482148   DISK_IMAGE( "b33a02", 0, SHA1(819d8fac5d2411542c1b989105cffe38a5545fc2) )
21492149ROM_END
21502150
r14399r14400
21542154   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21552155   ROM_LOAD("a29aaa_nvram.u39", 0x000000, 0x2000, CRC(14b9fe68) SHA1(3c59e6df1bb46bc1835c13fd182b1bb092c08759)) //supposed to be aab version?
21562156
2157   DISK_REGION( "ide" )
2157   DISK_REGION( "drive_0" )
21582158   DISK_IMAGE( "a29b02", 0, SHA1(f0c04310caf2cca804fde20805eb30a44c5a6796) ) //missing bootloader
21592159ROM_END
21602160
r14399r14400
21642164   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21652165   ROM_LOAD("a29jaa_nvram.u39", 0x000000, 0x2000, CRC(2f7cdf27) SHA1(0b69d8728be12909e235268268a312982f81d46a))
21662166
2167   DISK_REGION( "ide" )
2167   DISK_REGION( "drive_0" )
21682168   DISK_IMAGE( "a29a02", 0, SHA1(00afad399737652b3e17257c70a19f62e37f3c97) )
21692169ROM_END
21702170
r14399r14400
21742174   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21752175   ROM_LOAD("a00uad_nvram.u39", 0x000000, 0x2000, CRC(cca056ca) SHA1(de1a00d84c1311d48bbe6d24f5b36e22ecf5e85a))
21762176
2177   DISK_REGION( "ide" )
2177   DISK_REGION( "drive_0" )
21782178   DISK_IMAGE( "a00uad02", 0, SHA1(6acb8dc41920e7025b87034a3a62b185ef0109d9) )
21792179ROM_END
21802180
r14399r14400
21842184   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21852185   ROM_LOAD("a00uac_nvram.u39", 0x000000, 0x2000,  NO_DUMP )
21862186
2187   DISK_REGION( "ide" )
2187   DISK_REGION( "drive_0" )
21882188   DISK_IMAGE( "a00uac02", 0, SHA1(b268789416dbf8886118a634b911f0ee254970de) )
21892189ROM_END
21902190
r14399r14400
21942194   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
21952195   ROM_LOAD("a00kac_nvram.u39", 0x000000, 0x2000,  CRC(8ddc921c) SHA1(901538da237679fc74966a301278b36d1335671f) )
21962196
2197   DISK_REGION( "ide" )
2197   DISK_REGION( "drive_0" )
21982198   DISK_IMAGE( "a00kac02", 0, SHA1(b268789416dbf8886118a634b911f0ee254970de) )
21992199ROM_END
22002200
r14399r14400
22042204   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22052205   ROM_LOAD("a00eaa_nvram.u39", 0x000000, 0x2000,  CRC(4f3497b6) SHA1(3045c54f98dff92cdf3a1fc0cd4c76ba82d632d7) )
22062206
2207   DISK_REGION( "ide" )
2207   DISK_REGION( "drive_0" )
22082208   DISK_IMAGE( "a00eaa02", 0, SHA1(81565a2dce2e2b0a7927078a784354948af1f87c) )
22092209ROM_END
22102210
r14399r14400
22142214   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22152215   ROM_LOAD("a00jaa_nvram.u39", 0x000000, 0x2000, CRC(9ecf70dc) SHA1(4769a99b0cc28563e219860b8d480f32d1e21f60))
22162216
2217   DISK_REGION( "ide" )
2217   DISK_REGION( "drive_0" )
22182218   DISK_IMAGE( "a00jac02", 0, SHA1(d962d3a8ea84c380767d0fe336296911c289c224) )
22192219ROM_END
22202220
r14399r14400
22242224   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22252225   ROM_LOAD("nvram.u39", 0x000000, 0x2000, NO_DUMP )
22262226
2227   DISK_REGION( "ide" )
2227   DISK_REGION( "drive_0" )
22282228   DISK_IMAGE( "b11a02", 0, SHA1(57665664321b78c1913d01f0d2c0b8d3efd42e04) )
22292229ROM_END
22302230
r14399r14400
22342234   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22352235   ROM_LOAD("nvram.u39", 0x000000, 0x2000, NO_DUMP )
22362236
2237   DISK_REGION( "ide" )
2237   DISK_REGION( "drive_0" )
22382238   DISK_IMAGE( "c00jab", 0, BAD_DUMP SHA1(3763aaded9b45388a664edd84a3f7f8ff4101be4) )
22392239ROM_END
22402240
r14399r14400
22442244   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22452245   ROM_LOAD("a13uaa_nvram.u39", 0x000000, 0x2000, CRC(7b0e1ac8) SHA1(1ea549964539e27f87370e9986bfa44eeed037cd))
22462246
2247   DISK_REGION( "ide" )
2247   DISK_REGION( "drive_0" )
22482248   DISK_IMAGE( "a13c02", 0, SHA1(d740784fa51a3f43695ea95e23f92ef05f43284a) )
22492249ROM_END
22502250
r14399r14400
22562256   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22572257   ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(2f325c55) SHA1(0bc44f40f981a815c8ce64eae95ae55db510c565))
22582258
2259   DISK_REGION( "ide" )
2259   DISK_REGION( "drive_0" )
22602260   DISK_IMAGE( "a13b02", 0, SHA1(c25a61b76d365794c2da4a9e7de88a5519e944ec) )
22612261ROM_END
22622262
r14399r14400
22672267   ROM_LOAD("a41ebb_nvram.u39", 0x00000, 0x2000, CRC(22f59ac0) SHA1(e14ea2ba95b72edf0a3331ab82c192760bfdbce3))
22682268//  a41eba_nvram == a41ebb_nvram
22692269
2270   DISK_REGION( "ide" )
2270   DISK_REGION( "drive_0" )
22712271   DISK_IMAGE( "a41b02", 0, SHA1(0426f4bb9001cf457f44e2c22e3d7575b8049aa3) )
22722272ROM_END
22732273
r14399r14400
22772277   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22782278   ROM_LOAD("a41aaa_nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061))
22792279
2280   DISK_REGION( "ide" )
2280   DISK_REGION( "drive_0" )
22812281   DISK_IMAGE( "a41a02", 0, SHA1(bbb71e23bddfa07dfa30b6565a35befd82b055b8) )
22822282ROM_END
22832283
r14399r14400
22882288   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22892289   ROM_LOAD("941eaa_nvram.u39", 0x00000, 0x2000, NO_DUMP )
22902290
2291   DISK_REGION( "ide" )
2291   DISK_REGION( "drive_0" )
22922292   DISK_IMAGE( "a41c02", 0, SHA1(ab3020e8709768c0fd2467573e92b679a05944e5) )
22932293ROM_END
22942294
r14399r14400
22982298   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
22992299   ROM_LOAD("a30eab_nvram.u39", 0x00000, 0x2000, CRC(c123342c) SHA1(55416767608fe0311a362854a16b214b04435a31))
23002300
2301   DISK_REGION( "ide" )
2301   DISK_REGION( "drive_0" )
23022302   DISK_IMAGE( "a30b02", 0, SHA1(d2be83b7323c365ba445de7697c3fb8eb83d0212) )
23032303ROM_END
23042304
r14399r14400
23082308   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
23092309   ROM_LOAD("a30jac_nvram.u39", 0x00000, 0x2000, NO_DUMP )
23102310
2311   DISK_REGION( "ide" )
2311   DISK_REGION( "drive_0" )
23122312   DISK_IMAGE( "a30c02", 0, SHA1(533b5669b00884a800df9ba29651777a76559862) )
23132313ROM_END
23142314
r14399r14400
23192319   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
23202320   ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(4f8b5858) SHA1(68066241c6f9db7f45e55b3c5da101987f4ce53c))
23212321
2322   DISK_REGION( "ide" )
2322   DISK_REGION( "drive_0" )
23232323   DISK_IMAGE( "c22d02", 0, BAD_DUMP SHA1(85d2a8b5ec4cfd932190486cad991f0c180ca6b3) )
23242324ROM_END
23252325
r14399r14400
23292329   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
23302330   ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(ebd4d645) SHA1(2fa7e2c6b113214f3eb1900c8ceef4d5fcf0bb76))
23312331
2332   DISK_REGION( "ide" )
2332   DISK_REGION( "drive_0" )
23332333   DISK_IMAGE( "c22c02", 0, BAD_DUMP SHA1(8bd1dfbf926ad5b28fa7dafd7e31c475325ec569) )
23342334ROM_END
23352335
r14399r14400
23392339   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
23402340   ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(bd8a6640) SHA1(2d409197ef3fb07d984d27fa943f29c7a711d715))
23412341
2342   DISK_REGION( "ide" )
2342   DISK_REGION( "drive_0" )
23432343   DISK_IMAGE( "c22a02", 0, BAD_DUMP SHA1(b607fb2ddfd0bd552b7a736cea4ac1aa3ea021bd) )
23442344ROM_END
23452345
r14399r14400
23492349   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
23502350   ROM_LOAD("b4xjab_nvram.u39", 0x00000, 0x2000, CRC(33708a93) SHA1(715968e3c9c15edf628fa6ac655dc0864e336c6c))
23512351
2352   DISK_REGION( "ide" )
2352   DISK_REGION( "drive_0" )
23532353   DISK_IMAGE( "b4xb02", 0, SHA1(d8d54f3f16b762bf0187fe29b2f8696015c0a940) )
23542354ROM_END
23552355
r14399r14400
24082408   ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(9fb551a5) SHA1(a33d185e186d404c3bf62277d7e34e5ad0000b09)) //likely non-default settings
24092409   ROM_LOAD("c09jad_nvram.u39", 0x00000, 0x2000, CRC(33e960b7) SHA1(a9a249e68c89b18d4685f1859fe35dc21df18e14))
24102410
2411   DISK_REGION( "ide" )
2411   DISK_REGION( "drive_0" )
24122412   DISK_IMAGE( "c09d04", 0, SHA1(7395b7a33e953f65827aea44461e49f8388464fb) )
24132413ROM_END
24142414
r14399r14400
24192419   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
24202420   ROM_LOAD("c09jac_nvram.u39", 0x00000, 0x2000, NO_DUMP )
24212421
2422   DISK_REGION( "ide" )
2422   DISK_REGION( "drive_0" )
24232423   DISK_IMAGE( "c09c04", 0, SHA1(bf5f7447d74399d34edd4eb6dfcca7f6fc2154f2) )
24242424ROM_END
24252425
src/mame/drivers/kinst.c
r14399r14400
660660   MCFG_MACHINE_START(kinst)
661661   MCFG_MACHINE_RESET(kinst)
662662
663   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
663   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
664664
665665   /* video hardware */
666666   MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
r14399r14400
701701   ROM_LOAD16_BYTE( "u35-l1", 0xc00000, 0x80000, CRC(0aaef4fc) SHA1(48c4c954ac9db648f28ad64f9845e19ec432eec3) )
702702   ROM_LOAD16_BYTE( "u36-l1", 0xe00000, 0x80000, CRC(0577bb60) SHA1(cc78070cc41701e9a91fde5cfbdc7e1e83354854) )
703703
704   DISK_REGION( "ide" )
704   DISK_REGION( "drive_0" )
705705   DISK_IMAGE( "kinst", 0, SHA1(81d833236e994528d1482979261401b198d1ca53) )
706706ROM_END
707707
r14399r14400
720720   ROM_LOAD16_BYTE( "u35-l1", 0xc00000, 0x80000, CRC(0aaef4fc) SHA1(48c4c954ac9db648f28ad64f9845e19ec432eec3) )
721721   ROM_LOAD16_BYTE( "u36-l1", 0xe00000, 0x80000, CRC(0577bb60) SHA1(cc78070cc41701e9a91fde5cfbdc7e1e83354854) )
722722
723   DISK_REGION( "ide" )
723   DISK_REGION( "drive_0" )
724724   DISK_IMAGE( "kinst", 0, SHA1(81d833236e994528d1482979261401b198d1ca53) )
725725ROM_END
726726
r14399r14400
739739   ROM_LOAD16_BYTE( "u35-l1", 0xc00000, 0x80000, CRC(0aaef4fc) SHA1(48c4c954ac9db648f28ad64f9845e19ec432eec3) )
740740   ROM_LOAD16_BYTE( "u36-l1", 0xe00000, 0x80000, CRC(0577bb60) SHA1(cc78070cc41701e9a91fde5cfbdc7e1e83354854) )
741741
742   DISK_REGION( "ide" )
742   DISK_REGION( "drive_0" )
743743   DISK_IMAGE( "kinst", 0, SHA1(81d833236e994528d1482979261401b198d1ca53) )
744744ROM_END
745745
r14399r14400
758758   ROM_LOAD16_BYTE( "u35-l1", 0xc00000, 0x80000, CRC(0aaef4fc) SHA1(48c4c954ac9db648f28ad64f9845e19ec432eec3) )
759759   ROM_LOAD16_BYTE( "u36-l1", 0xe00000, 0x80000, CRC(0577bb60) SHA1(cc78070cc41701e9a91fde5cfbdc7e1e83354854) )
760760
761   DISK_REGION( "ide" )
761   DISK_REGION( "drive_0" )
762762   DISK_IMAGE( "kinst", 0, SHA1(81d833236e994528d1482979261401b198d1ca53) )
763763ROM_END
764764
r14399r14400
777777   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
778778   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
779779
780   DISK_REGION( "ide" )
780   DISK_REGION( "drive_0" )
781781   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
782782ROM_END
783783
r14399r14400
796796   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
797797   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
798798
799   DISK_REGION( "ide" )
799   DISK_REGION( "drive_0" )
800800   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
801801ROM_END
802802
r14399r14400
815815   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
816816   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
817817
818   DISK_REGION( "ide" )
818   DISK_REGION( "drive_0" )
819819   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
820820ROM_END
821821
r14399r14400
834834   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
835835   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
836836
837   DISK_REGION( "ide" )
837   DISK_REGION( "drive_0" )
838838   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
839839ROM_END
840840
r14399r14400
853853   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
854854   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
855855
856   DISK_REGION( "ide" )
856   DISK_REGION( "drive_0" )
857857   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
858858ROM_END
859859
r14399r14400
872872   ROM_LOAD16_BYTE( "ki2_l1.u35", 0xc00000, 0x80000, CRC(7245ce69) SHA1(24a3ff009c8a7f5a0bfcb198b8dcb5df365770d3) )
873873   ROM_LOAD16_BYTE( "ki2_l1.u36", 0xe00000, 0x80000, CRC(8920acbb) SHA1(0fca72c40067034939b984b4bf32972a5a6c26af) )
874874
875   DISK_REGION( "ide" )
875   DISK_REGION( "drive_0" )
876876   DISK_IMAGE( "kinst2", 0, SHA1(e7c9291b4648eae0012ea0cc230731ed4987d1d5) )
877877ROM_END
878878
src/mame/drivers/chihiro.c
r14399r14400
822822   pic8259_ir6_w(chihiro_devices.pic8259_2, state); // IRQ 14
823823}
824824
825void get_info(device_t *device, UINT8 *buffer, UINT16 &cylinders, UINT8 &sectors, UINT8 &heads)
825// ======================> ide_baseboard_device
826
827class ide_baseboard_device : public ide_hdd_device
826828{
827   cylinders=65535;
828   sectors=255;
829   heads=255;
829public:
830    // construction/destruction
831    ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
832   
833   virtual int    read_sector(UINT32 lba, void *buffer);
834   virtual int    write_sector(UINT32 lba, const void *buffer);
835   virtual bool is_ready() { return true; }
836   virtual void read_key(UINT8 key[]) { }
837protected:
838    // device-level overrides
839    virtual void device_start();
840   virtual void device_reset();
841};
842
843//**************************************************************************
844//  IDE HARD DISK IMAGE DEVICE
845//**************************************************************************
846
847// device type definition
848const device_type IDE_BASEBOARD = &device_creator<ide_baseboard_device>;
849
850//-------------------------------------------------
851//  ide_baseboard_device - constructor
852//-------------------------------------------------
853
854ide_baseboard_device::ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
855    : ide_hdd_device(mconfig, IDE_BASEBOARD, "IDE Baseboard", tag, owner, clock)
856{
830857}
831858
832int read_sector(device_t *device, UINT32 lba, void *buffer)
859//-------------------------------------------------
860//  device_start - device-specific startup
861//-------------------------------------------------
862
863void ide_baseboard_device::device_start()
833864{
865}
866
867//-------------------------------------------------
868//  device_reset - device-specific reset
869//-------------------------------------------------
870
871void ide_baseboard_device::device_reset()
872{
873   m_num_cylinders=65535;
874   m_num_sectors=255;
875   m_num_heads=255;
876   ide_build_features();
877}
878
879int ide_baseboard_device::read_sector(UINT32 lba, void *buffer)
880{
834881   int off;
835882   UINT8 *data;
836883
837884   logerror("baseboard: read sector lba %08x\n",lba);
838885   off=(lba&0x7ff)*512;
839   data=device->machine().region("others")->base();
886   data=machine().region("others")->base();
840887   memcpy(buffer,data+off,512);
841888   return 1;
842889}
843
844int write_sector(device_t *device, UINT32 lba, const void *buffer)
890int ide_baseboard_device::write_sector(UINT32 lba, const void *buffer)
845891{
846892   logerror("baseboard: write sector lba %08x\n",lba);
847893   return 1;
848894}
849895
850ide_hardware baseboard={get_info,read_sector,write_sector};
851
852896/*
853897 * PIC & PIT
854898 */
r14399r14400
11071151      debug_console_register_command(machine,"chihiro",CMDFLAG_NONE,0,1,4,chihiro_debug_commands);
11081152}
11091153
1154static SLOT_INTERFACE_START(ide_baseboard)
1155   SLOT_INTERFACE("bb", IDE_BASEBOARD)
1156SLOT_INTERFACE_END
1157
11101158static MACHINE_CONFIG_START( chihiro_base, driver_device )
11111159
11121160   /* basic machine hardware */
r14399r14400
11281176   MCFG_PIC8259_ADD( "pic8259_1", chihiro_pic8259_1_config )
11291177   MCFG_PIC8259_ADD( "pic8259_2", chihiro_pic8259_2_config )
11301178   MCFG_PIT8254_ADD( "pit8254", chihiro_pit8254_config )
1131   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt )
1132   MCFG_IDE_BUS_MASTER_SPACE( "maincpu", PROGRAM )
1133   MCFG_IDE_CONNECTED_TO( &baseboard )
1179   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt , ide_baseboard, "bb", NULL)
1180   MCFG_IDE_BUS_MASTER_SPACE( "ide", "maincpu", PROGRAM )
11341181
11351182   /* video hardware */
11361183   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/jaguar.c
r14399r14400
16841684   MCFG_MACHINE_RESET(cojag)
16851685   MCFG_NVRAM_ADD_1FILL("nvram")
16861686
1687   MCFG_IDE_CONTROLLER_ADD("ide", jaguar_external_int)
1687   MCFG_IDE_CONTROLLER_ADD("ide", jaguar_external_int, ide_devices, "hdd", NULL)
16881688
16891689   MCFG_TIMER_ADD("serial_timer", jaguar_serial_callback)
16901690
r14399r14400
19671967   ROM_LOAD32_BYTE( "136105-0001c.3m", 0x00002, 0x80000, CRC(6f135a81) SHA1(2d9660f240b14481e8c46bc98713e9dc12035063) )
19681968   ROM_LOAD32_BYTE( "136105-0000c.3k", 0x00003, 0x80000, CRC(94f50c14) SHA1(a54552e3ac5c4f481ba4f2fc7d724534576fe76c) )
19691969
1970   DISK_REGION( "ide" )
1970   DISK_REGION( "drive_0" )
19711971   DISK_IMAGE( "area51t", 0, SHA1(d2865cc7b1bb08a4393a72013a90e18d8a8f9860) )
19721972ROM_END
19731973
r14399r14400
19781978   ROM_LOAD32_BYTE( "136105-0001a.3m", 0x00002, 0x80000, CRC(c6d8322b) SHA1(90cf848a4195c51b505653cc2c74a3b9e3c851b8) )
19791979   ROM_LOAD32_BYTE( "136105-0000a.3k", 0x00003, 0x80000, CRC(729eb1b7) SHA1(21864b4281b1ad17b2903e3aa294e4be74161e80) )
19801980
1981   DISK_REGION( "ide" )
1981   DISK_REGION( "drive_0" )
19821982   DISK_IMAGE( "area51", 0, SHA1(3b303bc37e206a6d7339352c869f050d04186f11) )
19831983ROM_END
19841984
r14399r14400
19891989   ROM_LOAD32_BYTE( "a51_2-c.lh", 0x00002, 0x80000, CRC(a6524f73) SHA1(ae377a6803a4f7d1bbcc111725af121a3e82317d) )
19901990   ROM_LOAD32_BYTE( "a51_2-c.ll", 0x00003, 0x80000, CRC(471b15d2) SHA1(4b5f45ee140b03a6be61475cae1c2dbef0f07457) )
19911991
1992   DISK_REGION( "ide" )
1992   DISK_REGION( "drive_0" )
19931993   DISK_IMAGE( "area51", 0, SHA1(3b303bc37e206a6d7339352c869f050d04186f11) )
19941994ROM_END
19951995
r14399r14400
20002000   ROM_LOAD32_BYTE( "maxf_105.lh", 0x00002, 0x80000, CRC(84d49423) SHA1(88d9a6724f1118f2bbef5dfa27accc2b65c5ba1d) )
20012001   ROM_LOAD32_BYTE( "maxf_105.ll", 0x00003, 0x80000, CRC(16d0768d) SHA1(665a6d7602a7f2f5b1f332b0220b1533143d56b1) )
20022002
2003   DISK_REGION( "ide" )
2003   DISK_REGION( "drive_0" )
20042004   DISK_IMAGE( "maxforce", 0, SHA1(d54e7a8f3866bb2a1d28ae637e7c92ffa4dbe558) )
20052005ROM_END
20062006
r14399r14400
20122012   ROM_LOAD32_BYTE( "maxf_102.lh", 0x00002, 0x80000, CRC(459ffba5) SHA1(adb40db6904e84c17f32ac6518fd2e994da7883f) )
20132013   ROM_LOAD32_BYTE( "maxf_102.ll", 0x00003, 0x80000, CRC(e491be7f) SHA1(cbe281c099a4aa87067752d68cf2bb0ab3900531) )
20142014
2015   DISK_REGION( "ide" )
2015   DISK_REGION( "drive_0" )
20162016   DISK_IMAGE( "maxforce", 0, SHA1(d54e7a8f3866bb2a1d28ae637e7c92ffa4dbe558) )
20172017ROM_END
20182018
r14399r14400
20272027   ROM_REGION( 0x800, "user2", 0 ) /* 28C16 style eeprom, currently loaded but not used */
20282028   ROM_LOAD( "28c16.17z", 0x000, 0x800, CRC(1cdd9088) SHA1(4f01f02ff95f31ced87a3cdd7f171afd92551266) )
20292029
2030   DISK_REGION( "ide" )
2030   DISK_REGION( "drive_0" )
20312031   DISK_IMAGE( "maxforce", 0, SHA1(d54e7a8f3866bb2a1d28ae637e7c92ffa4dbe558) )
20322032ROM_END
20332033
r14399r14400
20392039   ROM_LOAD32_BYTE( "area51mx.3m", 0x00002, 0x80000, CRC(d800ac17) SHA1(3d515c8608d8101ee9227116175b3c3f1fe22e0c) )
20402040   ROM_LOAD32_BYTE( "area51mx.3k", 0x00003, 0x80000, CRC(0e78f308) SHA1(adc4c8e441eb8fe525d0a6220eb3a2a8791a7289) )
20412041
2042   DISK_REGION( "ide" )
2042   DISK_REGION( "drive_0" )
20432043   DISK_IMAGE( "area51mx", 0, SHA1(5ff10f4e87094d4449eabf3de7549564ca568c7e) )
20442044ROM_END
20452045
r14399r14400
20512051   ROM_LOAD32_BYTE( "a51mxr3k.lh", 0x00002, 0x80000, CRC(d7d94dac) SHA1(2060a74715f36a0d7f5dd0855eda48ad1f20f095) )
20522052   ROM_LOAD32_BYTE( "a51mxr3k.ll", 0x00003, 0x80000, CRC(ece9e5ae) SHA1(7e44402726f5afa6d1670b27aa43ad13d21c4ad9) )
20532053
2054   DISK_REGION( "ide" )
2054   DISK_REGION( "drive_0" )
20552055   DISK_IMAGE( "area51mx", 0, SHA1(5ff10f4e87094d4449eabf3de7549564ca568c7e) )
20562056ROM_END
20572057
r14399r14400
20632063   ROM_LOAD32_BYTE( "lh", 0x00002, 0x80000, CRC(be4b2ef6) SHA1(4332b3036e9cb12685e914d085d9a63aa856f0be) )
20642064   ROM_LOAD32_BYTE( "ll", 0x00003, 0x80000, CRC(ba8753eb) SHA1(0322e0e37d814a38d08ba191b1a97fb1a55fe461) )
20652065
2066   DISK_REGION( "ide" )
2066   DISK_REGION( "drive_0" )
20672067   DISK_IMAGE( "vcircle", 0, SHA1(bfa79c4cacdc9c2cd6362f62a23056b3e35a2034) )
20682068ROM_END
20692069
src/mame/drivers/queen.c
r14399r14400
701701   MCFG_PCI_BUS_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
702702   MCFG_PCI_BUS_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
703703
704   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
704   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
705705
706706   /* video hardware */
707707   MCFG_FRAGMENT_ADD( pcvideo_vga )
r14399r14400
718718//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
719719//  ROM_CONTINUE(                                 0x0001, 0x4000 )
720720
721   DISK_REGION( "ide" )
721   DISK_REGION( "drive_0" )
722722   DISK_IMAGE( "pqiidediskonmodule", 0,SHA1(a56efcc711b1c5a2e63160b3088001a8c4fb56c2) )
723723ROM_END
724724
src/mame/drivers/djmain.c
r14399r14400
14881488   MCFG_MACHINE_START(djmain)
14891489   MCFG_MACHINE_RESET(djmain)
14901490
1491   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
1491   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
14921492
14931493   /* video hardware */
14941494   MCFG_SCREEN_ADD("screen", RASTER)
r14399r14400
15441544   ROM_LOAD16_BYTE( "753jaa09.25d", 0x100000, 0x80000, CRC(B50C3DBB) SHA1(6022ea249aad0793b2279699e68087b4bc9b4ef1) )
15451545   ROM_LOAD16_BYTE( "753jaa10.27d", 0x100001, 0x80000, CRC(391F4BFD) SHA1(791c9889ea3ce639bbfb87934a1cad9aa3c9ccde) )
15461546
1547   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1547   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
15481548   DISK_IMAGE( "753jaa11", 0, SHA1(2e70cf31a853322f29f99b6f292c187a2cf33015) )   /* ver 1.00 JA */
15491549   // There is an alternate image
15501550   //DISK_IMAGE( "753jaa11", 0, MD5(260c9b72f4a03055e3abad61c6225324) SHA1(2cc3e149744516bf2353a2b47d33bc9d2072b6c4) ) /* ver 1.00 JA */
r14399r14400
15691569   ROM_LOAD16_BYTE( "853jaa09.25d", 0x100000, 0x80000, CRC(8584E21E) SHA1(3d1ca6de00f9ac07bbe7cd1e67093cca7bf484bb) )
15701570   ROM_LOAD16_BYTE( "853jaa10.27d", 0x100001, 0x80000, CRC(9CB92D98) SHA1(6ace4492ba0b5a8f94a9e7b4f7126b31c6254637) )
15711571
1572   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1572   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
15731573   DISK_IMAGE( "853jaa11", 0, SHA1(9683ff8462491252b6eb2e5b3aa6496884c01506) )   /* ver 1.10 JA */
15741574
15751575   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
15921592   ROM_LOAD16_BYTE( "853jaa09.25d", 0x100000, 0x80000, CRC(8584E21E) SHA1(3d1ca6de00f9ac07bbe7cd1e67093cca7bf484bb) )
15931593   ROM_LOAD16_BYTE( "853jaa10.27d", 0x100001, 0x80000, CRC(9CB92D98) SHA1(6ace4492ba0b5a8f94a9e7b4f7126b31c6254637) )
15941594
1595   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1595   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
15961596   DISK_IMAGE( "853jaa11", 0, SHA1(9683ff8462491252b6eb2e5b3aa6496884c01506) )   /* ver 1.10 JA */
15971597
15981598   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
16151615   ROM_LOAD16_BYTE( "825jaa09.25d", 0x100000, 0x80000, CRC(D3E65669) SHA1(51abf452da60794fa47c05d11c08b203dde563ff) )
16161616   ROM_LOAD16_BYTE( "825jaa10.27d", 0x100001, 0x80000, CRC(44D184F3) SHA1(28f3ec33a29164a6531f53db071272ccf015f66d) )
16171617
1618   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1618   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
16191619   DISK_IMAGE( "825jaa11", 0, SHA1(048919977232bbce046406a7212586cf39b77cf2) )   /* ver 1.00 JA */
16201620
16211621   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
16381638   ROM_LOAD16_BYTE( "858jaa09.25d", 0x100000, 0x80000, CRC(0B4AD843) SHA1(c01e15053dd1975dc68db9f4e6da47062d8f9b54) )
16391639   ROM_LOAD16_BYTE( "858jaa10.27d", 0x100001, 0x80000, CRC(00B124EE) SHA1(435d28a327c2707833a8ddfe841104df65ffa3f8) )
16401640
1641   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1641   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
16421642   DISK_IMAGE( "858jaa11", 0, SHA1(bc590472046336a1000f29901fe3fd7b29747e47) )   /* ver 1.00 JA */
16431643
16441644   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
16611661   ROM_LOAD16_BYTE( "858uaa09.25d", 0x100000, 0x80000, CRC(99519886) SHA1(664f6bd953201a6e2fc123cb8b3facf72766107d) )
16621662   ROM_LOAD16_BYTE( "858uaa10.27d", 0x100001, 0x80000, CRC(20AA7145) SHA1(eeff87eb9a9864985d751f45e843ee6e73db8cfd) )
16631663
1664   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1664   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
16651665   DISK_IMAGE( "858jaa11", 0, SHA1(bc590472046336a1000f29901fe3fd7b29747e47) )   /* ver 1.00 JA */
16661666
16671667   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
16841684   ROM_LOAD16_BYTE( "847jab09.25d", 0x100000, 0x80000, CRC(2E4AC9FE) SHA1(bbd4c6e0c82fc0be88f851e901e5853b6bcf775f) )
16851685   ROM_LOAD16_BYTE( "847jab10.27d", 0x100001, 0x80000, CRC(C78516F5) SHA1(1adf5805c808dc55de14a9a9b20c3d2cf7bf414d) )
16861686
1687   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1687   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
16881688   DISK_IMAGE( "847jaa11", 0, SHA1(8cad631531b5616d6a4b0a99d988f4b525932dc7) )   /* ver 1.00 JA */
16891689
16901690   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
17071707   ROM_LOAD16_BYTE( "981jaa09.25d", 0x100000, 0x80000, CRC(D96D4E1C) SHA1(379aa4e82cd06490645f54dab1724c827108735d) )
17081708   ROM_LOAD16_BYTE( "981jaa10.27d", 0x100001, 0x80000, CRC(06BEE0E4) SHA1(6eea8614cb01e7079393b9976b6fd6a52c14e3c0) )
17091709
1710   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1710   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
17111711   DISK_IMAGE( "981jaa11", 0, SHA1(dc7353fa436d96ae174a58d3a38ca9928a63727f) )   /* ver 1.00 JA */
17121712
17131713   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
17301730   ROM_LOAD16_BYTE( "993jaa09.25d", 0x100000, 0x80000, CRC(E1A172DD) SHA1(42e850c055dc5bfccf6b6989f9f3a945fce13006) )
17311731   ROM_LOAD16_BYTE( "993jaa10.27d", 0x100001, 0x80000, CRC(9D113A2D) SHA1(eee94a5f7015c49aa630b8df0c8e9d137d238811) )
17321732
1733   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1733   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
17341734   DISK_IMAGE( "993hdda01", 0, SHA1(f5d4df1dd27ce6ee2d0897852342691d55b63bfb) )
17351735   // this image has not been verified
17361736   //  DISK_IMAGE( "993jaa11", 0, MD5(e26eb62d7cf3357585f5066da6063143) )  /* ver 1.00 JA */
r14399r14400
17551755   ROM_LOAD16_BYTE( "988jaa09.25d", 0x100000, 0x80000, CRC(8F3BAE7F) SHA1(c4dac14f6c7f75a2b19153e05bfe969e9eb4aca0) )
17561756   ROM_LOAD16_BYTE( "988jaa10.27d", 0x100001, 0x80000, CRC(248BF0EE) SHA1(d89205ed57e771401bfc2c24043d200ecbd0b7fc) )
17571757
1758   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1758   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
17591759   DISK_IMAGE( "988jaa11", 0, SHA1(12a0988c631dd3331e54b8417a9659402afe168b) )   /* ver 1.00 JA */
17601760
17611761   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
17781778   ROM_LOAD16_BYTE( "988uaa09.25d", 0x100000, 0x80000, CRC(C2AD6810) SHA1(706388c5acf6718297fd90e10f8a673463a0893b) )
17791779   ROM_LOAD16_BYTE( "988uaa10.27d", 0x100001, 0x80000, CRC(DAB0F3C9) SHA1(6fd899e753e32f60262c54ab8553c686c7ef28de) )
17801780
1781   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1781   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
17821782   DISK_IMAGE( "988jaa11", 0, SHA1(12a0988c631dd3331e54b8417a9659402afe168b) )   /* ver 1.00 JA */
17831783
17841784   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
18011801   ROM_LOAD16_BYTE( "995jaa09.25d", 0x100000, 0x80000, CRC(1510A9C2) SHA1(daf1ab26b7b6b0fe0123b3fbee68684157c2ce51) )
18021802   ROM_LOAD16_BYTE( "995jaa10.27d", 0x100001, 0x80000, CRC(F9E4E9F2) SHA1(fe91badf6b0baeea690d75399d8c66fabcf6d352) )
18031803
1804   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1804   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
18051805   DISK_IMAGE( "995jaa11", 0, SHA1(8fec3c4d97f64f48b9867230a97cda4347496075) )   /* ver 1.00 JA */
18061806
18071807   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
18241824   ROM_LOAD16_BYTE( "a05jaa09.25d", 0x100000, 0x80000, CRC(1504D62C) SHA1(3c31c6625bc089235a96fe21021239f2d0c0f6e1) )
18251825   ROM_LOAD16_BYTE( "a05jaa10.27d", 0x100001, 0x80000, CRC(99D75C36) SHA1(9599420863aa0a9492d3caeb03f8ac5fd4c3cdb2) )
18261826
1827   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1827   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
18281828   DISK_IMAGE( "a05jaa11", 0, SHA1(7ebc41cc3e9a0a922b49201b34e29201522eb726) )   /* ver 1.00 JA */
18291829
18301830   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
18471847   ROM_LOAD16_BYTE( "a21jaa09.25d", 0x100000, 0x80000, CRC(181E6F70) SHA1(82c7ca3068ace9a66b614ead4b90ea6fe4017d51) )
18481848   ROM_LOAD16_BYTE( "a21jaa10.27d", 0x100001, 0x80000, CRC(1AC33595) SHA1(3173bb8dc420487c4d427e779444a98aad37d51e) )
18491849
1850   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1850   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
18511851   DISK_IMAGE( "a21jaa11", 0, SHA1(ed0a07212a360e75934fc22c56265842cf0829b6) )   /* ver 1.00 JA */
18521852
18531853   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
18701870   ROM_LOAD16_BYTE( "b07jaa09.25d", 0x100000, 0x80000, CRC(2530CEDB) SHA1(94b38b4fe198b26a2ff4d99d2cb28a0f935fe940) )
18711871   ROM_LOAD16_BYTE( "b07jaa10.27d", 0x100001, 0x80000, CRC(6B75BA9C) SHA1(aee922adc3bc0296ae6e08e461b20a9e5e72a2df) )
18721872
1873   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1873   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
18741874   DISK_IMAGE( "b07jaa11", 0, SHA1(e4925494f0a801abb4d3aa6524c379eb445d8dff) )   /* ver 1.00 JA */
18751875   // this image has not been verified
18761876   //DISK_IMAGE( "b07jab11", 0, MD5(0e9440787ca69567792095085e2a3619) )    /* ver 1.00 JA */
r14399r14400
18951895   ROM_LOAD16_BYTE( "c01jaa09.25d", 0x100000, 0x80000, CRC(45CF93B1) SHA1(7c5082bcd1fe15761a0a965e25dda121904ff1bd) )
18961896   ROM_LOAD16_BYTE( "c01jaa10.27d", 0x100001, 0x80000, CRC(C9927749) SHA1(c2644877bda483e241381265e723ea8ab8357761) )
18971897
1898   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1898   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
18991899   DISK_IMAGE( "c01jaa11", 0, SHA1(0a53c4412a72a886f5fb98c12c529d056d625244) )   /* ver 1.00 JA */
19001900   // this image has not been verified
19011901   //DISK_IMAGE( "c01jaa11", 0, MD5(8bb7e6b6bc63cac8a4f2997307c25748) )    /* ver 1.00 JA */
r14399r14400
19201920   ROM_LOAD16_BYTE( "831jaa09.25d", 0x100000, 0x80000, CRC(AE7838D2) SHA1(4f8a6793065c6c1eb08161f65b1d6246987bf47e) )
19211921   ROM_LOAD16_BYTE( "831jaa10.27d", 0x100001, 0x80000, CRC(85173CB6) SHA1(bc4d86bf4654a9a0a58e624f77090854950f3993) )
19221922
1923   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1923   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
19241924   DISK_IMAGE( "831jhdda01", 0, SHA1(ef62d5fcc1a36235fc932e6ecef71dc845d1d72d) )
19251925
19261926   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
19451945   ROM_LOAD16_BYTE( "825jab09.25d", 0x100000, 0x80000, CRC(1407BA5D) SHA1(e7a0d190326589f4d94e83cb7c85dd4e91f4efad) )
19461946   ROM_LOAD16_BYTE( "825jab10.27d", 0x100001, 0x80000, CRC(2AFD0A10) SHA1(1b8b868ac5720bb1b376f4eb8952efb190257bda) )
19471947
1948   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1948   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
19491949   DISK_IMAGE( "825jab11", 0, MD5(f4360da10a932ba90e93469df7426d1d) SHA1(1) )  /* ver 1.01 JA */
19501950
19511951   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
19681968   ROM_LOAD16_BYTE( "803jaa09.25d", 0x100000, 0x80000, CRC(204D53EB) SHA1(349de147246b0ed08fb7e473d63e073b71fa30c9) )
19691969   ROM_LOAD16_BYTE( "803jaa10.27d", 0x100001, 0x80000, CRC(535A61A3) SHA1(b24c57601a7e3a349473af69114703133a46806d) )
19701970
1971   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1971   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
19721972   DISK_IMAGE( "803jaa11", 0, MD5(54a8ac87857d81740621c622e27736d7) )   /* ver 1.00 JA */
19731973
19741974   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
19911991   ROM_LOAD16_BYTE( "980jaa09.25d", 0x100000, 0x80000, CRC(1CB4D84E) SHA1(9669585c6a2825aeae6e47dd03458624b4c44721) )
19921992   ROM_LOAD16_BYTE( "980jaa10.27d", 0x100001, 0x80000, CRC(7776B87E) SHA1(662b7cd7cb4fb8f8bab240ef543bf9a593e23a03) )
19931993
1994   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
1994   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
19951995   DISK_IMAGE( "980jaa11", 0, MD5(6e5cc17a6bc75cac0256192cc700215c) )   /* ver 1.00 JA */
19961996
19971997   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
r14399r14400
20142014   ROM_LOAD16_BYTE( "970jba09.25d", 0x100000, 0x80000, CRC(5D2BDA52) SHA1(d03c135ac04437b54e4d267ae168fe7ebb9e5b65) )
20152015   ROM_LOAD16_BYTE( "970jba10.27d", 0x100001, 0x80000, CRC(EDC4A245) SHA1(30bbd7bf0299a064119c535abb9be69d725aa130) )
20162016
2017   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
2017   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
20182018   DISK_IMAGE( "970jba11", 0, MD5(1616905838fdb2b521d53499c6c2a7a4) )   /* ver 1.00 JA */
20192019
20202020   ROM_REGION( 0x1000000, "shared", ROMREGION_ERASE00 )      /* K054539 RAM */
src/mame/drivers/savquest.c
r14399r14400
565565   MCFG_PCI_BUS_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
566566   MCFG_PCI_BUS_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
567567
568   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
568   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
569569
570570   /* video hardware */
571571   MCFG_FRAGMENT_ADD( pcvideo_vga )
r14399r14400
579579   ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
580580   ROM_CONTINUE(                                 0x0001, 0x4000 )
581581
582   DISK_REGION( "disk" )
582   DISK_REGION( "drive_0" )
583583   DISK_IMAGE( "savquest", 0, SHA1(b20cacf45e093b533c538bf4fc08f05f9475d640) )
584584ROM_END
585585
src/mame/drivers/cobra.c
r14399r14400
20212021   MCFG_PCI_BUS_ADD("pcibus", 0)
20222022   MCFG_PCI_BUS_DEVICE(0, NULL, mpc106_pci_r, mpc106_pci_w)
20232023
2024   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
2024   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
20252025
20262026   /* video hardware */
20272027   MCFG_VIDEO_START(cobra)
r14399r14400
21422142   ROM_REGION64_BE(0x80000, "user3", 0)      /* Gfx CPU program (PPC604) */
21432143   ROM_LOAD("645a03.u17", 0x00000, 0x80000, CRC(086abd0b) SHA1(24df439eb9828ed3842f43f5f4014a3fc746e1e3) )
21442144
2145   DISK_REGION( "ide" )
2145   DISK_REGION( "drive_0" )
21462146   DISK_IMAGE_READONLY( "645c04", 0, SHA1(c0aabe69f6eb4e4cf748d606ae50674297af6a04) )
21472147ROM_END
21482148
r14399r14400
21562156   ROM_REGION64_BE(0x80000, "user3", 0)      /* Gfx CPU program (PPC604) */
21572157   ROM_LOAD( "676a03.u17", 0x000000, 0x080000, CRC(66f77cbd) SHA1(f1c7e50dbbfcc27ac011cbbb8ad2fd376c2e9056) )
21582158
2159   DISK_REGION( "ide" )
2159   DISK_REGION( "drive_0" )
21602160   DISK_IMAGE_READONLY( "676a04", 0, SHA1(8e89d3e5099e871b99fccba13adaa3cf8a6b71f0) )
21612161ROM_END
21622162
src/mame/drivers/twinkle.c
r14399r14400
897897   MCFG_MACHINE_RESET( twinkle )
898898   MCFG_I2CMEM_ADD("security",i2cmem_interface)
899899
900   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
900   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
901901   MCFG_RTC65271_ADD("rtc", twinkle_rtc)
902902
903903   /* video hardware */
r14399r14400
995995   DISK_REGION( "cdrom1" ) // video CD
996996   DISK_IMAGE_READONLY("863jaa04", 0, SHA1(8f6a0d2e191153032c9388b5298d8ee531b22a41) )
997997
998   DISK_REGION( "ide" )
998   DISK_REGION( "drive_0" )
999999   DISK_IMAGE_READONLY("c44jaa03", 0, SHA1(53e9bd25d1674a04aeec81c0224b4e4e44af802a) )   // was part of a 1st mix machine, but "c44" indicates 8th mix?
10001000ROM_END
10011001
src/mame/drivers/30test.c
r14399r14400
6060};
6161
6262
63static VIDEO_START( 30test )
64{
65
66}
67
68static SCREEN_UPDATE_IND16( 30test )
69{
70   return 0;
71}
72
7363static READ8_HANDLER(hc11_mux_r)
7464{
7565   namco_30test_state *state = space->machine().driver_data<namco_30test_state>();
r14399r14400
272262   MCFG_MACHINE_START(30test)
273263   MCFG_MACHINE_RESET(30test)
274264
275   /* video hardware */
276   /* TODO: NOT raster! */
277   MCFG_SCREEN_ADD("screen", RASTER)
278   MCFG_SCREEN_REFRESH_RATE(60)
279   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
280   MCFG_SCREEN_SIZE(32*8, 32*8)
281   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
282   MCFG_SCREEN_UPDATE_STATIC(30test)
265   /* no video! */
283266
284//  MCFG_PALETTE_INIT(30test)
285   MCFG_PALETTE_LENGTH(2)
286
287   MCFG_VIDEO_START(30test)
288
289267   /* sound hardware */
290268   MCFG_SPEAKER_STANDARD_MONO("mono")
291269
src/mame/drivers/midqslvr.c
r14399r14400
716716   MCFG_PCI_BUS_DEVICE( 0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
717717   MCFG_PCI_BUS_DEVICE(31, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
718718
719   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
719   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
720720
721721   /* video hardware */
722722   MCFG_FRAGMENT_ADD( pcvideo_vga )
r14399r14400
731731//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
732732//  ROM_CONTINUE(                                 0x0001, 0x4000 )
733733
734   DISK_REGION( "disk" )
734   DISK_REGION( "drive_0" )
735735   DISK_IMAGE( "offrthnd", 0, SHA1(d88f1c5b75361a1e310565a8a5a09c674a4a1a22) )
736736ROM_END
737737
r14399r14400
743743//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
744744//  ROM_CONTINUE(                                 0x0001, 0x4000 )
745745
746   DISK_REGION( "disk" )
746   DISK_REGION( "drive_0" )
747747   DISK_IMAGE( "hydro", 0,  SHA1(d481d178782943c066b41764628a419cd55f676d) )
748748ROM_END
749749
r14399r14400
755755//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
756756//  ROM_CONTINUE(                                 0x0001, 0x4000 )
757757
758   DISK_REGION( "disk" )
758   DISK_REGION( "drive_0" )
759759   DISK_IMAGE( "arctthnd", 0,  SHA1(f4373e57c3f453ac09c735b5d8d99ff811416a23) )
760760ROM_END
761761
r14399r14400
768768//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
769769//  ROM_CONTINUE(                                 0x0001, 0x4000 )
770770
771   DISK_REGION( "disk" )
771   DISK_REGION( "drive_0" )
772772   DISK_IMAGE( "uarctict", 0, SHA1(8557a1d7ae8dc41c879350cb1c228f4c27a0dd09) )
773773ROM_END
774774
src/mame/drivers/calchase.c
r14399r14400
920920   MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, dma8237_2_config )
921921   MCFG_PIC8259_ADD( "pic8259_1", calchase_pic8259_1_config )
922922   MCFG_PIC8259_ADD( "pic8259_2", calchase_pic8259_2_config )
923   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
923   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
924924
925925   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
926926   MCFG_PCI_BUS_ADD("pcibus", 0)
r14399r14400
985985   ROM_REGION( 0x800, "nvram", 0 )
986986   ROM_LOAD( "ds1220y_nv.bin", 0x000, 0x800, CRC(7912c070) SHA1(b4c55c7ca76bcd8dad1c4b50297233349ae02ed3) )
987987
988   DISK_REGION( "ide" )
988   DISK_REGION( "drive_0" )
989989   DISK_IMAGE_READONLY( "calchase", 0,SHA1(6ae51a9b3f31cf4166322328a98c0235b0874eb3) )
990990ROM_END
991991
src/mame/drivers/vegas.c
r14399r14400
22202220   MCFG_MACHINE_RESET(vegas)
22212221   MCFG_M48T37_ADD("timekeeper")
22222222
2223   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
2224   MCFG_IDE_BUS_MASTER_SPACE("maincpu", PROGRAM)
2223   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
2224   MCFG_IDE_BUS_MASTER_SPACE("ide", "maincpu", PROGRAM)
22252225
22262226   MCFG_SMC91C94_ADD("ethernet", ethernet_interrupt)
22272227
r14399r14400
23112311   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.5 11/17/1998 */
23122312   ROM_LOAD( "legend15.bin", 0x000000, 0x80000, CRC(a8372d70) SHA1(d8cd4fd4d7007ee38bb58b5a818d0f83043d5a48) )
23132313
2314   DISK_REGION( "ide" )   /* Guts 1.5 1/14/1999 Game 1/14/1999 */
2314   DISK_REGION( "drive_0" )   /* Guts 1.5 1/14/1999 Game 1/14/1999 */
23152315   DISK_IMAGE( "gauntleg", 0, SHA1(66eb70e2fba574a7abe54be8bd45310654b24b08) )
23162316
23172317   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23232323   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.3 9/25/1998 */
23242324   ROM_LOAD( "legend12.bin", 0x000000, 0x80000, CRC(34674c5f) SHA1(92ec1779f3ab32944cbd953b6e1889503a57794b) )
23252325
2326   DISK_REGION( "ide" )   /* Guts 1.4 10/22/1998 Main 10/23/1998 */
2326   DISK_REGION( "drive_0" )   /* Guts 1.4 10/22/1998 Main 10/23/1998 */
23272327   DISK_IMAGE( "gauntl12", 0, SHA1(c8208e3ce3b02a271dc6b089efa98dd996b66ce0) )
23282328
23292329   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23352335   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.7 12/14/1999 */
23362336   ROM_LOAD( "gauntdl.bin", 0x000000, 0x80000, CRC(3d631518) SHA1(d7f5a3bc109a19c9c7a711d607ff87e11868b536) )
23372337
2338   DISK_REGION( "ide" )   /* Guts: 1.9 3/17/2000 Game 5/9/2000 */
2338   DISK_REGION( "drive_0" )   /* Guts: 1.9 3/17/2000 Game 5/9/2000 */
23392339   DISK_IMAGE( "gauntdl", 0, SHA1(ba3af48171e727c2f7232c06dcf8411cbcf14de8) )
23402340
23412341   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23472347   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.7 12/14/1999 */
23482348   ROM_LOAD( "gauntdl.bin", 0x000000, 0x80000, CRC(3d631518) SHA1(d7f5a3bc109a19c9c7a711d607ff87e11868b536) )
23492349
2350   DISK_REGION( "ide" )   /* Guts: 1.9 3/17/2000 Game 3/19/2000 */
2350   DISK_REGION( "drive_0" )   /* Guts: 1.9 3/17/2000 Game 3/19/2000 */
23512351   DISK_IMAGE( "gauntd24", 0, SHA1(3e055794d23d62680732e906cfaf9154765de698) )
23522352
23532353   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23592359   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.9 3/25/1999 */
23602360   ROM_LOAD( "warboot.v19", 0x000000, 0x80000, CRC(b0c095cd) SHA1(d3b8cccdca83f0ecb49aa7993864cfdaa4e5c6f0) )
23612361
2362   DISK_REGION( "ide" )   /* Guts 1.3 4/20/1999 Game 4/20/1999 */
2362   DISK_REGION( "drive_0" )   /* Guts 1.3 4/20/1999 Game 4/20/1999 */
23632363   DISK_IMAGE( "warfa", 0, SHA1(87f8a8878cd6be716dbd6c68fb1bc7f564ede484) )
23642364
23652365   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23712371   ROM_REGION32_LE( 0x80000, "user1", 0 )
23722372   ROM_LOAD( "tenthdeg.bio", 0x000000, 0x80000, CRC(1cd2191b) SHA1(a40c48f3d6a9e2760cec809a79a35abe762da9ce) )
23732373
2374   DISK_REGION( "ide" )   /* Guts 5/26/1998 Main 8/25/1998 */
2374   DISK_REGION( "drive_0" )   /* Guts 5/26/1998 Main 8/25/1998 */
23752375   DISK_IMAGE( "tenthdeg", 0, SHA1(41a1a045a2d118cf6235be2cc40bf16dbb8be5d1) )
23762376
23772377   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
23832383   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 2.6 4/22/1999 */
23842384   ROM_LOAD( "rbmain.bin", 0x000000, 0x80000, CRC(060e1aa8) SHA1(2a1027d209f87249fe143500e721dfde7fb5f3bc) )
23852385
2386   DISK_REGION( "ide" )   /* Guts 4/22/1999 Game 4/22/1999 */
2386   DISK_REGION( "drive_0" )   /* Guts 4/22/1999 Game 4/22/1999 */
23872387   DISK_IMAGE( "roadburn", 0, SHA1(a62870cceafa6357d7d3505aca250c3f16087566) )
23882388ROM_END
23892389
r14399r14400
23922392   ROM_REGION32_LE( 0x80000, "user1", 0 )
23932393   ROM_LOAD( "nbau27.100", 0x000000, 0x80000, CRC(ff5d620d) SHA1(8f07567929f40a2269a42495dfa9dd5edef688fe) )
23942394
2395   DISK_REGION( "ide" )
2395   DISK_REGION( "drive_0" )
23962396   DISK_IMAGE( "nbashowt", 0, SHA1(f7c56bc3dcbebc434de58034986179ae01127f87) )
23972397
23982398   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
24052405   ROM_LOAD( "u27nflnba.bin", 0x000000, 0x80000, CRC(6a9bd382) SHA1(18b942df6af86ea944c24166dbe88148334eaff9) )
24062406//  ROM_LOAD( "bootnflnba.bin", 0x000000, 0x80000, CRC(3def7053) SHA1(8f07567929f40a2269a42495dfa9dd5edef688fe) )
24072407
2408   DISK_REGION( "ide" )
2408   DISK_REGION( "drive_0" )
24092409   DISK_IMAGE( "nbanfl", 0, SHA1(f60c627f85f1bf58f2ea674063736a1e516e7e9e) )
24102410
24112411   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* Vegas SIO boot ROM */
r14399r14400
24172417   ROM_REGION32_LE( 0x80000, "user1", 0 )
24182418   ROM_LOAD( "bootu27", 0x000000, 0x80000, CRC(c44550a2) SHA1(ad30f1c3382ff2f5902a4cbacbb1f0c4e37f42f9) )
24192419
2420   DISK_REGION( "ide" )
2420   DISK_REGION( "drive_0" )
24212421   DISK_IMAGE( "cartfury", 0, SHA1(4c5bc2803297ea9a191bbd8b002d0e46b4ae1563) )
24222422
24232423   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2105 data */
r14399r14400
24292429   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* EPROM 1.02 7/9/1999 */
24302430   ROM_LOAD( "sf2049.u27", 0x000000, 0x80000, CRC(174ba8fe) SHA1(baba83b811eca659f00514a008a86ef0ac9680ee) )
24312431
2432   DISK_REGION( "ide" )   /* Guts 1.03 9/3/1999 Game 9/8/1999 */
2432   DISK_REGION( "drive_0" )   /* Guts 1.03 9/3/1999 Game 9/8/1999 */
24332433   DISK_IMAGE( "sf2049", 0, SHA1(9e0661b8566a6c78d18c59c11cd3a6628d025405) )
24342434ROM_END
24352435
r14399r14400
24382438   ROM_REGION32_LE( 0x80000, "user1", 0 )
24392439   ROM_LOAD( "sf2049se.u27", 0x000000, 0x80000, CRC(da4ecd9c) SHA1(2574ff3d608ebcc59a63cf6dea13ee7650ae8921) )
24402440
2441   DISK_REGION( "ide" )
2441   DISK_REGION( "drive_0" )
24422442   DISK_IMAGE( "sf2049se", 0, SHA1(7b27a8ce2a953050ce267548bb7160b41f3e8054) )
24432443ROM_END
24442444
r14399r14400
24472447   ROM_REGION32_LE( 0x80000, "user1", 0 )
24482448   ROM_LOAD( "sf2049te.u27", 0x000000, 0x80000, CRC(cc7c8601) SHA1(3f37dbd1b32b3ac5caa300725468e8e426f0fb83) )
24492449
2450   DISK_REGION( "ide" )
2450   DISK_REGION( "drive_0" )
24512451   DISK_IMAGE( "sf2049te", 0, SHA1(625aa36436587b7bec3e7db1d19793b760e2ea51) )
24522452ROM_END
24532453
src/mame/drivers/xtom3d.c
r14399r14400
707707   MCFG_PCI_BUS_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
708708   MCFG_PCI_BUS_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
709709
710   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
710   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
711711
712712   /* video hardware */
713713   MCFG_FRAGMENT_ADD( pcvideo_vga )
src/mame/drivers/qdrmfgp.c
r14399r14400
684684   MCFG_MACHINE_RESET(qdrmfgp)
685685   MCFG_NVRAM_ADD_1FILL("nvram")
686686
687   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
687   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
688688
689689   /* video hardware */
690690   MCFG_SCREEN_ADD("screen", RASTER)
r14399r14400
721721   MCFG_MACHINE_RESET(qdrmfgp)
722722   MCFG_NVRAM_ADD_1FILL("nvram")
723723
724   MCFG_IDE_CONTROLLER_ADD("ide", gp2_ide_interrupt)
724   MCFG_IDE_CONTROLLER_ADD("ide", gp2_ide_interrupt, ide_devices, "hdd", NULL)
725725
726726   /* video hardware */
727727   MCFG_SCREEN_ADD("screen", RASTER)
r14399r14400
766766   ROM_LOAD( "gq_460_a07.14h", 0x000000, 0x80000, CRC(67d8ea6b) SHA1(11af1b5a33de2a6e24823964d210bef193ecefe4) )
767767   ROM_LOAD( "gq_460_a06.12h", 0x080000, 0x80000, CRC(97ed5a77) SHA1(68600fd8d914451284cf181fb4bd5872860fb9ad) )
768768
769   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
769   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
770770   DISK_IMAGE( "gq460a08", 0, SHA1(2f142f986fa3c79d5c4102e800980d1706c35f75) )
771771ROM_END
772772
r14399r14400
783783   ROM_LOAD( "ge_557_a07.19h", 0x000000, 0x80000, CRC(7491e0c8) SHA1(6459ab5e7af052ef7a1c4ce01cd844c0f4319f2e) )
784784   ROM_LOAD( "ge_557_a08.19k", 0x080000, 0x80000, CRC(3da2b20c) SHA1(fdc2cdc27f3299f541944a78ce36ed33a7926056) )
785785
786   DISK_REGION( "ide" )         /* IDE HARD DRIVE */
786   DISK_REGION( "drive_0" )         /* IDE HARD DRIVE */
787787   DISK_IMAGE( "ge557a09", 0, SHA1(1ef8093b542fe0bf8240a5fd64e5af3839b6a04c) )
788788ROM_END
789789
src/mame/drivers/seattle.c
r14399r14400
25052505   MCFG_MACHINE_RESET(seattle)
25062506   MCFG_NVRAM_ADD_1FILL("nvram")
25072507
2508   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
2509   MCFG_IDE_BUS_MASTER_SPACE("maincpu", PROGRAM)
2508   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
2509   MCFG_IDE_BUS_MASTER_SPACE("ide", "maincpu", PROGRAM)
25102510
25112511   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, 2, "screen")
25122512   MCFG_3DFX_VOODOO_CPU("maincpu")
r14399r14400
25872587   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version L1.2 (10/8/96) */
25882588   ROM_LOAD( "wg3dh_12.u32", 0x000000, 0x80000, CRC(15e4cea2) SHA1(72c0db7dc53ce645ba27a5311b5ce803ad39f131) )
25892589
2590   DISK_REGION( "ide" )   /* Hard Drive Version 1.3 (Guts 10/15/96, Main 10/15/96) */
2590   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.3 (Guts 10/15/96, Main 10/15/96) */
25912591   DISK_IMAGE( "wg3dh", 0, SHA1(4fc6f25d7f043d9bcf8743aa8df1d9be3cbc375b) )
25922592
25932593   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version L1.1 */
r14399r14400
25992599   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.0ce 7/2/97 */
26002600   ROM_LOAD( "mace10ce.u32", 0x000000, 0x80000, CRC(7a50b37e) SHA1(33788835f84a9443566c80bee9f20a1691490c6d) )
26012601
2602   DISK_REGION( "ide" )   /* Hard Drive Version 1.0B 6/10/97 (Guts 7/2/97, Main 7/2/97) */
2602   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.0B 6/10/97 (Guts 7/2/97, Main 7/2/97) */
26032603   DISK_IMAGE( "mace", 0, SHA1(96ec8d3ff5dd894e21aa81403bcdbeba44bb97ea) )
26042604
26052605   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version L1.1, Labeled as Version 1.0 */
r14399r14400
26112611   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version ??? 5/7/97 */
26122612   ROM_LOAD( "maceboot.u32", 0x000000, 0x80000, CRC(effe3ebc) SHA1(7af3ca3580d6276ffa7ab8b4c57274e15ee6bcbb) )
26132613
2614   DISK_REGION( "ide" )   /* Hard Drive Version 1.0a (Guts 6/9/97, Main 5/12/97) */
2614   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.0a (Guts 6/9/97, Main 5/12/97) */
26152615   DISK_IMAGE( "macea", 0, BAD_DUMP SHA1(9bd4a60627915d71932cab24f89c48ea21f4c1cb) )
26162616
26172617   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version L1.1 */
r14399r14400
26322632   ROM_LOAD32_WORD( "sfrush.u53",  0x800000, 0x200000, CRC(71f8ddb0) SHA1(c24bef801f43bae68fda043c4356e8cf1298ca97) )
26332633   ROM_LOAD32_WORD( "sfrush.u49",  0x800002, 0x200000, CRC(dfb0a54c) SHA1(ed34f9485f7a7e5bb73bf5c6428b27548e12db12) )
26342634
2635   DISK_REGION( "ide" )   /* Hard Drive Version L1.06 */
2635   DISK_REGION( "drive_0" )   /* Hard Drive Version L1.06 */
26362636   DISK_IMAGE( "sfrush", 0, SHA1(e2db0270a707fb2115207f988d5751081d6b4994) )
26372637ROM_END
26382638
r14399r14400
26502650   ROM_LOAD32_WORD( "audio.u53",  0x800000, 0x200000, CRC(51c89a14) SHA1(6bc62bcda224040a4596d795132874828011a038) )
26512651   ROM_LOAD32_WORD( "audio.u49",  0x800002, 0x200000, CRC(e6b684d3) SHA1(1f5bab7fae974cecc8756dd23e3c7aa2cf6e7dc7) )
26522652
2653   DISK_REGION( "ide" )   /* Hard Drive Version 1.2 */
2653   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.2 */
26542654   DISK_IMAGE( "sfrushrk", 0, SHA1(e763f26aca67ebc17fe8b8df4fba91d492cf7837) )
26552655ROM_END
26562656
r14399r14400
26592659   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.2 (2/18/98) */
26602660   ROM_LOAD( "caspd1_2.u32", 0x000000, 0x80000, CRC(0a235e4e) SHA1(b352f10fad786260b58bd344b5002b6ea7aaf76d) )
26612661
2662   DISK_REGION( "ide" )   /* Release version 2.1a (4/17/98) (Guts 1.25 4/17/98, Main 4/17/98) */
2662   DISK_REGION( "drive_0" )   /* Release version 2.1a (4/17/98) (Guts 1.25 4/17/98, Main 4/17/98) */
26632663   DISK_IMAGE( "calspeed", 0, SHA1(08d411c591d4b8bbdd6437ea80d01c4cec8516f8) )
26642664
26652665   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version 1.02 */
r14399r14400
26712671   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.2 (2/18/98) */
26722672   ROM_LOAD( "caspd1_2.u32", 0x000000, 0x80000, CRC(0a235e4e) SHA1(b352f10fad786260b58bd344b5002b6ea7aaf76d) )
26732673
2674   DISK_REGION( "ide" )   /* Release version 1.0r7a (3/4/98) (Guts 3/3/98, Main 1/19/98) */
2674   DISK_REGION( "drive_0" )   /* Release version 1.0r7a (3/4/98) (Guts 3/3/98, Main 1/19/98) */
26752675   DISK_IMAGE( "calspeda", 0, SHA1(6b1c3a7530195ef7309b06a651b01c8b3ece92c6) )
26762676
26772677   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version 1.02 */
r14399r14400
26832683   ROM_REGION32_LE( 0x80000, "user1", 0 )
26842684   ROM_LOAD( "vtrxboot.bin", 0x000000, 0x80000, CRC(ee487a6c) SHA1(fb9efda85047cf615f24f7276a9af9fd542f3354) )
26852685
2686   DISK_REGION( "ide" )
2686   DISK_REGION( "drive_0" )
26872687   DISK_IMAGE( "vaportrx", 0, SHA1(fe53ca7643d2ed2745086abb7f2243c69678cab1) )
26882688
26892689   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version 1.02 */
r14399r14400
26952695   ROM_REGION32_LE( 0x80000, "user1", 0 )
26962696   ROM_LOAD( "vtrxboot.bin", 0x000000, 0x80000, CRC(ee487a6c) SHA1(fb9efda85047cf615f24f7276a9af9fd542f3354) )
26972697
2698   DISK_REGION( "ide" ) /* Guts: Apr 10 1998 11:03:14  Main: Apr 10 1998 11:27:44 */
2698   DISK_REGION( "drive_0" ) /* Guts: Apr 10 1998 11:03:14  Main: Apr 10 1998 11:27:44 */
26992699   DISK_IMAGE( "vaportrp", 0, SHA1(6c86637c442ebd6994eee8c0ae0dce343c35dbe9) )
27002700
27012701   ROM_REGION16_LE( 0x10000, "dcs", 0 )   /* ADSP-2115 data Version 1.02 */
r14399r14400
27102710   ROM_REGION32_LE( 0x80000, "user1", 0 ) /* Seattle System Boot ROM Version 0.1i Apr 14 1997  14:52:53 */
27112711   ROM_LOAD( "biofreak.u32", 0x000000, 0x80000, CRC(cefa00bb) SHA1(7e171610ede1e8a448fb8d175f9cb9e7d549de28) )
27122712
2713   DISK_REGION( "ide" ) /* Build Date 12/11/97 */
2713   DISK_REGION( "drive_0" ) /* Build Date 12/11/97 */
27142714   DISK_IMAGE( "biofreak", 0, SHA1(711241642f92ded8eaf20c418ea748989183fe10) )
27152715ROM_END
27162716
r14399r14400
27222722   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.2 */
27232723   ROM_LOAD( "blitz1_2.u32", 0x000000, 0x80000, CRC(38dbecf5) SHA1(7dd5a5b3baf83a7f8f877ff4cd3f5e8b5201b36f) )
27242724
2725   DISK_REGION( "ide" )   /* Hard Drive Version 1.21 */
2725   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.21 */
27262726   DISK_IMAGE( "blitz", 0, SHA1(9131c7888e89b3c172780156ed3fe1fe46f78b0a) )
27272727ROM_END
27282728
r14399r14400
27342734   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.1 */
27352735   ROM_LOAD( "blitz1_1.u32", 0x000000, 0x80000, CRC(8163ce02) SHA1(89b432d8879052f6c5534ee49599f667f50a010f) )
27362736
2737   DISK_REGION( "ide" )   /* Hard Drive Version 1.21 */
2737   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.21 */
27382738   DISK_IMAGE( "blitz", 0, SHA1(9131c7888e89b3c172780156ed3fe1fe46f78b0a) )
27392739ROM_END
27402740
r14399r14400
27462746   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.0 */
27472747   ROM_LOAD( "bltz9910.u32", 0x000000, 0x80000, CRC(777119b2) SHA1(40d255181c2f3a787919c339e83593fd506779a5) )
27482748
2749   DISK_REGION( "ide" )   /* Hard Drive Version 1.30 */
2749   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.30 */
27502750   DISK_IMAGE( "blitz99", 0, SHA1(19877e26ffce81dd525031e9e2b4f83ff982e2d9) )
27512751ROM_END
27522752
r14399r14400
27582758   ROM_REGION32_LE( 0x80000, "user1", 0 )   /* Boot Code Version 1.4 */
27592759   ROM_LOAD( "bltz2k14.u32", 0x000000, 0x80000, CRC(ac4f0051) SHA1(b8125c17370db7bfd9b783230b4ef3d5b22a2025) )
27602760
2761   DISK_REGION( "ide" )   /* Hard Drive Version 1.5 */
2761   DISK_REGION( "drive_0" )   /* Hard Drive Version 1.5 */
27622762   DISK_IMAGE( "blitz2k", 0, SHA1(e89b7fbd4b4a9854d47ae97493e0afffbd1f69e7) )
27632763ROM_END
27642764
r14399r14400
27702770   ROM_REGION32_LE( 0x80000, "user1", 0 ) /* Boot Rom Version 1.9 */
27712771   ROM_LOAD( "carnevil1_9.u32", 0x000000, 0x80000, CRC(82c07f2e) SHA1(fa51c58022ce251c53bad12fc6ffadb35adb8162) )
27722772
2773   DISK_REGION( "ide" )   /* Hard Drive v1.0.3  Diagnostics v3.4 / Feb 1 1999 16:00:07 */
2773   DISK_REGION( "drive_0" )   /* Hard Drive v1.0.3  Diagnostics v3.4 / Feb 1 1999 16:00:07 */
27742774   DISK_IMAGE( "carnevil", 0, SHA1(5cffb0de63ad36eb01c5951bab04d3f8a9e23e16) )
27752775ROM_END
27762776
r14399r14400
27822782   ROM_REGION32_LE( 0x80000, "user1", 0 ) /* Boot Rom Version 1.9 */
27832783   ROM_LOAD( "carnevil1_9.u32", 0x000000, 0x80000, CRC(82c07f2e) SHA1(fa51c58022ce251c53bad12fc6ffadb35adb8162) )
27842784
2785   DISK_REGION( "ide" )   /* Hard Drive v1.0.1  Diagnostics v3.3 / Oct 20 1998 11:44:41 */
2785   DISK_REGION( "drive_0" )   /* Hard Drive v1.0.1  Diagnostics v3.3 / Oct 20 1998 11:44:41 */
27862786   DISK_IMAGE( "carnevi1", 0, BAD_DUMP SHA1(94532727512280930a100fe473bf3a938fe2d44f) )
27872787ROM_END
27882788
r14399r14400
27942794   ROM_REGION32_LE( 0x80000, "user1", 0 ) /* Boot Rom Version 9. */
27952795   ROM_LOAD( "hyprdrve.u32", 0x000000, 0x80000, CRC(3e18cb80) SHA1(b18cc4253090ee1d65d72a7ec0c426ed08c4f238) )
27962796
2797   DISK_REGION( "ide" )   /* Version 1.40  Oct 23 1998  15:16:00 */
2797   DISK_REGION( "drive_0" )   /* Version 1.40  Oct 23 1998  15:16:00 */
27982798   DISK_IMAGE( "hyprdriv", 0, SHA1(8cfa343797575b32f46cc24150024be48963a03e) )
27992799ROM_END
28002800
src/mame/drivers/midvunit.c
r14399r14400
10571057   MCFG_DEVICE_REMOVE("nvram")
10581058   MCFG_NVRAM_HANDLER(midway_serial_pic2)
10591059
1060   MCFG_IDE_CONTROLLER_ADD("ide", NULL)
1060   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_devices, "hdd", NULL)
10611061
10621062   /* sound hardware */
10631063   MCFG_FRAGMENT_ADD(dcs2_audio_2115)
r14399r14400
16181618   ROM_REGION32_LE( 0x1000000, "user1", 0 )
16191619   ROM_LOAD( "u41.rom", 0x000000, 0x20000, CRC(398c54cc) SHA1(6c4b5d6ec5c844dcbf181f9d86a9196a088ed2db) )
16201620
1621   DISK_REGION( "ide" )
1621   DISK_REGION( "drive_0" )
16221622   DISK_IMAGE( "wargods", 0, SHA1(141063f95867fdcc4b15c844e510696604a70c6a) )
16231623ROM_END
16241624
src/mame/drivers/8080bw.c
r14399r14400
26432643   ROM_LOAD( "pv07.2",   0x0400, 0x0400, CRC(2c5b91cb) SHA1(7fa4d4aef85473b1b4f18734230c164e72be44e7) )
26442644ROM_END
26452645
2646ROM_START( invadpt2br )
2647   ROM_REGION( 0x10000, "maincpu", 0 )
2648   ROM_LOAD( "pv01_bad",    0x0000, 0x0800, BAD_DUMP CRC(2931a033) SHA1(b04ccde4a4a04b37aa65edc4af4e53a8c1f03dfe) ) // chunk of garbage in prg area $500-$600, the rest of rom contents is same as parent
2649   ROM_LOAD( "pv01",        0x0000, 0x0800, CRC(7288a511) SHA1(ff617872784c28ed03591aefa9f0519e5651701f) ) // so let's load the parent rom instead
2650   ROM_LOAD( "pv02",        0x0800, 0x0800, CRC(420c7c35) SHA1(b51265f4d9e5a8cf9d53099a97cadd25ea0b34ce) )
2651   ROM_LOAD( "pv03",        0x1000, 0x0800, CRC(dffd04b9) SHA1(d51a0f27e90b0a49cf2d57ec82a863dcae9f3ea4) )
2652   ROM_LOAD( "pv04",        0x1800, 0x0800, CRC(b0626aff) SHA1(b7de6c21030732bd0479228f057ca4c87b913b0a) )
2653   ROM_LOAD( "pv05",        0x4000, 0x0800, CRC(84c70bb8) SHA1(75fef3ee6da3e7e01a257629016bc10a23691d62) )
2654
2655   ROM_REGION( 0x0800, "proms", 0 )      /* color maps player 1/player 2 (taken from parent set) */
2656   ROM_LOAD( "pv06.1",   0x0000, 0x0400, CRC(a732810b) SHA1(a5fabffa73ca740909e23b9530936f9274dff356) )
2657   ROM_LOAD( "pv07.2",   0x0400, 0x0400, CRC(2c5b91cb) SHA1(7fa4d4aef85473b1b4f18734230c164e72be44e7) )
2658ROM_END
2659
26462660ROM_START( invaddlx )
26472661   ROM_REGION( 0x10000, "maincpu", 0 )
26482662   ROM_LOAD( "invdelux.h",   0x0000, 0x0800, CRC(e690818f) SHA1(0860fb03a64d34a9704a1459a5e96929eafd39c7) )
r14399r14400
34073421GAME( 1979, grescue,  lrescue,  lrescue,  lrescue,  0, ROT270, "Taito (Universal license?)", "Galaxy Rescue", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
34083422GAME( 1979, desterth, lrescue,  lrescue,  invrvnge, 0, ROT270, "bootleg", "Destination Earth", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
34093423GAME( 1979, invadpt2, 0,        invadpt2, invadpt2, 0, ROT270, "Taito", "Space Invaders Part II (Taito)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
3424GAME( 1979, invadpt2br,invadpt2,invadpt2, invadpt2, 0, ROT270, "Taito do Brasil", "Space Invaders Part II (Brazil)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
34103425GAME( 1980, invaddlx, invadpt2, invaders, invadpt2, 0, ROT270, "Taito (Midway license)", "Space Invaders Deluxe", GAME_SUPPORTS_SAVE )
34113426GAME( 1980, vortex,   0,        vortex,   vortex, vortex, ROT270, "Zilec Electronics", "Vortex", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) /* Encrypted 8080/IO */
34123427GAME( 1979, cosmo,    0,        cosmo,    cosmo,    0, ROT90,  "TDS & Mints", "Cosmo", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
src/mame/drivers/taitowlf.c
r14399r14400
644644   MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, dma8237_2_config )
645645   MCFG_PIC8259_ADD( "pic8259_1", taitowlf_pic8259_1_config )
646646   MCFG_PIC8259_ADD( "pic8259_2", taitowlf_pic8259_2_config )
647   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
647   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
648648   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
649649
650650   /* video hardware */
src/mame/drivers/taitogn.c
r14399r14400
975975   MCFG_MACHINE_RESET( coh3002t )
976976
977977   MCFG_AT28C16_ADD( "at28c16", 0 )
978   MCFG_IDE_CONTROLLER_ADD( "card", 0 )
978   MCFG_IDE_CONTROLLER_ADD( "card", 0, ide_devices, "hdd", NULL)
979979
980980   MCFG_MB3773_ADD("mb3773")
981981
r14399r14400
11271127ROM_START(raycris)
11281128   TAITOGNET_BIOS
11291129
1130   DISK_REGION( "card" )
1130   DISK_REGION( "drive_0" )
11311131   DISK_IMAGE( "raycris", 0, SHA1(015cb0e6c4421cc38809de28c4793b4491386aee))
11321132ROM_END
11331133
r14399r14400
11351135ROM_START(gobyrc)
11361136   TAITOGNET_BIOS
11371137
1138   DISK_REGION( "card" )
1138   DISK_REGION( "drive_0" )
11391139   DISK_IMAGE( "gobyrc", 0, SHA1(0bee1f495fc8b033fd56aad9260ae94abb35eb58))
11401140ROM_END
11411141
11421142ROM_START(rcdego)
11431143   TAITOGNET_BIOS
11441144
1145   DISK_REGION( "card" )
1145   DISK_REGION( "drive_0" )
11461146   DISK_IMAGE( "rcdego", 0, SHA1(9e177f2a3954cfea0c8c5a288e116324d10f5dd1))
11471147ROM_END
11481148
11491149ROM_START(chaoshea)
11501150   TAITOGNET_BIOS
11511151
1152   DISK_REGION( "card" )
1152   DISK_REGION( "drive_0" )
11531153   DISK_IMAGE( "chaosheat", 0, SHA1(c13b7d7025eee05f1f696d108801c7bafb3f1356))
11541154ROM_END
11551155
11561156ROM_START(chaosheaj)
11571157   TAITOGNET_BIOS
11581158
1159   DISK_REGION( "card" )
1159   DISK_REGION( "drive_0" )
11601160   DISK_IMAGE( "chaosheatj", 0, SHA1(2f211ac08675ea8ec33c7659a13951db94eaa627))
11611161ROM_END
11621162
r14399r14400
11641164ROM_START(flipmaze)
11651165   TAITOGNET_BIOS
11661166
1167   DISK_REGION( "card" )
1167   DISK_REGION( "drive_0" )
11681168   DISK_IMAGE( "flipmaze", 0, SHA1(423b6c06f4f2d9a608ce20b61a3ac11687d22c40) )
11691169ROM_END
11701170
r14399r14400
11721172ROM_START(spuzbobl)
11731173   TAITOGNET_BIOS
11741174
1175   DISK_REGION( "card" )
1175   DISK_REGION( "drive_0" )
11761176   DISK_IMAGE( "spuzbobl", 0, SHA1(1b1c72fb7e5656021485fefaef8f2ba48e2b4ea8))
11771177ROM_END
11781178
11791179ROM_START(spuzboblj)
11801180   TAITOGNET_BIOS
11811181
1182   DISK_REGION( "card" )
1182   DISK_REGION( "drive_0" )
11831183   DISK_IMAGE( "spuzbobj", 0, SHA1(dac433cf88543d2499bf797d7406b82ae4338726))
11841184ROM_END
11851185
11861186ROM_START(soutenry)
11871187   TAITOGNET_BIOS
11881188
1189   DISK_REGION( "card" )
1189   DISK_REGION( "drive_0" )
11901190   DISK_IMAGE( "soutenry", 0, SHA1(9204d0be833d29f37b8cd3fbdf09da69b622254b))
11911191ROM_END
11921192
11931193ROM_START(shanghss)
11941194   TAITOGNET_BIOS
11951195
1196   DISK_REGION( "card" )
1196   DISK_REGION( "drive_0" )
11971197   DISK_IMAGE( "shanghss", 0, SHA1(7964f71ec5c81d2120d83b63a82f97fbad5a8e6d))
11981198ROM_END
11991199
12001200ROM_START(sianniv)
12011201   TAITOGNET_BIOS
12021202
1203   DISK_REGION( "card" )
1203   DISK_REGION( "drive_0" )
12041204   DISK_IMAGE( "sianniv", 0, SHA1(1e08b813190a9e1baf29bc16884172d6c8da7ae3))
12051205ROM_END
12061206
12071207ROM_START(kollon)
12081208   TAITOGNET_BIOS
12091209
1210   DISK_REGION( "card" )
1210   DISK_REGION( "drive_0" )
12111211   DISK_IMAGE( "kollon", 0, SHA1(d8ea5b5b0ee99004b16ef89883e23de6c7ddd7ce))
12121212ROM_END
12131213
r14399r14400
12151215   TAITOGNET_BIOS
12161216   ROM_DEFAULT_BIOS( "v2" )
12171217
1218   DISK_REGION( "card" )
1218   DISK_REGION( "drive_0" )
12191219   DISK_IMAGE( "kollonc", 0, SHA1(ce62181659701cfb8f7c564870ab902be4d8e060)) /* Original Taito Compact Flash version */
12201220ROM_END
12211221
12221222ROM_START(shikigam)
12231223   TAITOGNET_BIOS
12241224
1225   DISK_REGION( "card" )
1225   DISK_REGION( "drive_0" )
12261226   DISK_IMAGE( "shikigam", 0, SHA1(fa49a0bc47f5cb7c30d7e49e2c3696b21bafb840))
12271227ROM_END
12281228
r14399r14400
12321232ROM_START(otenamih)
12331233   TAITOGNET_BIOS
12341234
1235   DISK_REGION( "card" )
1235   DISK_REGION( "drive_0" )
12361236   DISK_IMAGE( "otenamih", 0, SHA1(b3babe3a1876c43745616ee1e7d87276ce7dad0b) )
12371237ROM_END
12381238
r14399r14400
12401240ROM_START(psyvaria)
12411241   TAITOGNET_BIOS
12421242
1243   DISK_REGION( "card" )
1243   DISK_REGION( "drive_0" )
12441244   DISK_IMAGE( "psyvaria", 0,  SHA1(b981a42a10069322b77f7a268beae1d409b4156d))
12451245ROM_END
12461246
12471247ROM_START(psyvarrv)
12481248   TAITOGNET_BIOS
12491249
1250   DISK_REGION( "card" )
1250   DISK_REGION( "drive_0" )
12511251   DISK_IMAGE( "psyvarrv", 0, SHA1(277c4f52502bcd7acc1889840962ec80d56465f3))
12521252ROM_END
12531253
12541254ROM_START(zooo)
12551255   TAITOGNET_BIOS
12561256
1257   DISK_REGION( "card" )
1257   DISK_REGION( "drive_0" )
12581258   DISK_IMAGE( "zooo", 0, SHA1(e275b3141b2bc49142990e6b497a5394a314a30b))
12591259ROM_END
12601260
12611261ROM_START(zokuoten)
12621262   TAITOGNET_BIOS
12631263
1264   DISK_REGION( "card" )
1264   DISK_REGION( "drive_0" )
12651265   DISK_IMAGE( "zokuoten", 0, SHA1(5ce13db00518f96af64935176c71ec68d2a51938))
12661266ROM_END
12671267
r14399r14400
12691269   TAITOGNET_BIOS
12701270   ROM_DEFAULT_BIOS( "v2" )
12711271
1272   DISK_REGION( "card" )
1272   DISK_REGION( "drive_0" )
12731273   DISK_IMAGE( "otenamhf", 0, SHA1(5b15c33bf401e5546d78e905f538513d6ffcf562)) /* Original Taito Compact Flash version */
12741274ROM_END
12751275
r14399r14400
12811281ROM_START(nightrai)
12821282   TAITOGNET_BIOS
12831283
1284   DISK_REGION( "card" )
1284   DISK_REGION( "drive_0" )
12851285   DISK_IMAGE( "nightrai", 0, SHA1(74d0458f851cbcf10453c5cc4c47bb4388244cdf))
12861286ROM_END
12871287
12881288ROM_START(otenki)
12891289   TAITOGNET_BIOS
12901290
1291   DISK_REGION( "card" )
1291   DISK_REGION( "drive_0" )
12921292   DISK_IMAGE( "otenki", 0, SHA1(7e745ca4c4570215f452fd09cdd56a42c39caeba))
12931293ROM_END
12941294
r14399r14400
12971297ROM_START(usagi)
12981298   TAITOGNET_BIOS
12991299
1300   DISK_REGION( "card" )
1300   DISK_REGION( "drive_0" )
13011301   DISK_IMAGE( "usagi", 0, SHA1(edf9dd271957f6cb06feed238ae21100514bef8e))
13021302ROM_END
13031303
13041304ROM_START(mahjngoh)
13051305   TAITOGNET_BIOS
13061306
1307   DISK_REGION( "card" )
1307   DISK_REGION( "drive_0" )
13081308   DISK_IMAGE( "mahjngoh", 0, SHA1(3ef1110d15582d7c0187438d7ad61765dd121cff))
13091309ROM_END
13101310
13111311ROM_START(shangtou)
13121312   TAITOGNET_BIOS
13131313
1314   DISK_REGION( "card" )
1314   DISK_REGION( "drive_0" )
13151315   DISK_IMAGE( "shanghaito", 0, SHA1(9901db5a9aae77e3af4157aa2c601eaab5b7ca85) )
13161316ROM_END
13171317
r14399r14400
13211321ROM_START(xiistag)
13221322   TAITOGNET_BIOS
13231323
1324   DISK_REGION( "card" )
1324   DISK_REGION( "drive_0" )
13251325   DISK_IMAGE( "xiistag", 0, SHA1(586e37c8d926293b2bd928e5f0d693910cfb05a2))
13261326ROM_END
13271327
src/mame/drivers/funkball.c
r14399r14400
11651165   MCFG_PCI_BUS_DEVICE(7, "voodoo_0", voodoo_0_pci_r, voodoo_0_pci_w)
11661166   MCFG_PCI_BUS_DEVICE(18, NULL, cx5510_pci_r, cx5510_pci_w)
11671167
1168   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
1168   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
11691169
11701170   /* video hardware */
11711171   MCFG_3DFX_VOODOO_1_ADD("voodoo_0", STD_VOODOO_1_CLOCK, 2, "screen")
src/mame/drivers/gamecstl.c
r14399r14400
711711
712712   MCFG_PIC8259_ADD( "pic8259_2", gamecstl_pic8259_2_config )
713713
714   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
714   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL)
715715
716716   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
717717
r14399r14400
786786   ROM_REGION(0x08100, "gfx1", 0)
787787   ROM_LOAD("cga.chr",     0x00000, 0x01000, BAD_DUMP CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd))
788788
789   DISK_REGION( "ide" )
789   DISK_REGION( "drive_0" )
790790   DISK_IMAGE( "gamecstl", 0, SHA1(b431af3c42c48ba07972d77a3d24e60ee1e4359e) )
791791ROM_END
792792
r14399r14400
797797   ROM_REGION(0x08100, "gfx1", 0)
798798   ROM_LOAD("cga.chr",     0x00000, 0x01000, BAD_DUMP CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd))
799799
800   DISK_REGION( "ide" )
800   DISK_REGION( "drive_0" )
801801   DISK_IMAGE( "gamecst2", 0, SHA1(14e1b311cb474801c7bdda3164a0c220fb102159) )
802802ROM_END
803803
src/emu/drivers/xtal.h
r14399r14400
177177   XTAL_36MHz        = 36000000,      /* Sega Model 1 video board */
178178   XTAL_38_76922MHz   = 38769220,      /* Namco System 21 video board */
179179   XTAL_40MHz        = 40000000,
180        XTAL_42MHz        = 42000000,      /* BMC A-00211 - Popo Bear */
180   XTAL_42MHz         = 42000000,      /* BMC A-00211 - Popo Bear */
181181   XTAL_42_9545MHz    = 42954545,      /* CPS3 */
182182   XTAL_44_1MHz      = 44100000,      /* Subsino's Bishou Jan */
183183   XTAL_45MHz        = 45000000,      /* Eolith with Hyperstone CPUs */
r14399r14400
198198   XTAL_67_7376MHz    = 67737600,      /* PSX-based h/w, Sony ZN1-2-based */
199199   XTAL_72_576MHz     = 72576000,      /* Centipede, Millipede, Missile Command, Let's Go Bowling "Multipede" */
200200   XTAL_73_728MHz     = 73728000,      /* Ms. Pac-Man/Galaga 20th Anniversary */
201   XTAL_100MHz       = 100000000,      /* PSX-based Namco System 12, Vegas, Sony ZN1-2-based */
202   XTAL_101_4912MHz   = 101491200,      /* PSX-based Namco System 10 */
203   XTAL_200MHz         = 200000000,      /* Base SH4 CPU (Naomi, Hikaru etc.) */
201   XTAL_100MHz       = 100000000,   /* PSX-based Namco System 12, Vegas, Sony ZN1-2-based */
202   XTAL_101_4912MHz   = 101491200,   /* PSX-based Namco System 10 */
203   XTAL_200MHz         = 200000000,   /* Base SH4 CPU (Naomi, Hikaru etc.) */
204204
205205/* Resonators (There are probably more. Almost always used for driving OKI sound chips) */
206206
src/emu/emu.mak
r14399r14400
220220   $(EMUMACHINE)/msm6242.o      \
221221   $(EMUMACHINE)/ncr539x.o    \
222222   $(EMUMACHINE)/nmc9306.o      \
223    $(EMUMACHINE)/nscsi_bus.o   \
224    $(EMUMACHINE)/nscsi_cd.o    \
225    $(EMUMACHINE)/nscsi_hd.o    \
223226   $(EMUMACHINE)/nvram.o      \
224227   $(EMUMACHINE)/pc16552d.o   \
225228   $(EMUMACHINE)/pci.o         \
src/emu/machine/idectrl.c
r14399r14400
77#include "emu.h"
88#include "idectrl.h"
99#include "debugger.h"
10#include "imagedev/harddriv.h"
1110
1211/***************************************************************************
1312    DEBUGGING
r14399r14400
2726    CONSTANTS
2827***************************************************************************/
2928
30#define IDE_DISK_SECTOR_SIZE         512
31
3229#define MINIMUM_COMMAND_TIME         (attotime::from_usec(10))
3330
3431#define TIME_PER_SECTOR               (attotime::from_usec(100))
r14399r14400
108105typedef struct _ide_device ide_device;
109106struct _ide_device
110107{
111   UINT8         features[IDE_DISK_SECTOR_SIZE];
112
113108   UINT16         cur_cylinder;
114109   UINT8         cur_sector;
115110   UINT8         cur_head;
116111   UINT8         cur_head_reg;
117
118112   UINT32         cur_lba;
119
120   UINT16         num_cylinders;
121   UINT8         num_sectors;
122   UINT8         num_heads;
123
124   chd_file       *handle;
125   hard_disk_file *disk;
126   bool         is_image_device;
113   ide_slot_device *slot;
127114};
128115
129116
r14399r14400
172159   const UINT8 *   user_password;
173160
174161   UINT8         gnetreadlock;
175   ide_hardware *   hardware;
176162
177163   UINT8         cur_drive;
178164   ide_device      drive[2];
r14399r14400
186172
187173static TIMER_CALLBACK( reset_callback );
188174
189static void ide_build_features(ide_state *ide, int drive);
190
191175static void continue_read(ide_state *ide);
192176static void read_sector_done(ide_state *ide);
193177static TIMER_CALLBACK( read_sector_done_callback );
r14399r14400
288272UINT8 *ide_get_features(device_t *device, int drive)
289273{
290274   ide_state *ide = get_safe_token(device);
291   return ide->drive[drive].features;
275   return ide->drive[drive].slot->get_features();
292276}
293277
294278void ide_set_gnet_readlock(device_t *device, const UINT8 onoff)
r14399r14400
388372
389373   /* standard CHS */
390374   else
391      return (ide->drive[ide->cur_drive].cur_cylinder * ide->drive[ide->cur_drive].num_heads + ide->drive[ide->cur_drive].cur_head) * ide->drive[ide->cur_drive].num_sectors + ide->drive[ide->cur_drive].cur_sector - 1;
375      return (ide->drive[ide->cur_drive].cur_cylinder * ide->drive[ide->cur_drive].slot->get_heads() + ide->drive[ide->cur_drive].cur_head) * ide->drive[ide->cur_drive].slot->get_sectors() + ide->drive[ide->cur_drive].cur_sector - 1;
392376}
393377
394378
r14399r14400
418402   {
419403      /* sectors are 1-based */
420404      ide->drive[ide->cur_drive].cur_sector++;
421      if (ide->drive[ide->cur_drive].cur_sector > ide->drive[ide->cur_drive].num_sectors)
405      if (ide->drive[ide->cur_drive].cur_sector > ide->drive[ide->cur_drive].slot->get_sectors())
422406      {
423407         /* heads are 0 based */
424408         ide->drive[ide->cur_drive].cur_sector = 1;
425409         ide->drive[ide->cur_drive].cur_head++;
426         if (ide->drive[ide->cur_drive].cur_head >= ide->drive[ide->cur_drive].num_heads)
410         if (ide->drive[ide->cur_drive].cur_head >= ide->drive[ide->cur_drive].slot->get_heads())
427411         {
428412            ide->drive[ide->cur_drive].cur_head = 0;
429413            ide->drive[ide->cur_drive].cur_cylinder++;
r14399r14400
455439}
456440
457441
458static void ide_generate_features(ide_state *ide,int drive)
442void ide_hdd_device::ide_build_features()
459443{
460   int total_sectors = ide->drive[drive].num_cylinders * ide->drive[drive].num_heads * ide->drive[drive].num_sectors;
461   int sectors_per_track = ide->drive[drive].num_heads * ide->drive[drive].num_sectors;
444   memset(m_features, 0, IDE_DISK_SECTOR_SIZE);
445   int total_sectors = m_num_cylinders * m_num_heads * m_num_sectors;
446   int sectors_per_track = m_num_heads * m_num_sectors;
462447
463448   /* basic geometry */
464   ide->drive[drive].features[ 0*2+0] = 0x5a;                  /*  0: configuration bits */
465   ide->drive[drive].features[ 0*2+1] = 0x04;
466   ide->drive[drive].features[ 1*2+0] = ide->drive[drive].num_cylinders & 0xff;   /*  1: logical cylinders */
467   ide->drive[drive].features[ 1*2+1] = ide->drive[drive].num_cylinders >> 8;
468   ide->drive[drive].features[ 2*2+0] = 0;                     /*  2: reserved */
469   ide->drive[drive].features[ 2*2+1] = 0;
470   ide->drive[drive].features[ 3*2+0] = ide->drive[drive].num_heads & 0xff;      /*  3: logical heads */
471   ide->drive[drive].features[ 3*2+1] = 0;/*ide->num_heads >> 8;*/
472   ide->drive[drive].features[ 4*2+0] = 0;                     /*  4: vendor specific (obsolete) */
473   ide->drive[drive].features[ 4*2+1] = 0;
474   ide->drive[drive].features[ 5*2+0] = 0;                     /*  5: vendor specific (obsolete) */
475   ide->drive[drive].features[ 5*2+1] = 0;
476   ide->drive[drive].features[ 6*2+0] = ide->drive[drive].num_sectors & 0xff;   /*  6: logical sectors per logical track */
477   ide->drive[drive].features[ 6*2+1] = 0;/*ide->num_sectors >> 8;*/
478   ide->drive[drive].features[ 7*2+0] = 0;                     /*  7: vendor-specific */
479   ide->drive[drive].features[ 7*2+1] = 0;
480   ide->drive[drive].features[ 8*2+0] = 0;                     /*  8: vendor-specific */
481   ide->drive[drive].features[ 8*2+1] = 0;
482   ide->drive[drive].features[ 9*2+0] = 0;                     /*  9: vendor-specific */
483   ide->drive[drive].features[ 9*2+1] = 0;
484   swap_strncpy(&ide->drive[drive].features[10*2+0],            /* 10-19: serial number */
449   m_features[ 0*2+0] = 0x5a;                  /*  0: configuration bits */
450   m_features[ 0*2+1] = 0x04;
451   m_features[ 1*2+0] = m_num_cylinders & 0xff;   /*  1: logical cylinders */
452   m_features[ 1*2+1] = m_num_cylinders >> 8;
453   m_features[ 2*2+0] = 0;                     /*  2: reserved */
454   m_features[ 2*2+1] = 0;
455   m_features[ 3*2+0] = m_num_heads & 0xff;      /*  3: logical heads */
456   m_features[ 3*2+1] = 0;/*ide->num_heads >> 8;*/
457   m_features[ 4*2+0] = 0;                     /*  4: vendor specific (obsolete) */
458   m_features[ 4*2+1] = 0;
459   m_features[ 5*2+0] = 0;                     /*  5: vendor specific (obsolete) */
460   m_features[ 5*2+1] = 0;
461   m_features[ 6*2+0] = m_num_sectors & 0xff;   /*  6: logical sectors per logical track */
462   m_features[ 6*2+1] = 0;/*ide->num_sectors >> 8;*/
463   m_features[ 7*2+0] = 0;                     /*  7: vendor-specific */
464   m_features[ 7*2+1] = 0;
465   m_features[ 8*2+0] = 0;                     /*  8: vendor-specific */
466   m_features[ 8*2+1] = 0;
467   m_features[ 9*2+0] = 0;                     /*  9: vendor-specific */
468   m_features[ 9*2+1] = 0;
469   swap_strncpy(&m_features[10*2+0],            /* 10-19: serial number */
485470         "00000000000000000000", 10);
486   ide->drive[drive].features[20*2+0] = 0;                     /* 20: vendor-specific */
487   ide->drive[drive].features[20*2+1] = 0;
488   ide->drive[drive].features[21*2+0] = 0;                     /* 21: vendor-specific */
489   ide->drive[drive].features[21*2+1] = 0;
490   ide->drive[drive].features[22*2+0] = 4;                     /* 22: # of vendor-specific bytes on read/write long commands */
491   ide->drive[drive].features[22*2+1] = 0;
492   swap_strncpy(&ide->drive[drive].features[23*2+0],            /* 23-26: firmware revision */
471   m_features[20*2+0] = 0;                     /* 20: vendor-specific */
472   m_features[20*2+1] = 0;
473   m_features[21*2+0] = 0;                     /* 21: vendor-specific */
474   m_features[21*2+1] = 0;
475   m_features[22*2+0] = 4;                     /* 22: # of vendor-specific bytes on read/write long commands */
476   m_features[22*2+1] = 0;
477   swap_strncpy(&m_features[23*2+0],            /* 23-26: firmware revision */
493478         "1.0", 4);
494   swap_strncpy(&ide->drive[drive].features[27*2+0],            /* 27-46: model number */
479   swap_strncpy(&m_features[27*2+0],            /* 27-46: model number */
495480         "MAME Compressed Hard Disk", 20);
496   ide->drive[drive].features[47*2+0] = 0x01;                  /* 47: read/write multiple support */
497   ide->drive[drive].features[47*2+1] = 0x80;
498   ide->drive[drive].features[48*2+0] = 0;                     /* 48: reserved */
499   ide->drive[drive].features[48*2+1] = 0;
500   ide->drive[drive].features[49*2+0] = 0x03;                  /* 49: capabilities */
501   ide->drive[drive].features[49*2+1] = 0x0f;
502   ide->drive[drive].features[50*2+0] = 0;                     /* 50: reserved */
503   ide->drive[drive].features[50*2+1] = 0;
504   ide->drive[drive].features[51*2+0] = 2;                     /* 51: PIO data transfer cycle timing mode */
505   ide->drive[drive].features[51*2+1] = 0;
506   ide->drive[drive].features[52*2+0] = 2;                     /* 52: single word DMA transfer cycle timing mode */
507   ide->drive[drive].features[52*2+1] = 0;
508   ide->drive[drive].features[53*2+0] = 3;                     /* 53: field validity */
509   ide->drive[drive].features[53*2+1] = 0;
510   ide->drive[drive].features[54*2+0] = ide->drive[drive].num_cylinders & 0xff;   /* 54: number of current logical cylinders */
511   ide->drive[drive].features[54*2+1] = ide->drive[drive].num_cylinders >> 8;
512   ide->drive[drive].features[55*2+0] = ide->drive[drive].num_heads & 0xff;      /* 55: number of current logical heads */
513   ide->drive[drive].features[55*2+1] = 0;/*ide->num_heads >> 8;*/
514   ide->drive[drive].features[56*2+0] = ide->drive[drive].num_sectors & 0xff;   /* 56: number of current logical sectors per track */
515   ide->drive[drive].features[56*2+1] = 0;/*ide->num_sectors >> 8;*/
516   ide->drive[drive].features[57*2+0] = sectors_per_track & 0xff;   /* 57-58: number of current logical sectors per track */
517   ide->drive[drive].features[57*2+1] = sectors_per_track >> 8;
518   ide->drive[drive].features[58*2+0] = sectors_per_track >> 16;
519   ide->drive[drive].features[58*2+1] = sectors_per_track >> 24;
520   ide->drive[drive].features[59*2+0] = 0;                     /* 59: multiple sector timing */
521   ide->drive[drive].features[59*2+1] = 0;
522   ide->drive[drive].features[60*2+0] = total_sectors & 0xff;      /* 60-61: total user addressable sectors */
523   ide->drive[drive].features[60*2+1] = total_sectors >> 8;
524   ide->drive[drive].features[61*2+0] = total_sectors >> 16;
525   ide->drive[drive].features[61*2+1] = total_sectors >> 24;
526   ide->drive[drive].features[62*2+0] = 0x07;                  /* 62: single word dma transfer */
527   ide->drive[drive].features[62*2+1] = 0x00;
528   ide->drive[drive].features[63*2+0] = 0x07;                  /* 63: multiword DMA transfer */
529   ide->drive[drive].features[63*2+1] = 0x04;
530   ide->drive[drive].features[64*2+0] = 0x03;                  /* 64: flow control PIO transfer modes supported */
531   ide->drive[drive].features[64*2+1] = 0x00;
532   ide->drive[drive].features[65*2+0] = 0x78;                  /* 65: minimum multiword DMA transfer cycle time per word */
533   ide->drive[drive].features[65*2+1] = 0x00;
534   ide->drive[drive].features[66*2+0] = 0x78;                  /* 66: mfr's recommended multiword DMA transfer cycle time */
535   ide->drive[drive].features[66*2+1] = 0x00;
536   ide->drive[drive].features[67*2+0] = 0x4d;                  /* 67: minimum PIO transfer cycle time without flow control */
537   ide->drive[drive].features[67*2+1] = 0x01;
538   ide->drive[drive].features[68*2+0] = 0x78;                  /* 68: minimum PIO transfer cycle time with IORDY */
539   ide->drive[drive].features[68*2+1] = 0x00;
540   ide->drive[drive].features[69*2+0] = 0x00;                  /* 69-70: reserved */
541   ide->drive[drive].features[69*2+1] = 0x00;
542   ide->drive[drive].features[71*2+0] = 0x00;                  /* 71: reserved for IDENTIFY PACKET command */
543   ide->drive[drive].features[71*2+1] = 0x00;
544   ide->drive[drive].features[72*2+0] = 0x00;                  /* 72: reserved for IDENTIFY PACKET command */
545   ide->drive[drive].features[72*2+1] = 0x00;
546   ide->drive[drive].features[73*2+0] = 0x00;                  /* 73: reserved for IDENTIFY PACKET command */
547   ide->drive[drive].features[73*2+1] = 0x00;
548   ide->drive[drive].features[74*2+0] = 0x00;                  /* 74: reserved for IDENTIFY PACKET command */
549   ide->drive[drive].features[74*2+1] = 0x00;
550   ide->drive[drive].features[75*2+0] = 0x00;                  /* 75: queue depth */
551   ide->drive[drive].features[75*2+1] = 0x00;
552   ide->drive[drive].features[76*2+0] = 0x00;                  /* 76-79: reserved */
553   ide->drive[drive].features[76*2+1] = 0x00;
554   ide->drive[drive].features[80*2+0] = 0x00;                  /* 80: major version number */
555   ide->drive[drive].features[80*2+1] = 0x00;
556   ide->drive[drive].features[81*2+0] = 0x00;                  /* 81: minor version number */
557   ide->drive[drive].features[81*2+1] = 0x00;
558   ide->drive[drive].features[82*2+0] = 0x00;                  /* 82: command set supported */
559   ide->drive[drive].features[82*2+1] = 0x00;
560   ide->drive[drive].features[83*2+0] = 0x00;                  /* 83: command sets supported */
561   ide->drive[drive].features[83*2+1] = 0x00;
562   ide->drive[drive].features[84*2+0] = 0x00;                  /* 84: command set/feature supported extension */
563   ide->drive[drive].features[84*2+1] = 0x00;
564   ide->drive[drive].features[85*2+0] = 0x00;                  /* 85: command set/feature enabled */
565   ide->drive[drive].features[85*2+1] = 0x00;
566   ide->drive[drive].features[86*2+0] = 0x00;                  /* 86: command set/feature enabled */
567   ide->drive[drive].features[86*2+1] = 0x00;
568   ide->drive[drive].features[87*2+0] = 0x00;                  /* 87: command set/feature default */
569   ide->drive[drive].features[87*2+1] = 0x00;
570   ide->drive[drive].features[88*2+0] = 0x00;                  /* 88: additional DMA modes */
571   ide->drive[drive].features[88*2+1] = 0x00;
572   ide->drive[drive].features[89*2+0] = 0x00;                  /* 89: time required for security erase unit completion */
573   ide->drive[drive].features[89*2+1] = 0x00;
574   ide->drive[drive].features[90*2+0] = 0x00;                  /* 90: time required for enhanced security erase unit completion */
575   ide->drive[drive].features[90*2+1] = 0x00;
576   ide->drive[drive].features[91*2+0] = 0x00;                  /* 91: current advanced power management value */
577   ide->drive[drive].features[91*2+1] = 0x00;
578   ide->drive[drive].features[92*2+0] = 0x00;                  /* 92: master password revision code */
579   ide->drive[drive].features[92*2+1] = 0x00;
580   ide->drive[drive].features[93*2+0] = 0x00;                  /* 93: hardware reset result */
581   ide->drive[drive].features[93*2+1] = 0x00;
582   ide->drive[drive].features[94*2+0] = 0x00;                  /* 94: acoustic management values */
583   ide->drive[drive].features[94*2+1] = 0x00;
584   ide->drive[drive].features[95*2+0] = 0x00;                  /* 95-99: reserved */
585   ide->drive[drive].features[95*2+1] = 0x00;
586   ide->drive[drive].features[100*2+0] = total_sectors & 0xff;      /* 100-103: maximum 48-bit LBA */
587   ide->drive[drive].features[100*2+1] = total_sectors >> 8;
588   ide->drive[drive].features[101*2+0] = total_sectors >> 16;
589   ide->drive[drive].features[101*2+1] = total_sectors >> 24;
590   ide->drive[drive].features[102*2+0] = 0x00;
591   ide->drive[drive].features[102*2+1] = 0x00;
592   ide->drive[drive].features[103*2+0] = 0x00;
593   ide->drive[drive].features[103*2+1] = 0x00;
594   ide->drive[drive].features[104*2+0] = 0x00;                  /* 104-126: reserved */
595   ide->drive[drive].features[104*2+1] = 0x00;
596   ide->drive[drive].features[127*2+0] = 0x00;                  /* 127: removable media status notification */
597   ide->drive[drive].features[127*2+1] = 0x00;
598   ide->drive[drive].features[128*2+0] = 0x00;                  /* 128: security status */
599   ide->drive[drive].features[128*2+1] = 0x00;
600   ide->drive[drive].features[129*2+0] = 0x00;                  /* 129-159: vendor specific */
601   ide->drive[drive].features[129*2+1] = 0x00;
602   ide->drive[drive].features[160*2+0] = 0x00;                  /* 160: CFA power mode 1 */
603   ide->drive[drive].features[160*2+1] = 0x00;
604   ide->drive[drive].features[161*2+0] = 0x00;                  /* 161-175: reserved for CompactFlash */
605   ide->drive[drive].features[161*2+1] = 0x00;
606   ide->drive[drive].features[176*2+0] = 0x00;                  /* 176-205: current media serial number */
607   ide->drive[drive].features[176*2+1] = 0x00;
608   ide->drive[drive].features[206*2+0] = 0x00;                  /* 206-254: reserved */
609   ide->drive[drive].features[206*2+1] = 0x00;
610   ide->drive[drive].features[255*2+0] = 0x00;                  /* 255: integrity word */
611   ide->drive[drive].features[255*2+1] = 0x00;
481   m_features[47*2+0] = 0x01;                  /* 47: read/write multiple support */
482   m_features[47*2+1] = 0x80;
483   m_features[48*2+0] = 0;                     /* 48: reserved */
484   m_features[48*2+1] = 0;
485   m_features[49*2+0] = 0x03;                  /* 49: capabilities */
486   m_features[49*2+1] = 0x0f;
487   m_features[50*2+0] = 0;                     /* 50: reserved */
488   m_features[50*2+1] = 0;
489   m_features[51*2+0] = 2;                     /* 51: PIO data transfer cycle timing mode */
490   m_features[51*2+1] = 0;
491   m_features[52*2+0] = 2;                     /* 52: single word DMA transfer cycle timing mode */
492   m_features[52*2+1] = 0;
493   m_features[53*2+0] = 3;                     /* 53: field validity */
494   m_features[53*2+1] = 0;
495   m_features[54*2+0] = m_num_cylinders & 0xff;   /* 54: number of current logical cylinders */
496   m_features[54*2+1] = m_num_cylinders >> 8;
497   m_features[55*2+0] = m_num_heads & 0xff;      /* 55: number of current logical heads */
498   m_features[55*2+1] = 0;/*ide->num_heads >> 8;*/
499   m_features[56*2+0] = m_num_sectors & 0xff;   /* 56: number of current logical sectors per track */
500   m_features[56*2+1] = 0;/*ide->num_sectors >> 8;*/
501   m_features[57*2+0] = sectors_per_track & 0xff;   /* 57-58: number of current logical sectors per track */
502   m_features[57*2+1] = sectors_per_track >> 8;
503   m_features[58*2+0] = sectors_per_track >> 16;
504   m_features[58*2+1] = sectors_per_track >> 24;
505   m_features[59*2+0] = 0;                     /* 59: multiple sector timing */
506   m_features[59*2+1] = 0;
507   m_features[60*2+0] = total_sectors & 0xff;      /* 60-61: total user addressable sectors */
508   m_features[60*2+1] = total_sectors >> 8;
509   m_features[61*2+0] = total_sectors >> 16;
510   m_features[61*2+1] = total_sectors >> 24;
511   m_features[62*2+0] = 0x07;                  /* 62: single word dma transfer */
512   m_features[62*2+1] = 0x00;
513   m_features[63*2+0] = 0x07;                  /* 63: multiword DMA transfer */
514   m_features[63*2+1] = 0x04;
515   m_features[64*2+0] = 0x03;                  /* 64: flow control PIO transfer modes supported */
516   m_features[64*2+1] = 0x00;
517   m_features[65*2+0] = 0x78;                  /* 65: minimum multiword DMA transfer cycle time per word */
518   m_features[65*2+1] = 0x00;
519   m_features[66*2+0] = 0x78;                  /* 66: mfr's recommended multiword DMA transfer cycle time */
520   m_features[66*2+1] = 0x00;
521   m_features[67*2+0] = 0x4d;                  /* 67: minimum PIO transfer cycle time without flow control */
522   m_features[67*2+1] = 0x01;
523   m_features[68*2+0] = 0x78;                  /* 68: minimum PIO transfer cycle time with IORDY */
524   m_features[68*2+1] = 0x00;
525   m_features[69*2+0] = 0x00;                  /* 69-70: reserved */
526   m_features[69*2+1] = 0x00;
527   m_features[71*2+0] = 0x00;                  /* 71: reserved for IDENTIFY PACKET command */
528   m_features[71*2+1] = 0x00;
529   m_features[72*2+0] = 0x00;                  /* 72: reserved for IDENTIFY PACKET command */
530   m_features[72*2+1] = 0x00;
531   m_features[73*2+0] = 0x00;                  /* 73: reserved for IDENTIFY PACKET command */
532   m_features[73*2+1] = 0x00;
533   m_features[74*2+0] = 0x00;                  /* 74: reserved for IDENTIFY PACKET command */
534   m_features[74*2+1] = 0x00;
535   m_features[75*2+0] = 0x00;                  /* 75: queue depth */
536   m_features[75*2+1] = 0x00;
537   m_features[76*2+0] = 0x00;                  /* 76-79: reserved */
538   m_features[76*2+1] = 0x00;
539   m_features[80*2+0] = 0x00;                  /* 80: major version number */
540   m_features[80*2+1] = 0x00;
541   m_features[81*2+0] = 0x00;                  /* 81: minor version number */
542   m_features[81*2+1] = 0x00;
543   m_features[82*2+0] = 0x00;                  /* 82: command set supported */
544   m_features[82*2+1] = 0x00;
545   m_features[83*2+0] = 0x00;                  /* 83: command sets supported */
546   m_features[83*2+1] = 0x00;
547   m_features[84*2+0] = 0x00;                  /* 84: command set/feature supported extension */
548   m_features[84*2+1] = 0x00;
549   m_features[85*2+0] = 0x00;                  /* 85: command set/feature enabled */
550   m_features[85*2+1] = 0x00;
551   m_features[86*2+0] = 0x00;                  /* 86: command set/feature enabled */
552   m_features[86*2+1] = 0x00;
553   m_features[87*2+0] = 0x00;                  /* 87: command set/feature default */
554   m_features[87*2+1] = 0x00;
555   m_features[88*2+0] = 0x00;                  /* 88: additional DMA modes */
556   m_features[88*2+1] = 0x00;
557   m_features[89*2+0] = 0x00;                  /* 89: time required for security erase unit completion */
558   m_features[89*2+1] = 0x00;
559   m_features[90*2+0] = 0x00;                  /* 90: time required for enhanced security erase unit completion */
560   m_features[90*2+1] = 0x00;
561   m_features[91*2+0] = 0x00;                  /* 91: current advanced power management value */
562   m_features[91*2+1] = 0x00;
563   m_features[92*2+0] = 0x00;                  /* 92: master password revision code */
564   m_features[92*2+1] = 0x00;
565   m_features[93*2+0] = 0x00;                  /* 93: hardware reset result */
566   m_features[93*2+1] = 0x00;
567   m_features[94*2+0] = 0x00;                  /* 94: acoustic management values */
568   m_features[94*2+1] = 0x00;
569   m_features[95*2+0] = 0x00;                  /* 95-99: reserved */
570   m_features[95*2+1] = 0x00;
571   m_features[100*2+0] = total_sectors & 0xff;      /* 100-103: maximum 48-bit LBA */
572   m_features[100*2+1] = total_sectors >> 8;
573   m_features[101*2+0] = total_sectors >> 16;
574   m_features[101*2+1] = total_sectors >> 24;
575   m_features[102*2+0] = 0x00;
576   m_features[102*2+1] = 0x00;
577   m_features[103*2+0] = 0x00;
578   m_features[103*2+1] = 0x00;
579   m_features[104*2+0] = 0x00;                  /* 104-126: reserved */
580   m_features[104*2+1] = 0x00;
581   m_features[127*2+0] = 0x00;                  /* 127: removable media status notification */
582   m_features[127*2+1] = 0x00;
583   m_features[128*2+0] = 0x00;                  /* 128: security status */
584   m_features[128*2+1] = 0x00;
585   m_features[129*2+0] = 0x00;                  /* 129-159: vendor specific */
586   m_features[129*2+1] = 0x00;
587   m_features[160*2+0] = 0x00;                  /* 160: CFA power mode 1 */
588   m_features[160*2+1] = 0x00;
589   m_features[161*2+0] = 0x00;                  /* 161-175: reserved for CompactFlash */
590   m_features[161*2+1] = 0x00;
591   m_features[176*2+0] = 0x00;                  /* 176-205: current media serial number */
592   m_features[176*2+1] = 0x00;
593   m_features[206*2+0] = 0x00;                  /* 206-254: reserved */
594   m_features[206*2+1] = 0x00;
595   m_features[255*2+0] = 0x00;                  /* 255: integrity word */
596   m_features[255*2+1] = 0x00;
612597}
613598
614
615static void ide_build_features(ide_state *ide, int drive)
616{
617   memset(ide->drive[drive].features, 0, IDE_DISK_SECTOR_SIZE);
618   if (chd_get_metadata (ide->drive[drive].handle, HARD_DISK_IDENT_METADATA_TAG, 0, ide->drive[drive].features, IDE_DISK_SECTOR_SIZE, 0, 0, 0) != CHDERR_NONE)
619      ide_generate_features (ide,drive);
620}
621
622599/*************************************
623600 *
624601 *  security error handling
r14399r14400
743720      return;
744721   }
745722   /* now do the read */
746   if (ide->drive[ide->cur_drive].disk)
747      count = hard_disk_read(ide->drive[ide->cur_drive].disk, lba, ide->buffer);
748   else if (ide->hardware != NULL) {
749      count = ide->hardware->read_sector(ide->device, lba, ide->buffer);
723   if (ide->drive[ide->cur_drive].slot) {
724      count = ide->drive[ide->cur_drive].slot->read_sector(lba, ide->buffer);
750725   }
751726
752727   /* by default, mark the buffer ready and the seek complete */
r14399r14400
944919   int lba = lba_address(ide), count = 0;
945920
946921   /* now do the write */
947   if (ide->drive[ide->cur_drive].disk)
948      count = hard_disk_write(ide->drive[ide->cur_drive].disk, lba, ide->buffer);
949   else if (ide->hardware != NULL) {
950      count = ide->hardware->write_sector(ide->device, lba, ide->buffer);
951   }
922   if (ide->drive[ide->cur_drive].slot) {
923      count = ide->drive[ide->cur_drive].slot->write_sector(lba, ide->buffer);
924   }   
952925
953926   /* by default, mark the buffer ready and the seek complete */
954927   ide->status |= IDE_STATUS_BUFFER_READY;
r14399r14400
11521125         ide->sector_count = 1;
11531126
11541127         /* build the features page */
1155         memcpy(ide->buffer, ide->drive[ide->cur_drive].features, sizeof(ide->buffer));
1128         if (ide->drive[ide->cur_drive].slot->get_features()) {
1129            memcpy(ide->buffer, ide->drive[ide->cur_drive].slot->get_features(), sizeof(ide->buffer));
1130         }
11561131
11571132         /* indicate everything is ready */
11581133         ide->status |= IDE_STATUS_BUFFER_READY;
r14399r14400
11981173         LOGPRINT(("IDE Set configuration (%d heads, %d sectors)\n", ide->drive[ide->cur_drive].cur_head + 1, ide->sector_count));
11991174         ide->status &= ~IDE_STATUS_ERROR;
12001175         ide->error = IDE_ERROR_NONE;
1201
1202         ide->drive[ide->cur_drive].num_sectors = ide->sector_count;
1203         ide->drive[ide->cur_drive].num_heads = ide->drive[ide->cur_drive].cur_head + 1;
1204
1176         ide->drive[ide->cur_drive].slot->set_geometry(ide->sector_count,ide->drive[ide->cur_drive].cur_head + 1);
1177         
12051178         /* signal an interrupt */
12061179         signal_delayed_interrupt(ide, MINIMUM_COMMAND_TIME, 0);
12071180         break;
r14399r14400
12581231         LOGPRINT(("IDE GNET Unlock 3\n"));
12591232
12601233         /* key check */
1261         chd_get_metadata (ide->drive[ide->cur_drive].handle, HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
1234         ide->drive[ide->cur_drive].slot->read_key(key);
12621235         if ((ide->precomp_offset == key[0]) && (ide->sector_count == key[1]) && (ide->drive[ide->cur_drive].cur_sector == key[2]) && (ide->drive[ide->cur_drive].cur_cylinder == (((UINT16)key[4]<<8)|key[3])))
12631236         {
12641237            ide->gnetreadlock= 0;
r14399r14400
13131286//  if (BANK(bank, offset) != IDE_BANK0_DATA && BANK(bank, offset) != IDE_BANK0_STATUS_COMMAND && BANK(bank, offset) != IDE_BANK1_STATUS_CONTROL)
13141287      LOG(("%s:IDE read at %d:%X, size=%d\n", device->machine().describe_context(), bank, offset, size));
13151288
1316   if (ide->drive[ide->cur_drive].disk) {
1289   if (ide->drive[ide->cur_drive].slot->is_ready()) {
13171290      ide->status |= IDE_STATUS_DRIVE_READY;
13181291   } else {
13191292      ide->status &= ~IDE_STATUS_DRIVE_READY;
r14399r14400
15051478               {
15061479                  UINT8 key[5] = { 0, 0, 0, 0, 0 };
15071480                  int i, bad = 0;
1508                  chd_get_metadata (ide->drive[ide->cur_drive].handle, HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
1481                  ide->drive[ide->cur_drive].slot->read_key(key);
15091482
15101483                  for (i=0; !bad && i<512; i++)
15111484                     bad = ((i < 2 || i >= 7) && ide->buffer[i]) || ((i >= 2 && i < 7) && ide->buffer[i] != key[i-2]);
r14399r14400
18591832static DEVICE_START( ide_controller )
18601833{
18611834   ide_state *ide = get_safe_token(device);
1862   const hard_disk_info *hdinfo;
18631835   const ide_config *config;
18641836
18651837   /* validate some basic stuff */
r14399r14400
18731845   /* set MAME harddisk handle */
18741846   config = (const ide_config *)downcast<const legacy_device_base *>(device)->inline_config();
18751847
1876   ide->drive[0].handle = get_disk_handle(device->machine(), (config->master != NULL) ? config->master : device->tag());
1877   ide->drive[0].disk = hard_disk_open(ide->drive[0].handle);
1878   ide->drive[0].is_image_device = false;
1848   ide->drive[0].slot = device->owner()->subdevice<ide_slot_device>("drive_0");
1849   ide->drive[1].slot = device->owner()->subdevice<ide_slot_device>("drive_1");
18791850
1880   if (config->slave) {
1881      ide->drive[1].handle = get_disk_handle(device->machine(), config->slave);
1882      ide->drive[1].disk = hard_disk_open(ide->drive[1].handle);
1883      ide->drive[1].is_image_device = false;
1884   }
1885
1886   //assert_always(config->slave == NULL, "IDE controller does not yet support slave drives\n");
1887
18881851   /* find the bus master space */
18891852   if (config->bmcpu != NULL)
18901853   {
r14399r14400
19001863      ide->dma_address_xor = (ide->dma_space->endianness() == ENDIANNESS_LITTLE) ? 0 : 3;
19011864   }
19021865
1903   /* get and copy the geometry */
1904   if (ide->drive[0].disk != NULL)
1905   {
1906      hdinfo = hard_disk_get_info(ide->drive[0].disk);
1907      if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
1908      {
1909         ide->drive[0].num_cylinders = hdinfo->cylinders;
1910         ide->drive[0].num_sectors = hdinfo->sectors;
1911         ide->drive[0].num_heads = hdinfo->heads;
1912         if (PRINTF_IDE_COMMANDS) mame_printf_debug("CHS: %d %d %d\n", ide->drive[0].num_cylinders, ide->drive[0].num_heads, ide->drive[0].num_sectors);
1913      }
1914
1915      /* build the features page */
1916      ide_build_features(ide,0);
1917   }
1918   if (ide->drive[1].disk != NULL)
1919   {
1920      hdinfo = hard_disk_get_info(ide->drive[1].disk);
1921      if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
1922      {
1923         ide->drive[1].num_cylinders = hdinfo->cylinders;
1924         ide->drive[1].num_sectors = hdinfo->sectors;
1925         ide->drive[1].num_heads = hdinfo->heads;
1926         if (PRINTF_IDE_COMMANDS) mame_printf_debug("CHS: %d %d %d\n", ide->drive[1].num_cylinders, ide->drive[1].num_heads, ide->drive[1].num_sectors);
1927      }
1928
1929      /* build the features page */
1930      ide_build_features(ide,1);
1931   }
1932   if (config->hardware != NULL) {
1933      ide->hardware = (ide_hardware *)config->hardware;
1934      ide->hardware->get_info(ide->device, ide->drive[0].features, ide->drive[0].num_cylinders, ide->drive[0].num_sectors, ide->drive[0].num_heads);
1935      ide_generate_features (ide,0);
1936   }
1937
19381866   /* create a timer for timing status */
19391867   ide->last_status_timer = device->machine().scheduler().timer_alloc(FUNC_NULL);
19401868   ide->reset_timer = device->machine().scheduler().timer_alloc(FUNC(reset_callback), (void *)device);
r14399r14400
19861914   device->save_item(NAME(ide->gnetreadlock));
19871915}
19881916
1989
19901917/*-------------------------------------------------
1991    device exit callback
1992-------------------------------------------------*/
1993
1994static DEVICE_STOP( ide_controller )
1995{
1996   ide_state *ide = get_safe_token(device);
1997   if (!ide->drive[0].is_image_device) {
1998      /* close the hard disk */
1999      if (ide->drive[0].disk != NULL)
2000         hard_disk_close(ide->drive[0].disk);
2001   }
2002   if (!ide->drive[1].is_image_device) {
2003      /* close the hard disk */
2004      if (ide->drive[1].disk != NULL)
2005         hard_disk_close(ide->drive[1].disk);
2006   }
2007}
2008
2009
2010/*-------------------------------------------------
20111918    device reset callback
20121919-------------------------------------------------*/
20131920
20141921static DEVICE_RESET( ide_controller )
20151922{
20161923   ide_state *ide = get_safe_token(device);
2017   const ide_config *config = (const ide_config *)downcast<const legacy_device_base *>(device)->inline_config();
2018
1924   LOG(("IDE controller reset performed\n"));   
1925   /* reset the drive state */
20191926   ide->cur_drive = 0;
2020   LOG(("IDE controller reset performed\n"));
2021   if (config->master) {
2022      astring hardtag_master;
2023      device->siblingtag(hardtag_master, config->master);
2024      if (!ide->drive[0].disk)
2025      {
2026         ide->drive[0].handle = device->machine().device<harddisk_image_device>(hardtag_master.cstr())->get_chd_file();   // should be config->master
2027
2028         if (ide->drive[0].handle)
2029         {
2030            ide->drive[0].disk = device->machine().device<harddisk_image_device>(hardtag_master.cstr())->get_hard_disk_file();   // should be config->master
2031            ide->drive[0].is_image_device = true;
2032
2033            if (ide->drive[0].disk != NULL)
2034            {
2035               const hard_disk_info *hdinfo;
2036
2037               hdinfo = hard_disk_get_info(ide->drive[0].disk);
2038               if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
2039               {
2040                  ide->drive[0].num_cylinders = hdinfo->cylinders;
2041                  ide->drive[0].num_sectors = hdinfo->sectors;
2042                  ide->drive[0].num_heads = hdinfo->heads;
2043                  if (PRINTF_IDE_COMMANDS) printf("CHS: %d %d %d\n", ide->drive[0].num_cylinders, ide->drive[0].num_heads, ide->drive[0].num_sectors);
2044               }
2045
2046               /* build the features page */
2047               ide_build_features(ide,0);
2048            }
2049         }
2050      }
2051   }
2052   if (config->slave) {
2053      astring hardtag_slave;
2054      device->siblingtag(hardtag_slave, config->slave);
2055      if (!ide->drive[1].disk)
2056      {
2057         ide->drive[1].handle = device->machine().device<harddisk_image_device>(hardtag_slave.cstr())->get_chd_file();   // should be config->master
2058
2059         if (ide->drive[1].handle)
2060         {
2061            ide->drive[1].disk = device->machine().device<harddisk_image_device>(hardtag_slave.cstr())->get_hard_disk_file();   // should be config->master
2062            ide->drive[1].is_image_device = true;
2063
2064            if (ide->drive[1].disk != NULL)
2065            {
2066               const hard_disk_info *hdinfo;
2067
2068               hdinfo = hard_disk_get_info(ide->drive[1].disk);
2069               if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
2070               {
2071                  ide->drive[1].num_cylinders = hdinfo->cylinders;
2072                  ide->drive[1].num_sectors = hdinfo->sectors;
2073                  ide->drive[1].num_heads = hdinfo->heads;
2074                  if (PRINTF_IDE_COMMANDS) printf("CHS: %d %d %d\n", ide->drive[1].num_cylinders, ide->drive[1].num_heads, ide->drive[1].num_sectors);
2075               }
2076
2077               /* build the features page */
2078               ide_build_features(ide,1);
2079            }
2080         }
2081      }
2082   }
2083   if (ide->hardware != NULL) {
2084      ide->hardware->get_info(ide->device, ide->drive[0].features, ide->drive[0].num_cylinders, ide->drive[0].num_sectors, ide->drive[0].num_heads);
2085      ide_generate_features (ide,0);
2086   }
2087
2088   /* reset the drive state */
20891927   ide->status = IDE_STATUS_DRIVE_READY | IDE_STATUS_SEEK_COMPLETE;
20901928   ide->error = IDE_ERROR_DEFAULT;
20911929   ide->buffer_offset = 0;
r14399r14400
20951933   clear_interrupt(ide);
20961934}
20971935
1936SLOT_INTERFACE_START(ide_image_devices)
1937   SLOT_INTERFACE("hdd", IDE_HARDDISK_IMAGE)
1938SLOT_INTERFACE_END
20981939
1940SLOT_INTERFACE_START(ide_devices)
1941   SLOT_INTERFACE("hdd", IDE_HARDDISK)   
1942SLOT_INTERFACE_END
1943
20991944/*-------------------------------------------------
21001945    device get info callback
21011946-------------------------------------------------*/
r14399r14400
21101955
21111956      /* --- the following bits of info are returned as pointers to data or functions --- */
21121957      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(ide_controller); break;
2113      case DEVINFO_FCT_STOP:               info->stop = DEVICE_STOP_NAME(ide_controller); break;
21141958      case DEVINFO_FCT_RESET:               info->reset = DEVICE_RESET_NAME(ide_controller);break;
21151959
21161960      /* --- the following bits of info are returned as NULL-terminated strings --- */
r14399r14400
21241968
21251969
21261970DEFINE_LEGACY_DEVICE(IDE_CONTROLLER, ide_controller);
1971
1972//**************************************************************************
1973//  IDE SLOT DEVICE
1974//**************************************************************************
1975
1976// device type definition
1977const device_type IDE_SLOT = &device_creator<ide_slot_device>;
1978
1979//-------------------------------------------------
1980//  ide_slot_device - constructor
1981//-------------------------------------------------
1982
1983ide_slot_device::ide_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1984    : device_t(mconfig, IDE_SLOT, "IDE Connector", tag, owner, clock),
1985     device_slot_interface(mconfig, *this),
1986     m_dev(NULL)
1987{
1988
1989}
1990
1991//-------------------------------------------------
1992//  device_config_complete - perform any
1993//  operations now that the configuration is
1994//  complete
1995//-------------------------------------------------
1996
1997void ide_slot_device::device_config_complete()
1998{
1999   m_dev = dynamic_cast<ide_device_interface *>(get_card_device());
2000}
2001
2002//-------------------------------------------------
2003//  device_start - device-specific startup
2004//-------------------------------------------------
2005
2006void ide_slot_device::device_start()
2007{
2008}
2009
2010//**************************************************************************
2011//  IDE DEVICE INTERFACE
2012//**************************************************************************
2013
2014//-------------------------------------------------
2015//  ide_device_interface - constructor
2016//-------------------------------------------------
2017
2018ide_device_interface::ide_device_interface(const machine_config &mconfig, device_t &device)
2019   : device_slot_card_interface(mconfig, device)
2020{
2021}
2022
2023
2024//**************************************************************************
2025//  IDE HARD DISK DEVICE
2026//**************************************************************************
2027
2028// device type definition
2029const device_type IDE_HARDDISK = &device_creator<ide_hdd_device>;
2030
2031//-------------------------------------------------
2032//  ide_hdd_device - constructor
2033//-------------------------------------------------
2034
2035ide_hdd_device::ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2036    : device_t(mconfig, IDE_HARDDISK, "IDE Hard Disk", tag, owner, clock),
2037     ide_device_interface( mconfig, *this )
2038{
2039}
2040
2041ide_hdd_device::ide_hdd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
2042        device_t(mconfig, type, name, tag, owner, clock),
2043      ide_device_interface(mconfig, *this)
2044{
2045}
2046
2047//-------------------------------------------------
2048//  device_start - device-specific startup
2049//-------------------------------------------------
2050
2051void ide_hdd_device::device_start()
2052{
2053}
2054
2055//-------------------------------------------------
2056//  device_reset - device-specific reset
2057//-------------------------------------------------
2058
2059void ide_hdd_device::device_reset()
2060{
2061   m_handle = get_disk_handle(machine(), owner()->tag());
2062   m_disk = hard_disk_open(m_handle);
2063   
2064   if (m_disk != NULL)
2065   {
2066      const hard_disk_info *hdinfo = hard_disk_get_info(m_disk);
2067      if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
2068      {
2069         m_num_cylinders = hdinfo->cylinders;
2070         m_num_sectors = hdinfo->sectors;
2071         m_num_heads = hdinfo->heads;
2072         if (PRINTF_IDE_COMMANDS) mame_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
2073         mame_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
2074      }
2075      // build the features page
2076      if (chd_get_metadata (m_handle, HARD_DISK_IDENT_METADATA_TAG, 0, m_features, IDE_DISK_SECTOR_SIZE, 0, 0, 0) != CHDERR_NONE)
2077         ide_build_features();
2078   }   
2079}
2080
2081//-------------------------------------------------
2082//  read device key
2083//-------------------------------------------------
2084
2085void ide_hdd_device::read_key(UINT8 key[])
2086{
2087   chd_get_metadata(m_handle, HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
2088}
2089
2090//**************************************************************************
2091//  IDE HARD DISK IMAGE DEVICE
2092//**************************************************************************
2093
2094// device type definition
2095const device_type IDE_HARDDISK_IMAGE = &device_creator<ide_hdd_image_device>;
2096
2097//-------------------------------------------------
2098//  ide_hdd_image_device - constructor
2099//-------------------------------------------------
2100
2101ide_hdd_image_device::ide_hdd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2102    : ide_hdd_device(mconfig, IDE_HARDDISK_IMAGE, "IDE Hard Disk Image", tag, owner, clock)
2103{
2104}
2105
2106//-------------------------------------------------
2107//  device_start - device-specific startup
2108//-------------------------------------------------
2109
2110void ide_hdd_image_device::device_start()
2111{
2112}
2113
2114//-------------------------------------------------
2115//  device_reset - device-specific reset
2116//-------------------------------------------------
2117
2118void ide_hdd_image_device::device_reset()
2119{
2120   m_handle = subdevice<harddisk_image_device>("harddisk")->get_chd_file();   // should be config->master
2121
2122   if (m_handle)
2123   {
2124      m_disk = subdevice<harddisk_image_device>("harddisk")->get_hard_disk_file();   // should be config->master
2125
2126      if (m_disk != NULL)
2127      {
2128         const hard_disk_info *hdinfo;
2129
2130         hdinfo = hard_disk_get_info(m_disk);
2131         if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
2132         {
2133            m_num_cylinders = hdinfo->cylinders;
2134            m_num_sectors = hdinfo->sectors;
2135            m_num_heads = hdinfo->heads;
2136            if (PRINTF_IDE_COMMANDS) printf("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
2137         }
2138         // build the features page
2139         if (chd_get_metadata (m_handle, HARD_DISK_IDENT_METADATA_TAG, 0, m_features, IDE_DISK_SECTOR_SIZE, 0, 0, 0) != CHDERR_NONE)
2140            ide_build_features();
2141      }
2142   }
2143
2144}
2145
2146//-------------------------------------------------
2147//  machine_config_additions - device-specific
2148//  machine configurations
2149//-------------------------------------------------
2150static MACHINE_CONFIG_FRAGMENT( hdd_image )
2151   MCFG_HARDDISK_ADD( "harddisk" )
2152MACHINE_CONFIG_END   
2153
2154machine_config_constructor ide_hdd_image_device::device_mconfig_additions() const
2155{
2156   return MACHINE_CONFIG_NAME( hdd_image );
2157}
2158
src/emu/machine/idectrl.h
r14399r14400
1717#include "devlegcy.h"
1818
1919#include "harddisk.h"
20#include "imagedev/harddriv.h"
2021
22#define IDE_DISK_SECTOR_SIZE         512
2123
2224/***************************************************************************
2325    TYPE DEFINITIONS
2426***************************************************************************/
25typedef struct _ide_hardware ide_hardware;
26struct _ide_hardware
27// ======================> ide_device_interface
28
29class ide_device_interface : public device_slot_card_interface
2730{
28   void   (*get_info)(device_t *device, UINT8 *buffer, UINT16 &cylinders, UINT8 &sectors, UINT8 &heads);
29   int      (*read_sector)(device_t *device, UINT32 lba, void *buffer);
30   int      (*write_sector)(device_t *device, UINT32 lba, const void *buffer);
31public:
32   ide_device_interface(const machine_config &mconfig, device_t &device);
33public:
34   virtual int    read_sector(UINT32 lba, void *buffer) = 0;
35   virtual int    write_sector(UINT32 lba, const void *buffer) = 0;
36   
37   UINT8 *get_features() { return m_features;}
38
39   UINT16 get_cylinders() { return m_num_cylinders; }
40   UINT16 get_sectors() { return m_num_sectors; }
41   UINT16 get_heads() { return m_num_heads; }
42   void set_geometry(UINT8 sectors, UINT8 heads) { m_num_sectors= sectors; m_num_heads=heads; }
43   virtual bool is_ready() { return true; }
44   virtual void read_key(UINT8 key[]) { }
45protected:
46   UINT8         m_features[IDE_DISK_SECTOR_SIZE];
47   UINT16         m_num_cylinders;
48   UINT8         m_num_sectors;
49   UINT8         m_num_heads;
3150};
3251
52// ======================> ide_slot_device
53
54class ide_slot_device :   public device_t,
55                  public device_slot_interface
56{
57public:
58   // construction/destruction
59   ide_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
60
61   int    read_sector(UINT32 lba, void *buffer) { return (m_dev) ? m_dev->read_sector(lba,buffer) : 0; }
62   int    write_sector(UINT32 lba, const void *buffer) { return (m_dev) ? m_dev->write_sector(lba,buffer) : 0; }   
63   UINT8 *get_features() { return (m_dev) ? m_dev->get_features() : NULL;}
64
65   UINT16 get_cylinders() { return (m_dev) ? m_dev->get_cylinders() : 0; }
66   UINT16 get_sectors() { return (m_dev) ? m_dev->get_sectors() : 0; }
67   UINT16 get_heads() { return (m_dev) ? m_dev->get_heads() : 0; }   
68   void set_geometry(UINT8 sectors, UINT8 heads) { if (m_dev) m_dev->set_geometry(sectors,heads); }
69   bool is_ready() { return (m_dev) ? m_dev->is_ready() : false; }
70   void read_key(UINT8 key[]) { if (m_dev) m_dev->read_key(key); }
71protected:
72   // device-level overrides
73   virtual void device_start();
74   virtual void device_config_complete();
75private:
76   ide_device_interface *m_dev;
77};
78
79// device type definition
80extern const device_type IDE_SLOT;
81
82// ======================> ide_hdd_device
83
84class ide_hdd_device : public device_t,
85                  public ide_device_interface
86{
87public:
88    // construction/destruction
89    ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
90   ide_hdd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
91
92   virtual int    read_sector(UINT32 lba, void *buffer) { return hard_disk_read(m_disk, lba, buffer); }
93   virtual int    write_sector(UINT32 lba, const void *buffer) { return hard_disk_write(m_disk, lba, buffer); }
94   virtual void read_key(UINT8 key[]);
95protected:
96    // device-level overrides
97    virtual void device_start();
98   virtual void device_reset();
99   
100   void ide_build_features();
101   virtual bool is_ready() { return (m_disk != NULL); }
102protected:
103   chd_file       *m_handle;
104   hard_disk_file *m_disk;
105};
106// device type definition
107extern const device_type IDE_HARDDISK;
108
109// ======================> ide_hdd_image_device
110
111class ide_hdd_image_device : public ide_hdd_device
112{
113public:
114    // construction/destruction
115    ide_hdd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
116protected:
117    // device-level overrides
118    virtual void device_start();
119   virtual void device_reset();
120   // optional information overrides
121   virtual machine_config_constructor device_mconfig_additions() const;
122};
123// device type definition
124extern const device_type IDE_HARDDISK_IMAGE;
125
126/***************************************************************************
127    TYPE DEFINITIONS
128***************************************************************************/
129
33130typedef struct _ide_config ide_config;
34131struct _ide_config
35132{
r14399r14400
38135   const char *slave;      /* name of slave region (defaults to NULL) */
39136   const char *bmcpu;      /* name of bus master CPU */
40137   UINT32 bmspace;         /* address space of bus master transfer */
41   const ide_hardware *hardware;   /* connected to hardware that is not an hard disk */
42138};
43139
44140
141SLOT_INTERFACE_EXTERN(ide_devices);
142SLOT_INTERFACE_EXTERN(ide_image_devices);
45143
46144/***************************************************************************
47145    DEVICE CONFIGURATION MACROS
48146***************************************************************************/
49147
50#define MCFG_IDE_CONTROLLER_ADD(_tag, _callback) \
148#define MCFG_IDE_CONTROLLER_ADD(_tag, _callback, _slotintf, _master, _slave) \
51149   MCFG_DEVICE_ADD(_tag, IDE_CONTROLLER, 0) \
52   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, interrupt, _callback)
150   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, interrupt, _callback) \
151   MCFG_IDE_SLOT_ADD("drive_0", _slotintf, _master, NULL) \
152   MCFG_IDE_SLOT_ADD("drive_1", _slotintf, _slave, NULL) \
53153
54#define MCFG_IDE_CONTROLLER_REGIONS(_master, _slave) \
55   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, master, _master) \
56   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, slave,  _slave)
57
58#define MCFG_IDE_BUS_MASTER_SPACE(_cpu, _space) \
154#define MCFG_IDE_BUS_MASTER_SPACE(_tag, _cpu, _space) \
155   MCFG_DEVICE_MODIFY(_tag) \
59156   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, bmcpu, _cpu) \
60157   MCFG_DEVICE_CONFIG_DATA32(ide_config, bmspace, AS_##_space)
61158
62#define MCFG_IDE_CONNECTED_TO(_hardware) \
63   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, hardware, _hardware) \
159#define MCFG_IDE_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
160   MCFG_DEVICE_ADD(_tag, IDE_SLOT, 0) \
161   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp) \
64162
65
66163/***************************************************************************
67164    FUNCTION PROTOTYPES
68165***************************************************************************/
src/emu/machine/nscsi_bus.c
r0r14400
1#include "nscsi_bus.h"
2
3const device_type NSCSI_BUS = &device_creator<nscsi_bus_device>;
4const device_type NSCSI_CONNECTOR = &device_creator<nscsi_connector>;
5
6nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7   device_t(mconfig, NSCSI_BUS, "SCSI Bus", tag, owner, clock)
8{
9   devcnt = 0;
10   memset(dev, 0, sizeof(dev));
11}
12
13void nscsi_bus_device::device_start()
14{
15   data = 0;
16   ctrl = 0;
17}
18
19void nscsi_bus_device::device_reset()
20{
21}
22
23void nscsi_bus_device::regen_data()
24{
25   data = 0;
26   for(int i=0; i<devcnt; i++)
27      data |= dev[i].data;
28}
29
30void nscsi_bus_device::regen_ctrl(int refid)
31{
32   static const char *phase[8] = {
33      "dout", "din ", "cmd ", "stat", "4   ", "5   ", "mout", "min "
34   };
35
36   UINT32 octrl = ctrl;
37   ctrl = 0;
38   for(int i=0; i<devcnt; i++)
39      ctrl |= dev[i].ctrl;
40
41   if(0) {
42      logerror("%s: ctrl %c%c%c%c%c%c%c%c%c %s %04x -",
43             tag(),
44             ctrl & nscsi_device::S_RST ? 'R' : '.',
45             ctrl & nscsi_device::S_ATN ? 'A' : '.',
46             ctrl & nscsi_device::S_ACK ? 'K' : '.',
47             ctrl & nscsi_device::S_REQ ? 'Q' : '.',
48             ctrl & nscsi_device::S_SEL ? 'S' : '.',
49             ctrl & nscsi_device::S_BSY ? 'B' : '.',
50             ctrl & nscsi_device::S_MSG ? 'M' : '.',
51             ctrl & nscsi_device::S_CTL ? 'C' : '.',
52             ctrl & nscsi_device::S_INP ? 'I' : '.',
53             phase[ctrl & 7],
54             data);
55      for(int i=0; i<devcnt; i++)
56         if(dev[i].ctrl) {
57            logerror(" %d=", i);
58            logerror("%s%s%s%s%s%s%s%s%s",
59                   dev[i].ctrl & nscsi_device::S_RST ? "R" : "",
60                   dev[i].ctrl & nscsi_device::S_ATN ? "A" : "",
61                   dev[i].ctrl & nscsi_device::S_ACK ? "K" : "",
62                   dev[i].ctrl & nscsi_device::S_REQ ? "Q" : "",
63                   dev[i].ctrl & nscsi_device::S_MSG ? "M" : "",
64                   dev[i].ctrl & nscsi_device::S_INP ? "I" : "",
65                   dev[i].ctrl & nscsi_device::S_CTL ? "C" : "",
66                   dev[i].ctrl & nscsi_device::S_SEL ? "S" : "",
67                   dev[i].ctrl & nscsi_device::S_BSY ? "B" : "");
68         }
69      logerror("\n");
70   }
71     
72   octrl = octrl ^ ctrl;
73   if(octrl)
74      for(int i=0; i<devcnt; i++)
75         if(i != refid && (dev[i].wait_ctrl & octrl))
76            dev[i].dev->scsi_ctrl_changed();
77}
78
79UINT32 nscsi_bus_device::data_r() const
80{
81   return data;
82}
83
84UINT32 nscsi_bus_device::ctrl_r() const
85{
86   return ctrl;
87}
88
89void nscsi_bus_device::ctrl_w(int refid, UINT32 lines, UINT32 mask)
90{
91   UINT32 c = dev[refid].ctrl;
92   dev[refid].ctrl = (c & ~mask) | (lines & mask);
93   regen_ctrl(refid);
94}
95
96void nscsi_bus_device::data_w(int refid, UINT32 lines)
97{
98   dev[refid].data = lines;
99   regen_data();
100}
101
102void nscsi_bus_device::ctrl_wait(int refid, UINT32 lines, UINT32 mask)
103{
104   UINT32 w = dev[refid].wait_ctrl;
105   dev[refid].wait_ctrl = (w & ~mask) | (lines & mask);
106}
107
108void nscsi_bus_device::device_config_complete()
109{
110   char id[3];
111   for(int i=0; i<16; i++) {
112      sprintf(id, "%d", i);
113      nscsi_connector *conn = downcast<nscsi_connector *>(subdevice(id));
114      if(conn) {
115         nscsi_device *sdev = conn->get_device();
116         if(sdev) {
117            int rid = devcnt++;
118            dev[rid].dev = sdev;
119            sdev->connect_to_bus(this, rid, i);
120         }
121      }
122   }
123}
124
125
126nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
127   device_t(mconfig, NSCSI_CONNECTOR, "NSCSI device connector abstraction", tag, owner, clock),
128   device_slot_interface(mconfig, *this)
129{
130   fixed_subtag = 0;
131}
132
133nscsi_connector::~nscsi_connector()
134{
135}
136
137void nscsi_connector::device_start()
138{
139}
140
141nscsi_device *nscsi_connector::get_device()
142{
143   return dynamic_cast<nscsi_device *>(fixed_subtag ? subdevice(fixed_subtag) : get_card_device());
144}
145
146void nscsi_connector::set_fixed_device(const char *subtag)
147{
148   fixed_subtag = subtag;
149}
150
151
152nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
153   device_t(mconfig, type, name, tag, owner, clock),
154   device_slot_card_interface(mconfig, *this)
155{
156   scsi_id = scsi_refid = -1;
157   scsi_bus = 0;
158}
159
160void nscsi_device::connect_to_bus(nscsi_bus_device *bus, int refid, int default_scsi_id)
161{
162   scsi_bus = bus;
163   scsi_refid = refid;
164   scsi_id = default_scsi_id;
165}
166
167void nscsi_device::scsi_ctrl_changed()
168{
169}
170
171nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
172   nscsi_device(mconfig, type, name, tag, owner, clock)
173{
174}
175
176void nscsi_full_device::device_start()
177{
178   scsi_timer = timer_alloc(SCSI_TIMER);
179}
180
181void nscsi_full_device::device_reset()
182{
183   scsi_state = scsi_substate = IDLE;
184   buf_control_rpos = buf_control_wpos = 0;
185   scsi_identify = 0;
186   scsi_bus->data_w(scsi_refid, 0);
187   scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
188   scsi_bus->ctrl_wait(scsi_refid, S_SEL|S_BSY|S_RST, S_ALL);
189}
190
191void nscsi_full_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
192{
193   if(id != SCSI_TIMER)
194      return;
195
196   step(true);
197
198}
199
200void nscsi_full_device::scsi_ctrl_changed()
201{
202   step(false);
203}
204
205void nscsi_full_device::step(bool timeout)
206{
207   UINT32 ctrl = scsi_bus->ctrl_r();
208   UINT32 data = scsi_bus->data_r();
209   if(ctrl & S_RST) {
210      scsi_bus->data_w(scsi_refid, 0);
211      scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
212      scsi_state = IDLE;
213      logerror("%s: scsi bus reset\n", tag());
214      return;
215   }
216
217   if(0)
218      logerror("%s: state=%d.%d %s\n",
219             tag(), scsi_state & STATE_MASK, (scsi_state & SUB_MASK) >> SUB_SHIFT,
220             timeout ? "timeout" : "change");
221
222   switch(scsi_state & SUB_MASK ? scsi_state & SUB_MASK : scsi_state & STATE_MASK) {
223   case IDLE:
224      if(((ctrl & (S_SEL|S_BSY)) == S_SEL) && (scsi_id != -1) && ((data & (1 << scsi_id)) != 0)) {
225         for(scsi_initiator_id = 0; scsi_initiator_id != 16 && (scsi_initiator_id == scsi_id || (data & (1 << scsi_initiator_id))); scsi_initiator_id++);
226         if(scsi_initiator_id == 16)
227            scsi_initiator_id = -1;
228         scsi_state = TARGET_SELECT_WAIT_BUS_SETTLE;
229         scsi_timer->adjust(scsi_bus_settle_delay());
230      }
231      break;
232
233   case TARGET_SELECT_WAIT_BUS_SETTLE:
234      if((ctrl & (S_SEL|S_BSY)) == S_SEL) {
235         scsi_state = TARGET_SELECT_WAIT_SEL_0;
236         scsi_bus->ctrl_w(scsi_refid, S_BSY, S_BSY);
237      } else
238         scsi_state = IDLE;
239      break;
240
241   case TARGET_SELECT_WAIT_SEL_0:
242      if(ctrl & S_SEL)
243         break;
244      buf_control_push()->action = BC_MSG_OR_COMMAND;
245      scsi_state = TARGET_NEXT_CONTROL;
246      step(false);
247      break;
248
249   case RECV_BYTE_T_WAIT_ACK_1 << SUB_SHIFT:
250      if(ctrl & S_ACK) {
251         received(scsi_bus->data_r());
252         scsi_state = (scsi_state & STATE_MASK) | (RECV_BYTE_T_WAIT_ACK_0 << SUB_SHIFT);
253         scsi_bus->ctrl_w(scsi_refid, 0, S_REQ);
254      }
255      break;
256
257   case RECV_BYTE_T_WAIT_ACK_0 << SUB_SHIFT:
258      if(!(ctrl & S_ACK)) {
259         scsi_state &= STATE_MASK;
260         scsi_bus->ctrl_wait(scsi_refid, 0, S_ACK);
261         step(false);
262      }
263      break;
264
265   case SEND_BYTE_T_WAIT_ACK_1 << SUB_SHIFT:
266      if(ctrl & S_ACK) {
267         scsi_state = (scsi_state & STATE_MASK) | (SEND_BYTE_T_WAIT_ACK_0 << SUB_SHIFT);
268         scsi_bus->data_w(scsi_refid, 0);
269         scsi_bus->ctrl_w(scsi_refid, 0, S_REQ);
270      }
271      break;
272
273   case SEND_BYTE_T_WAIT_ACK_0 << SUB_SHIFT:
274      if(!(ctrl & S_ACK)) {
275         scsi_state &= STATE_MASK;
276         scsi_bus->ctrl_wait(scsi_refid, 0, S_ACK);
277         step(false);
278      }
279      break;
280
281   case TARGET_NEXT_CONTROL: {
282      control *ctl = buf_control_pop();
283      switch(ctl->action) {
284      case BC_MSG_OR_COMMAND:
285         if(ctrl & S_ATN) {
286            scsi_state = TARGET_WAIT_MSG_BYTE;
287            scsi_bus->ctrl_w(scsi_refid, S_PHASE_MSG_OUT, S_PHASE_MASK);
288         } else {
289            scsi_state = TARGET_WAIT_CMD_BYTE;
290            scsi_bus->ctrl_w(scsi_refid, S_PHASE_COMMAND, S_PHASE_MASK);
291         }
292         scsi_cmdsize = 0;
293         target_recv_byte();
294         break;
295
296      case BC_STATUS:
297         scsi_bus->ctrl_w(scsi_refid, S_PHASE_STATUS, S_PHASE_MASK);
298         target_send_byte(ctl->param1);
299         break;
300
301      case BC_DATA_IN:
302         scsi_bus->ctrl_w(scsi_refid, S_PHASE_DATA_IN, S_PHASE_MASK);
303         data_buffer_id = ctl->param1;
304         data_buffer_size = ctl->param2;
305         data_buffer_pos = 0;
306         scsi_state = TARGET_WAIT_DATA_IN_BYTE;
307         target_send_buffer_byte();
308         break;
309
310      case BC_MESSAGE_1:
311         scsi_bus->ctrl_w(scsi_refid, S_PHASE_MSG_IN, S_PHASE_MASK);
312         target_send_byte(ctl->param1);
313         break;
314
315      case BC_BUS_FREE:
316         scsi_bus->data_w(scsi_refid, 0);
317         scsi_bus->ctrl_wait(scsi_refid, S_BSY|S_SEL|S_RST, S_ALL);
318         scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
319         scsi_state = IDLE;
320         break;
321      };
322      break;
323   }
324
325   case TARGET_WAIT_DATA_IN_BYTE:
326      if(data_buffer_pos == data_buffer_size-1)
327         scsi_state = TARGET_NEXT_CONTROL;
328      target_send_buffer_byte();
329      break;
330
331   case TARGET_WAIT_MSG_BYTE:
332      if(ctrl & S_SEL)
333         return;
334      if(!(ctrl & S_ATN)) {
335         scsi_message();
336         scsi_cmdsize = 0;
337         scsi_state = TARGET_WAIT_CMD_BYTE;
338         scsi_bus->ctrl_w(scsi_refid, S_PHASE_COMMAND, S_PHASE_MASK);
339      }
340      target_recv_byte();
341      break;
342
343   case TARGET_WAIT_CMD_BYTE:
344      if(ctrl & S_SEL)
345         return;
346      if(ctrl & S_ATN) {
347         logerror("%s: Parity error? Say what?\n", tag());
348         scsi_state = IDLE;
349         break;
350      }
351
352      if(command_done()) {
353         scsi_bus->ctrl_wait(scsi_refid, 0, S_ACK);
354         scsi_command();
355         scsi_state = TARGET_NEXT_CONTROL;
356         step(false);
357      } else
358         target_recv_byte();
359      break;
360     
361   default:
362      logerror("%s: step() unexpected state %d.%d\n",
363             tag(),
364             scsi_state & STATE_MASK, (scsi_state & SUB_MASK) >> SUB_SHIFT);
365      exit(0);
366   }
367}
368
369void nscsi_full_device::target_recv_byte()
370{
371   scsi_bus->ctrl_wait(scsi_refid, S_ACK, S_ACK);
372   scsi_state = (scsi_state & STATE_MASK) | (RECV_BYTE_T_WAIT_ACK_1 << SUB_SHIFT);
373   scsi_bus->ctrl_w(scsi_refid, S_REQ, S_REQ);
374   step(false);
375}
376
377void nscsi_full_device::target_send_byte(UINT8 val)
378{
379   scsi_bus->ctrl_wait(scsi_refid, S_ACK, S_ACK);
380   scsi_state = (scsi_state & STATE_MASK) | (SEND_BYTE_T_WAIT_ACK_1 << SUB_SHIFT);
381   scsi_bus->data_w(scsi_refid, val);
382   scsi_bus->ctrl_w(scsi_refid, S_REQ, S_REQ);
383   step(false);
384}
385
386void nscsi_full_device::received(UINT8 val)
387{
388   scsi_cmdbuf[scsi_cmdsize++] = val;
389}
390
391UINT8 nscsi_full_device::scsi_get_data(int id, int pos)
392{
393   switch(id) {
394   case SBUF_MAIN:
395      return scsi_cmdbuf[pos];
396   case SBUF_SENSE:
397      return scsi_sense_buffer[pos];
398   default:
399      abort();
400   }
401}
402
403void nscsi_full_device::target_send_buffer_byte()
404{
405   target_send_byte(scsi_get_data(data_buffer_id, data_buffer_pos++));
406}
407
408bool nscsi_full_device::command_done()
409{
410   if(!scsi_cmdsize)
411      return false;
412   UINT8 h = scsi_cmdbuf[0];
413   switch(h >> 5) {
414   case 0: return scsi_cmdsize == 6;
415   case 1: return scsi_cmdsize == 10;
416   case 2: return scsi_cmdsize == 10;
417   case 3: return true;
418   case 4: return true;
419   case 5: return scsi_cmdsize == 12;
420   case 6: return true;
421   case 7: return true;
422   }
423   return true;
424}
425
426nscsi_full_device::control *nscsi_full_device::buf_control_push()
427{
428   if(buf_control_wpos == int(sizeof(buf_control)/sizeof(buf_control[0])))
429      throw emu_fatalerror("%s: buf_control overflow\n", tag());
430
431   control *c = buf_control + buf_control_wpos;
432   buf_control_wpos++;
433   return c;
434}
435
436nscsi_full_device::control *nscsi_full_device::buf_control_pop()
437{
438   if(buf_control_rpos == buf_control_wpos)
439      throw emu_fatalerror("%s: buf_control underflow\n", tag());
440
441   control *c = buf_control + buf_control_rpos;
442   buf_control_rpos++;
443   if(buf_control_rpos == buf_control_wpos)
444      buf_control_rpos = buf_control_wpos = 0;
445   return c;   
446}
447
448void nscsi_full_device::scsi_status_complete(UINT8 st)
449{
450   control *c;
451   c = buf_control_push();
452   c->action = BC_STATUS;
453   c->param1 = st;
454   c = buf_control_push();
455   c->action = BC_MESSAGE_1;
456   c->param1 = SM_COMMAND_COMPLETE;
457   c = buf_control_push();
458   c->action = BC_BUS_FREE;
459}
460
461void nscsi_full_device::scsi_data_in(int buf, int size)
462{
463   control *c;
464   c = buf_control_push();
465   c->action = BC_DATA_IN;
466   c->param1 = buf;
467   c->param2 = size;
468}
469
470void nscsi_full_device::scsi_data_out(int buf, int size)
471{
472   control *c;
473   c = buf_control_push();
474   c->action = BC_DATA_OUT;
475   c->param1 = buf;
476   c->param2 = size;
477}
478
479void nscsi_full_device::sense(bool deferred, UINT8 key)
480{
481   memset(scsi_sense_buffer, 0, sizeof(scsi_sense_buffer));
482   scsi_sense_buffer[0] = deferred ? 0x71 : 0x70;
483   scsi_sense_buffer[2] = key;
484}
485
486void nscsi_full_device::scsi_unknown_command()
487{
488   logerror("%s: Unknown command", tag());
489   for(int i=0; i != scsi_cmdsize; i++)
490      logerror(" %02x", scsi_cmdbuf[i]);
491   logerror("\n");
492
493   scsi_status_complete(SS_CHECK_CONDITION);
494   sense(false, 5);
495}
496
497void nscsi_full_device::scsi_command()
498{
499   switch(scsi_cmdbuf[0]) {
500   case SC_REQUEST_SENSE:
501      logerror("%s: command REQUEST SENSE\n", tag());
502      scsi_data_in(SBUF_SENSE, 8);
503      scsi_status_complete(SS_GOOD);
504      break;
505   default:
506      scsi_unknown_command();
507      break;
508   }
509}
510
511void nscsi_full_device::scsi_message()
512{
513   if(scsi_cmdbuf[0] & 0x80) {
514      scsi_identify = scsi_cmdbuf[0];
515      return;
516   }
517
518   logerror("%s: Unknown message", tag());
519   for(int i=0; i != scsi_cmdsize; i++)
520      logerror(" %02x", scsi_cmdbuf[i]);
521   logerror("\n");
522}
523
524int nscsi_full_device::get_lun(int def)
525{
526   if(scsi_identify & 0x80)
527      return scsi_identify & 0x7f;
528   return def;
529}
530
531void nscsi_full_device::bad_lun()
532{
533   scsi_status_complete(SS_CHECK_CONDITION);
534   sense(false, 2);
535}
536
537// Arbitration delay (2.4us)
538attotime nscsi_full_device::scsi_arbitation_delay()
539{
540   return attotime::from_nsec(2400);
541}
542
543// Assertion period (90ns)
544attotime nscsi_full_device::scsi_assertion_period()
545{
546   return attotime::from_nsec(90);
547}
548
549// Bus clear delay (800ns)
550attotime nscsi_full_device::scsi_bus_clear_delay()
551{
552   return attotime::from_nsec(800);
553}
554
555// Bus free delay (800ns)
556attotime nscsi_full_device::scsi_bus_free_delay()
557{
558   return attotime::from_nsec(800);
559}
560
561// Bus set delay (1.8us)
562attotime nscsi_full_device::scsi_bus_set_delay()
563{
564   return attotime::from_nsec(1800);
565}
566
567// Bus settle delay (400ns)
568attotime nscsi_full_device::scsi_bus_settle_delay()
569{
570   return attotime::from_nsec(400);
571}
572
573// Cable skew delay (10ns)
574attotime nscsi_full_device::scsi_cable_skew_delay()
575{
576   return attotime::from_nsec(10);
577}
578
579// Data release delay (400ns)
580attotime nscsi_full_device::scsi_data_release_delay()
581{
582   return attotime::from_nsec(40);
583}
584
585// Deskew delay (45ns)
586attotime nscsi_full_device::scsi_deskew_delay()
587{
588   return attotime::from_nsec(45);
589}
590
591// Disconnection delay (200us)
592attotime nscsi_full_device::scsi_disconnection_delay()
593{
594   return attotime::from_usec(200);
595}
596
597// Hold time (45ns)
598attotime nscsi_full_device::scsi_hold_time()
599{
600   return attotime::from_nsec(45);
601}
602
603// Negation period (90ns)
604attotime nscsi_full_device::scsi_negation_period()
605{
606   return attotime::from_nsec(90);
607}
608
609// Reset hold time (25us)
610attotime nscsi_full_device::scsi_reset_hold_time()
611{
612   return attotime::from_usec(25);
613}
614
615// Selection abort time (200us)
616attotime nscsi_full_device::scsi_selection_abort_time()
617{
618   return attotime::from_usec(200);
619}
620
621// Selection timeout delay (250ms)
622attotime nscsi_full_device::scsi_selection_timeout_delay()
623{
624   return attotime::from_msec(250);
625}
626
627// Fast assertion period (30ns)
628attotime nscsi_full_device::scsi_fast_assertion_period()
629{
630   return attotime::from_nsec(30);
631}
632
633// Fast cable skew delay (5ns)
634attotime nscsi_full_device::scsi_fast_cable_skew_delay()
635{
636   return attotime::from_nsec(5);
637}
638
639// Fast deskew delay (20ns)
640attotime nscsi_full_device::scsi_fast_deskew_delay()
641{
642   return attotime::from_nsec(20);
643}
644
645// Fast hold time (10ns)
646attotime nscsi_full_device::scsi_fast_hold_time()
647{
648   return attotime::from_nsec(10);
649}
650
651// Fast negation period (30ns)
652attotime nscsi_full_device::scsi_fast_negation_period()
653{
654   return attotime::from_nsec(30);
655}
656
src/emu/machine/nscsi_hd.c
r0r14400
1#include "machine/nscsi_hd.h"
2#include "imagedev/harddriv.h"
3
4const device_type NSCSI_HARDDISK = &device_creator<nscsi_harddisk_device>;
5
6nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7   nscsi_full_device(mconfig, NSCSI_HARDDISK, "SCSI HARDDISK", tag, owner, clock)
8{
9}
10
11void nscsi_harddisk_device::device_start()
12{
13   nscsi_full_device::device_start();
14}
15
16void nscsi_harddisk_device::device_reset()
17{
18   nscsi_full_device::device_reset();
19   harddisk_image_device *hd = subdevice<harddisk_image_device>("image");
20   harddisk = hd->get_hard_disk_file();
21   if(!harddisk) {
22      scsi_id = -1;
23      bytes_per_sector = 0;
24   } else {
25      const hard_disk_info *hdinfo = hard_disk_get_info(harddisk);
26      bytes_per_sector = hdinfo->sectorbytes;
27   }
28}
29
30harddisk_interface nscsi_harddisk_device::hd_intf = { 0, 0 };
31
32static MACHINE_CONFIG_FRAGMENT(scsi_harddisk)
33   MCFG_HARDDISK_CONFIG_ADD("image", nscsi_harddisk_device::hd_intf)
34MACHINE_CONFIG_END
35
36machine_config_constructor nscsi_harddisk_device::device_mconfig_additions() const
37{
38   return MACHINE_CONFIG_NAME(scsi_harddisk);
39}
40
41UINT8 nscsi_harddisk_device::scsi_get_data(int id, int pos)
42{
43   if(id != 2)
44      return nscsi_full_device::scsi_get_data(id, pos);
45   int clba = lba + pos / bytes_per_sector;
46   if(clba != cur_lba) {
47      cur_lba = clba;
48      if(!hard_disk_read(harddisk, cur_lba, block)) {
49         logerror("%s: HD READ ERROR !\n", tag());
50         memset(block, 0, sizeof(block));
51      }
52   }
53   return block[pos & (bytes_per_sector - 1)];
54}
55
56void nscsi_harddisk_device::scsi_command()
57{
58   switch(scsi_cmdbuf[0]) {
59   case SC_TEST_UNIT_READY:
60      logerror("%s: command TEST UNIT READY\n", tag());
61      scsi_status_complete(SS_GOOD);
62      break;
63
64   case SC_READ:
65      lba = ((scsi_cmdbuf[1] & 0x1f)<<16) | (scsi_cmdbuf[2]<<8) | scsi_cmdbuf[3];
66      blocks = scsi_cmdbuf[4];
67      if(!blocks)
68         blocks = 256;
69
70      logerror("%s: command READ start=%08x blocks=%04x\n",
71             tag(), lba, blocks);
72
73      scsi_data_in(2, blocks*bytes_per_sector);
74      scsi_status_complete(SS_GOOD);
75      break;
76
77   case SC_INQUIRY: {
78      int lun = get_lun(scsi_cmdbuf[1] >> 5);
79      logerror("%s: INQUIRY lun=%d EVPD=%d page=%d alloc=%02x link=%02x\n",
80             tag(),
81             lun, scsi_cmdbuf[1] & 1, scsi_cmdbuf[2], scsi_cmdbuf[4], scsi_cmdbuf[5]);
82      if(lun) {
83         bad_lun();
84         return;
85      }
86         
87      int page = scsi_cmdbuf[2];
88      int size = scsi_cmdbuf[4];
89      switch(page) {
90      case 0:
91         memset(scsi_cmdbuf, 0, 148);
92         scsi_cmdbuf[0] = 0x00; // device is direct-access (e.g. hard disk)
93         scsi_cmdbuf[1] = 0x00; // media is not removable
94         scsi_cmdbuf[2] = 0x05; // device complies with SPC-3 standard
95         scsi_cmdbuf[3] = 0x02; // response data format = SPC-3 standard
96         // Apple HD SC setup utility needs to see this
97         strcpy((char *)&scsi_cmdbuf[8], " SEAGATE");
98         strcpy((char *)&scsi_cmdbuf[16], "          ST225N");
99         strcpy((char *)&scsi_cmdbuf[32], "1.0");
100         if(size > 148)
101            size = 148;
102         scsi_data_in(0, size);
103         break;
104      }
105      scsi_status_complete(SS_GOOD);
106      break;
107   }
108
109   case SC_START_STOP_UNIT:
110      logerror("%s: command START STOP UNIT\n", tag());
111      scsi_status_complete(SS_GOOD);
112      break;
113
114   case SC_READ_CAPACITY: {
115      logerror("%s: command READ CAPACITY\n", tag());
116
117      hard_disk_info *info;
118      UINT32 temp;
119
120      info = hard_disk_get_info(harddisk);
121
122      // get # of sectors
123      temp = info->cylinders * info->heads * info->sectors;
124      temp--;
125
126      scsi_cmdbuf[0] = (temp>>24) & 0xff;
127      scsi_cmdbuf[1] = (temp>>16) & 0xff;
128      scsi_cmdbuf[2] = (temp>>8) & 0xff;
129      scsi_cmdbuf[3] = (temp & 0xff);
130      scsi_cmdbuf[4] = (info->sectorbytes>>24)&0xff;
131      scsi_cmdbuf[5] = (info->sectorbytes>>16)&0xff;
132      scsi_cmdbuf[6] = (info->sectorbytes>>8)&0xff;
133      scsi_cmdbuf[7] = (info->sectorbytes & 0xff);
134
135      scsi_data_in(0, 8);
136      scsi_status_complete(SS_GOOD);
137      break;
138   }
139
140   case SC_READ_EXTENDED:
141      lba = (scsi_cmdbuf[2]<<24) | (scsi_cmdbuf[3]<<16) | (scsi_cmdbuf[4]<<8) | scsi_cmdbuf[5];
142      blocks = (scsi_cmdbuf[7] << 8) | scsi_cmdbuf[8];
143
144      logerror("%s: command READ EXTENDED start=%08x blocks=%04x\n",
145             tag(), lba, blocks);
146
147      scsi_data_in(2, blocks*bytes_per_sector);
148      scsi_status_complete(SS_GOOD);
149      break;
150
151   default:
152      nscsi_full_device::scsi_command();
153      break;
154   }
155}
src/emu/machine/nscsi_bus.h
r0r14400
1#ifndef __NSCSI_BUS_H__
2#define __NSCSI_BUS_H__
3
4#include "emu.h"
5
6#define MCFG_NSCSI_BUS_ADD(_tag)      \
7   MCFG_DEVICE_ADD(_tag, NSCSI_BUS, 0)
8
9#define MCFG_NSCSI_DEVICE_ADD(_tag, _subtag, _type, _clock)         \
10   MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0)                   \
11   downcast<nscsi_connector *>(device)->set_fixed_device(_subtag);   \
12   MCFG_DEVICE_ADD(_tag ":" _subtag, _type, _clock)
13
14#define MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, _type, _clock)   \
15   MCFG_NSCSI_DEVICE_ADD(_tag, _subtag, _type, _clock)
16
17#define MCFG_NSCSI_ADD(_tag, _slot_intf, _def_slot, _def_inp)   \
18   MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0)                \
19   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp)
20
21class nscsi_device;
22
23class nscsi_bus_device : public device_t
24{
25public:
26   nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
27
28   void ctrl_w(int refid, UINT32 lines, UINT32 mask);
29   void data_w(int refid, UINT32 lines);
30   void ctrl_wait(int refid, UINT32 lines, UINT32 mask);
31
32   UINT32 ctrl_r() const;
33   UINT32 data_r() const;
34
35protected:
36   virtual void device_start();
37   virtual void device_reset();
38   virtual void device_config_complete();
39
40private:
41   struct dev_t {
42      nscsi_device *dev;
43      UINT32 ctrl, wait_ctrl;
44      UINT32 data;
45   };
46
47   dev_t dev[16];
48   int devcnt;
49
50   UINT32 data, ctrl;
51
52   void regen_data();
53   void regen_ctrl(int refid);
54};
55
56class nscsi_connector: public device_t,
57                  public device_slot_interface
58{
59public:
60   nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
61   virtual ~nscsi_connector();
62
63   nscsi_device *get_device();
64   void set_fixed_device(const char *subtag);
65
66protected:
67   virtual void device_start();
68
69private:
70   const char *fixed_subtag;
71};
72
73class nscsi_device : public device_t,
74                public device_slot_card_interface
75{
76public:
77   // Here because the biggest users are the devices, not the bus
78   enum {
79      S_INP = 0x0001,
80      S_CTL = 0x0002,
81      S_MSG = 0x0004,
82      S_BSY = 0x0008,
83      S_SEL = 0x0010,
84      S_REQ = 0x0020,
85      S_ACK = 0x0040,
86      S_ATN = 0x0080,
87      S_RST = 0x0100,
88      S_ALL = 0x01ff,
89
90      S_PHASE_DATA_OUT = 0,
91      S_PHASE_DATA_IN  = S_INP,
92      S_PHASE_COMMAND  = S_CTL,
93      S_PHASE_STATUS   = S_CTL|S_INP,
94      S_PHASE_MSG_OUT  = S_MSG|S_CTL,
95      S_PHASE_MSG_IN   = S_MSG|S_CTL|S_INP,
96      S_PHASE_MASK     = S_MSG|S_CTL|S_INP,
97   };
98
99   nscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
100
101   void connect_to_bus(nscsi_bus_device *bus, int refid, int default_scsi_id);
102   virtual void scsi_ctrl_changed();
103protected:
104   int scsi_id;
105   int scsi_refid;
106   nscsi_bus_device *scsi_bus;
107};
108
109class nscsi_full_device : public nscsi_device
110{
111public:
112   nscsi_full_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
113
114   virtual void scsi_ctrl_changed();
115protected:
116   enum { SCSI_TIMER = 100 };
117
118   // SCSI status returns
119   enum {
120      SS_GOOD              = 0x00,
121      SS_CHECK_CONDITION   = 0x02,
122      SS_CONDITION_MET     = 0x04,
123      SS_BUSY              = 0x08,
124      SS_INT_GOOD          = 0x10,
125      SS_INT_CONDITION_MET = 0x14,
126      SS_RESV_CONFLICT     = 0x18,
127      SS_TERMINATED        = 0x22,
128      SS_QUEUE_FULL        = 0x28,
129   };
130
131   // SCSI commands
132   enum {
133      SC_TEST_UNIT_READY   = 0x00,
134      SC_REZERO            = 0x01,
135      SC_REQUEST_SENSE     = 0x03,
136      SC_FORMAT_UNIT       = 0x04,
137      SC_REASSIGN_BLOCKS   = 0x07,
138      SC_READ              = 0x08,
139      SC_WRITE             = 0x0a,
140      SC_SEEK              = 0x0b,
141      SC_INQUIRY           = 0x12,
142      SC_MODE_SELECT_6     = 0x15,
143      SC_RESERVE_6         = 0x16,
144      SC_RELEASE_6         = 0x17,
145      SC_MODE_SENSE_6      = 0x1a,
146      SC_START_STOP_UNIT   = 0x1b,
147      SC_RECIEVE_DIAG_RES  = 0x1c,
148      SC_SEND_DIAGNOSTICS  = 0x1d,
149      SC_READ_CAPACITY     = 0x25,
150      SC_READ_EXTENDED     = 0x28,
151      SC_WRITE_EXTENDED    = 0x2a,
152      SC_SEEK_EXTENDED     = 0x2b,
153      SC_WRITE_VERIFY      = 0x2e,
154      SC_VERIFY            = 0x2f,
155      SC_SYNC_CACHE        = 0x35,
156      SC_READ_DEFECT_DATA  = 0x37,
157      SC_READ_DATA_BUFFER  = 0x3c,
158      SC_READ_LONG         = 0x3e,
159      SC_WRITE_LONG        = 0x3f,
160      SC_CHANGE_DEFINITION = 0x40,
161      SC_LOG_SELECT        = 0x4c,
162      SC_LOG_SENSE         = 0x4d,
163      SC_MODE_SELECT_10    = 0x55,
164      SC_RESERVE_10        = 0x56,
165      SC_RELEASE_10        = 0x57,
166      SC_MODE_SENSE_10     = 0x5a,
167   };
168
169   // SCSI Messages
170   enum {
171      SM_COMMAND_COMPLETE  = 0x00,
172      SM_EXTENDED_MSG      = 0x01,
173      SM_SAVE_DATA_PTR     = 0x02,
174      SM_RESTORE_PTR       = 0x03,
175      SM_DISCONNECT        = 0x04,
176      SM_INITIATOR_ERROR   = 0x05,
177      SM_ABORT             = 0x06,
178      SM_MSG_REJECT        = 0x07,
179      SM_NOP               = 0x08,
180      SM_MSG_PARITY        = 0x09,
181      SM_LCMD_COMPLETE     = 0x0a,
182      SM_LCMD_COMPLETE_F   = 0x0b,
183      SM_BUS_DEVICE_RESET  = 0x0c,
184      SM_ABORT_TAG         = 0x0d,
185      SM_CLEAR_QUEUE       = 0x0e,
186      SM_INIT_RECOVERY     = 0x0f,
187      SM_RELEASE_RECOVERY  = 0x10,
188      SM_TERMINATE_IO      = 0x11,
189      SM_SIMPLE_QUEUE      = 0x20,
190      SM_HEAD_QUEUE        = 0x21,
191      SM_ORDERED_QUEUE     = 0x22,
192      SM_IGNORE_WIDE_RES   = 0x23,
193   };
194
195   enum {
196      SBUF_MAIN,
197      SBUF_SENSE,
198   };
199
200   UINT8 scsi_cmdbuf[4096], scsi_sense_buffer[8];
201   int scsi_cmdsize;
202   UINT8 scsi_identify;
203
204   virtual void device_start();
205   virtual void device_reset();
206   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
207
208   virtual void scsi_message();
209   virtual void scsi_command();
210
211   void scsi_unknown_command();
212   void scsi_status_complete(UINT8 st);
213   void scsi_data_in(int buf, int size);
214   void scsi_data_out(int buf, int size);
215
216   void sense(bool deferred, UINT8 key);
217   int get_lun(int def = 0);
218   void bad_lun();
219
220   virtual UINT8 scsi_get_data(int buf, int offset);
221
222   // Default delays:
223
224   // Arbitration delay (2.4us)
225   virtual attotime scsi_arbitation_delay();
226
227   // Assertion period (90ns)
228   virtual attotime scsi_assertion_period();
229
230   // Bus clear delay (800ns)
231   virtual attotime scsi_bus_clear_delay();
232
233   // Bus free delay (800ns)
234   virtual attotime scsi_bus_free_delay();
235
236   // Bus set delay (1.8us)
237   virtual attotime scsi_bus_set_delay();
238
239   // Bus settle delay (400ns)
240   virtual attotime scsi_bus_settle_delay();
241
242   // Cable skew delay (10ns)
243   virtual attotime scsi_cable_skew_delay();
244
245   // Data release delay (400ns)
246   virtual attotime scsi_data_release_delay();
247
248   // Deskew delay (45ns)
249   virtual attotime scsi_deskew_delay();
250
251   // Disconnection delay (200us)
252   virtual attotime scsi_disconnection_delay();
253
254   // Hold time (45ns)
255   virtual attotime scsi_hold_time();
256
257   // Negation period (90ns)
258   virtual attotime scsi_negation_period();
259
260   // Reset hold time (25us)
261   virtual attotime scsi_reset_hold_time();
262
263   // Selection abort time (200us)
264   virtual attotime scsi_selection_abort_time();
265
266   // Selection timeout delay (250ms)
267   virtual attotime scsi_selection_timeout_delay();
268
269   // Fast assertion period (30ns)
270   virtual attotime scsi_fast_assertion_period();
271
272   // Fast cable skew delay (5ns)
273   virtual attotime scsi_fast_cable_skew_delay();
274
275   // Fast deskew delay (20ns)
276   virtual attotime scsi_fast_deskew_delay();
277
278   // Fast hold time (10ns)
279   virtual attotime scsi_fast_hold_time();
280
281   // Fast negation period (30ns)
282   virtual attotime scsi_fast_negation_period();
283
284private:
285   enum {
286      IDLE,
287   };
288
289   enum {
290      TARGET_SELECT_WAIT_BUS_SETTLE = 1,
291      TARGET_SELECT_WAIT_SEL_0,
292
293      TARGET_NEXT_CONTROL,
294      TARGET_WAIT_MSG_BYTE,
295      TARGET_WAIT_CMD_BYTE,
296      TARGET_WAIT_DATA_IN_BYTE,
297   };
298
299   enum {
300      RECV_BYTE_T_WAIT_ACK_0 = 1,
301      RECV_BYTE_T_WAIT_ACK_1,
302      SEND_BYTE_T_WAIT_ACK_0,
303      SEND_BYTE_T_WAIT_ACK_1,
304   };
305
306   enum {
307      STATE_MASK = 0x00ff,
308      SUB_SHIFT  = 8,
309      SUB_MASK   = 0xff00,
310   };
311
312   enum {
313      BC_MSG_OR_COMMAND,
314      BC_STATUS,
315      BC_MESSAGE_1,
316      BC_MESSAGE_2,
317      BC_DATA_IN,
318      BC_DATA_OUT,
319      BC_BUS_FREE,
320   };
321
322   struct control {
323      int action;
324      int param1, param2;
325   };
326
327   emu_timer *scsi_timer;
328
329   int scsi_state, scsi_substate;
330   int scsi_initiator_id;
331   int data_buffer_id, data_buffer_size, data_buffer_pos;
332
333   control buf_control[32];
334   int buf_control_rpos;
335   int buf_control_wpos;
336
337   control *buf_control_push();
338   control *buf_control_pop();
339   
340   void step(bool timeout);
341   void target_recv_byte();
342   void target_send_byte(UINT8 val);
343   void received(UINT8 val);
344   void target_send_buffer_byte();
345   bool command_done();
346};
347
348
349extern const device_type NSCSI_BUS;
350extern const device_type NSCSI_CONNECTOR;
351
352#endif
353
src/emu/machine/nscsi_hd.h
r0r14400
1#ifndef __NSCSI_HD_H__
2#define __NSCSI_HD_H__
3
4#include "machine/nscsi_bus.h"
5#include "harddisk.h"
6
7#define MCFG_NSCSI_HARDDISK_ADD(_tag, _subtag)                  \
8   MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, NSCSI_HARDDISK, 0)
9
10class nscsi_harddisk_device : public nscsi_full_device
11{
12public:
13   nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
14
15   virtual machine_config_constructor device_mconfig_additions() const;
16
17   static struct harddisk_interface hd_intf;
18protected:
19   virtual void device_start();
20   virtual void device_reset();
21
22   virtual void scsi_command();
23   virtual UINT8 scsi_get_data(int id, int pos);
24
25private:
26   UINT8 block[512];
27   hard_disk_file *harddisk;
28   int lba, cur_lba, blocks;
29   int bytes_per_sector;
30};
31
32extern const device_type NSCSI_HARDDISK;
33
34#endif
src/emu/machine/nscsi_cd.c
r0r14400
1#include "machine/nscsi_cd.h"
2#include "imagedev/chd_cd.h"
3
4const device_type NSCSI_CDROM = &device_creator<nscsi_cdrom_device>;
5
6nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7   nscsi_full_device(mconfig, NSCSI_CDROM, "SCSI CDROM", tag, owner, clock)
8{
9}
10
11void nscsi_cdrom_device::device_start()
12{
13   nscsi_full_device::device_start();
14   bytes_per_sector = 2048;
15}
16
17void nscsi_cdrom_device::device_reset()
18{
19   nscsi_full_device::device_reset();
20   cdrom = subdevice<cdrom_image_device>("image")->get_cdrom_file();
21   lba = 0;
22   blocks = 0;
23   cur_lba = -1;
24}
25
26cdrom_interface nscsi_cdrom_device::cd_intf = { 0, 0 };
27
28static MACHINE_CONFIG_FRAGMENT(scsi_cdrom)
29   MCFG_CDROM_ADD("image", nscsi_cdrom_device::cd_intf)
30MACHINE_CONFIG_END
31
32machine_config_constructor nscsi_cdrom_device::device_mconfig_additions() const
33{
34   return MACHINE_CONFIG_NAME(scsi_cdrom);
35}
36
37UINT8 nscsi_cdrom_device::scsi_get_data(int id, int pos)
38{
39   if(id != 2)
40      return nscsi_full_device::scsi_get_data(id, pos);
41   int clba = lba + pos / bytes_per_sector;
42   if(clba != cur_lba) {
43      cur_lba = clba;
44      if(!cdrom_read_data(cdrom, cur_lba, block, CD_TRACK_MODE1)) {
45         logerror("%s: CD READ ERROR !\n", tag());
46         memset(block, 0, sizeof(block));
47      }
48   }
49   return block[pos & (bytes_per_sector - 1)];
50}
51
52void nscsi_cdrom_device::scsi_command()
53{
54   switch(scsi_cmdbuf[0]) {
55   case SC_TEST_UNIT_READY:
56      logerror("%s: command TEST UNIT READY\n", tag());
57      scsi_status_complete(SS_GOOD);
58      break;
59
60   case SC_READ:
61      lba = ((scsi_cmdbuf[1] & 0x1f)<<16) | (scsi_cmdbuf[2]<<8) | scsi_cmdbuf[3];
62      blocks = scsi_cmdbuf[4];
63      if(!blocks)
64         blocks = 256;
65
66      logerror("%s: command READ start=%08x blocks=%04x\n",
67             tag(), lba, blocks);
68
69      scsi_data_in(2, blocks*bytes_per_sector);
70      scsi_status_complete(SS_GOOD);
71      break;
72
73   case SC_INQUIRY: {
74      int lun = get_lun(scsi_cmdbuf[1] >> 5);
75      logerror("%s: command INQUIRY lun=%d EVPD=%d page=%d alloc=%02x link=%02x\n",
76             tag(),
77             lun, scsi_cmdbuf[1] & 1, scsi_cmdbuf[2], scsi_cmdbuf[4], scsi_cmdbuf[5]);
78      if(lun) {
79         bad_lun();
80         return;
81      }
82
83      int page = scsi_cmdbuf[2];
84      int size = scsi_cmdbuf[4];
85      switch(page) {
86      case 0:
87         memset(scsi_cmdbuf, 0, 148);
88         scsi_cmdbuf[0] = 0x05; // device is present, device is CD/DVD (MMC-3)
89         scsi_cmdbuf[1] = 0x80; // media is removable
90         scsi_cmdbuf[2] = 0x05; // device complies with SPC-3 standard
91         scsi_cmdbuf[3] = 0x02; // response data format = SPC-3 standard
92         // some Konami games freak out if this isn't "Sony", so we'll lie
93         // this is the actual drive on my Nagano '98 board
94         strcpy((char *)&scsi_cmdbuf[8], "Sony");
95         strcpy((char *)&scsi_cmdbuf[16], "CDU-76S");
96         strcpy((char *)&scsi_cmdbuf[32], "1.0");
97         if(size > 148)
98            size = 148;
99         scsi_data_in(SBUF_MAIN, size);
100         break;
101      }
102      scsi_status_complete(SS_GOOD);
103      break;
104   }
105
106   case SC_START_STOP_UNIT:
107      logerror("%s: command START STOP UNIT\n", tag());
108      scsi_status_complete(SS_GOOD);
109      break;
110
111   case SC_READ_CAPACITY: {
112      logerror("%s: command READ CAPACITY\n", tag());
113
114      UINT32 temp = cdrom_get_track_start(cdrom, 0xaa);
115      temp--;   // return the last used block on the disc
116
117      scsi_cmdbuf[0] = (temp>>24) & 0xff;
118      scsi_cmdbuf[1] = (temp>>16) & 0xff;
119      scsi_cmdbuf[2] = (temp>>8) & 0xff;
120      scsi_cmdbuf[3] = (temp & 0xff);
121      scsi_cmdbuf[4] = 0;
122      scsi_cmdbuf[5] = 0;
123      scsi_cmdbuf[6] = (bytes_per_sector>>8)&0xff;
124      scsi_cmdbuf[7] = (bytes_per_sector & 0xff);
125
126      scsi_data_in(SBUF_MAIN, 8);
127      scsi_status_complete(SS_GOOD);
128      break;
129   }
130
131   case SC_READ_EXTENDED:
132      lba = (scsi_cmdbuf[2]<<24) | (scsi_cmdbuf[3]<<16) | (scsi_cmdbuf[4]<<8) | scsi_cmdbuf[5];
133      blocks = (scsi_cmdbuf[7] << 8) | scsi_cmdbuf[8];
134
135      logerror("%s: command READ EXTENDED start=%08x blocks=%04x\n",
136             tag(), lba, blocks);
137
138      scsi_data_in(2, blocks*bytes_per_sector);
139      scsi_status_complete(SS_GOOD);
140      break;
141
142   default:
143      nscsi_full_device::scsi_command();
144      break;
145   }
146}
src/emu/machine/nscsi_cd.h
r0r14400
1#ifndef __NSCSI_CD_H__
2#define __NSCSI_CD_H__
3
4#include "machine/nscsi_bus.h"
5#include "cdrom.h"
6
7#define MCFG_NSCSI_CDROM_ADD(_tag, _subtag)                  \
8   MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, NSCSI_CDROM, 0)
9
10class nscsi_cdrom_device : public nscsi_full_device
11{
12public:
13   nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
14   virtual machine_config_constructor device_mconfig_additions() const;
15
16   static struct cdrom_interface cd_intf;
17
18protected:
19   virtual void device_start();
20   virtual void device_reset();
21
22   virtual void scsi_command();
23   virtual UINT8 scsi_get_data(int id, int pos);
24
25private:
26   UINT8 block[2048];
27   cdrom_file *cdrom;
28   int bytes_per_sector;
29   int lba, cur_lba, blocks;
30};
31
32extern const device_type NSCSI_CDROM;
33
34#endif
src/mess/machine/isa_ide.c
r14399r14400
3131
3232
3333static MACHINE_CONFIG_FRAGMENT( ide )
34   MCFG_HARDDISK_ADD("harddisk1")
35   MCFG_HARDDISK_ADD("harddisk2")
36
37   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
38   MCFG_IDE_CONTROLLER_REGIONS("harddisk1", "harddisk2")
34   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_image_devices, "hdd", "hdd")
3935MACHINE_CONFIG_END
4036
4137static INPUT_PORTS_START( ide )
src/mess/machine/ti99/tn_ide.c
r14399r14400
395395
396396MACHINE_CONFIG_FRAGMENT( tn_ide )
397397   MCFG_RTC65271_ADD( "ide_rtc", ide_rtc_cfg )
398   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt_callback )
399   MCFG_IDE_CONTROLLER_REGIONS(":peribox:idehd0:drive", NULL)
398   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt_callback, ide_image_devices, "hdd", NULL )
399//   MCFG_IDE_CONTROLLER_REGIONS(":peribox:idehd0:drive", NULL)
400400MACHINE_CONFIG_END
401401
402402static const char DEVTEMPLATE_SOURCE[] = __FILE__;
src/mess/drivers/bebox.c
r14399r14400
161161   MCFG_FUJITSU_29F016A_ADD("flash")
162162
163163   MCFG_CDROM_ADD( "cdrom",bebox_cdrom )
164   MCFG_HARDDISK_ADD( "harddisk1" )
165164
166   MCFG_IDE_CONTROLLER_ADD( "ide", bebox_ide_interrupt )   /* FIXME */
167   MCFG_IDE_CONTROLLER_REGIONS("harddisk1", NULL)
165   MCFG_IDE_CONTROLLER_ADD( "ide", bebox_ide_interrupt, ide_image_devices, "hdd", NULL )   /* FIXME */
168166
169167   MCFG_MPC105_ADD("mpc105","ppc1",0)
170168   MCFG_CIRRUS_ADD("cirrus")
src/mess/drivers/apple2.c
r14399r14400
707707   MCFG_CPU_REPLACE("maincpu", M65C02, 1021800)      /* close to actual CPU frequency of 1.020484 MHz */
708708
709709   /* CFFA stuff */
710   MCFG_HARDDISK_ADD("harddisk")
711   MCFG_IDE_CONTROLLER_ADD("ide", NULL)
712   MCFG_IDE_CONTROLLER_REGIONS("harddisk", NULL)
710   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", NULL)
713711   MCFG_A2CFFA_ADD("cffa")
714712   MCFG_APPLE2_SLOT_ADD(7, "cffa", a2cffa_r, a2cffa_w, a2cffa_c800_r, a2cffa_c800_w, a2cffa_cnxx_r, a2cffa_cnxx_w)
715713MACHINE_CONFIG_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team