// license:BSD-3-Clause // copyright-holders:smf #include "emu.h" #include "t10spc.h" void t10spc::t10_start(device_t &device) { m_device = &device; device.save_item(NAME(command)); device.save_item(NAME(commandLength)); device.save_item(NAME(m_transfer_length)); device.save_item(NAME(m_phase)); device.save_item(NAME(m_sense_key)); device.save_item(NAME(m_sense_asc)); device.save_item(NAME(m_sense_ascq)); device.save_item(NAME(m_sense_information)); } void t10spc::t10_reset() { m_phase = SCSI_PHASE_BUS_FREE; m_status_code = SCSI_STATUS_CODE_GOOD; m_sense_key = 0; m_sense_asc = 0; m_sense_ascq = 0; m_sense_information = 0; } void t10spc::set_sense(sense_key_t key, sense_asc_ascq_t asc_ascq) { m_sense_key = key; m_sense_asc = (asc_ascq >> 8) & 0xff; m_sense_ascq = asc_ascq & 0xff; m_sense_information = 0; } void t10spc::ExecCommand() { switch( command[ 0 ] ) { case T10SPC_CMD_TEST_UNIT_READY: m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; case T10SPC_CMD_RECALIBRATE: m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; case T10SPC_CMD_REQUEST_SENSE: m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; if (command[4] == 0) { m_transfer_length = 4; } else if (command[4] > 18) { m_transfer_length = 18; } else { m_transfer_length = command[ 4 ]; } break; case T10SPC_CMD_START_STOP_UNIT: m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; case T10SPC_CMD_SEND_DIAGNOSTIC: m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT16(&command[3]); break; default: m_device->logerror( "SCSIDEV unknown command %02x\n", command[ 0 ] ); m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; } } void t10spc::ReadData( uint8_t *data, int dataLength ) { switch( command[ 0 ] ) { case T10SPC_CMD_REQUEST_SENSE: if (command[4] == 0) { data[0] = m_sense_asc & 0x7f; data[1] = (m_sense_information >> 16) & 0x1f; data[2] = (m_sense_information >> 8) & 0xff; data[3] = (m_sense_information >> 0) & 0xff; } else { data[0] = 0x70; data[1] = 0; data[2] = m_sense_key & 0xf; data[3] = (m_sense_information >> 24) & 0xff; data[4] = (m_sense_information >> 16) & 0xff; data[5] = (m_sense_information >> 8) & 0xff; data[6] = (m_sense_information >> 0) & 0xff; data[7] = 10; data[8] = 0; data[9] = 0; data[10] = 0; data[11] = 0; data[12] = m_sense_asc; data[13] = m_sense_ascq; data[14] = 0; data[15] = 0; data[16] = 0; data[17] = 0; } set_sense(SCSI_SENSE_KEY_NO_SENSE, SCSI_SENSE_ASC_ASCQ_NO_SENSE); break; default: m_device->logerror( "SCSIDEV unknown read %02x\n", command[ 0 ] ); break; } } void t10spc::WriteData( uint8_t *data, int dataLength ) { switch( command[ 0 ] ) { case T10SPC_CMD_SEND_DIAGNOSTIC: break; default: m_device->logerror( "SCSIDEV unknown write %02x\n", command[ 0 ] ); break; } } void t10spc::SetCommand( uint8_t *_command, int _commandLength ) { if( _commandLength > sizeof( command ) ) { /// TODO: output an error. return; } memcpy( command, _command, _commandLength ); commandLength = _commandLength; m_phase = SCSI_PHASE_COMMAND; } =76a2e99d6bb80aaf515b8da699255c87498f7ca0&follow=1'>commitdiffstatshomepage
path: root/src/mess/video (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-10-15fmtowns: add the Model 2 ROMs (#5732) r092-25/+79
* fmtowns: add the Model 2 ROMs - Dumped and added the ROMs from an first-generation FM Towns Model 2, and made it the parent set. For now we'll assume that the Model 1 ROMs are the same, since the only differences between them are the amount of floppy drives and RAM. - Removed the old "fmtowns" set, since its ROMs completely match the FM Towns II MX ones after splitting them. - Renamed and added a few comments to the "fmtownsa" set so the description is a bit more accurate. It seems to be from a third-generation model, probaby a CX. - Added a comment with a list of all the known FM Towns models. * TC Marty (nw) * oops (nw) * fix some mistakes (nw)
2019-10-15-x c++ should not be applied to targets like msvc Julian Sikorski1-8/+11
2019-10-15hitme.cpp: Rename m21 to mirco21 to resolve name collision AJR2-3/+3
2019-10-15m24.cpp: Added Olivetti M21 and hitherto unknown BIOS revision, at.cpp: ↵ rfka013-606/+1785
motherboards and BIOS versions (#5706) * m24.cpp: Added Olivetti M21 and hitherto unknown BIOS revision * at.cpp: added motherboards and BIOS files sorted by chipset * at, m24: srcclean (nw) * srcclean mame.lst (nw) * at.cpp: motherboards and BIOS versions (nw) * at.cpp: more motherboards and BIOS versions (nw) * at.cpp: more motherboards and BIOS versions * at.cpp: sorted by chipset, added more motherboards and BIOS versions * at.cpp: more 486 motherboards and BIOS versions (nw)
2019-10-15Unbreak building shaders in cmd shell and add support for building them in ↵ Julian Sikorski1-4/+9
MINGW bash shell (#5740)
2019-10-15apple2_flop_orig.xml: fixed validation (nw) Ivan Vangelista1-1/+1
2019-10-15nmk16.cpp: added a note about the gunnailb audio CPU ROM (nw) Ivan Vangelista1-1/+1
2019-10-15Apple II update to October 14th, 2019 (#5742) Firehawke2-0/+293
* New working software list additions ----------------------------------- apple2_flop_orig: Whole Numbers: Multiplication (cleanly cracked), Statistics (Version 3.3) (cleanly cracked), Fractions: Basic Skills (cleanly cracked) [4am, Firehawke] apple2_flop_clcracked: Winter Games, Apple Stellar Invaders, Ulysses and the Golden Fleece [4am, Firehawke] * New working software list additions ----------------------------------- apple2_flop_orig: Simultaneous Linear Equations [4am, Firehawke] * New working software list additions ----------------------------------- apple2_flop_clcracked: Balancing Act (cleanly cracked), Fractions: Subtraction (cleanly cracked) [4am, Firehawke] * New working software list additions ----------------------------------- apple2_flop_orig: The Coveted Mirror, Alibi, Reversal, The Haunted Palace, Sherlock Holmes in Another Bow, Dogfight II, The Mask of the Sun (Version 2.1), Pulsar ][ [4am, Firehawke]
2019-10-15Check that m_display is not null to prevent crash (#5725) George McMullen1-4/+20
* Check that m_display is not null to prevent crash https://mametesters.org/view.php?id=7372 * Probe method to check if X11 is actually being used As per: https://github.com/mamedev/mame/pull/5725#issuecomment-540004475 this will help MAME verify X11 has no inputs when X11 is not actually being used (e.g. on RetroPie where SDL display is RPI). * Fix issue where a lightgun with no name would return nullptr As suggested by https://github.com/mamedev/mame/pull/5725#issuecomment-539914514 , a bug in create_lightgun_device() returned nullptr if the lightgun had no name. Now it will create the device with a name using the lightgun's device index * Change older m_display change to assert This module can now be probed and disabled correctly if X11 is not being used. Removed the if statements that would be called every cycle (and fail silently) in favor of asserts, as MAME does not currently handle dynamic hardware configuration changes. * Fixing semicolons in asserts that were ifs
2019-10-15netlist: Use unique_ptr where possible. (nw) couriersud16-1505/+1628
Also improve code readability.
2019-10-15sed1330: Calculate frame rate for LCD screen (nw) AJR3-3/+10
pc8401a: Derive clocks from XTAL (might well be different for pc8500, so not used there) (nw)
2019-10-15(nw) mw8080bw.cpp: completely untangle tone generator from machine state, ↵ Vas Crabb5-868/+898
move more stuff out to derived state classes, reduce tag map lookups
2019-10-15New Working clone added (#5739) algestam2-5/+27
------------- Game & Watch: Super Mario Bros. (crystal screen) [algestam, Mr Jiggles the Christmas Man]
2019-10-14triforce.cpp: redumped "Triforce DIMM Updater (3.17) (GDT-0011)", prev was ↵ MetalliC1-1/+1
bad dump [MajorPBX]
2019-10-14New machines marked as NOT_WORKING Ivan Vangelista2-0/+19
---------------------------------- El Dorado [Team Europe]
2019-10-14Add missing spirv shaders (nw) Olivier Galibert3-0/+0
2019-10-14sgi_gr1: small steps (nw) Patrick Mackinlay7-79/+189
* fifo half-full interrupt latching * address map banking * conf not dip switches * logging improvements
2019-10-14wtl3132: float operation condition (nw) Patrick Mackinlay1-0/+13
2019-10-14mess.lua: Move some drivers to more specific subtargets, including new ones (nw) AJR1-20/+30
2019-10-14Fix BGFX build on older OS X systems (nw) AJR2-1/+9
The Vulkan renderer has to be disabled on Yosemite and older because its backend depends on Metal.
2019-10-14megadriv.xml: removed double entry. Thanks to UED-Wayder for spotting this (nw) Ivan Vangelista1-11/+0
2019-10-14ymf278b.cpp : Allow scaling for FM DO2 output cam9002-5/+12
ymf262.cpp : Add notes
2019-10-14(nw) quick fix for multi32 games with different sound hardware - state class ↵ Vas Crabb2-2/+3
really should be split up more
2019-10-13Make shaders fixes (#5730) Julian Sikorski1-14/+15
* Actually honor VERBOSE setting * Current shaders build setup is not capable of parallel build
2019-10-13New working software list additions ArcadeShadow1-1/+17
ibm5170: Links - The Challenge of Golf (5.25"HD)
2019-10-13-bgfx: Do texture format conversion via a full-screen GPU pass. [Ryan Holtz] MooglyGuy40-67/+491
2019-10-13fix for clang 9.0.0 on windows (nw) smf-2-1/+2
2019-10-13-supracan: Various changes and code cleanup. [Ryan Holtz] mooglyguy1-345/+353
* Removed sound CPU boot hack. * Fixed sound CPU reset/halt behavior. * Documented controller shift-register protocol and removed inaccurate direct port hookups. * Removed P3/P4 ports which don't exist on real hardware. * Added save state registration.
2019-10-13Add include folder 3rdparty/bgfx/3rdparty/khronos too (nw) yz70s1-0/+1
2019-10-13nforcepc: use a s3 virge pci video card (nw) yz70s1-0/+2
2019-10-14(nw) mess.lua: don't need this line any more Robbbert1-1/+0
2019-10-14pasopia7 : added cassette and beeper sound, and added missing keys. Patched ↵ Robbbert2-189/+186
around the sound freeze issue. Most games work fairly well.
2019-10-14pasopia : added cassette and sound. Patched around the broken keyboard problem. Robbbert1-55/+208
2019-10-14(nw) fixed compile error Robbbert1-1/+1
2019-10-13New working clone braintro2-2/+108
New working clone ------------------ Buggy Boy/Speed Buggy (cockpit, rev. B) [pacman70, Asayuki Kizuyomina]
2019-10-13netlist: mame netlist reorganization. [Couriersud] couriersud35-364/+457
- moved netlists out of driver code into audio/ or machine/ as nl_xxx.cpp files. - identified and documented extended validation - updated arcade, mess and nl targets
2019-10-13firetrap.cpp: Replaced handcrafted MCU code with actual MCU code from ↵ braintro1-4/+4
decapped/dump MCU for Fire Trap (US) [TeamEurope, Brian Troha, The Dumping Union]
2019-10-13xtal: add comment (nw) hap1-1/+1
2019-10-13fb01: ram address mirror, see MT7451 (nw) hap1-1/+1
2019-10-13(nw) dec8.cpp: MCU redump for Last Mission - fixes bit rot in unused area braintro1-3/+3