mirror of https://github.com/inolen/redream.git
avoid excessive gdrom / aica spam
track number of TA startrenders / second
This commit is contained in:
parent
3c5827a12a
commit
8419cce2b6
|
@ -101,12 +101,13 @@ static void emu_debug_menu(void *data, struct nk_context *ctx) {
|
|||
char status[128];
|
||||
|
||||
int frames = (int)prof_counter_load(COUNTER_frames);
|
||||
int ta_renders = (int)prof_counter_load(COUNTER_ta_renders);
|
||||
int pvr_vblanks = (int)prof_counter_load(COUNTER_pvr_vblanks);
|
||||
int sh4_instrs = (int)(prof_counter_load(COUNTER_sh4_instrs) / 1000000.0f);
|
||||
int arm7_instrs = (int)(prof_counter_load(COUNTER_arm7_instrs) / 1000000.0f);
|
||||
|
||||
snprintf(status, sizeof(status), "%3d FPS %3d VBS %4d SH4 %d ARM", frames,
|
||||
pvr_vblanks, sh4_instrs, arm7_instrs);
|
||||
snprintf(status, sizeof(status), "%3d FPS %3d RPS %3d VBS %4d SH4 %d ARM",
|
||||
frames, ta_renders, pvr_vblanks, sh4_instrs, arm7_instrs);
|
||||
win_set_status(emu->window, status);
|
||||
|
||||
/* add drop down menus */
|
||||
|
|
|
@ -14,9 +14,14 @@
|
|||
#include "ui/nuklear.h"
|
||||
|
||||
DEFINE_OPTION_INT(rtc, 0, OPTION_HIDDEN);
|
||||
|
||||
DEFINE_AGGREGATE_COUNTER(aica_samples);
|
||||
|
||||
#if 0
|
||||
#define LOG_AICA LOG_INFO
|
||||
#else
|
||||
#define LOG_AICA(...)
|
||||
#endif
|
||||
|
||||
#define AICA_SAMPLE_FREQ 44100
|
||||
#define AICA_SAMPLE_BATCH 10
|
||||
#define AICA_NUM_CHANNELS 64
|
||||
|
@ -273,7 +278,7 @@ static void aica_channel_stop(struct aica *aica, struct aica_channel *ch) {
|
|||
|
||||
ch->active = 0;
|
||||
|
||||
LOG_INFO("aica_channel_stop %d", ch - aica->channels);
|
||||
LOG_AICA("aica_channel_stop %d", ch - aica->channels);
|
||||
}
|
||||
|
||||
static void aica_channel_start(struct aica *aica, struct aica_channel *ch) {
|
||||
|
@ -287,7 +292,7 @@ static void aica_channel_start(struct aica *aica, struct aica_channel *ch) {
|
|||
ch->step = aica_channel_step(ch);
|
||||
ch->offset = 0;
|
||||
|
||||
LOG_INFO("aica_channel_start %d", ch - aica->channels);
|
||||
LOG_AICA("aica_channel_start %d", ch - aica->channels);
|
||||
}
|
||||
|
||||
static void aica_channel_update_key_state(struct aica *aica,
|
||||
|
@ -355,7 +360,7 @@ static int32_t aica_channel_update(struct aica *aica, struct aica_channel *ch) {
|
|||
if (pos > ch->data->LEA) {
|
||||
if (ch->data->LPCTL) {
|
||||
/* restart channel at LSA */
|
||||
LOG_INFO("aica_channel_step %d restart", ch - aica->channels);
|
||||
LOG_AICA("aica_channel_step %d restart", ch - aica->channels);
|
||||
ch->offset = ch->data->LSA << AICA_FNS_BITS;
|
||||
ch->looped = 1;
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
#include "hw/gdrom/gdrom_types.h"
|
||||
#include "hw/holly/holly.h"
|
||||
|
||||
#if 0
|
||||
#define LOG_GDROM LOG_INFO
|
||||
#else
|
||||
#define LOG_GDROM(...)
|
||||
#endif
|
||||
|
||||
#define SWAP_24(fad) \
|
||||
(((fad & 0xff) << 16) | (fad & 0x00ff00) | ((fad & 0xff0000) >> 16))
|
||||
|
||||
|
@ -167,7 +173,7 @@ static void gdrom_get_subcode(struct gdrom *gd, int format, uint8_t *data) {
|
|||
}
|
||||
|
||||
static void gdrom_ata_cmd(struct gdrom *gd, enum gd_ata_cmd cmd) {
|
||||
LOG_INFO("gdrom_ata_cmd 0x%x", cmd);
|
||||
LOG_GDROM("gdrom_ata_cmd 0x%x", cmd);
|
||||
|
||||
gd->status.DRDY = 0;
|
||||
gd->status.BSY = 1;
|
||||
|
@ -213,7 +219,7 @@ static void gdrom_ata_cmd(struct gdrom *gd, enum gd_ata_cmd cmd) {
|
|||
static void gdrom_spi_cmd(struct gdrom *gd, uint8_t *data) {
|
||||
enum gd_spi_cmd cmd = (enum gd_spi_cmd)data[0];
|
||||
|
||||
LOG_INFO("gdrom_spi_cmd 0x%x", cmd);
|
||||
LOG_GDROM("gdrom_spi_cmd 0x%x", cmd);
|
||||
|
||||
gd->status.DRQ = 0;
|
||||
gd->status.BSY = 1;
|
||||
|
@ -334,7 +340,7 @@ static int gdrom_read_sectors(struct gdrom *gd, int fad, enum gd_secfmt fmt,
|
|||
int total = 0;
|
||||
char data[SECTOR_SIZE];
|
||||
|
||||
LOG_INFO("gdrom_read_sectors [%d, %d)", fad, fad + num_sectors);
|
||||
LOG_GDROM("gdrom_read_sectors [%d, %d)", fad, fad + num_sectors);
|
||||
|
||||
for (int i = 0; i < num_sectors; i++) {
|
||||
int r = disc_read_sector(gd->disc, fad, data);
|
||||
|
@ -517,8 +523,8 @@ static void gdrom_event(struct gdrom *gd, enum gd_event ev, intptr_t arg0,
|
|||
} break;
|
||||
}
|
||||
|
||||
LOG_INFO("gdrom_event %d, old_state %d, new_state %d", ev, old_state,
|
||||
gd->state);
|
||||
LOG_GDROM("gdrom_event %d, old_state %d, new_state %d", ev, old_state,
|
||||
gd->state);
|
||||
}
|
||||
|
||||
static int gdrom_init(struct device *dev) {
|
||||
|
@ -588,7 +594,7 @@ REG_R32(holly_cb, GD_ALTSTAT_DEVCTRL) {
|
|||
}
|
||||
|
||||
REG_W32(holly_cb, GD_ALTSTAT_DEVCTRL) {
|
||||
/* LOG_INFO("GD_DEVCTRL 0x%x", (uint32_t)value); */
|
||||
LOG_GDROM("GD_DEVCTRL 0x%x", (uint32_t)value);
|
||||
}
|
||||
|
||||
REG_R32(holly_cb, GD_DATA) {
|
||||
|
@ -614,7 +620,7 @@ REG_W32(holly_cb, GD_DATA) {
|
|||
}
|
||||
|
||||
REG_R32(holly_cb, GD_ERROR_FEATURES) {
|
||||
/* LOG_INFO("GD_ERROR"); */
|
||||
LOG_GDROM("GD_ERROR");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "hw/pvr/ta.h"
|
||||
#include "core/list.h"
|
||||
#include "core/profiler.h"
|
||||
#include "core/string.h"
|
||||
#include "hw/holly/holly.h"
|
||||
#include "hw/pvr/pixel_convert.h"
|
||||
|
@ -15,6 +14,7 @@
|
|||
#include "ui/nuklear.h"
|
||||
|
||||
DEFINE_AGGREGATE_COUNTER(ta_data);
|
||||
DEFINE_AGGREGATE_COUNTER(ta_renders);
|
||||
|
||||
#define TA_MAX_CONTEXTS 8
|
||||
#define TA_YUV420_MACROBLOCK_SIZE 384
|
||||
|
@ -683,6 +683,8 @@ static void ta_render_timer(void *data) {
|
|||
}
|
||||
|
||||
static void ta_start_render(struct ta *ta, struct tile_ctx *ctx) {
|
||||
prof_counter_add(COUNTER_ta_renders, 1);
|
||||
|
||||
mutex_lock(ta->pending_mutex);
|
||||
|
||||
/* remove context from pool */
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef TILE_ACCELERATOR_H
|
||||
#define TILE_ACCELERATOR_H
|
||||
#ifndef TA_H
|
||||
#define TA_H
|
||||
|
||||
#include "core/profiler.h"
|
||||
#include "hw/memory.h"
|
||||
#include "hw/pvr/ta_types.h"
|
||||
|
||||
|
@ -97,6 +98,8 @@ struct ta;
|
|||
|
||||
void ta_build_tables();
|
||||
|
||||
DECLARE_COUNTER(ta_renders);
|
||||
|
||||
AM_DECLARE(ta_fifo_map);
|
||||
|
||||
struct ta *ta_create(struct dreamcast *dc);
|
||||
|
|
Loading…
Reference in New Issue