diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-13 23:21:32 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-13 23:21:32 +0200 |
| commit | b458ea70700739bf8a64217af369c7ace08fc954 (patch) | |
| tree | 77281ebd18e5049fcb1c86718854ff3ce91e54c2 /libpsn00b/psxcd | |
| parent | 8e92156bc6a977651771d2cf91ac5800a0e9a913 (diff) | |
| download | psn00bsdk-b458ea70700739bf8a64217af369c7ace08fc954.tar.gz | |
Fix dropped IRQs, clean up psxcd and psxetc logging
Diffstat (limited to 'libpsn00b/psxcd')
| -rw-r--r-- | libpsn00b/psxcd/isofs.c | 20 | ||||
| -rw-r--r-- | libpsn00b/psxcd/psxcd.c | 9 |
2 files changed, 12 insertions, 17 deletions
diff --git a/libpsn00b/psxcd/isofs.c b/libpsn00b/psxcd/isofs.c index fb1f6c9..16e64ef 100644 --- a/libpsn00b/psxcd/isofs.c +++ b/libpsn00b/psxcd/isofs.c @@ -148,7 +148,7 @@ static int _CdReadIsoDirectory(int lba) CdIntToPos(lba, &loc); i = CdPosToInt(&loc); - _LOG("psxcd_dbg: Seek to sector %d\n", i); + _LOG("psxcd: Seek to sector %d\n", i); if( !CdControl(CdlSetloc, (uint8_t*)&loc, 0) ) { @@ -232,7 +232,7 @@ static void dump_directory(void) strncpy(namebuff, _cd_iso_directory_buff+dir_pos+sizeof(ISO_DIR_ENTRY), dir_entry->identifierLen); - _LOG("P:%d L:%d %s\n", dir_pos, dir_entry->identifierLen, namebuff); + _LOG("psxcd: P:%d L:%d %s\n", dir_pos, dir_entry->identifierLen, namebuff); dir_pos += dir_entry->entryLength; i++; @@ -251,7 +251,7 @@ static void dump_directory(void) } } - _LOG("--\n"); + _LOG("psxcd: --\n"); } @@ -534,7 +534,7 @@ CdlFILE *CdSearchFile(CdlFILE *fp, const char *filename) } #ifndef NDEBUG - dump_directory(); + //dump_directory(); #endif if( find_dir_entry(fp->name, &dir_entry) ) @@ -582,7 +582,7 @@ CdlDIR *CdOpenDir(const char* path) for( i=1; i<num_dirs; i++ ) { rbuff = resolve_pathtable_path( i, tpath_rbuff+127 ); - _LOG( "psxcd_dbg: Found = %s|\n", rbuff ); + _LOG( "psxcd: Found = %s|\n", rbuff ); if( rbuff ) { @@ -596,14 +596,14 @@ CdlDIR *CdOpenDir(const char* path) if( !found_dir ) { - _LOG( "psxcd_dbg: Directory path not found.\n" ); + _LOG( "psxcd: Directory path not found.\n" ); return NULL; } - _LOG( "psxcd_dbg: Found directory at record %d!\n", found_dir ); + _LOG( "psxcd: Found directory at record %d!\n", found_dir ); get_pathtable_entry( found_dir, &tbl_entry, NULL ); - _LOG( "psxcd_dbg: Directory LBA = %d\n", tbl_entry.dirOffs ); + _LOG( "psxcd: Directory LBA = %d\n", tbl_entry.dirOffs ); _CdReadIsoDirectory( tbl_entry.dirOffs ); @@ -668,11 +668,11 @@ int CdReadDir(CdlDIR *dir, CdlFILE* file) file->size = dir_entry->entrySize.lsb; - _LOG("dir_entry->entryLength = %d, ", dir_entry->entryLength); + _LOG("psxcd: dir_entry->entryLength = %d, ", dir_entry->entryLength); d_dir->_pos += dir_entry->entryLength; - _LOG("d_dir->_pos = %d\n", d_dir->_pos); + _LOG("psxcd: d_dir->_pos = %d\n", d_dir->_pos); // Check if padding is reached (end of record sector) if( d_dir->_dir[d_dir->_pos] == 0 ) diff --git a/libpsn00b/psxcd/psxcd.c b/libpsn00b/psxcd/psxcd.c index 65dea48..160a1ed 100644 --- a/libpsn00b/psxcd/psxcd.c +++ b/libpsn00b/psxcd/psxcd.c @@ -46,7 +46,7 @@ int CdInit(void) { CdControl(CdlDemute, 0, 0); _LOG("psxcd: setup done\n"); } else { - _LOG("psxcd: initialization error, bad disc/drive or no disc inserted\n"); + _LOG("psxcd: setup error, bad disc/drive or no disc inserted\n"); } return 1; @@ -106,14 +106,8 @@ int CdControlF(unsigned char com, const void *param) param_len = 2; break; case CdlSetmode: - param_len = 1; - break; case CdlSetsession: - param_len = 1; - break; case CdlTest: - param_len = 1; - break; case CdlGetTD: param_len = 1; break; @@ -126,6 +120,7 @@ int CdControlF(unsigned char com, const void *param) _cd_control(CdlSetloc, param, 3); _cd_last_setloc = *((CdlLOC*)param); } + break; } // Issue CD command |
