Remove some printfs

This commit is contained in:
Snesrev
2023-03-11 18:09:42 +01:00
parent 9de1abd672
commit 39ab392092
4 changed files with 7 additions and 8 deletions

View File

@@ -798,8 +798,6 @@ void DrawFrameToPpu(void) {
g_snes->cpu->nmiWanted = false;
}
extern bool g_debug_flag;
void SaveBugSnapshot() {
if (!g_debug_flag && g_got_mismatch_count == 0) {
char buffer[64];

View File

@@ -131,7 +131,7 @@ void StateRecorder_Record(StateRecorder *sr, uint16 inputs) {
void StateRecorder_RecordPatchByte(StateRecorder *sr, uint32 addr, const uint8 *value, int num) {
assert(addr < 0x20000);
printf("%d: PatchByte(0x%x, 0x%x. %d): ", sr->frames_since_last, addr, *value, num);
// printf("%d: PatchByte(0x%x, 0x%x. %d): ", sr->frames_since_last, addr, *value, num);
size_t lb = sr->log.size;
int lq = (num - 1) <= 3 ? (num - 1) : 3;
StateRecorder_RecordCmd(sr, 0xc0 | (addr & 0x10000 ? 2 : 0) | lq << 2);
@@ -141,9 +141,9 @@ void StateRecorder_RecordPatchByte(StateRecorder *sr, uint32 addr, const uint8 *
ByteArray_AppendByte(&sr->log, addr);
for (int i = 0; i < num; i++)
ByteArray_AppendByte(&sr->log, value[i]);
while (lb < sr->log.size)
printf("%.2x ", sr->log.data[lb++]);
printf("\n");
// while (lb < sr->log.size)
// printf("%.2x ", sr->log.data[lb++]);
// printf("\n");
}
void ReadFromFile(FILE *f, void *data, size_t n) {
@@ -407,7 +407,8 @@ bool RtlRunFrame(int inputs) {
inputs = state_recorder.last_inputs;
} else {
if (bug_fix_counter != kCurrentBugFixCounter) {
printf("bug_fix_counter %d => %d\n", bug_fix_counter, kCurrentBugFixCounter);
if (g_debug_flag)
printf("bug_fix_counter %d => %d\n", bug_fix_counter, kCurrentBugFixCounter);
if (bug_fix_counter < kCurrentBugFixCounter) {
bug_fix_counter = kCurrentBugFixCounter;
StateRecorder_RecordPatchByte(&state_recorder, (uint8 *)&bug_fix_counter - g_ram, (uint8 *)&bug_fix_counter, 2);

View File

@@ -10,6 +10,7 @@ extern int snes_frame_counter;
extern uint8 *g_sram;
extern bool g_use_my_apu_code;
#define LONGPTR(t) {(t) & 0xffff, (t) >> 16}
extern bool g_debug_flag;
typedef void HandlerFunc(void);
typedef uint8 Func_V_A(void);

View File

@@ -94,7 +94,6 @@ bool snes_loadRom(Snes* snes, const uint8_t* data, int length) {
test *= 2;
}
// load it
printf("Loaded %s rom\n\"%s\"\n", headers[used].cartType == 2 ? "HiROM" : "LoROM", headers[used].name);
cart_load(
snes->cart, headers[used].cartType,
newData, newLength, headers[used].chips > 0 ? headers[used].ramSize : 0