get rid of GP2X_BUILD checks where they are not really needed
This commit is contained in:
parent
d5e0983c10
commit
ee0a3871f9
24
common.h
24
common.h
|
@ -157,30 +157,6 @@
|
|||
|
||||
#define file_tag_type FILE *
|
||||
|
||||
// The ARM arch uses SDL, and SDL requires you to know what resolution
|
||||
// you want. Define the resolution for ARM arch builds here.
|
||||
// Placed in common.h for use with video.c and gui.c.
|
||||
|
||||
#ifndef PC_BUILD
|
||||
|
||||
#define GP2X_SCREEN_WIDTH 320
|
||||
#define GP2X_SCREEN_HEIGHT 240
|
||||
|
||||
#define GIZ_SCREEN_WIDTH 320
|
||||
#define GIZ_SCREEN_HEIGHT 240
|
||||
|
||||
#ifdef GP2X_BUILD
|
||||
#define SDL_SCREEN_WIDTH GP2X_SCREEN_WIDTH
|
||||
#define SDL_SCREEN_HEIGHT GP2X_SCREEN_HEIGHT
|
||||
|
||||
#elif defined(GIZ_BUILD)
|
||||
|
||||
#define SDL_SCREEN_WIDTH GIZ_SCREEN_WIDTH
|
||||
#define SDL_SCREEN_HEIGHT GIZ_SCREEN_HEIGHT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// These must be variables, not constants.
|
||||
|
|
15
cpu.h
15
cpu.h
|
@ -133,19 +133,20 @@ s32 translate_block_arm(u32 pc, translation_region_type translation_region,
|
|||
s32 translate_block_thumb(u32 pc, translation_region_type translation_region,
|
||||
u32 smc_enable);
|
||||
|
||||
#ifdef GP2X_BUILD
|
||||
#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5)
|
||||
#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2)
|
||||
#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2)
|
||||
#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32)
|
||||
|
||||
#else
|
||||
#ifdef PSP_BUILD
|
||||
|
||||
#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4)
|
||||
#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384)
|
||||
#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128)
|
||||
#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024)
|
||||
|
||||
#else
|
||||
|
||||
#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5)
|
||||
#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2)
|
||||
#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2)
|
||||
#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32)
|
||||
|
||||
#endif
|
||||
|
||||
extern u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE];
|
||||
|
|
|
@ -3481,11 +3481,7 @@ void flush_translation_cache_bios()
|
|||
memset(bios_rom + 0x4000, 0, 0x4000);
|
||||
}
|
||||
|
||||
#ifdef GP2X_BUILD
|
||||
#define cache_dump_prefix "/mnt/nand/"
|
||||
#else
|
||||
#define cache_dump_prefix ""
|
||||
#endif
|
||||
#define cache_dump_prefix ""
|
||||
|
||||
void dump_translation_cache()
|
||||
{
|
||||
|
|
20
gui.c
20
gui.c
|
@ -25,10 +25,6 @@
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef GP2X_BUILD
|
||||
#include "gp2x/cpuctrl.h"
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "font.h"
|
||||
|
||||
|
@ -38,7 +34,7 @@
|
|||
|
||||
#ifdef GP2X_BUILD
|
||||
|
||||
#define FILE_LIST_ROWS ((int)((SDL_SCREEN_HEIGHT - 40) / FONT_HEIGHT))
|
||||
#define FILE_LIST_ROWS 20
|
||||
#define FILE_LIST_POSITION 5
|
||||
#define DIR_LIST_POSITION 260
|
||||
|
||||
|
@ -52,23 +48,17 @@
|
|||
|
||||
#ifdef PSP_BUILD
|
||||
|
||||
#define COLOR_BG color16(2, 8, 10)
|
||||
|
||||
#define color16(red, green, blue) \
|
||||
(blue << 11) | (green << 5) | red \
|
||||
|
||||
#else
|
||||
|
||||
#define color16(red, green, blue) \
|
||||
(red << 11) | (green << 5) | blue \
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef GP2X_BUILD
|
||||
|
||||
#define COLOR_BG color16(0, 0, 0)
|
||||
|
||||
#else
|
||||
|
||||
#define COLOR_BG color16(2, 8, 10)
|
||||
#define color16(red, green, blue) \
|
||||
(red << 11) | (green << 5) | blue \
|
||||
|
||||
#endif
|
||||
|
||||
|
|
4
input.c
4
input.c
|
@ -374,7 +374,7 @@ u32 gamepad_config_map[16] =
|
|||
BUTTON_ID_MENU // Vol middle
|
||||
};
|
||||
|
||||
extern u32 gp2x_fps_debug;
|
||||
extern u32 fps_debug;
|
||||
extern u32 gpsp_gp2x_joystick_read(void);
|
||||
|
||||
gui_action_type get_gui_input()
|
||||
|
@ -577,7 +577,7 @@ u32 update_input()
|
|||
break;
|
||||
|
||||
case BUTTON_ID_FPS:
|
||||
gp2x_fps_debug ^= 1;
|
||||
fps_debug ^= 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
6
main.c
6
main.c
|
@ -41,13 +41,13 @@ debug_state current_debug_state = RUN;
|
|||
frameskip_type current_frameskip_type = auto_frameskip;
|
||||
u32 global_cycles_per_instruction = 1;
|
||||
u32 random_skip = 0;
|
||||
u32 fps_debug = 0;
|
||||
|
||||
#ifdef GP2X_BUILD
|
||||
u32 frameskip_value = 2;
|
||||
|
||||
u64 frame_count_initial_timestamp = 0;
|
||||
u64 last_frame_interval_timestamp;
|
||||
u32 gp2x_fps_debug = 0;
|
||||
|
||||
void gp2x_init(void);
|
||||
void gp2x_quit(void);
|
||||
|
@ -197,8 +197,6 @@ int main(int argc, char *argv[])
|
|||
sceKernelRegisterSubIntrHandler(PSP_VBLANK_INT, 0,
|
||||
vblank_interrupt_handler, NULL);
|
||||
sceKernelEnableSubIntr(PSP_VBLANK_INT, 0);
|
||||
#elif !defined(GP2X_BUILD)
|
||||
freopen("CON", "wb", stdout);
|
||||
#endif
|
||||
|
||||
extern char *cpu_mode_names[];
|
||||
|
@ -613,7 +611,7 @@ u32 update_gba()
|
|||
|
||||
update_gbc_sound(cpu_ticks);
|
||||
|
||||
if(gp2x_fps_debug)
|
||||
if(fps_debug)
|
||||
{
|
||||
char print_buffer[32];
|
||||
sprintf(print_buffer, "%d (%d)", fps, frames_drawn);
|
||||
|
|
10
main.h
10
main.h
|
@ -111,6 +111,10 @@ extern u32 virtual_frame_count;
|
|||
extern u32 max_frameskip;
|
||||
extern u32 num_skipped_frames;
|
||||
|
||||
#else
|
||||
|
||||
u32 file_length(u8 *dummy, FILE *fp);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -125,12 +129,6 @@ extern u32 num_skipped_frames;
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef PC_BUILD
|
||||
|
||||
u32 file_length(u8 *dummy, FILE *fp);
|
||||
|
||||
#endif
|
||||
|
||||
#define count_timer(timer_number) \
|
||||
timer[timer_number].reload = 0x10000 - value; \
|
||||
if(timer_number < 2) \
|
||||
|
|
2
memory.c
2
memory.c
|
@ -3115,9 +3115,7 @@ void bios_region_read_allow()
|
|||
|
||||
void bios_region_read_protect()
|
||||
{
|
||||
#ifdef GP2X_BUILD
|
||||
memory_map_read[0] = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
4
sound.c
4
sound.c
|
@ -25,11 +25,7 @@ u32 global_enable_audio = 1;
|
|||
direct_sound_struct direct_sound_channel[2];
|
||||
gbc_sound_struct gbc_sound_channel[4];
|
||||
|
||||
#if defined(GP2X_BUILD) || defined(TAVI_BUILD)
|
||||
u32 sound_frequency = 44100;
|
||||
#else
|
||||
u32 sound_frequency = 44100;
|
||||
#endif
|
||||
|
||||
SDL_AudioSpec sound_settings;
|
||||
SDL_mutex *sound_mutex;
|
||||
|
|
Loading…
Reference in New Issue