cfg->view_int_memory = 1;
cfg->view_sfr_memory = 1;
cfg->view_ext_memory = 1;
- cfg->bits_per_row = 16; /* 8 or 16 */
+ cfg->bytes_per_row = 16; /* 8 or 16 */
}
static int
&cfg->view_sfr_memory);
app_config_key_file_get_int(kf, "view", "ext_memory",
&cfg->view_ext_memory);
- app_config_key_file_get_int(kf, "view", "bits_per_row",
- &cfg->bits_per_row);
+ app_config_key_file_get_int(kf, "view", "bytes_per_row",
+ &cfg->bytes_per_row);
}
static char *
cfg->view_sfr_memory);
g_string_append_printf(buf, "ext_memory=%d\n",
cfg->view_ext_memory);
- g_string_append_printf(buf, "bits_per_row=%d\n",
- cfg->bits_per_row);
+ g_string_append_printf(buf, "bytes_per_row=%d\n",
+ cfg->bytes_per_row);
file_path = app_config_get_file_path();
int view_int_memory;
int view_sfr_memory;
int view_ext_memory;
- int bits_per_row; /* 8 or 16 */
+ int bytes_per_row; /* 8 or 16 */
};
int
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
- for (i = COL_DATA0; i < (COL_DATA0 + cfg->bits_per_row); i++) {
+ for (i = COL_DATA0; i < (COL_DATA0 + cfg->bytes_per_row); i++) {
char col_name[8];
/* Create new renderer for each editable cell. */
GUINT_TO_POINTER(memory_id));
/* Use two digits only if DATA_ROWS > 10 */
- if (cfg->bits_per_row < 10)
+ if (cfg->bytes_per_row < 10)
sprintf(col_name, "B%1d", i - COL_DATA0);
else
sprintf(col_name, "B%02d", i - COL_DATA0);
u_int32_t *crc;
if (memory_id == INT_MEM_ID) {
- data_rows = options.iram_size / cfg->bits_per_row;
+ data_rows = options.iram_size / cfg->bytes_per_row;
crc = crc_internal;
} else if (memory_id == EXT_MEM_ID) {
- data_rows = options.xram_size / cfg->bits_per_row;
+ data_rows = options.xram_size / cfg->bytes_per_row;
crc = crc_external;
} else {
log_fail("Invalid memory type");
GtkWidget *memlist;
int data_rows;
- COL_ASCII = cfg->bits_per_row + 1;
+ COL_ASCII = cfg->bytes_per_row + 1;
N_COLUMNS = COL_ASCII + 1;
frame = gtk_frame_new(title);
store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(memlist)));
- for (row = 0; row < data_rows; row++, Address += cfg->bits_per_row) {
+ for (row = 0; row < data_rows; row++, Address += cfg->bytes_per_row) {
int valid;
GtkTreeIter iter;
char str[4+1]; /* Maximum str len is for address column (4 digits) */
*/
buf8 = memory_getbuf(memory_id, Address);
crc_new = crc32(0L, Z_NULL, 0);
- crc_new = crc32(crc_new, buf8, cfg->bits_per_row);
+ crc_new = crc32(crc_new, buf8, cfg->bytes_per_row);
if (crc_new == crc_old[row]) {
continue;
gtk_list_store_set(store, &iter, COL_ADDRESS, str, -1);
- for (col = 0; col < cfg->bits_per_row; col++) {
+ for (col = 0; col < cfg->bytes_per_row; col++) {
u_int8_t data;
data = memory_read8(memory_id, Address + col);
}
}
-void toggle_bits_per_row(GtkWidget *widget, gpointer data)
+void toggle_bytes_per_row(GtkWidget *widget, gpointer data)
{
- int bits_per_row;
+ int bytes_per_row;
- bits_per_row = GPOINTER_TO_UINT(data);
+ bytes_per_row = GPOINTER_TO_UINT(data);
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
- log_info(" Bits per row = %d", bits_per_row);
- cfg->bits_per_row = bits_per_row;
+ log_info(" Bytes per row = %d", bytes_per_row);
+ cfg->bytes_per_row = bytes_per_row;
emugtk_restart_gui();
}
}
}
void
-view_add_bits_per_row_submenu(GtkWidget *parent)
+view_add_bytes_per_row_submenu(GtkWidget *parent)
{
GtkWidget *submenu;
GtkWidget *item;
submenu = gtk_menu_new();
- item = gtk_menu_item_new_with_label("Bits per row");
+ item = gtk_menu_item_new_with_label("Bytes per row");
item1 = gtk_radio_menu_item_new_with_label(group, "8");
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item1));
item2 = gtk_radio_menu_item_new_with_label(group, "16");
- if (cfg->bits_per_row == 8)
+ if (cfg->bytes_per_row == 8)
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item1), TRUE);
else
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item2), TRUE);
g_signal_connect(G_OBJECT(item1), "activate",
- G_CALLBACK(toggle_bits_per_row), (gpointer) 8);
+ G_CALLBACK(toggle_bytes_per_row), (gpointer) 8);
g_signal_connect(G_OBJECT(item2), "activate",
- G_CALLBACK(toggle_bits_per_row), (gpointer) 16);
+ G_CALLBACK(toggle_bytes_per_row), (gpointer) 16);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item1);
AddMenuSeparator(menu);
- /* Add bits per row submenu */
- view_add_bits_per_row_submenu(menu);
+ /* Add bytes per row submenu */
+ view_add_bytes_per_row_submenu(menu);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), menu);
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), view);