final cleanup (nw)

This commit is contained in:
Vas Crabb 2018-08-29 05:29:50 +10:00
parent 413e511e12
commit 9f7bcbd886
4 changed files with 20 additions and 31 deletions

View File

@ -587,8 +587,7 @@ void upd765_family_device::fifo_push(uint8_t data, bool internal)
// MZ: A bit speculative. These lines help to avoid some FIFO mess-up
// with the HX5102 that happens when WRITE DATA fails to find the sector
// but the host already starts pushing the sector data. Should not hurt.
if (fifo_expected == 0)
{
if(fifo_expected == 0) {
LOGFIFO("Fifo not expecting data, discarding\n");
return;
}
@ -976,15 +975,13 @@ void upd765_family_device::live_run(attotime limit)
break;
case SCAN_SECTOR_DATA_BYTE:
if(!scan_done) // TODO: handle stp, x68000 sets it to 0xff (as it would dtl)?
{
if(!scan_done) { // TODO: handle stp, x68000 sets it to 0xff (as it would dtl)?
int slot = (cur_live.bit_counter >> 4)-1;
uint8_t data = fifo_pop(true);
if(!slot)
st2 = (st2 & ~(ST2_SN)) | ST2_SH;
if(data != cur_live.data_reg)
{
if(data != cur_live.data_reg) {
st2 = (st2 & ~(ST2_SH)) | ST2_SN;
if((data < cur_live.data_reg) && ((command[0] & 0x1f) == 0x19)) // low
st2 &= ~ST2_SN;
@ -992,14 +989,11 @@ void upd765_family_device::live_run(attotime limit)
if((data > cur_live.data_reg) && ((command[0] & 0x1f) == 0x1d)) // high
st2 &= ~ST2_SN;
}
if((slot == sector_size) && !(st2 & ST2_SN))
{
if((slot == sector_size) && !(st2 & ST2_SN)) {
scan_done = true;
tc_done = true;
}
}
else
{
} else {
if(fifo_pos)
fifo_pop(true);
}
@ -2378,9 +2372,9 @@ std::string upd765_family_device::results() const
{
std::ostringstream stream;
stream << "results=(";
if (!result_pos) stream << "none";
else
{
if(!result_pos)
stream << "none";
else {
stream << std::hex << std::setfill('0') << std::setw(2) << unsigned(result[0]);
for (int i=1; i < result_pos; i++)
stream << ',' << std::setw(2) << unsigned(result[i]);
@ -2752,7 +2746,7 @@ void i82072_device::start_command(int cmd)
upd765_family_device::start_command(cmd);
// set motor off counter if command execution has completed
if (main_phase != PHASE_EXEC && motorcfg)
if(main_phase != PHASE_EXEC && motorcfg)
motor_off_counter = (2 + ((motorcfg & MOFF) >> 4)) << (motorcfg & HSDA ? 1 : 0);
} else
delayed_command = cmd;
@ -2775,7 +2769,7 @@ void i82072_device::execute_command(int cmd)
LOGCOMMAND("command motor %s drive %d\n", motor_on ? "on" : "off", fi.id);
// if we are selecting a different drive, stop the motor on the previously selected drive
if (selected_drive != fi.id && flopi[selected_drive].dev && flopi[selected_drive].dev->mon_r() == 0)
if(selected_drive != fi.id && flopi[selected_drive].dev && flopi[selected_drive].dev->mon_r() == 0)
flopi[selected_drive].dev->mon_w(1);
// select the drive
@ -2992,14 +2986,13 @@ WRITE8_MEMBER(tc8566af_device::cr1_w)
WRITE8_MEMBER(upd72065_device::auxcmd_w)
{
switch(data)
{
case 0x36: // reset
soft_reset();
break;
case 0x35: // set standby
break;
case 0x34: // reset standby
break;
switch(data) {
case 0x36: // reset
soft_reset();
break;
case 0x35: // set standby
break;
case 0x34: // reset standby
break;
}
}

View File

@ -13,13 +13,11 @@
#include "emu.h"
#include "huc6230.h"
static const int clamp(int val, int min, int max) { return std::min(max,std::max(min,val)); }
constexpr int clamp(int val, int min, int max) { return std::min(max, std::max(min, val)); }
void huc6230_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
/* Clear buffer */
int frq = (1 << m_adpcm_freq);
for (int i = 0; i < samples; i++)
{

View File

@ -596,6 +596,6 @@ GAMEL( 1977, circus, 0, circus, circus, circus_state, init_circus,
GAMEL( 1977, springbd, circus, circus, circus, circus_state, init_circus, ROT0, "bootleg (Sub-Electro)", "Springboard (bootleg of Circus)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_circus ) // looks like a text hack, but we've seen 2 identical copies so it's worth supporting
GAME( 1977, robotbwl, 0, robotbwl, robotbwl, circus_state, init_robotbwl, ROT0, "Exidy", "Robot Bowl", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
GAMEL( 1979, crash, 0, crash, crash, circus_state, init_crash, ROT0, "Exidy", "Crash", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_crash )
GAMEL( 1979, crasha, crash, crash, crash, circus_state, init_crash, ROT0, "Exidy", "Crash (Alt)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_crash )
GAMEL( 1979, crasha, crash, crash, crash, circus_state, init_crash, ROT0, "Exidy", "Crash (alt)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_crash )
GAMEL( 1979, smash, crash, crash, crash, circus_state, init_crash, ROT0, "bootleg", "Smash (Crash bootleg)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_crash ) // looks like a text hack, but it also had a different bezel
GAME( 1979, ripcord, 0, ripcord, ripcord, circus_state, init_ripcord, ROT0, "Exidy", "Rip Cord", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )

View File

@ -29,8 +29,6 @@
PALETTE_INIT_MEMBER(dcheese_state, dcheese)
{
/* really 65536 colors, but they don't use the later ones so we can stay */
/* within MAME's limits */
for (int i = 0; i < 65536; i++)
{
int data = m_palrom[i];