summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/scsicd.c
Commit message (Collapse)AuthorAgeFilesLines
* asserted copyright (nw) smf-2013-11-021-0/+2
|
* Use virtual multiple inheritance to share command processing between SCSI & ↵ smf-2013-09-171-691/+7
| | | | ATAPI instead of having a SCSI subdevice. This allows matsushita_cr589_device & gdrom_device to derive from atapi_cdrom_device. [smf]
* modernised CDDA & discard buffered samples when starting to play to avoid ↵ smf-2013-05-131-58/+21
| | | | audio glitches and timing issues. [smf]
* Expanded device_t constructor with parameters for short name and source file ↵ Miodrag Milanovic2013-03-261-3/+3
| | | | location [Miodrag Milanovic]
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-27/+27
|
* Set interface name to scsi harddisks so they can be mounted as softlist ↵ Miodrag Milanovic2012-11-271-1/+1
| | | | | | items (no whatsnew) Fixed mac harddisk list to use new interface Also added interface for scsi cdrom, but named it "cdrom" since medium is always same.
* Cleanups and version bump (nw)mame0147u3 Miodrag Milanovic2012-11-191-2/+2
|
* scsicd: Add STOP command [PKGINKO] R. Belmont2012-11-161-0/+13
| | | | | | | | | firebeat: Some additional ATAPI support [PKGINKGO] New games added as GAME NOT WORKING ----------------------------------- ParaParaParadise 1st Mix Plus [PKGINKO, R. Belmont]
* SCSICD now has a CDDA sub device [smf] smf-2012-10-231-1/+3
|
* made cdrom_image_device & harddisk_image_device responsible for accessing ↵ smf-2012-10-111-23/+0
| | | | driver based chd's (nw)
* removed GetCommand() and made command and commandLength protected (nw) smf-2012-10-111-13/+0
|
* call base class in device_start() (nw) smf-2012-10-061-0/+2
|
* renamed scsidev to scsihle (nw) smf-2012-10-041-7/+7
|
* Removed init_scsibus() from scsibus_device as it was only used for passing ↵ smf-2012-09-211-0/+5
| | | | the sector size, in reality this is an attribute of the hard drive and not the bus. It now asks the device for the size, however this will go away soon (nw)
* scsi devices are now proper mame devices. smf-2012-05-311-236/+216
|
* sync with mess (no whatsnew) Miodrag Milanovic2012-03-091-0/+20
|
* CDROM image device modernized and drivers updated (no whatsnew) Miodrag Milanovic2011-06-151-1/+2
|
* BIG update. Aaron Giles2011-03-291-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
* Removed more ifdefs from scsi code (no whatsnew) Miodrag Milanovic2011-01-101-11/+13
|
* Removed mess from names of some calls in image device code (no whatsnew) Miodrag Milanovic2011-01-061-1/+1
|
* Moved image devices implementation and related UI functions to emu section ↵ Miodrag Milanovic2011-01-051-3/+1
| | | | from MESS [Miodrag Milanovic]
* running_device -> device_t Aaron Giles2010-12-311-2/+2
| | | | | They both already existed. No sense in having two names for the same object type.
* Correct a long-standing design flaw: device configuration state Aaron Giles2010-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is now separate from runtime device state. I have larger plans for devices, so there is some temporary scaffolding to hold everything together, but this first step does separate things out. There is a new class 'running_device' which represents the state of a live device. A list of these running_devices sits in machine->devicelist and is created when a running_machine is instantiated. To access the configuration state, use device->baseconfig() which returns a reference to the configuration. The list of running_devices in machine->devicelist has a 1:1 correspondance with the list of device configurations in machine->config->devicelist, and most navigation options work equally on either (scanning by class, type, etc.) For the most part, drivers will now deal with running_device objects instead of const device_config objects. In fact, in order to do this patch, I did the following global search & replace: const device_config -> running_device device->static_config -> device->baseconfig().static_config device->inline_config -> device->baseconfig().inline_config and then fixed up the compiler errors that fell out. Some specifics: Removed device_get_info_* functions and replaced them with methods called get_config_*. Added methods for get_runtime_* to access runtime state from the running_device. DEVICE_GET_INFO callbacks are only passed a device_config *. This means they have no access to the token or runtime state at all. For most cases this is fine. Added new DEVICE_GET_RUNTIME_INFO callback that is passed the running_device for accessing data that is live at runtime. In the future this will go away to make room for a cleaner mechanism. Cleaned up the handoff of memory regions from the memory subsystem to the devices.
* Within src/emu, basic conversions: Aaron Giles2010-01-121-1/+1
| | | | | | devtag_get_device ... machine->device() memory_find_address_space ... device->space()
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* > -----Original Message----- Aaron Giles2009-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | > From: Atari Ace [mailto:atari_ace@verizon.net] > Sent: Monday, August 03, 2009 10:52 PM > To: submit@mamedev.org > Cc: atariace@hotmail.com > Subject: [patch] De-globalize romload.c/validity.c > > Hi mamedev, > > Static and global variables in the core of MAME have slowly been > replaced with opaque structures latched onto the running machine. This > patch extends this idiom to two more files, romload.c and validity.c. > validity.c in fact didn't need any global state (it was used only to > pass data between function calls), and romload.c already had a struct > that largely served that purpose. > > ~aa
* Many casts added to the core files, and various other tweaks Aaron Giles2009-03-121-16/+16
| | | | to make them compile as either C or C++.
* Removed device types from device queries that use tags, under the Aaron Giles2009-03-021-1/+1
| | | | | | | | | | | | | | | assumption that all device tags are unique. Specifically, the following no longer need to provide a device type: AM_DEVREAD/WRITE DEVCB_DEVICE_HANDLER devtag_get_device devtag_reset device_list_find_by_tag as well as several device interfaces that referenced other devices. Also fixed assertion due to overflow in the recent sound fix.
* Ok, this is The Big One. Aaron Giles2009-02-111-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please note: regression testing is in progress, but the first round of glaring regressions have already been taken care of. That said, there is likely to be a host of regressions as a result of this change. Also note: There are still a few rough edges in the interfaces. I will try to clean them up systematically once the basic system is working. All sound chips are now proper devices. Merged the sound chip interface into the device interface, removing any differences (such as the whole ALIASing concept). Modified every sound chip in the following ways: * updated to match the device interface * reduced read/write handlers down to the minimal number * added the use of get_safe_token() for ensuring correctness * other minor cleanup Removed the custom sound device. The additional work to just make custom sound cases into full devices is minimal, so I just converted them all over to be actual devices. Vastly simplified the sound interfaces, removing the ghastly sndti_* business and moving everyone over to using tags for sound identity. sndintrf, like cpuintrf, is now just a header file with no implementation. Modified each and every driver that references a sound chip: * all memory maps explicitly reference the targeted device via AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE * 16-bit and 32-bit accesses to 8-bit chips no longer use trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE macros * all references to sound chips are now done via tags * note that these changes are brute force, not optimal; in many cases drivers should grab pointers to devices in MACHINE_START and stash them away
* This update is the below two patches, plus the remaining changes Aaron Giles2008-12-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | necessary to remove 12 of the final 14 references to the global Machine. The remaining 2 are in fatalerror() and logerror(), which are both local to mame.c, so Machine is now fully static. -- From: Atari Ace [mailto:atari_ace@verizon.net] Sent: Thursday, December 18, 2008 5:47 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Make Machine static followup Hi mamedev, This incremental patch to my last patch undoes the change that caches the ppu2c0x videorom. I changed the code back to how it behaved originally, using an existing machine on the chip struct to eliminate the one troublesome Machine reference. ~aa -- From: Atari Ace [mailto:atari_ace@verizon.net] Sent: Thursday, December 18, 2008 2:54 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Make Machine static! Hi mamedev, This large patch completes the removal of the use of Machine throughout MAME. It does so primarily by adding machine, device or space to various apis and modifying the callers, but for some remaining cases it adds a new api, mame_get_running_machine(), which will be called instead. There are only 14 uses of this api currently, and that number should drop over time. There are a few changes of note: 1. 6821pia.c. I attached machine to the 'device' structure. I'm working on converting this to a proper device, but that change isn't ready. 2. fddebug.c. I added a proper header so that the apis won't get accidentally converted to static again. 3. scsi.c. I added a machine to SCSIInstance. 4. system16.c. I modified sys16_patch_code to take an array of patches. 4. custom.h. I added the owning sound device to the reset/stop routines as well as the token. Note that passing only the device would require exposing the internals of custom_sound, as the token passed is not the device token, but the token returned from the CUSTOM_START routine. Better ideas here are welcome. 4. ppc2c0x.c. To avoid changing more interfaces, the init routine saves the videorom location rather than looks it up each time. I tried to choose what I felt was the natural parameter for an api, rather than always pass machine, but in some cases I used machine to limit the number of additional changes. Some additional cleanup here is probably warranted, I'll look into that later once I'm recovered from this two-week project. ~aa
* Hi mamedev, Aaron Giles2008-12-081-7/+8
| | | | | | | | | | | | | | | | | | | | | | | This is a reworked/expanded version of the patch I sent yesterday. This one is split into three parts: 1. This introduces function macros for SAMPLES_START, CUSTOM_{START,STOP,RESET}, and ANTIC_RENDERER. 2. This introduces running_machine *machine throughout MAME. Principally it adds running_machine *machine = Machine to the top of functions, but in some static functions the parameter is added directly. Some similar changes in 99xxcore.h, v9938.c, v9938mod.c, galaxold.c, psx.c, taito_l.c are also made to eliminate Machine params. No global API is changed. 3. This changes the APIs introduced in the first part to pass device or space as appropriate. A few similar changes in some other global apis are made as well. The net result of this sequence of patches is to remove 40% of the Machine references and 27 deprecat.h includes. ~aa
* Changed save state system to accept machine parameters where Aaron Giles2008-12-051-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate, and to keep all global variables hanging off the machine structure. Once again, this means all state registration call sites have been touched: - state_save_register_global* now takes a machine parameter - state_save_register_item* now takes a machine parameter - added new state_save_register_device_item* which now uses the device name and tag to generate the base name Extended the fake sound devices to have more populated fields. Modified sound cores to use tags from the devices and simplified the start function. Renumbered CPU and sound get/set info constants to align with the device constants, and shared values where they were perfectly aligned. Set the type field in the fake device_configs for CPU and sound chips to a get_info stub which calls through to the CPU and sound specific get_info functions. This means the device_get_info() functions work for CPU and sound cores, even in their fake state. Changed device information getters from device_info() to device_get_info() to match the CPU and sound macros.
* Added "tag" parameter to state_save_register_item_* calls. Removed Aaron Giles2008-11-171-10/+7
| | | | | | state_save_combine_module_and_tag() function in favor of passing the tag when registering. Revisited all save state item registrations and changed them to use the tag where appropriate.
* Some MESS specific fixes. Wilbert Pol2008-08-191-1/+1
|
* Some MESS specific changes Wilbert Pol2008-08-171-1/+3
|
* Disks opened by the romload module are no longer identified by index. Aaron Giles2008-08-011-11/+17
| | | | | | | | | | | | | | | | | Instead, they are identified by the region they were loaded in. This generally means one disk per region. get_disk_handle() now takes a region name in place of an index. Updated all callers to do this. The SCSI modules in particular posed a challenge to make this work, so watch out for potential bugs there. Changed the IDE interfaces to default to choosing the region with the same tag as the device for its master disk (assuming no slave). Added support for specifying explicit master/slave disk regions as part of the configuration, though slave disks are still not supported yet. Change the laserdisc interface to no longer require a disk number or a custom sound device. Both are now assumed to be tagged the same as the laserdisc device. Updated all drivers accordingly.
* [SCSICD] Reverted previous change. R. Belmont2008-04-041-2/+2
|
* Cleanups and version bump to 0.124u1.mame0124u1 Aaron Giles2008-04-031-1/+1
|
* Various SCSI devices register state items by their disk ID, which are not ↵ R. Belmont2008-03-311-3/+3
| | | | unique across device types. This introduces a device-type offset for CD-ROMs so their registrations don't clash with harddisks.
* (From Atari Ace) Aaron Giles2007-12-241-0/+1
| | | | | | | | | | This small patch makes some minor "code quality" improvements to MAME. First off, some remaing static/const qualifier missed cases were addressed. Secondly, a few cases of missing #include "foo.h" were added. Thirdly, a few global names were modified to make them less generic/more consistent (voodoo.c, vrender0.c, lethal.c, rungun.c, zac2650.c). Fourthly, some dead/useless code was removed (i8051.c,model1.c,romcmp.c).
* Changes for MAME 0.121u4.mame0121u4 Aaron Giles2007-12-171-1/+1
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+768