Commit de851eab authored by libretroadmin's avatar libretroadmin
Browse files

Remove printf/puts

parent 82572699
Pipeline #114673 passed with stages
in 11 minutes and 57 seconds
......@@ -37,7 +37,6 @@ class CDAFReader
if(LastReadPos != frame_offset)
{
//puts("SEEK");
if(!Seek_(frame_offset))
return(0);
LastReadPos = frame_offset;
......
......@@ -52,7 +52,6 @@ static T CCD_ReadInt(CCD_Section &s, const std::string &propname, const bool hav
{
if(have_defval)
return defval;
printf("Missing property: %s", propname.c_str());
return 0;
}
......@@ -76,10 +75,7 @@ static T CCD_ReadInt(CCD_Section &s, const std::string &propname, const bool hav
ret = strtoul(vp, &ep, scan_base);
if(!vp[0] || ep[0])
{
printf("Property %s: Malformed integer: %s", propname.c_str(), v.c_str());
return 0;
}
return ret;
}
......@@ -139,8 +135,6 @@ bool CDAccess_CCD::Load(const std::string& path, bool image_memcache)
}
}
//printf("%s %d %d %d\n", file_ext.c_str(), extupt[0], extupt[1], extupt[2]);
linebuf.reserve(256);
while(cf.get_line(linebuf) >= 0)
......@@ -207,8 +201,6 @@ bool CDAccess_CCD::Load(const std::string& path, bool image_memcache)
return false;
}
//printf("MOO: %d\n", toc_entries);
for(unsigned te = 0; te < toc_entries; te++)
{
char tmpbuf[64];
......@@ -220,7 +212,6 @@ bool CDAccess_CCD::Load(const std::string& path, bool image_memcache)
uint8_t control = CCD_ReadInt<uint8_t>(ts, "CONTROL");
uint8_t pmin = CCD_ReadInt<uint8_t>(ts, "PMIN");
uint8_t psec = CCD_ReadInt<uint8_t>(ts, "PSEC");
//uint8_t pframe = CCD_ReadInt<uint8_t>(ts, "PFRAME");
signed plba = CCD_ReadInt<signed>(ts, "PLBA");
if(session != 1)
......@@ -350,8 +341,6 @@ bool CDAccess_CCD::CheckSubQSanity(void)
uint8_t as_bcd = buf.qbuf[8];
uint8_t af_bcd = buf.qbuf[9];
//printf("%2x %2x %2x\n", am_bcd, as_bcd, af_bcd);
if(!BCD_is_valid(track_bcd) || !BCD_is_valid(index_bcd) || !BCD_is_valid(rm_bcd) || !BCD_is_valid(rs_bcd) || !BCD_is_valid(rf_bcd) ||
!BCD_is_valid(am_bcd) || !BCD_is_valid(as_bcd) || !BCD_is_valid(af_bcd) ||
rs_bcd > 0x59 || rf_bcd > 0x74 || as_bcd > 0x59 || af_bcd > 0x74)
......@@ -391,7 +380,6 @@ bool CDAccess_CCD::CheckSubQSanity(void)
}
}
//printf("%u/%u\n", checksum_pass_counter, img_numsectors);
return true;
}
......
......@@ -83,9 +83,6 @@ static void InitScrambleTable(void)
scramble_table[i - 12] = z;
}
//for(int i = 0; i < 2352 - 12; i++)
// printf("0x%02x, ", scramble_table[i]);
}
void CDUtility_Init(void)
......@@ -323,10 +320,6 @@ void subpw_synth_udapp_lba(const TOC& toc, const int32_t lba, const int32_t lba_
uint32_t lba_relative;
uint32_t ma, sa, fa;
uint32_t m, s, f;
if(lba < -150 || lba >= 0)
printf("[BUG] subpw_synth_udapp_lba() lba out of range --- %d\n", lba);
{
int32_t lba_tmp = lba + lba_subq_relative_offs;
......
......@@ -141,10 +141,7 @@ int CDIF::ReadSector(uint8_t* buf, int32_t lba, uint32_t sector_count, bool supp
uint8_t tmpbuf[2352 + 96];
if(!ReadRawSector(tmpbuf, lba))
{
puts("CDIF Raw Read error");
return(FALSE);
}
if(!ValidateRawSector(tmpbuf))
{
......@@ -163,18 +160,11 @@ int CDIF::ReadSector(uint8_t* buf, int32_t lba, uint32_t sector_count, bool supp
ret = mode;
if(mode == 1)
{
memcpy(buf, &tmpbuf[12 + 4], 2048);
}
else if(mode == 2)
{
memcpy(buf, &tmpbuf[12 + 4 + 8], 2048);
}
else
{
printf("CDIF_ReadSector() invalid sector type at LBA=%u\n", (unsigned int)lba);
return(false);
}
buf += 2048;
lba++;
......@@ -191,16 +181,9 @@ int CDIF::ReadSector(uint8_t* buf, int32_t lba, uint32_t sector_count, bool supp
CDIF_ST::CDIF_ST(CDAccess *cda) : CDIF(cda)
{
//puts("***WARNING USING SINGLE-THREADED CD READER***");
UnrecoverableError = false;
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
{
printf("TOC first(%d)/last(%d) track numbers bad.", disc_toc.first_track, disc_toc.last_track);
}
}
CDIF_ST::~CDIF_ST()
......@@ -223,7 +206,6 @@ bool CDIF_ST::ReadRawSector(uint8_t *buf, int32_t lba)
if(lba < LBA_Read_Minimum || lba > LBA_Read_Maximum)
{
printf("Attempt to read sector out of bounds; LBA=%d\n", lba);
memset(buf, 0, 2352 + 96);
return(false);
}
......@@ -243,7 +225,6 @@ bool CDIF_ST::ReadRawSectorPWOnly(uint8_t* pwbuf, int32_t lba, bool hint_fullrea
if(lba < LBA_Read_Minimum || lba > LBA_Read_Maximum)
{
printf("Attempt to read sector out of bounds; LBA=%d\n", lba);
memset(pwbuf, 0, 96);
return(false);
}
......
......@@ -7,7 +7,6 @@ static void DoNEC_PCE_SAPSP(const uint8_t *cdb)
{
uint32 new_read_sec_start;
//printf("Set audio start: %02x %02x %02x %02x %02x %02x %02x\n", cdb[9], cdb[1], cdb[2], cdb[3], cdb[4], cdb[5], cdb[6]);
switch (cdb[9] & 0xc0)
{
default: //SCSIDBG("Unknown SAPSP 9: %02x\n", cdb[9]);
......@@ -32,7 +31,6 @@ static void DoNEC_PCE_SAPSP(const uint8_t *cdb)
break;
}
//printf("%lld\n", (long long)(monotonic_timestamp - pce_lastsapsp_timestamp) * 1000 / System_Clock);
if(cdda.CDDAStatus == CDDASTATUS_PLAYING && new_read_sec_start == read_sec_start && ((int64)(monotonic_timestamp - pce_lastsapsp_timestamp) * 1000 / System_Clock) < 190)
{
pce_lastsapsp_timestamp = monotonic_timestamp;
......@@ -77,8 +75,6 @@ static void DoNEC_PCE_SAPEP(const uint8_t *cdb)
{
uint32 new_read_sec_end;
//printf("Set audio end: %02x %02x %02x %02x %02x %02x %02x\n", cdb[9], cdb[1], cdb[2], cdb[3], cdb[4], cdb[5], cdb[6]);
switch (cdb[9] & 0xc0)
{
default: //SCSIDBG("Unknown SAPEP 9: %02x\n", cdb[9]);
......@@ -203,8 +199,7 @@ static void DoNEC_PCE_GETDIRINFO(const uint8_t *cdb)
switch(cdb[1])
{
default: //MDFN_DispMessage("Unknown GETDIRINFO Mode: %02x", cdb[1]);
//printf("Unknown GETDIRINFO Mode: %02x", cdb[1]);
default:
case 0x0:
data_in[0] = U8_to_BCD(toc.first_track);
data_in[1] = U8_to_BCD(toc.last_track);
......
......@@ -205,8 +205,6 @@ static void FixOPV(void)
{
int32_t tmpvol = cdda.CDDAVolume[port] * 100 / (2 * cdda.CDDADivAccVolFudge);
//printf("TV: %d\n", tmpvol);
cdda.OutPortVolumeCache[port] = tmpvol;
if(cdda.OutPortChSelect[port] & 0x01)
......@@ -279,31 +277,26 @@ void SCSICD_Power(scsicd_timestamp_t system_timestamp)
void SCSICD_SetDB(uint8_t data)
{
cd_bus.DB = data;
//printf("Set DB: %02x\n", data);
}
void SCSICD_SetACK(bool set)
{
SetkingACK(set);
//printf("Set ACK: %d\n", set);
}
void SCSICD_SetSEL(bool set)
{
SetkingSEL(set);
//printf("Set SEL: %d\n", set);
}
void SCSICD_SetRST(bool set)
{
SetkingRST(set);
//printf("Set RST: %d\n", set);
}
void SCSICD_SetATN(bool set)
{
SetkingATN(set);
//printf("Set ATN: %d\n", set);
}
static void GenSubQFromSubPW(void)
......@@ -315,12 +308,6 @@ static void GenSubQFromSubPW(void)
for(int i = 0; i < 96; i++)
SubQBuf[i >> 3] |= ((cd.SubPWBuf[i] & 0x40) >> 6) << (7 - (i & 7));
//printf("Real %d/ SubQ %d - ", read_sec, BCD_to_U8(SubQBuf[7]) * 75 * 60 + BCD_to_U8(SubQBuf[8]) * 75 + BCD_to_U8(SubQBuf[9]) - 150);
// Debug code, remove me.
//for(int i = 0; i < 0xC; i++)
// printf("%02x ", SubQBuf[i]);
//printf("\n");
if(!subq_check_checksum(SubQBuf))
{
//SCSIDBG("SubQ checksum error!");
......@@ -333,10 +320,6 @@ static void GenSubQFromSubPW(void)
if(adr <= 0x3)
memcpy(cd.SubQBuf[adr], SubQBuf, 0xC);
//if(adr == 0x02)
//for(int i = 0; i < 12; i++)
// printf("%02x\n", cd.SubQBuf[0x2][i]);
}
}
......@@ -383,7 +366,6 @@ static void GenSubQFromSubPW(void)
static void ChangePhase(const unsigned int new_phase)
{
//printf("New phase: %d %lld\n", new_phase, monotonic_timestamp);
switch(new_phase)
{
case PHASE_BUS_FREE:
......@@ -453,10 +435,7 @@ static void SendStatusAndMessage(uint8_t status, uint8_t message)
{
// This should never ever happen, but that doesn't mean it won't. ;)
if(din->in_count)
{
//printf("[SCSICD] BUG: %d bytes still in SCSI CD FIFO\n", din->in_count);
din->Flush();
}
cd.message_pending = message;
......@@ -514,8 +493,6 @@ void SCSICD_SetDisc(bool new_tray_open, CDIF *cdif, bool no_emu_side_effects)
static void CommandCCError(int key, int asc = 0, int ascq = 0)
{
//printf("[SCSICD] CC Error: %02x %02x %02x\n", key, asc, ascq);
cd.key_pending = key;
cd.asc_pending = asc;
cd.ascq_pending = ascq;
......@@ -547,8 +524,6 @@ static void DoMODESELECT6(const uint8_t *cdb)
{
cd.data_out_pos = 0;
cd.data_out_want = cdb[4];
//printf("Switch to DATA OUT phase, len: %d\n", cd.data_out_want);
ChangePhase(PHASE_DATA_OUT);
}
else
......@@ -744,7 +719,6 @@ static void UpdateMPCacheP(const ModePage* mp)
speed = std::max<int>(-32, std::min<int>(32, (int8_t)mp->current_value[0]));
rate = 44100 + 441 * speed;
//printf("[SCSICD] Speed: %d(pre-clamped=%d) %d\n", speed, (int8_t)mp->current_value[0], rate);
cdda.CDDADivAcc = ((int64_t)System_Clock * (1024 * 1024) / (2 * rate));
cdda.CDDADivAccVolFudge = 100 + speed;
FixOPV(); // Resampler impulse amplitude volume adjustment(call after setting cdda.CDDADivAccVolFudge)
......@@ -786,11 +760,6 @@ static void FinishMODESELECT6(const uint8_t *data, const uint8_t data_len)
uint8_t mode_data_length, medium_type, device_specific, block_descriptor_length;
uint32_t offset = 0;
//printf("[SCSICD] Mode Select (6) Data: Length=0x%02x, ", data_len);
//for(uint32_t i = 0; i < data_len; i++)
// printf("0x%02x ", data[i]);
//printf("\n");
if(data_len < 4)
{
CommandCCError(SENSEKEY_ILLEGAL_REQUEST, NSE_INVALID_PARAMETER);
......@@ -1460,8 +1429,6 @@ static void DoREADHEADER10(const uint8_t *cdb)
mode = raw_buf[12 + 3];
lba = AMSF_to_LBA(m, s, f);
//printf("%d:%d:%d(LBA=%08x) %02x\n", m, s, f, lba, mode);
data_in[0] = mode;
data_in[1] = 0;
data_in[2] = 0;
......@@ -1773,8 +1740,6 @@ static void DoPATI(const uint8_t *cdb)
return;
}
//printf("PATI: %d %d %d SI: %d, EI: %d\n", StartTrack, EndTrack, Cur_CDIF->GetTrackStartPositionLBA(StartTrack), StartIndex, EndIndex);
DoPABase(toc.tracks[StartTrack].lba, toc.tracks[EndTrack].lba - toc.tracks[StartTrack].lba);
}
......@@ -2010,8 +1975,6 @@ static void DoPREFETCH(const uint8_t *cdb)
return;
}
//printf("Prefetch: %08x %08x %d %d %d %d\n", lba, len, link, flag, reladdr, immed);
//SendStatusAndMessage(STATUS_GOOD, 0x00);
SendStatusAndMessage(STATUS_CONDITION_MET, 0x00);
}
......@@ -2108,7 +2071,6 @@ static void DoREADSUBCHANNEL(const uint8_t *cdb)
data_in[offset++] = 0x00;
data_in[offset++] = 0x00;
//printf("42Read SubChannel: %02x %02x %d %d %d\n", DataFormat, TrackNum, AllocSize, WantQ, WantMSF);
if(WantQ)
{
// Sub-channel format code
......@@ -2661,7 +2623,6 @@ static INLINE void RunCDDA(uint32_t system_timestamp, int32_t run_time)
//
if(MDFN_UNLIKELY(cd.SubQBuf_Last[0] & 0x10))
{
//puts("Deemph");
for(unsigned lr = 0; lr < 2; lr++)
{
float inv = sample_va[lr] * 0.35971507338824012f;
......@@ -2670,7 +2631,6 @@ static INLINE void RunCDDA(uint32_t system_timestamp, int32_t run_time)
cdda.DeemphState[lr][0] = inv;
sample_va[lr] = std::max<float>(-2147483648.0, std::min<float>(2147483647.0, cdda.DeemphState[lr][1]));
//printf("%u: %f, %d\n", lr, cdda.DeemphState[lr][1], sample_va[lr]);
}
}
......@@ -2691,9 +2651,6 @@ static INLINE void RunCDDA(uint32_t system_timestamp, int32_t run_time)
const int16 mult_b = synthtime_phase_fract << MULT_SHIFT_ADJ;
int32_t coeff[CDDA_FILTER_NUMCONVOLUTIONS];
//if(synthtime_phase_fract == 0)
// printf("%5d: %d %d\n", synthtime_phase_fract, mult_a, mult_b);
for(unsigned c = 0; c < CDDA_FILTER_NUMCONVOLUTIONS; c++)
{
coeff[c] = (CDDA_Filter[1 + synthtime_phase_int + 0][c] * mult_a +
......@@ -2727,12 +2684,7 @@ static INLINE void RunCDRead(uint32_t system_timestamp, int32_t run_time)
{
if(din->CanWrite() < ((WhichSystem == SCSICD_PCFX) ? 2352 : 2048)) // +96 if we find out the PC-FX can read subchannel data along with raw data too. ;)
{
//printf("Carp: %d %d %d\n", din->CanWrite(), SectorCount, CDReadTimer);
//CDReadTimer = (cd.data_in_size - cd.data_in_pos) * 10;
CDReadTimer += (uint64_t) 1 * 2048 * System_Clock / CD_DATA_TRANSFER_RATE;
//CDReadTimer += (uint64_t) 1 * 128 * System_Clock / CD_DATA_TRANSFER_RATE;
}
else
{
......@@ -2800,10 +2752,7 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
int32_t run_time = system_timestamp - lastts;
if(system_timestamp < lastts)
{
fprintf(stderr, "Meow: %d %d\n", system_timestamp, lastts);
assert(system_timestamp >= lastts);
}
monotonic_timestamp += run_time;
......@@ -2820,20 +2769,14 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
cd.last_RST_signal = RST_signal;
if(ResetNeeded)
{
//puts("RST");
VirtualReset();
}
else if(CurrentPhase == PHASE_BUS_FREE)
{
if(SEL_signal)
{
if(WhichSystem == SCSICD_PCFX)
{
//if(cd_bus.DB == 0x84)
{
ChangePhase(PHASE_COMMAND);
}
}
else // PCE
{
......@@ -2842,16 +2785,12 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
}
}
else if(ATN_signal && !REQ_signal && !ACK_signal)
{
//printf("Yay: %d %d\n", REQ_signal, ACK_signal);
ChangePhase(PHASE_MESSAGE_OUT);
}
else switch(CurrentPhase)
{
case PHASE_COMMAND:
if(REQ_signal && ACK_signal) // Data bus is valid nowww
{
//printf("Command Phase Byte I->T: %02x, %d\n", cd_bus.DB, cd.command_buffer_pos);
cd.command_buffer[cd.command_buffer_pos++] = cd_bus.DB;
SetREQ(FALSE);
}
......@@ -2884,7 +2823,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
lb_pos += snprintf(log_buffer + lb_pos, 1024 - lb_pos, "%02x ", cd.command_buffer[i]);
SCSILog("SCSI", "%s", log_buffer);
//puts(log_buffer);
}
......@@ -2933,7 +2871,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
memset(cdda.sr, 0, sizeof(cdda.sr));
memset(cdda.OversampleBuffer, 0, sizeof(cdda.OversampleBuffer));
memset(cdda.DeemphState, 0, sizeof(cdda.DeemphState));
//printf("CLEAR BUFFERS LALALA\n");
}
}
......@@ -2948,7 +2885,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
case PHASE_DATA_OUT:
if(REQ_signal && ACK_signal) // Data bus is valid nowww
{
//printf("DATAOUT-SCSIIN: %d %02x\n", cd.data_out_pos, cd_bus.DB);
cd.data_out[cd.data_out_pos++] = cd_bus.DB;
SetREQ(FALSE);
}
......@@ -2970,7 +2906,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
case PHASE_MESSAGE_OUT:
//printf("%d %d, %02x\n", REQ_signal, ACK_signal, cd_bus.DB);
if(REQ_signal && ACK_signal)
{
SetREQ(FALSE);
......@@ -2981,7 +2916,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
//if(cd_bus.DB == 0x6) // ABORT message!
if(1)
{
//printf("[SCSICD] Abort Received(DB=0x%02x)\n", cd_bus.DB);
din->Flush();
cd.data_out_pos = cd.data_out_want = 0;
......@@ -2989,8 +2923,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
cdda.CDDAStatus = CDDASTATUS_STOPPED;
ChangePhase(PHASE_BUS_FREE);
}
//else
// printf("[SCSICD] Message to target: 0x%02x\n", cd_bus.DB);
}
break;
......@@ -3015,7 +2947,6 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
case PHASE_DATA_IN:
if(!REQ_signal && !ACK_signal)
{
//puts("REQ and ACK false");
if(din->in_count == 0) // aaand we're done!
{
CDIRQCallback(0x8000 | SCSICD_IRQ_DATA_TRANSFER_READY);
......@@ -3034,10 +2965,7 @@ uint32_t SCSICD_Run(scsicd_timestamp_t system_timestamp)
}
}
if(REQ_signal && ACK_signal)
{
//puts("REQ and ACK true");
SetREQ(FALSE);
}
break;
case PHASE_MESSAGE_IN:
......@@ -3136,10 +3064,7 @@ void SCSICD_SetCDDAVolume(double left, double right)
for(int i = 0; i < 2; i++)
{
if(cdda.CDDAVolume[i] > 65536)
{
printf("[SCSICD] Debug Warning: CD-DA volume %d too large: %d\n", i, cdda.CDDAVolume[i]);
cdda.CDDAVolume[i] = 65536;
}
}
FixOPV();
......@@ -3228,7 +3153,6 @@ int SCSICD_StateAction(StateMem* sm, const unsigned load, const bool data_only,
din->in_count &= din->size - 1;
din->read_pos &= din->size - 1;
din->write_pos = (din->read_pos + din->in_count) & (din->size - 1);
//printf("%d %d %d\n", din->in_count, din->read_pos, din->write_pos);
if(load < 0x0935)
cdda.CDDADiv /= 2;
......
......@@ -32,40 +32,20 @@ static INLINE void ACAutoIncrement(ACPort_t *port)
if(port->control & 0x1)
{
if(port->control & 0x10)
{
//if(port->control & 0x4)
//{
// printf("BOONY: %04x\n", port->increment);
// port->base = (port->base + port->increment + 0xFF0000) & 0xFFFFFF;
// printf("%04x\n", port->base);
//}
//else
port->base = (port->base + port->increment) & 0xFFFFFF;
}
else
{
port->offset = (port->offset + port->increment) & 0xFFFF;
}
}
}
uint8 ArcadeCard::Read(uint32 A, bool peek)
{
//printf("AC Read: %04x\n", A);
if((A & 0x1F00) != 0x1A00)
{
//if(!peek)
// printf("AC unknown read: %08x\n", A);
return(0xFF);
}
if(A < 0x1A80)
{
ACPort_t *port = &AC.ports[(A >> 4) & 0x3];
// if(!peek)
// if(A & 0x40)
// printf("AC mirrored port read: %08x\n", A); // Madou Monogatari does!
switch(A & 0xF)
{
case 0x00:
......@@ -122,19 +102,13 @@ uint8 ArcadeCard::Read(uint32 A, bool peek)
}
}
//if(!peek)
// printf("AC unknown read: %08x\n", A);
return(0xFF);
}
void ArcadeCard::Write(uint32 A, uint8 V)
{
//printf("AC Write: %04x %02x\n", A, V);
if((A & 0x1F00) != 0x1A00)
{
//printf("AC unknown write: %08x:%02x\n", A, V);
return;
}
if(A < 0x1A80)
{
......@@ -142,7 +116,7 @@ void ArcadeCard::Write(uint32 A, uint8 V)
switch(A & 0xF)
{
default: //printf("AC unknown write: %08x:%02x\n", A, V);
default:
break;
case 0x00:
......@@ -219,15 +193,12 @@ void ArcadeCard::Write(uint32 A, uint8 V)
}
break;
}
//if(A & 0x40)
// printf("AC mirrored port write: %08x:%02x\n", A, V);
}
else if(A >= 0x1AE0)
{
switch(A & 0x1F)
{
default: //printf("Unknown AC write: %04x %02x\n", A, V);
default:
break;
case 0x00:
......
......@@ -155,8 +155,6 @@ void PCE_PSG::RecalcUOFunc(int chnum)
{
psg_channel *ch = &channel[chnum];
//printf("UO Update: %d, %02x\n", chnum, ch->control);
if((revision != REVISION_HUC6280 && !(ch->control & 0xC0)) || (revision == REVISION_HUC6280 && !(ch->control & 0x80)))
ch->UpdateOutput = &PCE_PSG::UpdateOutput_Off;
else if(ch->noisectrl & ch->control & 0x80)
......@@ -357,8 +355,6 @@ void PCE_PSG::SetRegister(const unsigned int id, const uint32 value)
PCE_PSG::PCE_PSG(int32* hr_l, int32* hr_r, int want_revision)
{
//printf("Test: %u, %u\n", sizeof(psg_channel), (uint8*)&channel[0].balance - (uint8*)&channel[0].waveform[0]);
revision = want_revision;
switch(revision)
{
......@@ -426,9 +422,6 @@ void PCE_PSG::Write(int32 timestamp, uint8 A, uint8 V)
psg_channel *ch = &channel[select];
//if(A == 0x01 || select == 5)
// printf("Write Ch: %d %04x %02x, %d\n", select, A, V, timestamp);
switch(A)
{
default: break;
......@@ -521,11 +514,9 @@ void PCE_PSG::Write(int32 timestamp, uint8 A, uint8 V)
case 0x08: /* LFO frequency */
lfofreq = V & 0xFF;
//printf("LFO Freq: %02x\n", V);
break;
case 0x09: /* LFO trigger and control */
//printf("LFO Ctrl: %02x\n", V);
if(V & 0x80)
{
channel[1].waveform_index = 0;
......@@ -683,18 +674,13 @@ void PCE_PSG::Update(int32 timestamp)
if(!phase)
{
//printf("Volume update(Read, %d since last): ch=%d, lr=%d, ts=%d\n", running_timestamp - last_read, chnum, lr, running_timestamp);
if(chnum < 6)