Remove unused variables and functions
This commit is contained in:
@@ -74,7 +74,6 @@ static void build_load_routine(codeblock_t *block, int size, int is_float)
|
||||
{
|
||||
uint32_t *branch_offset;
|
||||
uint32_t *misaligned_offset;
|
||||
int offset;
|
||||
|
||||
/*In - W0 = address
|
||||
Out - W0 = data, W1 = abrt*/
|
||||
@@ -143,7 +142,6 @@ static void build_store_routine(codeblock_t *block, int size, int is_float)
|
||||
{
|
||||
uint32_t *branch_offset;
|
||||
uint32_t *misaligned_offset;
|
||||
int offset;
|
||||
|
||||
/*In - R0 = address, R1 = data
|
||||
Out - R1 = abrt*/
|
||||
@@ -283,12 +281,6 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
@@ -270,12 +270,6 @@ static inline int imm_is_imm16(uint32_t imm_data)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
static inline int imm_is_imm12(uint32_t imm_data)
|
||||
{
|
||||
if (!(imm_data & 0xfffff000) || !(imm_data & 0xff000fff))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void codegen_allocate_new_block(codeblock_t *block);
|
||||
|
||||
|
@@ -294,12 +294,6 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
@@ -268,12 +268,7 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
|
@@ -148,8 +148,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
int max_high_id, expected_high_count, expected_low_count;
|
||||
uint8_t *r_map;
|
||||
uint8_t *n_map;
|
||||
char *data_base;
|
||||
char *cur_data;
|
||||
|
||||
effective_sectors = xdf_sectors = high_sectors = low_sectors = 0;
|
||||
|
||||
@@ -162,7 +160,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
(dev->tracks[track][side].params[3] != 19)) return(0);
|
||||
|
||||
r_map = (uint8_t *)(dev->buffer + dev->tracks[track][side].r_map_offs);
|
||||
data_base = dev->buffer + dev->tracks[track][side].data_offs;
|
||||
|
||||
if (! track) {
|
||||
if (dev->tracks[track][side].params[4] != 2) return(0);
|
||||
@@ -197,7 +194,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
|
||||
n_map = (uint8_t *) (dev->buffer + dev->tracks[track][side].n_map_offs);
|
||||
|
||||
cur_data = data_base;
|
||||
for (i = 0; i < dev->tracks[track][side].params[3]; i++) {
|
||||
effective_sectors++;
|
||||
if (!(r_map[i]) && !(n_map[i]))
|
||||
@@ -207,7 +203,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
xdf_sectors++;
|
||||
dev->xdf_ordered_pos[(int) r_map[i]][side] = i;
|
||||
}
|
||||
cur_data += (128 << ((uint32_t) n_map[i]));
|
||||
}
|
||||
|
||||
if ((effective_sectors == 3) && (xdf_sectors == 3)) {
|
||||
|
@@ -401,7 +401,10 @@ static void model_50_write(uint16_t port, uint8_t val)
|
||||
|
||||
static void model_55sx_mem_recalc(void)
|
||||
{
|
||||
int i, j, state, enabled_mem = 0;
|
||||
int i, j, state;
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
int enabled_mem = 0;
|
||||
#endif
|
||||
int base = 0, remap_size = (ps2.option[3] & 0x10) ? 384 : 256;
|
||||
int bit_mask = 0x00, max_rows = 4;
|
||||
int bank_to_rows[16] = { 4, 2, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0 };
|
||||
@@ -424,14 +427,18 @@ static void model_55sx_mem_recalc(void)
|
||||
if (ps2.memory_bank[i] & (1 << j)) {
|
||||
ps2_mca_log("Set memory at %06X-%06X to internal\n", (base * 1024), (base * 1024) + (((base > 0) ? 1024 : 640) * 1024) - 1);
|
||||
mem_set_mem_state(base * 1024, ((base > 0) ? 1024 : 640) * 1024, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
enabled_mem += 1024;
|
||||
#endif
|
||||
bit_mask |= (1 << (j + (i << 2)));
|
||||
}
|
||||
base += 1024;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
ps2_mca_log("Enabled memory: %i kB (%02X)\n", enabled_mem, bit_mask);
|
||||
#endif
|
||||
|
||||
if (ps2.option[3] & 0x10)
|
||||
{
|
||||
|
@@ -2210,8 +2210,6 @@ void
|
||||
mem_invalidate_range(uint32_t start_addr, uint32_t end_addr)
|
||||
{
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
int byte_offset;
|
||||
uint64_t byte_mask;
|
||||
page_t *p;
|
||||
|
||||
start_addr &= ~PAGE_MASK_MASK;
|
||||
|
@@ -93,12 +93,12 @@ FILE *
|
||||
rom_fopen(char *fn, char *mode)
|
||||
{
|
||||
char temp[1024];
|
||||
rom_path_t *rom_path = &rom_paths;
|
||||
rom_path_t *rom_path;
|
||||
FILE *fp = NULL;
|
||||
|
||||
if (strstr(fn, "roms/") == fn) {
|
||||
/* Relative path */
|
||||
for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
plat_append_filename(temp, rom_path->path, fn + 5);
|
||||
|
||||
if ((fp = plat_fopen(temp, mode)) != NULL) {
|
||||
@@ -118,11 +118,11 @@ int
|
||||
rom_getfile(char *fn, char *s, int size)
|
||||
{
|
||||
char temp[1024];
|
||||
rom_path_t *rom_path = &rom_paths;
|
||||
rom_path_t *rom_path;
|
||||
|
||||
if (strstr(fn, "roms/") == fn) {
|
||||
/* Relative path */
|
||||
for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
plat_append_filename(temp, rom_path->path, fn + 5);
|
||||
|
||||
if (rom_present(temp)) {
|
||||
|
@@ -446,11 +446,6 @@ bool NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_s
|
||||
uint32_t total_size = 0;
|
||||
uint32_t total_sectors = 0;
|
||||
uint32_t sector_bytes = 0;
|
||||
uint32_t root_dir_bytes = 0;
|
||||
uint32_t fat_size = 0;
|
||||
uint32_t fat1_offs = 0;
|
||||
uint32_t fat2_offs = 0;
|
||||
uint32_t zero_bytes = 0;
|
||||
uint16_t base = 0x1000;
|
||||
uint32_t pbar_max = 0;
|
||||
|
||||
@@ -466,11 +461,6 @@ bool NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_s
|
||||
if (total_sectors > ZIP_SECTORS)
|
||||
total_sectors = ZIP_250_SECTORS;
|
||||
total_size = total_sectors * sector_bytes;
|
||||
root_dir_bytes = (disk_size.root_dir_entries << 5);
|
||||
fat_size = (disk_size.spfat * sector_bytes);
|
||||
fat1_offs = sector_bytes;
|
||||
fat2_offs = fat1_offs + fat_size;
|
||||
zero_bytes = fat2_offs + fat_size + root_dir_bytes;
|
||||
|
||||
pbar_max = total_size;
|
||||
if (type == FileType::Zdi) {
|
||||
|
@@ -48,7 +48,6 @@ int xi2flides[2] = { 0, 0 };
|
||||
|
||||
static Display* disp = nullptr;
|
||||
static QThread* procThread = nullptr;
|
||||
static bool xi2childinit = false;
|
||||
static XIEventMask ximask;
|
||||
static std::atomic<bool> exitfromthread = false;
|
||||
static std::atomic<double> xi2_mouse_x = 0, xi2_mouse_y = 0, xi2_mouse_abs_x = 0, xi2_mouse_abs_y = 0;
|
||||
@@ -106,7 +105,6 @@ void xinput2_proc()
|
||||
if (XGetEventData(disp, cookie) && cookie->type == GenericEvent && cookie->extension == xi2opcode) {
|
||||
switch (cookie->evtype) {
|
||||
case XI_RawMotion: {
|
||||
static int ss = 0;
|
||||
const XIRawEvent *rawev = (const XIRawEvent*)cookie->data;
|
||||
double relative_coords[2] = { 0., 0. };
|
||||
parse_valuators(rawev->raw_values,rawev->valuators.mask,
|
||||
|
@@ -546,14 +546,8 @@ gd54xx_overlay_draw(svga_t *svga, int displine)
|
||||
int bpp = svga->bpp;
|
||||
int bytesperpix = (bpp + 7) / 8;
|
||||
uint8_t *src2 = &svga->vram[(svga->ma - (svga->hdisp * bytesperpix)) & svga->vram_display_mask];
|
||||
int w = gd54xx->overlay.r2sdz;
|
||||
int occl, ckval;
|
||||
|
||||
if (gd54xx->overlay.mode == 2)
|
||||
w *= 4;
|
||||
else
|
||||
w *= 2;
|
||||
|
||||
p = &((uint32_t *)buffer32->line[displine])[gd54xx->overlay.region1size + svga->x_add];
|
||||
src2 += gd54xx->overlay.region1size * bytesperpix;
|
||||
|
||||
|
@@ -265,7 +265,7 @@ draw_char_rom(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr)
|
||||
static void
|
||||
draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr)
|
||||
{
|
||||
unsigned ull, val, ifg, ibg, cfg;
|
||||
unsigned ull, val, ibg, cfg;
|
||||
const uint8_t *fnt;
|
||||
int i, elg, blk;
|
||||
int cw = HERCULESPLUS_CW;
|
||||
@@ -280,17 +280,13 @@ draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr)
|
||||
|
||||
/* MDA-compatible attributes */
|
||||
ibg = 0;
|
||||
ifg = 7;
|
||||
if ((attr & 0x77) == 0x70) { /* Invert */
|
||||
ifg = 0;
|
||||
ibg = 7;
|
||||
}
|
||||
if (attr & 8)
|
||||
ifg |= 8; /* High intensity FG */
|
||||
if (attr & 0x80)
|
||||
ibg |= 8; /* High intensity BG */
|
||||
if ((attr & 0x77) == 0) /* Blank */
|
||||
ifg = ibg;
|
||||
ull = ((attr & 0x07) == 1) ? 13 : 0xffff;
|
||||
if (dev->crtc[HERCULESPLUS_CRTC_XMODE] & HERCULESPLUS_XMODE_90COL)
|
||||
elg = 0;
|
||||
|
Reference in New Issue
Block a user